acpi currently clears up/down registers on each hotplug request. This loses events if they are done quickly. It's easy to clear down on ej write. To detect that guest was notified of device addition, we track configuration accesses since system reset.
Michael S. Tsirkin (2): pci: track function accesses acpi: don't clear up/down on each host change hw/acpi_piix4.c | 32 +++++++++++++++++++++++++++----- hw/pci.c | 26 ++++++++++++++++++++++++++ hw/pci.h | 3 +++ hw/pci_host.c | 2 ++ 4 files changed, 58 insertions(+), 5 deletions(-) -- 1.7.9.111.gf3fb0