Message ID | 20240327161642.33574-1-philmd@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | [PATCH-for-9.0] hw/i386/pc: Restrict CXL to PCI-based machines | expand |
On Wed, 27 Mar 2024 17:16:42 +0100 Philippe Mathieu-Daudé <philmd@linaro.org> wrote: > CXL is based on PCIe. In is pointless to initialize > its context on non-PCI machines. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Seems a reasonable restriction. Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Jonathan > --- > hw/i386/pc.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > index e80f02bef4..5c21b0c4db 100644 > --- a/hw/i386/pc.c > +++ b/hw/i386/pc.c > @@ -1738,7 +1738,9 @@ static void pc_machine_initfn(Object *obj) > pcms->pcspk = isa_new(TYPE_PC_SPEAKER); > object_property_add_alias(OBJECT(pcms), "pcspk-audiodev", > OBJECT(pcms->pcspk), "audiodev"); > - cxl_machine_init(obj, &pcms->cxl_devices_state); > + if (pcmc->pci_enabled) { > + cxl_machine_init(obj, &pcms->cxl_devices_state); > + } > > pcms->machine_done.notify = pc_machine_done; > qemu_add_machine_init_done_notifier(&pcms->machine_done);
diff --git a/hw/i386/pc.c b/hw/i386/pc.c index e80f02bef4..5c21b0c4db 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1738,7 +1738,9 @@ static void pc_machine_initfn(Object *obj) pcms->pcspk = isa_new(TYPE_PC_SPEAKER); object_property_add_alias(OBJECT(pcms), "pcspk-audiodev", OBJECT(pcms->pcspk), "audiodev"); - cxl_machine_init(obj, &pcms->cxl_devices_state); + if (pcmc->pci_enabled) { + cxl_machine_init(obj, &pcms->cxl_devices_state); + } pcms->machine_done.notify = pc_machine_done; qemu_add_machine_init_done_notifier(&pcms->machine_done);
CXL is based on PCIe. In is pointless to initialize its context on non-PCI machines. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/i386/pc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)