summaryrefslogtreecommitdiff
path: root/hw/pcie.h
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2010-10-25 07:46:47 +0200
committerMichael S. Tsirkin <mst@redhat.com>2010-10-27 19:01:59 +0200
commit6bde6aaac6f2af14557ef65f5eb053cb135ca173 (patch)
tree4dfc51485e7b1e40587ff9ec520a5479bb068f35 /hw/pcie.h
parentac0cdda347abee6c1aa8a08a7441fc52c6d7badc (diff)
downloadqemu-6bde6aaac6f2af14557ef65f5eb053cb135ca173.tar.gz
qemu-6bde6aaac6f2af14557ef65f5eb053cb135ca173.tar.bz2
qemu-6bde6aaac6f2af14557ef65f5eb053cb135ca173.zip
pcie: clean up hot plug notification
Simplify logic for hotplug notification, by tracking state of the logical interrupt condition. We then simply use this variable to make the interrupt decision, according to spec. API is made cleaner as we no longer force users to pass in old slot control value. Includes fixes by Isaku Yamahata. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Diffstat (limited to 'hw/pcie.h')
-rw-r--r--hw/pcie.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/hw/pcie.h b/hw/pcie.h
index 2871e27012..87085041f2 100644
--- a/hw/pcie.h
+++ b/hw/pcie.h
@@ -74,6 +74,11 @@ struct PCIExpressDevice {
* also initialize it when loaded as
* appropreately.
*/
+ bool hpev_notified; /* Logical AND of conditions for hot plug event.
+ Following 6.7.3.4:
+ Software Notification of Hot-Plug Events, an interrupt
+ is sent whenever the logical and of these conditions
+ transitions from false to true. */
};
/* PCI express capability helper functions */
@@ -89,8 +94,8 @@ void pcie_cap_deverr_reset(PCIDevice *dev);
void pcie_cap_slot_init(PCIDevice *dev, uint16_t slot);
void pcie_cap_slot_reset(PCIDevice *dev);
void pcie_cap_slot_write_config(PCIDevice *dev,
- uint32_t addr, uint32_t val, int len,
- uint16_t sltctl_prev);
+ uint32_t addr, uint32_t val, int len);
+int pcie_cap_slot_post_load(void *opaque, int version_id);
void pcie_cap_slot_push_attention_button(PCIDevice *dev);
void pcie_cap_root_init(PCIDevice *dev);