hvmloader/acpi/dsdt: Fix PCI hotplug with the new qemu-xen.
authorAnthony PERARD <anthony.perard@citrix.com>
Fri, 28 Oct 2011 16:16:51 +0000 (17:16 +0100)
committerAnthony PERARD <anthony.perard@citrix.com>
Fri, 28 Oct 2011 16:16:51 +0000 (17:16 +0100)
commit6a5fb716a223b7f141e5f493132e1029d106e96f
tree262a7fd424817163978fa058b27390fdda388060
parenta14a239243f180f0f78df793bf65277b9ef26c46
hvmloader/acpi/dsdt: Fix PCI hotplug with the new qemu-xen.

The ACPI PIIX4 device in QEMU upstream as not the same behavior to
handle PCI hotplug. This patch introduce the necessary change to the
DSDT ACPI table to behave as expceted by the new QEMU.

To switch to this new DSDT table version, there is a new option
--dm-version to mk_dsdt.

Change are inspired by SeaBIOS DSDT source code.

There is few things missing with the new QEMU:
  - QEMU provide the plugged/unplugged status only per slot (and not
    per func like qemu-xen-traditionnal.
  - I did not include the _STA ACPI method that give the status of a
    device (present, functionning properly) because qemu-xen does not
    handle it.
  - I did not include the _RMV method that say if the device can be
    removed,
    because the IO port of QEMU that give this status always return
    true. In
    SeaBIOS table, they have a specific _RMV method for VGA, ISA that
    return
    false. But I'm not sure that we can do the same in Xen.

So, the only way to remove a device is from outside of the guest (like
with xl pci-detatch), and can not be initiated from inside.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
tools/firmware/hvmloader/acpi/Makefile
tools/firmware/hvmloader/acpi/mk_dsdt.c