Skip to contentSkip to conversation

coco/tdx-host: add Kconfig description

PATCH Superseded Dmitry Voytik 2 participants 3 messages Oct 3 – Oct 12

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 coco/tdx-host: add Kconfig description

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.

---
 drivers/virt/coco/tdx-host/Kconfig | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/virt/coco/tdx-host/Kconfig +5 -1
index 57d0c01a4357..5a13ec6f51e8 100644
@@ -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.
Signature · 1 line
2.55.0
maintainer
#1 lore raw
Quoted 34 lines · 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.

---
 drivers/virt/coco/tdx-host/Kconfig | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/virt/coco/tdx-host/Kconfig +0 -0
index 57d0c01a4357..5a13ec6f51e8 100644
@@ -1,6 +1,10 @@
 config TDX_HOST_SERVICES

drivers/virt/coco/tdx-host/Kconfig line 10

Quoted 10 lines
drivers/virt/coco/tdx-host/Kconfig +5 -1
-	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?

Signature · 1 line
  Kiryl Shutsemau / Kirill A. Shutemov
#2 lore raw

Hi Kiryl,

Thanks for the review!

Quoted 56 lines · Kiryl Shutsemau
Quoted 34 lines · 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.

---
 drivers/virt/coco/tdx-host/Kconfig | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/virt/coco/tdx-host/Kconfig +0 -0
index 57d0c01a4357..5a13ec6f51e8 100644
@@ -1,6 +1,10 @@
 config TDX_HOST_SERVICES

drivers/virt/coco/tdx-host/Kconfig line 10

Quoted 10 lines
drivers/virt/coco/tdx-host/Kconfig +5 -1
-     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

Quoted 4 lines

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!

Quoted 2 lines

--
Kiryl Shutsemau / Kirill A. Shutemov