aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShmulik Ladkani <shmulik.ladkani@ravellosystems.com>2015-12-24 09:17:37 +0200
committerJason Wang <jasowang@redhat.com>2016-01-11 11:01:34 +0800
commitb22e0aef462df40e3355ee1cdf707b9578d23706 (patch)
tree9861f8f68bfec7512f9e4f3e1edd798b437c01bc
parent9c087a05040a7495d7614110fb85a81d65ac24d3 (diff)
vmxnet3: Introduce 'x-old-msi-offsets' back-compat property
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>
-rw-r--r--hw/net/vmxnet3.c2
-rw-r--r--include/hw/compat.h6
2 files changed, 7 insertions, 1 deletions
diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index 4e1534b21f..f398dea6c3 100644
--- a/hw/net/vmxnet3.c
+++ b/hw/net/vmxnet3.c
@@ -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(),
};
diff --git a/include/hw/compat.h b/include/hw/compat.h
index 3d8d2a9244..fd20d0e00f 100644
--- a/include/hw/compat.h
+++ b/include/hw/compat.h
@@ -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 \
{\