[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 4/9] MSI-X state save/load invocations moved to P
From: |
Dmitry Fleytman |
Subject: |
[Qemu-devel] [PATCH v4 4/9] MSI-X state save/load invocations moved to PCI Device save/load callbacks to avoid code duplication in MSI-X-enabled devices that support live migration |
Date: |
Thu, 15 Mar 2012 23:09:03 +0200 |
Signed-off-by: Dmitry Fleytman <address@hidden>
Signed-off-by: Yan Vugenfirer <address@hidden>
---
hw/pci.c | 5 +++++
hw/virtio-pci.c | 2 --
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/hw/pci.c b/hw/pci.c
index bf046bf..9146d3f 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -31,6 +31,7 @@
#include "loader.h"
#include "range.h"
#include "qmp-commands.h"
+#include "msix.h"
//#define DEBUG_PCI
#ifdef DEBUG_PCI
@@ -387,6 +388,8 @@ static int get_pci_irq_state(QEMUFile *f, void *pv, size_t
size)
pci_set_irq_state(s, i, irq_state[i]);
}
+ msix_load(s, f);
+
return 0;
}
@@ -398,6 +401,8 @@ static void put_pci_irq_state(QEMUFile *f, void *pv, size_t
size)
for (i = 0; i < PCI_NUM_PINS; ++i) {
qemu_put_be32(f, pci_irq_state(s, i));
}
+
+ msix_save(s, f);
}
static VMStateInfo vmstate_info_pci_irq_state = {
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index a0fb7c1..2f3cb1f 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -110,7 +110,6 @@ static void virtio_pci_save_config(void * opaque, QEMUFile
*f)
{
VirtIOPCIProxy *proxy = opaque;
pci_device_save(&proxy->pci_dev, f);
- msix_save(&proxy->pci_dev, f);
if (msix_present(&proxy->pci_dev))
qemu_put_be16(f, proxy->vdev->config_vector);
}
@@ -130,7 +129,6 @@ static int virtio_pci_load_config(void * opaque, QEMUFile
*f)
if (ret) {
return ret;
}
- msix_load(&proxy->pci_dev, f);
if (msix_present(&proxy->pci_dev)) {
qemu_get_be16s(f, &proxy->vdev->config_vector);
} else {
--
1.7.7.6
- [Qemu-devel] [PATCH v4 0/9] VMXNET3 paravirtual NIC device implementation, Dmitry Fleytman, 2012/03/15
- [Qemu-devel] [PATCH v4 3/9] Adding utility function iov_net_csum_add() for iovec checksum calculation, Dmitry Fleytman, 2012/03/15
- [Qemu-devel] [PATCH v4 1/9] Adding missing flag VIRTIO_NET_HDR_F_DATA_VALID from Linux kernel source tre Reformatting comments according to checkpatch.pl requirements, Dmitry Fleytman, 2012/03/15
- [Qemu-devel] [PATCH v4 7/9] Packet abstraction used by VMWARE network devices, Dmitry Fleytman, 2012/03/15
- [Qemu-devel] [PATCH v4 4/9] MSI-X state save/load invocations moved to PCI Device save/load callbacks to avoid code duplication in MSI-X-enabled devices that support live migration,
Dmitry Fleytman <=
- [Qemu-devel] [PATCH v4 2/9] Adding utility function net_checksum_add_cont() that allows checksum calculation of scattered data with odd chunk sizes, Dmitry Fleytman, 2012/03/15
- [Qemu-devel] [PATCH v4 5/9] Header with various utility functions shared by VMWARE SCSI and network devi, Dmitry Fleytman, 2012/03/15
- [Qemu-devel] [PATCH v4 6/9] Various utility functions used by VMWARE network devices, Dmitry Fleytman, 2012/03/15
- [Qemu-devel] [PATCH v4 8/9] VMXNET3 paravirtual device implementation, Dmitry Fleytman, 2012/03/15
- [Qemu-devel] [PATCH v4 9/9] VMXNET3 paravirtualized device integration. Interface type "vmxnet3" added., Dmitry Fleytman, 2012/03/15
- Re: [Qemu-devel] [PATCH v4 0/9] VMXNET3 paravirtual NIC device implementation, Gerhard Wiesinger, 2012/03/18