aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShmulik Ladkani <shmulik.ladkani@ravellosystems.com>2015-12-24 09:17:40 +0200
committerJason Wang <jasowang@redhat.com>2016-01-11 11:01:35 +0800
commit7d6d347d0602997a7fcb33b7edd20f8d8515b48b (patch)
tree4b16195c300e58dec2f2719723477ccb160968d7
parent3509866ab36972043d6757a03c48097c7b5ae22b (diff)
vmxnet3: Introduce 'x-disable-pcie' back-compat property
Following the previous patch which changed vmxnet3 to be a pci express device, this patch introduces a boolean property 'x-disable-pcie' whose default is false. Setting 'x-disable-pcie' to 'on' preserves the old 'pci device' (non express) behavior. This 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.h4
2 files changed, 6 insertions, 0 deletions
diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index aee218c58a..67abad3598 100644
--- a/hw/net/vmxnet3.c
+++ b/hw/net/vmxnet3.c
@@ -2663,6 +2663,8 @@ 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_BIT("x-disable-pcie", VMXNET3State, compat_flags,
+ VMXNET3_COMPAT_FLAG_DISABLE_PCIE_BIT, false),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/include/hw/compat.h b/include/hw/compat.h
index fd20d0e00f..98df0dd7b5 100644
--- a/include/hw/compat.h
+++ b/include/hw/compat.h
@@ -6,6 +6,10 @@
.driver = "vmxnet3",\
.property = "x-old-msi-offsets",\
.value = "on",\
+ },{\
+ .driver = "vmxnet3",\
+ .property = "x-disable-pcie",\
+ .value = "on",\
},
#define HW_COMPAT_2_4 \