Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-18 Thread Ani Sinha
On Mon, Sep 18, 2023 at 4:32 PM David Hildenbrand wrote: > > On 18.09.23 13:00, Ani Sinha wrote: > > On Mon, Sep 18, 2023 at 4:28 PM David Hildenbrand wrote: > >> > >> On 18.09.23 12:54, Ani Sinha wrote: > >>> On Mon, Sep 18, 2023 at 3:49 PM David Hildenbrand > >>> wrote: > > On 18.09

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-18 Thread David Hildenbrand
On 18.09.23 13:00, Ani Sinha wrote: On Mon, Sep 18, 2023 at 4:28 PM David Hildenbrand wrote: On 18.09.23 12:54, Ani Sinha wrote: On Mon, Sep 18, 2023 at 3:49 PM David Hildenbrand wrote: On 18.09.23 12:11, Ani Sinha wrote: Ok hopefully my last question. I am still confused on somet

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-18 Thread Ani Sinha
On Mon, Sep 18, 2023 at 4:30 PM Ani Sinha wrote: > > On Mon, Sep 18, 2023 at 4:28 PM David Hildenbrand wrote: > > > > On 18.09.23 12:54, Ani Sinha wrote: > > > On Mon, Sep 18, 2023 at 3:49 PM David Hildenbrand > > > wrote: > > >> > > >> On 18.09.23 12:11, Ani Sinha wrote: > > >> > > >>> > > >>>

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-18 Thread Ani Sinha
On Mon, Sep 18, 2023 at 4:28 PM David Hildenbrand wrote: > > On 18.09.23 12:54, Ani Sinha wrote: > > On Mon, Sep 18, 2023 at 3:49 PM David Hildenbrand wrote: > >> > >> On 18.09.23 12:11, Ani Sinha wrote: > >> > >>> > >>> Ok hopefully my last question. I am still confused on something. > >>>

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-18 Thread David Hildenbrand
On 18.09.23 12:54, Ani Sinha wrote: On Mon, Sep 18, 2023 at 3:49 PM David Hildenbrand wrote: On 18.09.23 12:11, Ani Sinha wrote: Ok hopefully my last question. I am still confused on something. Does the above mean that the hole64 will actually start from an address that is be

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-18 Thread Ani Sinha
On Mon, Sep 18, 2023 at 3:49 PM David Hildenbrand wrote: > > On 18.09.23 12:11, Ani Sinha wrote: > > > > > Ok hopefully my last question. I am still confused on something. > > Does the above mean that the hole64 will actually start from an > > address that is beyond maxram? Like basica

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-18 Thread David Hildenbrand
On 18.09.23 12:11, Ani Sinha wrote: Ok hopefully my last question. I am still confused on something. Does the above mean that the hole64 will actually start from an address that is beyond maxram? Like basically if you added all of ram_below_4G, ram_above_4G, hot plug_mem and pci

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-18 Thread Ani Sinha
On Mon, 18 Sept, 2023, 3:41 pm Ani Sinha, wrote: > > > On Mon, 18 Sept, 2023, 3:39 pm David Hildenbrand, > wrote: > >> On 18.09.23 12:07, Ani Sinha wrote: >> > >> > >> > On Mon, 18 Sept, 2023, 3:03 pm David Hildenbrand, > > > wrote: >> > >> > >> >> > /* >>

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-18 Thread Ani Sinha
On Mon, 18 Sept, 2023, 3:39 pm David Hildenbrand, wrote: > On 18.09.23 12:07, Ani Sinha wrote: > > > > > > On Mon, 18 Sept, 2023, 3:03 pm David Hildenbrand, > > wrote: > > > > >> > > /* > > * The 64bit pci hole starts after "above 4G RAM" and > >

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-18 Thread David Hildenbrand
On 18.09.23 12:07, Ani Sinha wrote: On Mon, 18 Sept, 2023, 3:03 pm David Hildenbrand, > wrote: >> /* * The 64bit pci hole starts after "above 4G RAM" and * potentially the space reserved for memory hotplug. */

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-18 Thread Ani Sinha
On Mon, 18 Sept, 2023, 3:03 pm David Hildenbrand, wrote: > >> > /* > * The 64bit pci hole starts after "above 4G RAM" and > * potentially the space reserved for memory hotplug. > */ > > There is the > ROUND_UP(hole64_start, 1 * GiB); > in there that is n

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-18 Thread David Hildenbrand
/* * The 64bit pci hole starts after "above 4G RAM" and * potentially the space reserved for memory hotplug. */ There is the ROUND_UP(hole64_start, 1 * GiB); in there that is not really required for the !hole64 case. It shouldn't matter much in practice I think (besides an aligned value

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-15 Thread Ani Sinha
> On 14-Sep-2023, at 2:07 PM, David Hildenbrand wrote: > > On 14.09.23 07:53, Ani Sinha wrote: >>> On 12-Sep-2023, at 9:04 PM, David Hildenbrand wrote: >>> >>> [...] >>> > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > index 54838c0c41..d187890675 100644 > --- a/hw/i386/pc.c > +

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-15 Thread Ani Sinha
> On 14-Sep-2023, at 5:19 PM, David Hildenbrand wrote: > > We requested a to hotplug a maximum of "8 GiB", and sized the area > slightly larger to allow for some flexibility > when it comes to placing DIMMs in that "device-memory" area. Right but here in this example you do n

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-14 Thread Ani Sinha
> On 14-Sep-2023, at 2:07 PM, David Hildenbrand wrote: > > On 14.09.23 07:53, Ani Sinha wrote: >>> On 12-Sep-2023, at 9:04 PM, David Hildenbrand wrote: >>> >>> [...] >>> > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > index 54838c0c41..d187890675 100644 > --- a/hw/i386/pc.c > +

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-14 Thread David Hildenbrand
We requested a to hotplug a maximum of "8 GiB", and sized the area slightly larger to allow for some flexibility when it comes to placing DIMMs in that "device-memory" area. Right but here in this example you do not hot plug memory while the VM is running. We can hot plug 8G yes, but the memory

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-14 Thread Ani Sinha
> On 14-Sep-2023, at 2:07 PM, David Hildenbrand wrote: > > On 14.09.23 07:53, Ani Sinha wrote: >>> On 12-Sep-2023, at 9:04 PM, David Hildenbrand wrote: >>> >>> [...] >>> > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > index 54838c0c41..d187890675 100644 > --- a/hw/i386/pc.c > +

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-14 Thread David Hildenbrand
On 14.09.23 07:53, Ani Sinha wrote: On 12-Sep-2023, at 9:04 PM, David Hildenbrand wrote: [...] diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 54838c0c41..d187890675 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -908,9 +908,12 @@ static hwaddr pc_max_used_gpa(PCMachineState *pcms, uint64

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-13 Thread Ani Sinha
> On 12-Sep-2023, at 9:04 PM, David Hildenbrand wrote: > > [...] > >>> diff --git a/hw/i386/pc.c b/hw/i386/pc.c >>> index 54838c0c41..d187890675 100644 >>> --- a/hw/i386/pc.c >>> +++ b/hw/i386/pc.c >>> @@ -908,9 +908,12 @@ static hwaddr pc_max_used_gpa(PCMachineState *pcms, >>> uint64_t pci_

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-12 Thread David Hildenbrand
[...] diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 54838c0c41..d187890675 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -908,9 +908,12 @@ static hwaddr pc_max_used_gpa(PCMachineState *pcms, uint64_t pci_hole64_size) { X86CPU *cpu = X86_CPU(first_cpu); -/* 32-bit systems don't have

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-12 Thread Ani Sinha
> On 08-Sep-2023, at 9:32 PM, David Hildenbrand wrote: > > On 08.09.23 17:13, Ani Sinha wrote: >>> On 08-Sep-2023, at 7:46 PM, David Hildenbrand wrote: >>> >>> On 08.09.23 16:12, Ani Sinha wrote: > On 08-Sep-2023, at 3:58 PM, David Hildenbrand wrote: > > On 08.09.23 11:50, Ani

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-08 Thread David Hildenbrand
On 08.09.23 18:02, David Hildenbrand wrote: On 08.09.23 17:13, Ani Sinha wrote: On 08-Sep-2023, at 7:46 PM, David Hildenbrand wrote: On 08.09.23 16:12, Ani Sinha wrote: On 08-Sep-2023, at 3:58 PM, David Hildenbrand wrote: On 08.09.23 11:50, Ani Sinha wrote: Depending on the number of av

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-08 Thread Philippe Mathieu-Daudé
On 8/9/23 17:13, Ani Sinha wrote: On 08-Sep-2023, at 7:46 PM, David Hildenbrand wrote: On 08.09.23 16:12, Ani Sinha wrote: On 08-Sep-2023, at 3:58 PM, David Hildenbrand wrote: On 08.09.23 11:50, Ani Sinha wrote: Depending on the number of available address bits of the current processor,

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-08 Thread David Hildenbrand
On 08.09.23 17:13, Ani Sinha wrote: On 08-Sep-2023, at 7:46 PM, David Hildenbrand wrote: On 08.09.23 16:12, Ani Sinha wrote: On 08-Sep-2023, at 3:58 PM, David Hildenbrand wrote: On 08.09.23 11:50, Ani Sinha wrote: Depending on the number of available address bits of the current processor

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-08 Thread Ani Sinha
> On 08-Sep-2023, at 7:46 PM, David Hildenbrand wrote: > > On 08.09.23 16:12, Ani Sinha wrote: >>> On 08-Sep-2023, at 3:58 PM, David Hildenbrand wrote: >>> >>> On 08.09.23 11:50, Ani Sinha wrote: Depending on the number of available address bits of the current processor, a VM

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-08 Thread David Hildenbrand
On 08.09.23 16:12, Ani Sinha wrote: On 08-Sep-2023, at 3:58 PM, David Hildenbrand wrote: On 08.09.23 11:50, Ani Sinha wrote: Depending on the number of available address bits of the current processor, a VM can only use a certain maximum amount of memory and no more. This change makes sure t

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-08 Thread Ani Sinha
> On 08-Sep-2023, at 3:58 PM, David Hildenbrand wrote: > > On 08.09.23 11:50, Ani Sinha wrote: >> Depending on the number of available address bits of the current processor, a >> VM can only use a certain maximum amount of memory and no more. This change >> makes sure that a VM is not configur

Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-08 Thread David Hildenbrand
On 08.09.23 11:50, Ani Sinha wrote: Depending on the number of available address bits of the current processor, a VM can only use a certain maximum amount of memory and no more. This change makes sure that a VM is not configured to have more memory than what it can use with the current processor

[PATCH] mem/x86: add processor address space check for VM memory

2023-09-08 Thread Ani Sinha
Depending on the number of available address bits of the current processor, a VM can only use a certain maximum amount of memory and no more. This change makes sure that a VM is not configured to have more memory than what it can use with the current processor settings when started. Additionally, t