linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] KVM: x86: disable on 32-bit unless CONFIG_BROKEN
@ 2022-09-26 16:51 Paolo Bonzini
  2022-09-27 17:07 ` Sean Christopherson
  0 siblings, 1 reply; 18+ messages in thread
From: Paolo Bonzini @ 2022-09-26 16:51 UTC (permalink / raw)
  To: linux-kernel, kvm; +Cc: seanjc

32-bit KVM has extra complications in the code due to:

- different ways to write 64-bit values in VMCS

- different handling of DS and ES selectors as well as FS/GS bases

- lack of CR8 and EFER

- lack of XFD

- impossibility of writing 64-bit PTEs atomically

The last is the big one, because it prevents from using the TDP MMU
unconditionally.

Since 32-bit processors with virtualization extensions are a historical
curiosity, and even 32-bit userspace can only deal with small guests
due to limited address space, it makes sense to restrict KVM to 64-bit
hosts and kernels.

In preparation for that make 32-bit KVM depend on CONFIG_BROKEN, and
opportunistically rephrase the help message---processors with
virtualization extensions are supported even if they are not
"fairly recent".

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 arch/x86/kvm/Kconfig | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig
index e3cbd7706136..a107df22ffee 100644
--- a/arch/x86/kvm/Kconfig
+++ b/arch/x86/kvm/Kconfig
@@ -21,6 +21,7 @@ if VIRTUALIZATION
 config KVM
 	tristate "Kernel-based Virtual Machine (KVM) support"
 	depends on HAVE_KVM
+	depends on X86_64 || BROKEN
 	depends on HIGH_RES_TIMERS
 	depends on X86_LOCAL_APIC
 	select PREEMPT_NOTIFIERS
@@ -50,12 +51,13 @@ config KVM
 	select HAVE_KVM_PM_NOTIFIER if PM
 	help
 	  Support hosting fully virtualized guest machines using hardware
-	  virtualization extensions.  You will need a fairly recent
-	  processor equipped with virtualization extensions. You will also
-	  need to select one or more of the processor modules below.
+	  virtualization extensions. You will also need to select one or
+	  more of the processor modules below.
 
 	  This module provides access to the hardware capabilities through
-	  a character device node named /dev/kvm.
+	  a character device node named /dev/kvm.  You might have to enable
+	  virtualization extensions in the firmware setup if the device is
+	  not visible.
 
 	  To compile this as a module, choose M here: the module
 	  will be called kvm.
-- 
2.31.1


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

end of thread, other threads:[~2023-02-24  6:29 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-26 16:51 [PATCH] KVM: x86: disable on 32-bit unless CONFIG_BROKEN Paolo Bonzini
2022-09-27 17:07 ` Sean Christopherson
2022-09-28  7:10   ` Maxim Levitsky
2022-09-28  9:55     ` Paolo Bonzini
2022-09-28 16:12       ` Sean Christopherson
2022-09-28 17:43         ` Maxim Levitsky
2022-09-28 17:44         ` Maxim Levitsky
2022-09-28 17:55           ` Sean Christopherson
2022-09-29 13:26             ` Paolo Bonzini
2022-09-29 13:52               ` Maxim Levitsky
2022-09-29 15:07                 ` Paolo Bonzini
2023-02-17 19:36                 ` Thomas Huth
2023-02-22 22:27                   ` Sean Christopherson
2023-02-23  7:01                     ` Thomas Huth
2023-02-23  8:33                       ` Maxim Levitsky
2023-02-23 22:10                         ` Sean Christopherson
2023-02-24  6:28                           ` Thomas Huth
2022-09-28 10:04   ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).