All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] virtio-iommu: depend on PCI
@ 2020-03-20 10:41 Paolo Bonzini
  2020-03-20 10:54 ` Auger Eric
  2020-03-20 11:26 ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 5+ messages in thread
From: Paolo Bonzini @ 2020-03-20 10:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: eric.auger, Gerd Hoffmann, mst

The virtio-iommu device attaches itself to a PCI bus, so it makes
no sense to include it unless PCI is supported---and in fact
compilation fails without this change.

Reported-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/virtio/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig
index d29525b36f..83122424fa 100644
--- a/hw/virtio/Kconfig
+++ b/hw/virtio/Kconfig
@@ -12,7 +12,7 @@ config VIRTIO_RNG
 config VIRTIO_IOMMU
     bool
     default y
-    depends on VIRTIO
+    depends on PCI && VIRTIO
 
 config VIRTIO_PCI
     bool
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] virtio-iommu: depend on PCI
  2020-03-20 10:41 [PATCH] virtio-iommu: depend on PCI Paolo Bonzini
@ 2020-03-20 10:54 ` Auger Eric
  2020-03-20 11:13   ` Paolo Bonzini
  2020-03-20 11:26 ` Philippe Mathieu-Daudé
  1 sibling, 1 reply; 5+ messages in thread
From: Auger Eric @ 2020-03-20 10:54 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: Gerd Hoffmann, mst

Hi Paolo

On 3/20/20 11:41 AM, Paolo Bonzini wrote:
> The virtio-iommu device attaches itself to a PCI bus, so it makes
> no sense to include it unless PCI is supported---and in fact
> compilation fails without this change.

with the --- cleanup (?)

Acked-by: Eric Auger <eric.auger@redhat.com>

Thanks


Eric

> 
> Reported-by: Gerd Hoffmann <kraxel@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/virtio/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig
> index d29525b36f..83122424fa 100644
> --- a/hw/virtio/Kconfig
> +++ b/hw/virtio/Kconfig
> @@ -12,7 +12,7 @@ config VIRTIO_RNG
>  config VIRTIO_IOMMU
>      bool
>      default y
> -    depends on VIRTIO
> +    depends on PCI && VIRTIO
>  
>  config VIRTIO_PCI
>      bool
> 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] virtio-iommu: depend on PCI
  2020-03-20 10:54 ` Auger Eric
@ 2020-03-20 11:13   ` Paolo Bonzini
  0 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2020-03-20 11:13 UTC (permalink / raw)
  To: Auger Eric, qemu-devel; +Cc: Gerd Hoffmann, mst

On 20/03/20 11:54, Auger Eric wrote:
>> The virtio-iommu device attaches itself to a PCI bus, so it makes
>> no sense to include it unless PCI is supported---and in fact
>> compilation fails without this change.
> with the --- cleanup (?)

Fails if PCI is not included but virtio-iommu is.

Paolo

> Acked-by: Eric Auger <eric.auger@redhat.com>
> 
> Thanks



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] virtio-iommu: depend on PCI
  2020-03-20 10:41 [PATCH] virtio-iommu: depend on PCI Paolo Bonzini
  2020-03-20 10:54 ` Auger Eric
@ 2020-03-20 11:26 ` Philippe Mathieu-Daudé
  2020-03-20 11:36   ` Auger Eric
  1 sibling, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-03-20 11:26 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: eric.auger, Gerd Hoffmann, mst

On 3/20/20 11:41 AM, Paolo Bonzini wrote:
> The virtio-iommu device attaches itself to a PCI bus, so it makes
> no sense to include it unless PCI is supported---and in fact
> compilation fails without this change.
> 
> Reported-by: Gerd Hoffmann <kraxel@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   hw/virtio/Kconfig | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig
> index d29525b36f..83122424fa 100644
> --- a/hw/virtio/Kconfig
> +++ b/hw/virtio/Kconfig
> @@ -12,7 +12,7 @@ config VIRTIO_RNG
>   config VIRTIO_IOMMU
>       bool
>       default y
> -    depends on VIRTIO
> +    depends on PCI && VIRTIO
>   
>   config VIRTIO_PCI
>       bool
> 

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

I see hw/virtio/virtio-iommu-pci.c apart, what is the difference?



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] virtio-iommu: depend on PCI
  2020-03-20 11:26 ` Philippe Mathieu-Daudé
@ 2020-03-20 11:36   ` Auger Eric
  0 siblings, 0 replies; 5+ messages in thread
From: Auger Eric @ 2020-03-20 11:36 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Paolo Bonzini, qemu-devel; +Cc: Gerd Hoffmann, mst

Hi Philippe,

On 3/20/20 12:26 PM, Philippe Mathieu-Daudé wrote:
> On 3/20/20 11:41 AM, Paolo Bonzini wrote:
>> The virtio-iommu device attaches itself to a PCI bus, so it makes
>> no sense to include it unless PCI is supported---and in fact
>> compilation fails without this change.
>>
>> Reported-by: Gerd Hoffmann <kraxel@redhat.com>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>>   hw/virtio/Kconfig | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig
>> index d29525b36f..83122424fa 100644
>> --- a/hw/virtio/Kconfig
>> +++ b/hw/virtio/Kconfig
>> @@ -12,7 +12,7 @@ config VIRTIO_RNG
>>   config VIRTIO_IOMMU
>>       bool
>>       default y
>> -    depends on VIRTIO
>> +    depends on PCI && VIRTIO
>>     config VIRTIO_PCI
>>       bool
>>
> 
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> 
> I see hw/virtio/virtio-iommu-pci.c apart, what is the difference?
That's the virtio-iommu pci proxy whereas TYPE_VIRTIO_IOMMU inherits
from TYPE_VIRTIO_DEVICE.

The virtio-iommu device could also be instantiated directly as a
TYPE_VIRTIO_IOMMU device but that's not the choice eventually made for
machvirt.

Thanks

Eric

> 



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-03-20 11:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-20 10:41 [PATCH] virtio-iommu: depend on PCI Paolo Bonzini
2020-03-20 10:54 ` Auger Eric
2020-03-20 11:13   ` Paolo Bonzini
2020-03-20 11:26 ` Philippe Mathieu-Daudé
2020-03-20 11:36   ` Auger Eric

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.