qemu/hw/core
Ankit Agrawal 0a5b5acdf2 hw/acpi: Implement the SRAT GI affinity structure
ACPI spec provides a scheme to associate "Generic Initiators" [1]
(e.g. heterogeneous processors and accelerators, GPUs, and I/O devices with
integrated compute or DMA engines GPUs) with Proximity Domains. This is
achieved using Generic Initiator Affinity Structure in SRAT. During bootup,
Linux kernel parse the ACPI SRAT to determine the PXM ids and create a NUMA
node for each unique PXM ID encountered. Qemu currently do not implement
these structures while building SRAT.

Add GI structures while building VM ACPI SRAT. The association between
device and node are stored using acpi-generic-initiator object. Lookup
presence of all such objects and use them to build these structures.

The structure needs a PCI device handle [2] that consists of the device BDF.
The vfio-pci device corresponding to the acpi-generic-initiator object is
located to determine the BDF.

[1] ACPI Spec 6.3, Section 5.2.16.6
[2] ACPI Spec 6.3, Table 5.80

Cc: Jonathan Cameron <qemu-devel@nongnu.org>
Cc: Alex Williamson <alex.williamson@redhat.com>
Cc: Cedric Le Goater <clg@redhat.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Ankit Agrawal <ankita@nvidia.com>
Message-Id: <20240308145525.10886-3-ankita@nvidia.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2024-03-12 17:56:55 -04:00
..
bus.c hw/core: Remove transitional infrastructure from BusClass 2024-02-02 13:51:57 +00:00
clock-vmstate.c hw/core: Constify VMState 2023-12-29 11:17:30 +11:00
clock.c misc: fix commonly doubled up words 2022-08-01 11:58:02 +02:00
cpu-common.c plugins: create CPUPluginState and migrate plugin_mask 2024-02-28 09:11:42 +00:00
cpu-sysemu.c memory: follow Error API guidelines 2023-10-19 23:13:27 +02:00
fw-path-provider.c
generic-loader.c hw/other: spelling fixes 2023-09-21 11:31:16 +03:00
gpio.c hw/qdev: Rename qdev_connect_gpio_out*() 'input_pin' parameter 2021-12-31 13:21:36 +01:00
guest-loader.c Mark remaining global TypeInfo instances as const 2022-02-21 13:30:20 +00:00
guest-loader.h hw/core: implement a guest-loader to support static hypervisor guests 2021-03-10 15:34:11 +00:00
hotplug-stubs.c hw/core: Restrict hotplug to system emulation 2021-11-01 19:44:11 +01:00
hotplug.c
irq.c hw/irq: Declare QOM macros using OBJECT_DECLARE_SIMPLE_TYPE() 2023-02-27 13:27:05 +00:00
Kconfig hw/core: Only build guest-loader if libfdt is available 2021-03-17 07:17:46 +00:00
loader-fit.c
loader.c accel/tcg: Move perf and debuginfo support to tcg/ 2024-01-29 21:04:10 +10:00
machine-hmp-cmds.c qapi: Add query-memory-devices support to hv-balloon 2023-11-06 14:08:10 +01:00
machine-qmp-cmds.c hw/core: Move machine-qmp-cmds.c into the target independent source set 2023-05-16 09:14:18 +02:00
machine-smp.c hw/core/machine-smp: Calculate total CPUs once in machine_parse_smp_config() 2024-03-09 19:17:01 +01:00
machine.c hw/core/machine: Use qemu_register_resettable for sysbus reset 2024-02-27 13:01:42 +00:00
meson.build hw/core: Add ResetContainer which holds objects implementing Resettable 2024-02-27 13:01:42 +00:00
nmi.c hw/core: Improve error message when machine doesn't provide NMIs 2023-02-23 14:10:17 +01:00
null-machine.c Do not include sysemu/sysemu.h if it's not really necessary 2021-05-02 17:24:50 +02:00
numa.c hw/acpi: Implement the SRAT GI affinity structure 2024-03-12 17:56:55 -04:00
or-irq.c hw/core: Constify VMState 2023-12-29 11:17:30 +11:00
platform-bus.c
ptimer.c hw/core: Constify VMState 2023-12-29 11:17:30 +11:00
qdev-clock.c Drop more useless casts from void * to pointer 2022-12-14 16:19:35 +01:00
qdev-fw.c
qdev-hotplug.c hw/core: Extract hotplug-related functions to qdev-hotplug.c 2021-11-01 19:44:11 +01:00
qdev-prop-internal.h
qdev-properties-system.c pcie: Support PCIe Gen5/Gen6 link speeds 2024-03-12 17:56:55 -04:00
qdev-properties.c qdev-properties: alias all object class properties 2023-12-21 22:49:28 +01:00
qdev.c hw/core/qdev.c: add qdev_get_human_name() 2024-01-30 16:19:00 -05:00
register.c hw/core/register: Add more 64-bit utilities 2021-09-01 11:59:12 +10:00
reset.c hw/core/reset: Implement qemu_register_reset via qemu_register_resettable 2024-02-27 13:01:42 +00:00
resetcontainer.c hw/core: Add ResetContainer which holds objects implementing Resettable 2024-02-27 13:01:42 +00:00
resettable.c hw/core/resettable: fix reset level counting 2022-10-27 10:27:23 +01:00
split-irq.c
stream.c
sysbus-fdt.c hw/core: Tidy up unnecessary casting away of const 2022-10-22 22:50:27 +02:00
sysbus.c hw/sysbus: Remove now unused sysbus_address_space() 2024-02-26 18:40:21 +01:00
trace-events trace-events: remove the remaining vcpu trace events 2023-06-01 11:05:05 -04:00
trace.h
uboot_image.h hw/core: Sync uboot_image.h from U-Boot v2022.01 2022-05-24 10:38:50 +10:00
vm-change-state-handler.c qdev: Add qdev_add_vm_change_state_handler_full() 2023-09-11 08:34:05 +02:00
vmstate-if.c