]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
vmw_pvscsi: Introduce 'x-old-pci-configuration' backword compatability property
authorShmulik Ladkani <shmulik.ladkani@ravellosystems.com>
Sun, 13 Dec 2015 08:08:29 +0000 (10:08 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 17 Dec 2015 14:24:34 +0000 (15:24 +0100)
Following the previous patches, which introduced various changes in
pvscsi's pci configuration space (device subsystem id and revision, msi
offset), this patch introduces a boolean property
'x-old-pci-configuration' to pvscsi.

Its default value is false, exposing the above changes in the pci config
space.

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

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
Message-Id: <1449994112-7054-4-git-send-email-shmulik.ladkani@ravellosystems.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/vmw_pvscsi.c
include/hw/compat.h

index be95cff5e75eaa67d2ea1d16313fe258c0392899..e785b8b6ecbbea402e3f4f49022185ca711cb194 100644 (file)
@@ -1194,6 +1194,8 @@ static const VMStateDescription vmstate_pvscsi = {
 
 static Property pvscsi_properties[] = {
     DEFINE_PROP_UINT8("use_msg", PVSCSIState, use_msg, 1),
+    DEFINE_PROP_BIT("x-old-pci-configuration", PVSCSIState, compat_flags,
+                    PVSCSI_COMPAT_OLD_PCI_CONFIGURATION_BIT, false),
     DEFINE_PROP_END_OF_LIST(),
 };
 
index d0b1c4f1ef8c63e1de3a79b3b87ff86cbee46325..66e4affa982625bbe334628742b89eb8b47e4897 100644 (file)
@@ -6,6 +6,10 @@
             .driver   = "virtio-blk-device",\
             .property = "scsi",\
             .value    = "true",\
+        },{\
+            .driver   = "pvscsi",\
+            .property = "x-old-pci-configuration",\
+            .value    = "on",\
         },{\
             .driver   = "e1000",\
             .property = "extra_mac_registers",\