aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2010-05-09 19:15:16 +0300
committerDoug Goldstein <cardoe@gentoo.org>2010-07-20 17:27:56 -0500
commit4b063765107ff88ff996c86d6e4ea868df58fec2 (patch)
tree9f794f6d43924b249fe810b4d3b7418a0f48c399
parentMerge commit 'v0.12.4' into stable-0.12 (diff)
downloadqemu-kvm-4b063765107ff88ff996c86d6e4ea868df58fec2.tar.gz
qemu-kvm-4b063765107ff88ff996c86d6e4ea868df58fec2.tar.bz2
qemu-kvm-4b063765107ff88ff996c86d6e4ea868df58fec2.zip
pci: irq_state vmstate breakage
Code for saving irq_state got vm_state macros wrong, passing in the wrong parameter. As a result, we both saved a wrong value and restored it to a wrong offset. This leads to device and bus irq counts getting out of sync, which in turn leads to interrupts getting lost or never cleared, such as https://bugzilla.redhat.com/show_bug.cgi?id=588133 Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> (cherry picked from commit c3f8f61157625d0bb5bfc135047573de48fdc675)
-rw-r--r--hw/pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/pci.c b/hw/pci.c
index 861d42784..18a7911d3 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -320,7 +320,7 @@ static VMStateInfo vmstate_info_pci_config = {
static int get_pci_irq_state(QEMUFile *f, void *pv, size_t size)
{
- PCIDevice *s = container_of(pv, PCIDevice, config);
+ PCIDevice *s = container_of(pv, PCIDevice, irq_state);
uint32_t irq_state[PCI_NUM_PINS];
int i;
for (i = 0; i < PCI_NUM_PINS; ++i) {
@@ -342,7 +342,7 @@ static int get_pci_irq_state(QEMUFile *f, void *pv, size_t size)
static void put_pci_irq_state(QEMUFile *f, void *pv, size_t size)
{
int i;
- PCIDevice *s = container_of(pv, PCIDevice, config);
+ PCIDevice *s = container_of(pv, PCIDevice, irq_state);
for (i = 0; i < PCI_NUM_PINS; ++i) {
qemu_put_be32(f, pci_irq_state(s, i));