qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 3/6] vmw_pvscsi: Introduce 'x-old-pci-configurati


From: Shmulik Ladkani
Subject: [Qemu-devel] [PATCH v2 3/6] vmw_pvscsi: Introduce 'x-old-pci-configuration' backword compatability property
Date: Sun, 13 Dec 2015 10:08:29 +0200

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 <address@hidden>
---
 hw/scsi/vmw_pvscsi.c | 2 ++
 include/hw/compat.h  | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c
index be95cff..e785b8b 100644
--- a/hw/scsi/vmw_pvscsi.c
+++ b/hw/scsi/vmw_pvscsi.c
@@ -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(),
 };
 
diff --git a/include/hw/compat.h b/include/hw/compat.h
index d0b1c4f..66e4aff 100644
--- a/include/hw/compat.h
+++ b/include/hw/compat.h
@@ -7,6 +7,10 @@
             .property = "scsi",\
             .value    = "true",\
         },{\
+            .driver   = "pvscsi",\
+            .property = "x-old-pci-configuration",\
+            .value    = "on",\
+        },{\
             .driver   = "e1000",\
             .property = "extra_mac_registers",\
             .value    = "off",\
-- 
1.9.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]