[RFC,v1,2/8] Kconfig: Add the new file vhost/iommufd

Message ID 20231103171641.1703146-3-lulu@redhat.com
State New
Headers
Series vhost-vdpa: add support for iommufd |

Commit Message

Cindy Lu Nov. 3, 2023, 5:16 p.m. UTC
  Change the makefile and Kconfig, to add the
new file vhost/iommufd.c

Signed-off-by: Cindy Lu <lulu@redhat.com>
---
 drivers/vhost/Kconfig  | 1 +
 drivers/vhost/Makefile | 1 +
 2 files changed, 2 insertions(+)
  

Comments

Yi Liu Nov. 6, 2023, 8:53 a.m. UTC | #1
On 2023/11/4 01:16, Cindy Lu wrote:
> Change the makefile and Kconfig, to add the
> new file vhost/iommufd.c

why not merge it with patch 1?

> Signed-off-by: Cindy Lu <lulu@redhat.com>
> ---
>   drivers/vhost/Kconfig  | 1 +
>   drivers/vhost/Makefile | 1 +
>   2 files changed, 2 insertions(+)
> 
> diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig
> index b455d9ab6f3d..a4becfb36d77 100644
> --- a/drivers/vhost/Kconfig
> +++ b/drivers/vhost/Kconfig
> @@ -72,6 +72,7 @@ config VHOST_VDPA
>   	select VHOST
>   	select IRQ_BYPASS_MANAGER
>   	depends on VDPA
> +	depends on IOMMUFD || !IOMMUFD
>   	help
>   	  This kernel module can be loaded in host kernel to accelerate
>   	  guest virtio devices with the vDPA-based backends.
> diff --git a/drivers/vhost/Makefile b/drivers/vhost/Makefile
> index f3e1897cce85..cda7f6b7f8da 100644
> --- a/drivers/vhost/Makefile
> +++ b/drivers/vhost/Makefile
> @@ -12,6 +12,7 @@ obj-$(CONFIG_VHOST_RING) += vringh.o
>   
>   obj-$(CONFIG_VHOST_VDPA) += vhost_vdpa.o
>   vhost_vdpa-y := vdpa.o
> +vhost_vdpa-$(CONFIG_IOMMUFD) += iommufd.o
>   
>   obj-$(CONFIG_VHOST)	+= vhost.o
>
  
Cindy Lu Nov. 7, 2023, 6:15 a.m. UTC | #2
On Mon, Nov 6, 2023 at 4:50 PM Yi Liu <yi.l.liu@intel.com> wrote:
>
> On 2023/11/4 01:16, Cindy Lu wrote:
> > Change the makefile and Kconfig, to add the
> > new file vhost/iommufd.c
>
> why not merge it with patch 1?
>
sure will change this

thanks
cindy
> > Signed-off-by: Cindy Lu <lulu@redhat.com>
> > ---
> >   drivers/vhost/Kconfig  | 1 +
> >   drivers/vhost/Makefile | 1 +
> >   2 files changed, 2 insertions(+)
> >
> > diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig
> > index b455d9ab6f3d..a4becfb36d77 100644
> > --- a/drivers/vhost/Kconfig
> > +++ b/drivers/vhost/Kconfig
> > @@ -72,6 +72,7 @@ config VHOST_VDPA
> >       select VHOST
> >       select IRQ_BYPASS_MANAGER
> >       depends on VDPA
> > +     depends on IOMMUFD || !IOMMUFD
> >       help
> >         This kernel module can be loaded in host kernel to accelerate
> >         guest virtio devices with the vDPA-based backends.
> > diff --git a/drivers/vhost/Makefile b/drivers/vhost/Makefile
> > index f3e1897cce85..cda7f6b7f8da 100644
> > --- a/drivers/vhost/Makefile
> > +++ b/drivers/vhost/Makefile
> > @@ -12,6 +12,7 @@ obj-$(CONFIG_VHOST_RING) += vringh.o
> >
> >   obj-$(CONFIG_VHOST_VDPA) += vhost_vdpa.o
> >   vhost_vdpa-y := vdpa.o
> > +vhost_vdpa-$(CONFIG_IOMMUFD) += iommufd.o
> >
> >   obj-$(CONFIG_VHOST) += vhost.o
> >
>
> --
> Regards,
> Yi Liu
>
  

Patch

diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig
index b455d9ab6f3d..a4becfb36d77 100644
--- a/drivers/vhost/Kconfig
+++ b/drivers/vhost/Kconfig
@@ -72,6 +72,7 @@  config VHOST_VDPA
 	select VHOST
 	select IRQ_BYPASS_MANAGER
 	depends on VDPA
+	depends on IOMMUFD || !IOMMUFD
 	help
 	  This kernel module can be loaded in host kernel to accelerate
 	  guest virtio devices with the vDPA-based backends.
diff --git a/drivers/vhost/Makefile b/drivers/vhost/Makefile
index f3e1897cce85..cda7f6b7f8da 100644
--- a/drivers/vhost/Makefile
+++ b/drivers/vhost/Makefile
@@ -12,6 +12,7 @@  obj-$(CONFIG_VHOST_RING) += vringh.o
 
 obj-$(CONFIG_VHOST_VDPA) += vhost_vdpa.o
 vhost_vdpa-y := vdpa.o
+vhost_vdpa-$(CONFIG_IOMMUFD) += iommufd.o
 
 obj-$(CONFIG_VHOST)	+= vhost.o