]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/arm/virt: Basic CXL enablement on pci_expander_bridge instances pxb-cxl
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 3 Jul 2025 10:41:08 +0000 (11:41 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 8 Jul 2025 19:27:09 +0000 (20:27 +0100)
commit9d8ade51a20d15f3be70c821c274b081ba65cea8
tree527f728890f742b14f865fda51abbadab79757f0
parent584f722eb3ab4896ce9e3913c49f4f22e8b51f2b
hw/arm/virt: Basic CXL enablement on pci_expander_bridge instances pxb-cxl

Code based on i386/pc enablement.
The memory layout places space for 16 host bridge register regions after
the GIC_REDIST2 in the extended memmap. This is a hole in the current
map so adding them here has no impact on placement of other memory regions
(tested with enough CPUs for GIC_REDIST2 to be in use.)
The high memory map is GiB aligned so the hole is there whatever the
size of memory or device_memory below this point.

The CFMWs are placed above the extended memmap. Note the existing
variable highest_gpa is the highest GPA that has been allocated at
a particular point in setting up the memory map. Whilst this caused
some confusion in review there are existing comments explaining this
so nothing is added.

The cxl_devices_state.host_mr provides a small space in which to place
the individual host bridge register regions for whatever host bridges are
allocated via -device pxb-cxl on the command line. The existing dynamic
sysbus infrastructure is not reused because pxb-cxl is a PCI device not
a sysbus one but these registers are directly in the main memory map,
not the PCI address space.

Only create the CEDT table if cxl=on set for the machine. Default to off.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Tested-by: Itaru Kitayama <itaru.kitayama@fujitsu.com>
Tested-by: Li Zhijian <lizhijian@fujitsu.com>
Message-id: 20250703104110.992379-4-Jonathan.Cameron@huawei.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
docs/system/arm/virt.rst
hw/arm/virt-acpi-build.c
hw/arm/virt.c
include/hw/arm/virt.h