From: "Michael S. Tsirkin" <mst@redhat.com>
To: Dmitry Fleytman <dmitry.fleytman@ravellosystems.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
Alex Fishman <alex.fishman@ravellosystems.com>,
yvugenfi@redhat.com, Izik Eidus <izik.eidus@ravellosystems.com>,
qemu-devel@nongnu.org, Yan Vugenfirer <yan@daynix.com>,
Dmitry Fleytman <dmitry@daynix.com>
Subject: Re: [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: Fri, 16 Mar 2012 01:00:13 +0200 [thread overview]
Message-ID: <20120315230012.GA12879@redhat.com> (raw)
In-Reply-To: <1331845748-6026-5-git-send-email-dmitry.fleytman@ravellosystems.com>
On Thu, Mar 15, 2012 at 11:09:03PM +0200, Dmitry Fleytman wrote:
> Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
> Signed-off-by: Yan Vugenfirer <yan@daynix.com>
I'm working on a higher level API that will
handle all capabilities. For now, pls just put
these calls in your device.
> ---
> 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
next prev parent reply other threads:[~2012-03-15 23:18 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-15 21:08 [Qemu-devel] [PATCH v4 0/9] VMXNET3 paravirtual NIC device implementation Dmitry Fleytman
2012-03-15 21:09 ` [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 21:09 ` [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 21:09 ` [Qemu-devel] [PATCH v4 3/9] Adding utility function iov_net_csum_add() for iovec checksum calculation Dmitry Fleytman
2012-03-15 21:09 ` [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
2012-03-15 23:00 ` Michael S. Tsirkin [this message]
2012-03-16 9:18 ` Dmitry Fleytman
2012-03-15 21:09 ` [Qemu-devel] [PATCH v4 5/9] Header with various utility functions shared by VMWARE SCSI and network devi Dmitry Fleytman
2012-03-15 21:09 ` [Qemu-devel] [PATCH v4 6/9] Various utility functions used by VMWARE network devices Dmitry Fleytman
2012-03-15 21:09 ` [Qemu-devel] [PATCH v4 7/9] Packet abstraction " Dmitry Fleytman
2012-03-15 21:09 ` [Qemu-devel] [PATCH v4 8/9] VMXNET3 paravirtual device implementation Dmitry Fleytman
2012-03-15 21:09 ` [Qemu-devel] [PATCH v4 9/9] VMXNET3 paravirtualized device integration. Interface type "vmxnet3" added Dmitry Fleytman
2012-03-16 11:35 ` Paolo Bonzini
2012-03-18 9:26 ` Dmitry Fleytman
2012-03-18 8:29 ` [Qemu-devel] [PATCH v4 0/9] VMXNET3 paravirtual NIC device implementation Gerhard Wiesinger
2012-03-18 15:30 ` Dmitry Fleytman
2012-03-19 19:24 ` Gerhard Wiesinger
2012-03-20 8:00 ` Dmitry Fleytman
2012-03-21 6:59 ` Gerhard Wiesinger
2012-03-25 6:39 ` Gerhard Wiesinger
2012-03-18 8:32 ` Gerhard Wiesinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120315230012.GA12879@redhat.com \
--to=mst@redhat.com \
--cc=alex.fishman@ravellosystems.com \
--cc=aliguori@us.ibm.com \
--cc=dmitry.fleytman@ravellosystems.com \
--cc=dmitry@daynix.com \
--cc=izik.eidus@ravellosystems.com \
--cc=qemu-devel@nongnu.org \
--cc=yan@daynix.com \
--cc=yvugenfi@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.