[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 5/6] pcie/slot: fix save/load
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH 5/6] pcie/slot: fix save/load |
Date: |
Wed, 27 Oct 2010 19:21:20 +0900 |
This patch fixes save/load of pcie slot which was broken by
cd870502e228f8f028f93fb585ae3b208fcb46c7.
Signed-off-by: Isaku Yamahata <address@hidden>
---
hw/ioh3420.c | 1 +
hw/pcie.c | 7 +++++++
hw/pcie.h | 1 +
hw/xio3130_downstream.c | 1 +
4 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/hw/ioh3420.c b/hw/ioh3420.c
index 23aecbf..3cc129f 100644
--- a/hw/ioh3420.c
+++ b/hw/ioh3420.c
@@ -139,6 +139,7 @@ static const VMStateDescription vmstate_ioh3420 = {
.version_id = 1,
.minimum_version_id = 1,
.minimum_version_id_old = 1,
+ .post_load = pcie_cap_slot_post_load,
.fields = (VMStateField[]) {
VMSTATE_PCIE_DEVICE(port.br.dev, PCIESlot),
/* TODO: AER */
diff --git a/hw/pcie.c b/hw/pcie.c
index 97d17fa..23e35dc 100644
--- a/hw/pcie.c
+++ b/hw/pcie.c
@@ -343,6 +343,13 @@ void pcie_cap_slot_write_config(PCIDevice *dev,
}
}
+int pcie_cap_slot_post_load(void *opaque, int version_id)
+{
+ PCIDevice *dev = opaque;
+ hotplug_event_update_event_status(dev);
+ return 0;
+}
+
void pcie_cap_slot_push_attention_button(PCIDevice *dev)
{
pcie_cap_slot_event(dev, PCI_EXP_HP_EV_ABP);
diff --git a/hw/pcie.h b/hw/pcie.h
index 39c6e47..8708504 100644
--- a/hw/pcie.h
+++ b/hw/pcie.h
@@ -95,6 +95,7 @@ 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);
+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);
diff --git a/hw/xio3130_downstream.c b/hw/xio3130_downstream.c
index d46f911..854eba8 100644
--- a/hw/xio3130_downstream.c
+++ b/hw/xio3130_downstream.c
@@ -141,6 +141,7 @@ static const VMStateDescription vmstate_xio3130_downstream
= {
.version_id = 1,
.minimum_version_id = 1,
.minimum_version_id_old = 1,
+ .post_load = pcie_cap_slot_post_load,
.fields = (VMStateField[]) {
VMSTATE_PCIE_DEVICE(port.br.dev, PCIESlot),
/* TODO: AER */
--
1.7.1.1
- [Qemu-devel] [PATCH 0/6] pcie: fixes for pci branch, Isaku Yamahata, 2010/10/27
- [Qemu-devel] [PATCH 1/6] pcie: fix pcie_cap_slot_write_config()., Isaku Yamahata, 2010/10/27
- [Qemu-devel] [PATCH 5/6] pcie/slot: fix save/load,
Isaku Yamahata <=
- [Qemu-devel] [PATCH 2/6] pcie/slot: fix hotplug_event_notify()., Isaku Yamahata, 2010/10/27
- [Qemu-devel] [PATCH 6/6] msix: remove range checks., Isaku Yamahata, 2010/10/27
- [Qemu-devel] [PATCH 3/6] pcie/slot: clean up of hotplug_event_notify()., Isaku Yamahata, 2010/10/27
- [Qemu-devel] [PATCH 4/6] pcie/slot: factor out the logic to update hotplug event status., Isaku Yamahata, 2010/10/27
- [Qemu-devel] Re: [PATCH 0/6] pcie: fixes for pci branch, Michael S. Tsirkin, 2010/10/27