diff options
author | Igor Mammedov <imammedo@redhat.com> | 2021-03-15 14:01:01 -0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2021-03-22 18:58:19 -0400 |
commit | b7f23f62e40bb7bc87fe170471a31ab1fb8a0784 (patch) | |
tree | 9f81ee3135a6872fa31f5eeae1ba47d0f637cc7f /include/hw/acpi | |
parent | 910e4069710d854757c8fe8921dcff5b62dcd960 (diff) | |
download | qemu-b7f23f62e40bb7bc87fe170471a31ab1fb8a0784.zip qemu-b7f23f62e40bb7bc87fe170471a31ab1fb8a0784.tar.gz qemu-b7f23f62e40bb7bc87fe170471a31ab1fb8a0784.tar.bz2 |
pci: acpi: add _DSM method to PCI devices
Implement _DSM according to:
PCI Firmware Specification 3.1
4.6.7. DSM for Naming a PCI or PCI Express Device Under
Operating Systems
and wire it up to cold and hot-plugged PCI devices.
Feature depends on ACPI hotplug being enabled (as that provides
PCI devices descriptions in ACPI and MMIO registers that are
reused to fetch acpi-index).
acpi-index should work for
- cold plugged NICs:
$QEMU -device e1000,acpi-index=100
=> 'eno100'
- hot-plugged
(monitor) device_add e1000,acpi-index=200,id=remove_me
=> 'eno200'
- re-plugged
(monitor) device_del remove_me
(monitor) device_add e1000,acpi-index=1
=> 'eno1'
Windows also sees index under "PCI Label Id" field in properties
dialog but otherwise it doesn't seem to have any effect.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20210315180102.3008391-6-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/acpi')
-rw-r--r-- | include/hw/acpi/pci.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h index e514f17..b5deee0 100644 --- a/include/hw/acpi/pci.h +++ b/include/hw/acpi/pci.h @@ -35,4 +35,5 @@ typedef struct AcpiMcfgInfo { void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info, const char *oem_id, const char *oem_table_id); +Aml *aml_pci_device_dsm(void); #endif |