Skip to content

Commit

Permalink
vmxnet3: Introduce 'x-disable-pcie' back-compat property
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
shmulik-ravello authored and jasowang committed Jan 11, 2016
1 parent 3509866 commit 7d6d347
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hw/net/vmxnet3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
};

Expand Down
4 changes: 4 additions & 0 deletions include/hw/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 7d6d347

Please sign in to comment.