pcihp: make pci_read() mmio calback compatible with legacy ACPI hotplug
commit99d09dd32820f5702031e3c08c81f8c209dc2220
authorIgor Mammedov <imammedo@redhat.com>
Mon, 3 Feb 2014 10:44:59 +0000 (3 11:44 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 5 Feb 2014 14:55:49 +0000 (5 16:55 +0200)
treefdc0505a6f922b9cf8a614ad552eadc05a1f2080
parenta7b613cf68b65d04ef2b1b601bb18f31e8ca0c11
pcihp: make pci_read() mmio calback compatible with legacy ACPI hotplug

due to recent change introduced by:
"pcihp: reduce number of device check events"

'up' field is cleared right after it's read.
This is incompatible with legacy BIOS ACPI code
where PCNF ACPI method reads this field 32 times.

To make pci_read mmio callback compatible with legacy
'up' behavior, pcihp code will need to know in which
mode it runs add 'legacy_piix' field to AcpiPciHpState
structure and alter register behavior accordingly.

Signed-off-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/pcihp.c
hw/acpi/piix4.c
include/hw/acpi/pcihp.h