Skip to content

Commit 3116070

Browse files
nathanchancedjbw
authored andcommitted
virt: Fix Kconfig warning when selecting TSM without VIRT_DRIVERS
After commit 3225f52 ("PCI/TSM: Establish Secure Sessions and Link Encryption"), there is a Kconfig warning when selecting CONFIG_TSM without CONFIG_VIRT_DRIVERS: WARNING: unmet direct dependencies detected for TSM Depends on [n]: VIRT_DRIVERS [=n] Selected by [y]: - PCI_TSM [=y] && PCI [=y] CONFIG_TSM is defined in drivers/virt/coco/Kconfig but this Kconfig is only sourced when CONFIG_VIRT_DRIVERS is enabled. Since this symbol is hidden with no dependencies, it should be available without a symbol that just enables a menu. Move the sourcing of drivers/virt/coco/Kconfig outside of CONFIG_VIRT_DRIVERS and wrap the other source statements in drivers/virt/coco/Kconfig with CONFIG_VIRT_DRIVERS to ensure users do not get any additional prompts while ensuring CONFIG_TSM is always available to select. This complements commit 110c155 ("drivers/virt: Drop VIRT_DRIVERS build dependency"), which addressed the build issue that this Kconfig warning was pointing out. Fixes: 3225f52 ("PCI/TSM: Establish Secure Sessions and Link Encryption") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202511140712.NubhamPy-lkp@intel.com/ Signed-off-by: Nathan Chancellor <nathan@kernel.org> Link: https://patch.msgid.link/20251203-fix-pci-tsm-select-tsm-warning-v1-1-c3959c1cb110@kernel.org Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent 4be4235 commit 3116070

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/virt/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ source "drivers/virt/nitro_enclaves/Kconfig"
4747

4848
source "drivers/virt/acrn/Kconfig"
4949

50-
source "drivers/virt/coco/Kconfig"
51-
5250
endif
51+
52+
source "drivers/virt/coco/Kconfig"

drivers/virt/coco/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Confidential computing related collateral
44
#
55

6+
if VIRT_DRIVERS
67
source "drivers/virt/coco/efi_secret/Kconfig"
78

89
source "drivers/virt/coco/pkvm-guest/Kconfig"
@@ -14,6 +15,7 @@ source "drivers/virt/coco/tdx-guest/Kconfig"
1415
source "drivers/virt/coco/arm-cca-guest/Kconfig"
1516

1617
source "drivers/virt/coco/guest/Kconfig"
18+
endif
1719

1820
config TSM
1921
bool

0 commit comments

Comments
 (0)