ACPI: don't call acpi_pcihp_device_plug_cb on xen
commit153eba4726dfa1bdfc31d1fe973b2a61b9035492
authorBruce Rogers <brogers@suse.com>
Thu, 27 Apr 2017 19:59:08 +0000 (27 13:59 -0600)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 10 May 2017 19:04:23 +0000 (10 22:04 +0300)
tree50db174fd2b90339f45e3734c4eafb64dc15e24b
parentef0e8fc768a561dd13a86420b3268f6f3d5d0621
ACPI: don't call acpi_pcihp_device_plug_cb on xen

Commit f0c9d64a exposed the issue that with a xenfv machine using
pci passthrough, acpi pci hotplug code was being executed by mistake.
Guard calls to acpi_pcihp_device_plug_cb (and corresponding
acpi_pcihp_device_unplug_cb) with a check for xen_enabled(). Without
this check I am seeing an error that the bus doesn't have the
acpi-pcihp-bsel property set.

Signed-off-by: Bruce Rogers <brogers@suse.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/acpi/piix4.c