aboutsummaryrefslogtreecommitdiff
path: root/hw/i386/acpi-build.c
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2022-06-08 15:54:39 +0100
committerMichael S. Tsirkin <mst@redhat.com>2022-06-09 19:32:49 -0400
commit1ebf9001fb2701e3c00b401334c8f3900a46adaa (patch)
tree1b866f90c9de4da6a76644a826ae8c9446460ee4 /hw/i386/acpi-build.c
parent3546b0529a5799d1a13397fa3586711b3da52190 (diff)
downloadqemu-1ebf9001fb2701e3c00b401334c8f3900a46adaa.zip
qemu-1ebf9001fb2701e3c00b401334c8f3900a46adaa.tar.gz
qemu-1ebf9001fb2701e3c00b401334c8f3900a46adaa.tar.bz2
hw/cxl: Move the CXLState from MachineState to machine type specific state.
This removes the last of the CXL code from the MachineState where it is visible to all Machines to only those that support CXL (currently i386/pc) As i386/pc always support CXL now, stop allocating the state independently. Note the pxb register hookup code runs even if cxl=off in order to detect pxb_cxl host bridges and fail to start if any are present as they won't have the control registers available. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Ben Widawsky <ben@bwidawsk.net> Message-Id: <20220608145440.26106-8-Jonathan.Cameron@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386/acpi-build.c')
-rw-r--r--hw/i386/acpi-build.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 663c34b..73d0bf5 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1631,7 +1631,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
/* Handle the ranges for the PXB expanders */
if (pci_bus_is_cxl(bus)) {
- MemoryRegion *mr = &machine->cxl_devices_state->host_mr;
+ MemoryRegion *mr = &pcms->cxl_devices_state.host_mr;
uint64_t base = mr->addr;
cxl_present = true;
@@ -2614,9 +2614,9 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine)
machine->nvdimms_state, machine->ram_slots,
x86ms->oem_id, x86ms->oem_table_id);
}
- if (machine->cxl_devices_state->is_enabled) {
+ if (pcms->cxl_devices_state.is_enabled) {
cxl_build_cedt(table_offsets, tables_blob, tables->linker,
- x86ms->oem_id, x86ms->oem_table_id, machine->cxl_devices_state);
+ x86ms->oem_id, x86ms->oem_table_id, &pcms->cxl_devices_state);
}
acpi_add_table(table_offsets, tables_blob);