Skip to content

Commit 7b89a44

Browse files
mhklinuxliuw
authored andcommitted
Drivers: hv: Select CONFIG_SYSFB only if EFI is enabled
Commit 9695928 ("Drivers: hv: Always select CONFIG_SYSFB for Hyper-V guests") selects CONFIG_SYSFB for Hyper-V guests so that screen_info is available to the VMBus driver to get the location of the framebuffer in Generation 2 VMs. However, if CONFIG_HYPERV is enabled but CONFIG_EFI is not, a kernel link error results in ARM64 builds because screen_info is provided by the EFI firmware interface. While configuring an ARM64 Hyper-V guest without EFI isn't useful since EFI is required to boot, the configuration is still possible and the link error should be prevented. Fix this by making the selection of CONFIG_SYSFB conditional on CONFIG_EFI being defined. For Generation 1 VMs on x86/x64, which don't use EFI, the additional condition is OK because such VMs get the framebuffer information via a mechanism that doesn't use screen_info. Fixes: 9695928 ("Drivers: hv: Always select CONFIG_SYSFB for Hyper-V guests") Reported-by: Arnd Bergmann <[email protected]> Closes: https://lore.kernel.org/linux-hyperv/[email protected]/ Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Michael Kelley <[email protected]> Link: https://lore.kernel.org/stable/20250613230059.380483-1-mhklinux%40outlook.com Reviewed-by: Roman Kisel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Wei Liu <[email protected]> Message-ID: <[email protected]>
1 parent d7b8f8e commit 7b89a44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hv/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ config HYPERV
99
select PARAVIRT
1010
select X86_HV_CALLBACK_VECTOR if X86
1111
select OF_EARLY_FLATTREE if OF
12-
select SYSFB if !HYPERV_VTL_MODE
12+
select SYSFB if EFI && !HYPERV_VTL_MODE
1313
help
1414
Select this option to run Linux as a Hyper-V client operating
1515
system.

0 commit comments

Comments
 (0)