diff mbox

Use CONFIG_VHOST_USER_SCSI to enable vhost-scsi-pci

Message ID 1520264575-26506-1-git-send-email-mrezanin@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Miroslav Rezanina March 5, 2018, 3:42 p.m. UTC
From: Miroslav Rezanina <mrezanin@redhat.com>

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.

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 hw/virtio/virtio-pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Marc-André Lureau March 5, 2018, 3:51 p.m. UTC | #1
On Mon, Mar 5, 2018 at 4:42 PM,  <mrezanin@redhat.com> wrote:
> From: Miroslav Rezanina <mrezanin@redhat.com>
>
> 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.
>
> Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>


> ---
>  hw/virtio/virtio-pci.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
> index 1e8ab7b..df59d6b 100644
> --- a/hw/virtio/virtio-pci.c
> +++ b/hw/virtio/virtio-pci.c
> @@ -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
>
>
diff mbox

Patch

diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 1e8ab7b..df59d6b 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -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