E1000State::check_rxov field must be preserved on live migration. Signed-off-by: Dmitry Fleytman <dmi...@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