diff mbox

[3/3] vhost/scsi: Add VIRTIO_F_ANY_LAYOUT host_feature bit

Message ID 1422606950-25291-4-git-send-email-nab@daterainc.com (mailing list archive)
State New, archived
Headers show

Commit Message

Nicholas A. Bellinger Jan. 30, 2015, 8:35 a.m. UTC
From: Nicholas Bellinger <nab@linux-iscsi.org>

Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
---
 hw/scsi/vhost-scsi.c   | 1 +
 hw/virtio/virtio-pci.c | 2 ++
 include/hw/i386/pc.h   | 5 +++++
 3 files changed, 8 insertions(+)
diff mbox

Patch

diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index 95f7b99..bfb7005 100644
--- a/hw/scsi/vhost-scsi.c
+++ b/hw/scsi/vhost-scsi.c
@@ -32,6 +32,7 @@  static const int kernel_feature_bits[] = {
     VIRTIO_RING_F_EVENT_IDX,
     VIRTIO_SCSI_F_HOTPLUG,
     VIRTIO_SCSI_F_T10_PI,
+    VIRTIO_F_ANY_LAYOUT,
     VHOST_INVALID_FEATURE_BIT
 };
 
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 861ec95..7863dcc 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1198,6 +1198,8 @@  static const TypeInfo virtio_scsi_pci_info = {
 static Property vhost_scsi_pci_properties[] = {
     DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
                        DEV_NVECTORS_UNSPECIFIED),
+    DEFINE_PROP_BIT("any_layout", VirtIOPCIProxy, host_features,
+                       VIRTIO_F_ANY_LAYOUT, true),
     DEFINE_PROP_BIT("hotplug", VirtIOPCIProxy, host_features,
                        VIRTIO_SCSI_F_HOTPLUG, true),
     DEFINE_PROP_BIT("prot_info", VirtIOPCIProxy, host_features,
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index c81e2e9..16f52bd 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -322,6 +322,11 @@  bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
             .value    = "off",\
         },\
         {\
+            .driver   = "vhost-scsi-pci", \
+            .property = "any_layout",\
+            .value    = "off",\
+        },\
+        {\
             .driver   = "vhost-scsi-pci",\
             .property = "prot_info",\
             .value    = "off",\