Skip to contentSkip to conversation

Use CONFIG_VHOST_USER_SCSI to enable vhost-scsi-pci

PATCH In review [email protected] 2 participants 2 messages Mar 5, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Use CONFIG_VHOST_USER_SCSI to enable vhost-scsi-pci

From: Miroslav Rezanina <[email protected]>

Currently, "defined(CONFIG_VHOST_USER) && defined(CONFIG_LINUX)" is used to enable/disable vhost-scsi-pci build as this condition is used to enable/disable CONFIG_VHOST_USER_SCSI too.

However, when CONFIG_VHOST_USER_SCSI is manually disable vhost-scsi-pci is still registered although it should be disabled.

Changing condition to use CONFIG_VHOST_USER_SCSI so vhost-scsi-pci can be controled by CONFIG_VHOST_USER_SCSI option.

---
 hw/virtio/virtio-pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/virtio/virtio-pci.c +2 -2
index 1e8ab7b..df59d6b 100644
@@ -2163,7 +2163,7 @@ static const TypeInfo vhost_scsi_pci_info = {
 };
 #endif
 
-#if defined(CONFIG_VHOST_USER) && defined(CONFIG_LINUX)
+#if defined(CONFIG_VHOST_USER_SCSI)
 /* vhost-user-scsi-pci */
 static Property vhost_user_scsi_pci_properties[] = {
     DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
@@ -2696,7 +2696,7 @@ static void virtio_pci_register_types(void)
 #ifdef CONFIG_VHOST_SCSI
     type_register_static(&vhost_scsi_pci_info);
 #endif
-#if defined(CONFIG_VHOST_USER) && defined(CONFIG_LINUX)
+#if defined(CONFIG_VHOST_USER_SCSI)
     type_register_static(&vhost_user_scsi_pci_info);
 #endif
 #ifdef CONFIG_VHOST_VSOCK
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · On Mon, Mar 5, 2018 at 4:42 PM, <[email protected]> wrote:

From: Miroslav Rezanina <[email protected]>

Currently, "defined(CONFIG_VHOST_USER) && defined(CONFIG_LINUX)" is used to enable/disable vhost-scsi-pci build as this condition is used to enable/disable CONFIG_VHOST_USER_SCSI too.

Quoted 7 lines

However, when CONFIG_VHOST_USER_SCSI is manually disable vhost-scsi-pci is still registered although it should be disabled.

Changing condition to use CONFIG_VHOST_USER_SCSI so vhost-scsi-pci can be controled by CONFIG_VHOST_USER_SCSI option.

Quoted 30 lines
---
 hw/virtio/virtio-pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/virtio/virtio-pci.c +2 -3
index 1e8ab7b..df59d6b 100644
@@ -2163,7 +2163,7 @@ static const TypeInfo vhost_scsi_pci_info = {
 };
 #endif
 
-#if defined(CONFIG_VHOST_USER) && defined(CONFIG_LINUX)
+#if defined(CONFIG_VHOST_USER_SCSI)
 /* vhost-user-scsi-pci */
 static Property vhost_user_scsi_pci_properties[] = {
     DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
@@ -2696,7 +2696,7 @@ static void virtio_pci_register_types(void)
 #ifdef CONFIG_VHOST_SCSI
     type_register_static(&vhost_scsi_pci_info);
 #endif
-#if defined(CONFIG_VHOST_USER) && defined(CONFIG_LINUX)
+#if defined(CONFIG_VHOST_USER_SCSI)
     type_register_static(&vhost_user_scsi_pci_info);
 #endif
 #ifdef CONFIG_VHOST_VSOCK
--

1.8.3.1

Signature · 1 line
Marc-André Lureau