Re: [BUG] hw/i386/pc.c: CXL Fixed Memory Window should not reserve e820 in bios

2022-11-11 Thread Michael S. Tsirkin
On Fri, Nov 11, 2022 at 02:36:02PM +0100, Gerd Hoffmann wrote: > > if (pcmc->has_reserved_memory && machine->device_memory->base) { > > > > [...] > > > > if (pcms->cxl_devices_state.is_enabled) {

Re: [BUG] hw/i386/pc.c: CXL Fixed Memory Window should not reserve e820 in bios

2022-11-11 Thread Gerd Hoffmann
> if (pcmc->has_reserved_memory && machine->device_memory->base) { > > [...] > > if (pcms->cxl_devices_state.is_enabled) { > > res_mem_end = cxl_resv_end; > > that s

Re: [BUG] hw/i386/pc.c: CXL Fixed Memory Window should not reserve e820 in bios

2022-11-11 Thread Igor Mammedov
On Fri, 11 Nov 2022 12:40:59 +0100 Gerd Hoffmann wrote: > On Fri, Nov 11, 2022 at 11:51:23AM +0100, Igor Mammedov wrote: > > On Tue, 8 Nov 2022 12:21:11 +0100 > > Gerd Hoffmann wrote: > > > > > > >> > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > > > > >> > index 566accf7e6..5bf5465a21 100644 >

Re: [BUG] hw/i386/pc.c: CXL Fixed Memory Window should not reserve e820 in bios

2022-11-11 Thread Gerd Hoffmann
On Fri, Nov 11, 2022 at 11:51:23AM +0100, Igor Mammedov wrote: > On Tue, 8 Nov 2022 12:21:11 +0100 > Gerd Hoffmann wrote: > > > > >> > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > > > >> > index 566accf7e6..5bf5465a21 100644 > > > >> > --- a/hw/i386/pc.c > > > >> > +++ b/hw/i386/pc.c > > > >> > @@

Re: [BUG] hw/i386/pc.c: CXL Fixed Memory Window should not reserve e820 in bios

2022-11-11 Thread Igor Mammedov
On Tue, 8 Nov 2022 12:21:11 +0100 Gerd Hoffmann wrote: > > >> > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > > >> > index 566accf7e6..5bf5465a21 100644 > > >> > --- a/hw/i386/pc.c > > >> > +++ b/hw/i386/pc.c > > >> > @@ -1061,7 +1061,6 @@ void pc_memory_init(PCMachineState *pcms, > > >> >

Re: [BUG] hw/i386/pc.c: CXL Fixed Memory Window should not reserve e820 in bios

2022-11-08 Thread Gerd Hoffmann
> >> > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > >> > index 566accf7e6..5bf5465a21 100644 > >> > --- a/hw/i386/pc.c > >> > +++ b/hw/i386/pc.c > >> > @@ -1061,7 +1061,6 @@ void pc_memory_init(PCMachineState *pcms, > >> > hwaddr cxl_size = MiB; > >> > > >> > cxl_base = pc_get_cxl_r

Re: [BUG] hw/i386/pc.c: CXL Fixed Memory Window should not reserve e820 in bios

2022-10-18 Thread Ani Sinha
+Gerd Hoffmann On Tue, Oct 18, 2022 at 8:16 PM Gregory Price wrote: > > This patch does not resolve the issue, reserved entries are still created. > > [0.00] BIOS-e820: [mem 0x00028000-0x0002800f] reserved > [0.00] BIOS-e820: [mem 0x00029000-0x00029

Re: [BUG] hw/i386/pc.c: CXL Fixed Memory Window should not reserve e820 in bios

2022-10-18 Thread Gregory Price
> > -e820_add_entry(cxl_base, cxl_size, E820_RESERVED); > > memory_region_init(mr, OBJECT(machine), "cxl_host_reg", cxl_size); > > memory_region_add_subregion(system_memory, cxl_base, mr); > > cxl_resv_end = cxl_base + cxl_size; > > @@ -1077,7 +1076,6 @@ void p

Re: [BUG] hw/i386/pc.c: CXL Fixed Memory Window should not reserve e820 in bios

2022-10-18 Thread Gregory Price
This patch does not resolve the issue, reserved entries are still created. [0.00] BIOS-e820: [mem 0x00028000-0x0002800f] reserved [0.00] BIOS-e820: [mem 0x00029000-0x00029fff] reserved # cat /proc/iomem 29000-29fff : CXL Window 0 29000

Re: [BUG] hw/i386/pc.c: CXL Fixed Memory Window should not reserve e820 in bios

2022-10-17 Thread Ani Sinha
On Tue, Oct 18, 2022 at 5:14 AM Gregory Price wrote: > > Early-boot e820 records will be inserted by the bios/efi/early boot > software and be reported to the kernel via insert_resource. Later, when > CXL drivers iterate through the regions again, they will insert another > resource and make the

Re: [BUG] hw/i386/pc.c: CXL Fixed Memory Window should not reserve e820 in bios

2022-10-17 Thread Gupta, Pankaj
Early-boot e820 records will be inserted by the bios/efi/early boot software and be reported to the kernel via insert_resource. Later, when CXL drivers iterate through the regions again, they will insert another resource and make the RESERVED memory area a child. This RESERVED memory area cau

[BUG] hw/i386/pc.c: CXL Fixed Memory Window should not reserve e820 in bios

2022-10-17 Thread Gregory Price
Early-boot e820 records will be inserted by the bios/efi/early boot software and be reported to the kernel via insert_resource. Later, when CXL drivers iterate through the regions again, they will insert another resource and make the RESERVED memory area a child. This RESERVED memory area causes