diff mbox series

vhost: drop vring dependency on iotlb

Message ID 20200402141207.32628-1-mst@redhat.com (mailing list archive)
State New, archived
Headers show
Series vhost: drop vring dependency on iotlb | expand

Commit Message

Michael S. Tsirkin April 2, 2020, 2:12 p.m. UTC
vringh can now be built without IOTLB.
Select IOTLB directly where it's used.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---

This is on top of my previous patch (in vhost tree now).

 drivers/vdpa/Kconfig  | 1 +
 drivers/vhost/Kconfig | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

Comments

Jason Wang April 2, 2020, 2:28 p.m. UTC | #1
On 2020/4/2 下午10:12, Michael S. Tsirkin wrote:
> vringh can now be built without IOTLB.
> Select IOTLB directly where it's used.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>
> This is on top of my previous patch (in vhost tree now).
>
>   drivers/vdpa/Kconfig  | 1 +
>   drivers/vhost/Kconfig | 1 -
>   2 files changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/vdpa/Kconfig b/drivers/vdpa/Kconfig
> index 7db1460104b7..08b615f2da39 100644
> --- a/drivers/vdpa/Kconfig
> +++ b/drivers/vdpa/Kconfig
> @@ -17,6 +17,7 @@ config VDPA_SIM
>   	depends on RUNTIME_TESTING_MENU
>   	select VDPA
>   	select VHOST_RING
> +	select VHOST_IOTLB
>   	default n
>   	help
>   	  vDPA networking device simulator which loop TX traffic back
> diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig
> index 21feea0d69c9..bdd270fede26 100644
> --- a/drivers/vhost/Kconfig
> +++ b/drivers/vhost/Kconfig
> @@ -6,7 +6,6 @@ config VHOST_IOTLB
>   
>   config VHOST_RING
>   	tristate
> -	select VHOST_IOTLB
>   	help
>   	  This option is selected by any driver which needs to access
>   	  the host side of a virtio ring.


Do we need to mention driver need to select VHOST_IOTLB by itself here?

Thanks
Michael S. Tsirkin April 2, 2020, 2:36 p.m. UTC | #2
On Thu, Apr 02, 2020 at 10:28:28PM +0800, Jason Wang wrote:
> 
> On 2020/4/2 下午10:12, Michael S. Tsirkin wrote:
> > vringh can now be built without IOTLB.
> > Select IOTLB directly where it's used.
> > 
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > ---
> > 
> > This is on top of my previous patch (in vhost tree now).
> > 
> >   drivers/vdpa/Kconfig  | 1 +
> >   drivers/vhost/Kconfig | 1 -
> >   2 files changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/vdpa/Kconfig b/drivers/vdpa/Kconfig
> > index 7db1460104b7..08b615f2da39 100644
> > --- a/drivers/vdpa/Kconfig
> > +++ b/drivers/vdpa/Kconfig
> > @@ -17,6 +17,7 @@ config VDPA_SIM
> >   	depends on RUNTIME_TESTING_MENU
> >   	select VDPA
> >   	select VHOST_RING
> > +	select VHOST_IOTLB
> >   	default n
> >   	help
> >   	  vDPA networking device simulator which loop TX traffic back
> > diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig
> > index 21feea0d69c9..bdd270fede26 100644
> > --- a/drivers/vhost/Kconfig
> > +++ b/drivers/vhost/Kconfig
> > @@ -6,7 +6,6 @@ config VHOST_IOTLB
> >   config VHOST_RING
> >   	tristate
> > -	select VHOST_IOTLB
> >   	help
> >   	  This option is selected by any driver which needs to access
> >   	  the host side of a virtio ring.
> 
> 
> Do we need to mention driver need to select VHOST_IOTLB by itself here?
> 
> Thanks
> 

OK but I guess it's best to do it near where VHOST_IOTLB is defined.
Like this?


diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig
index bdd270fede26..ce51126f51e7 100644
--- a/drivers/vhost/Kconfig
+++ b/drivers/vhost/Kconfig
@@ -3,6 +3,8 @@ config VHOST_IOTLB
 	tristate
 	help
 	  Generic IOTLB implementation for vhost and vringh.
+	  This option is selected by any driver which needs to support
+	  an IOMMU in software.
 
 config VHOST_RING
 	tristate
Jason Wang April 2, 2020, 2:59 p.m. UTC | #3
On 2020/4/2 下午10:36, Michael S. Tsirkin wrote:
> On Thu, Apr 02, 2020 at 10:28:28PM +0800, Jason Wang wrote:
>> On 2020/4/2 下午10:12, Michael S. Tsirkin wrote:
>>> vringh can now be built without IOTLB.
>>> Select IOTLB directly where it's used.
>>>
>>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>>> ---
>>>
>>> This is on top of my previous patch (in vhost tree now).
>>>
>>>    drivers/vdpa/Kconfig  | 1 +
>>>    drivers/vhost/Kconfig | 1 -
>>>    2 files changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/vdpa/Kconfig b/drivers/vdpa/Kconfig
>>> index 7db1460104b7..08b615f2da39 100644
>>> --- a/drivers/vdpa/Kconfig
>>> +++ b/drivers/vdpa/Kconfig
>>> @@ -17,6 +17,7 @@ config VDPA_SIM
>>>    	depends on RUNTIME_TESTING_MENU
>>>    	select VDPA
>>>    	select VHOST_RING
>>> +	select VHOST_IOTLB
>>>    	default n
>>>    	help
>>>    	  vDPA networking device simulator which loop TX traffic back
>>> diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig
>>> index 21feea0d69c9..bdd270fede26 100644
>>> --- a/drivers/vhost/Kconfig
>>> +++ b/drivers/vhost/Kconfig
>>> @@ -6,7 +6,6 @@ config VHOST_IOTLB
>>>    config VHOST_RING
>>>    	tristate
>>> -	select VHOST_IOTLB
>>>    	help
>>>    	  This option is selected by any driver which needs to access
>>>    	  the host side of a virtio ring.
>>
>> Do we need to mention driver need to select VHOST_IOTLB by itself here?
>>
>> Thanks
>>
> OK but I guess it's best to do it near where VHOST_IOTLB is defined.
> Like this?
>
>
> diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig
> index bdd270fede26..ce51126f51e7 100644
> --- a/drivers/vhost/Kconfig
> +++ b/drivers/vhost/Kconfig
> @@ -3,6 +3,8 @@ config VHOST_IOTLB
>   	tristate
>   	help
>   	  Generic IOTLB implementation for vhost and vringh.
> +	  This option is selected by any driver which needs to support
> +	  an IOMMU in software.
>   
>   config VHOST_RING
>   	tristate
>

Yes, probably.

Thanks
diff mbox series

Patch

diff --git a/drivers/vdpa/Kconfig b/drivers/vdpa/Kconfig
index 7db1460104b7..08b615f2da39 100644
--- a/drivers/vdpa/Kconfig
+++ b/drivers/vdpa/Kconfig
@@ -17,6 +17,7 @@  config VDPA_SIM
 	depends on RUNTIME_TESTING_MENU
 	select VDPA
 	select VHOST_RING
+	select VHOST_IOTLB
 	default n
 	help
 	  vDPA networking device simulator which loop TX traffic back
diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig
index 21feea0d69c9..bdd270fede26 100644
--- a/drivers/vhost/Kconfig
+++ b/drivers/vhost/Kconfig
@@ -6,7 +6,6 @@  config VHOST_IOTLB
 
 config VHOST_RING
 	tristate
-	select VHOST_IOTLB
 	help
 	  This option is selected by any driver which needs to access
 	  the host side of a virtio ring.