qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Fleytman <dmitry@daynix.com>
To: qemu-devel@nongnu.org
Cc: Yan Vugenfirer <yan@daynix.com>,
	Dmitry Fleytman <dmitry@daynix.com>,
	Chris Webb <chris.webb@elastichosts.com>,
	Richard Davies <richard.davies@elastichosts.com>
Subject: [Qemu-devel] [PATCH 2/2] Add check_rxov into VMState.
Date: Wed, 17 Oct 2012 20:31:47 +0200	[thread overview]
Message-ID: <1350498707-6749-3-git-send-email-dmitry@daynix.com> (raw)
In-Reply-To: <1350498707-6749-1-git-send-email-dmitry@daynix.com>

E1000State::check_rxov field must be preserved on live migration.

Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
---
 hw/e1000.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/hw/e1000.c b/hw/e1000.c
index 606bf3a..26ad03c 100644
--- a/hw/e1000.c
+++ b/hw/e1000.c
@@ -92,7 +92,7 @@ typedef struct E1000State_st {
 
     uint32_t rxbuf_size;
     uint32_t rxbuf_min_shift;
-    int check_rxov;
+    uint32_t check_rxov;
     struct e1000_tx {
         unsigned char header[256];
         unsigned char vlan_header[4];
@@ -1100,6 +1100,11 @@ static bool is_version_1(void *opaque, int version_id)
     return version_id == 1;
 }
 
+static bool is_version_3(void *opaque, int version_id)
+{
+    return version_id == 1;
+}
+
 static int e1000_post_load(void *opaque, int version_id)
 {
     E1000State *s = opaque;
@@ -1113,7 +1118,7 @@ static int e1000_post_load(void *opaque, int version_id)
 
 static const VMStateDescription vmstate_e1000 = {
     .name = "e1000",
-    .version_id = 2,
+    .version_id = 3,
     .minimum_version_id = 1,
     .minimum_version_id_old = 1,
     .post_load = e1000_post_load,
@@ -1123,6 +1128,7 @@ static const VMStateDescription vmstate_e1000 = {
         VMSTATE_UNUSED(4), /* Was mmio_base.  */
         VMSTATE_UINT32(rxbuf_size, E1000State),
         VMSTATE_UINT32(rxbuf_min_shift, E1000State),
+        VMSTATE_UINT32_TEST(check_rxov, E1000State, is_version_3),
         VMSTATE_UINT32(eecd_state.val_in, E1000State),
         VMSTATE_UINT16(eecd_state.bitnum_in, E1000State),
         VMSTATE_UINT16(eecd_state.bitnum_out, E1000State),
-- 
1.7.11.4

  parent reply	other threads:[~2012-10-17 18:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-17 18:31 [Qemu-devel] [PATCH 0/2] E1000 RX/Live migration bugs fixed Dmitry Fleytman
2012-10-17 18:31 ` [Qemu-devel] [PATCH 1/2] Ignore RX tail kicks when RX disabled Dmitry Fleytman
2012-10-18  7:31   ` Stefan Hajnoczi
2012-10-18  8:08     ` Dmitry Fleytman
2012-10-18  8:09   ` Stefan Hajnoczi
2012-10-18  8:34     ` Dmitry Fleytman
2012-10-18 14:31       ` Stefan Hajnoczi
2012-10-18 16:06         ` Alexander Duyck
2012-10-18 16:12           ` Dmitry Fleytman
2012-10-17 18:31 ` Dmitry Fleytman [this message]
2012-10-18  7:24   ` [Qemu-devel] [PATCH 2/2] Add check_rxov into VMState Stefan Hajnoczi
2012-10-18  8:06     ` Dmitry Fleytman
2012-10-18 14:56   ` Avi Kivity

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=1350498707-6749-3-git-send-email-dmitry@daynix.com \
    --to=dmitry@daynix.com \
    --cc=chris.webb@elastichosts.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.davies@elastichosts.com \
    --cc=yan@daynix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).