]> git.proxmox.com Git - mirror_qemu.git/commitdiff
vmxnet3: Introduce 'x-old-msi-offsets' back-compat property
authorShmulik Ladkani <shmulik.ladkani@ravellosystems.com>
Thu, 24 Dec 2015 07:17:37 +0000 (09:17 +0200)
committerJason Wang <jasowang@redhat.com>
Mon, 11 Jan 2016 03:01:34 +0000 (11:01 +0800)
Following the previous patches, where vmxnet3's pci's msi/msix
capability offsets and msix's PBA table offsets have been changed, this
patch introduces a boolean property 'x-old-msi-offsets' to vmxnet3,
whose default is false.

Setting 'x-old-msi-offsets' to 'on' preserves the old offsets behavior,
which allows migration to older versions.

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/vmxnet3.c
include/hw/compat.h

index 4e1534b21fa168eb60944d04b4f51a2b05b9c31b..f398dea6c3834ce3264a54f5d56178fda3fc00f9 100644 (file)
@@ -2593,6 +2593,8 @@ static const VMStateDescription vmstate_vmxnet3 = {
 
 static Property vmxnet3_properties[] = {
     DEFINE_NIC_PROPERTIES(VMXNET3State, conf),
+    DEFINE_PROP_BIT("x-old-msi-offsets", VMXNET3State, compat_flags,
+                    VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS_BIT, false),
     DEFINE_PROP_END_OF_LIST(),
 };
 
index 3d8d2a9244ae8ded7f6680f07cebb44cc9eb5fdc..fd20d0e00f71826f6e957d1de2723b76d058b161 100644 (file)
@@ -2,7 +2,11 @@
 #define HW_COMPAT_H
 
 #define HW_COMPAT_2_5 \
-    /* empty */
+    {\
+        .driver   = "vmxnet3",\
+        .property = "x-old-msi-offsets",\
+        .value    = "on",\
+    },
 
 #define HW_COMPAT_2_4 \
     {\