summaryrefslogtreecommitdiff
path: root/hw/net/vmxnet3.c
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2017-05-24 14:10:48 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2017-06-06 08:53:24 +1000
commit1b6e74824659ef10bd2a2924a98df388b78e175e (patch)
tree586d5444c2e168b2b5dcd54cde22242b8519db0c /hw/net/vmxnet3.c
parent199e19ee538eb61fd08b1c1ee5aa838ebdcc968e (diff)
downloadqemu-1b6e74824659ef10bd2a2924a98df388b78e175e.zip
migration: remove register_savevm()
We can replace the four remaining calls of register_savevm() by calls to register_savevm_live(). So we can remove the function and as we don't allocate anymore the ops pointer with g_new0() we don't have to free it then. Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/net/vmxnet3.c')
-rw-r--r--hw/net/vmxnet3.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index 8b1fab24fd..4df31101ec 100644
--- a/hw/net/vmxnet3.c
+++ b/hw/net/vmxnet3.c
@@ -2262,6 +2262,11 @@ static const MemoryRegionOps b1_ops = {
},
};
+static SaveVMHandlers savevm_vmxnet3_msix = {
+ .save_state = vmxnet3_msix_save,
+ .load_state = vmxnet3_msix_load,
+};
+
static uint64_t vmxnet3_device_serial_num(VMXNET3State *s)
{
uint64_t dsn_payload;
@@ -2331,8 +2336,7 @@ static void vmxnet3_pci_realize(PCIDevice *pci_dev, Error **errp)
vmxnet3_device_serial_num(s));
}
- register_savevm(dev, "vmxnet3-msix", -1, 1,
- vmxnet3_msix_save, vmxnet3_msix_load, s);
+ register_savevm_live(dev, "vmxnet3-msix", -1, 1, &savevm_vmxnet3_msix, s);
}
static void vmxnet3_instance_init(Object *obj)