mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] coco/tdx-host: add Kconfig description
@ 2026-10-03 22:32 Dmitry Voytik
  2026-10-12 11:42 ` Kiryl Shutsemau
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Voytik @ 2026-10-03 22:32 UTC (permalink / raw)
  To: Kiryl Shutsemau, Chao Gao, Dave Hansen
  Cc: linux-coco, x86, kvm, linux-kernel, Dmitry Voytik

Fix the issue when the driver always gets compiled as a module.
How to reproduce the issue:
	make mrproper
	make defconfig

	./scripts/config \
	  -e CMA \
	  -e ALLOC \
	  -e KVM \
	  -e KVM_INTEL \
	  -e KVM_INTEL_TDX \
	  -e INTEL_TDX_HOST \
	  -e TDX_HOST_SERVICES \
	  --refresh
	make olddefconfig
	make mod2yesconfig
	grep '=m$' .config

	returns only this driver as module:
	  CONFIG_TDX_HOST_SERVICES=m

"make menuconfig" doesn't let switch from =m to =y either.

Signed-off-by: Dmitry Voytik <voytikd@gmail.com>
---
 drivers/virt/coco/tdx-host/Kconfig | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/virt/coco/tdx-host/Kconfig b/drivers/virt/coco/tdx-host/Kconfig
index 57d0c01a4357..5a13ec6f51e8 100644
--- a/drivers/virt/coco/tdx-host/Kconfig
+++ b/drivers/virt/coco/tdx-host/Kconfig
@@ -1,6 +1,10 @@
 config TDX_HOST_SERVICES
-	tristate
+	tristate "TDX host user interface driver"
 	depends on INTEL_TDX_HOST
 	select FW_LOADER
 	select FW_UPLOAD
 	default m
+	help
+	  See INTEL_TDX_HOST for details.
+
+	  If unsure, say N.
-- 
2.55.0


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

* Re: [PATCH] coco/tdx-host: add Kconfig description
  2026-10-03 22:32 [PATCH] coco/tdx-host: add Kconfig description Dmitry Voytik
@ 2026-10-12 11:42 ` Kiryl Shutsemau
  2026-10-12 17:55   ` Dmitry Voytik
  0 siblings, 1 reply; 3+ messages in thread
From: Kiryl Shutsemau @ 2026-10-12 11:42 UTC (permalink / raw)
  To: Dmitry Voytik; +Cc: Chao Gao, Dave Hansen, linux-coco, x86, kvm, linux-kernel

On Sun, Oct 04, 2026 at 12:32:37AM +0200, Dmitry Voytik wrote:
> Fix the issue when the driver always gets compiled as a module.
> How to reproduce the issue:
> 	make mrproper
> 	make defconfig
> 
> 	./scripts/config \
> 	  -e CMA \
> 	  -e ALLOC \
> 	  -e KVM \
> 	  -e KVM_INTEL \
> 	  -e KVM_INTEL_TDX \
> 	  -e INTEL_TDX_HOST \
> 	  -e TDX_HOST_SERVICES \
> 	  --refresh
> 	make olddefconfig
> 	make mod2yesconfig
> 	grep '=m$' .config
> 
> 	returns only this driver as module:
> 	  CONFIG_TDX_HOST_SERVICES=m
> 
> "make menuconfig" doesn't let switch from =m to =y either.
> 
> Signed-off-by: Dmitry Voytik <voytikd@gmail.com>
> ---
>  drivers/virt/coco/tdx-host/Kconfig | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/virt/coco/tdx-host/Kconfig b/drivers/virt/coco/tdx-host/Kconfig
> index 57d0c01a4357..5a13ec6f51e8 100644
> --- a/drivers/virt/coco/tdx-host/Kconfig
> +++ b/drivers/virt/coco/tdx-host/Kconfig
> @@ -1,6 +1,10 @@
>  config TDX_HOST_SERVICES
> -	tristate
> +	tristate "TDX host user interface driver"
>  	depends on INTEL_TDX_HOST
>  	select FW_LOADER
>  	select FW_UPLOAD
>  	default m
> +	help
> +	  See INTEL_TDX_HOST for details.
> +
> +	  If unsure, say N.

I would rather keep it hidden and make it follow KVM_INTEL instead:

config TDX_HOST_SERVICES
        tristate
        depends on INTEL_TDX_HOST
        select FW_LOADER
        select FW_UPLOAD
        default KVM_INTEL

INTEL_TDX_HOST depends on KVM_INTEL, so this gives =m with kvm-intel as a
module and =y with it built in, which covers your mod2yesconfig case.

Does it work for you?

-- 
  Kiryl Shutsemau / Kirill A. Shutemov

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

* Re: [PATCH] coco/tdx-host: add Kconfig description
  2026-10-12 11:42 ` Kiryl Shutsemau
@ 2026-10-12 17:55   ` Dmitry Voytik
  0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Voytik @ 2026-10-12 17:55 UTC (permalink / raw)
  To: Kiryl Shutsemau; +Cc: Chao Gao, Dave Hansen, linux-coco, x86, kvm, linux-kernel

Hi Kiryl,

Thanks for the review!

On Mon, Oct 12, 2026 at 1:42 PM Kiryl Shutsemau <kas@kernel.org> wrote:
>
> On Sun, Oct 04, 2026 at 12:32:37AM +0200, Dmitry Voytik wrote:
> > Fix the issue when the driver always gets compiled as a module.
> > How to reproduce the issue:
> >       make mrproper
> >       make defconfig
> >
> >       ./scripts/config \
> >         -e CMA \
> >         -e ALLOC \
> >         -e KVM \
> >         -e KVM_INTEL \
> >         -e KVM_INTEL_TDX \
> >         -e INTEL_TDX_HOST \
> >         -e TDX_HOST_SERVICES \
> >         --refresh
> >       make olddefconfig
> >       make mod2yesconfig
> >       grep '=m$' .config
> >
> >       returns only this driver as module:
> >         CONFIG_TDX_HOST_SERVICES=m
> >
> > "make menuconfig" doesn't let switch from =m to =y either.
> >
> > Signed-off-by: Dmitry Voytik <voytikd@gmail.com>
> > ---
> >  drivers/virt/coco/tdx-host/Kconfig | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/virt/coco/tdx-host/Kconfig b/drivers/virt/coco/tdx-host/Kconfig
> > index 57d0c01a4357..5a13ec6f51e8 100644
> > --- a/drivers/virt/coco/tdx-host/Kconfig
> > +++ b/drivers/virt/coco/tdx-host/Kconfig
> > @@ -1,6 +1,10 @@
> >  config TDX_HOST_SERVICES
> > -     tristate
> > +     tristate "TDX host user interface driver"
> >       depends on INTEL_TDX_HOST
> >       select FW_LOADER
> >       select FW_UPLOAD
> >       default m
> > +     help
> > +       See INTEL_TDX_HOST for details.
> > +
> > +       If unsure, say N.
>
> I would rather keep it hidden and make it follow KVM_INTEL instead:
>
> config TDX_HOST_SERVICES
>         tristate
>         depends on INTEL_TDX_HOST
>         select FW_LOADER
>         select FW_UPLOAD
>         default KVM_INTEL
>
> INTEL_TDX_HOST depends on KVM_INTEL, so this gives =m with kvm-intel as a
> module and =y with it built in, which covers your mod2yesconfig case.
>
> Does it work for you?

Sure, I've retested and sent a v2.

I also rechecked that it still can be built as =m:
./scripts/config \
 -e CMA \
 -e ALLOC \
 -e KVM \
 -m KVM_INTEL \
 -e KVM_INTEL_TDX \
 -e INTEL_TDX_HOST \
 -m TDX_HOST_SERVICES \
 --refresh
I did this because sashiko produced a false warning that it can't be
built as =m.

Thanks!

> --
>   Kiryl Shutsemau / Kirill A. Shutemov

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

end of thread, other threads:[~2026-10-12 17:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-03 22:32 [PATCH] coco/tdx-host: add Kconfig description Dmitry Voytik
2026-10-12 11:42 ` Kiryl Shutsemau
2026-10-12 17:55   ` Dmitry Voytik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®