From: Paolo Bonzini <pbonzini@redhat.com>
To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: seanjc@google.com
Subject: [PATCH] KVM: x86: disable on 32-bit unless CONFIG_BROKEN
Date: Mon, 26 Sep 2022 12:51:12 -0400 [thread overview]
Message-ID: <20220926165112.603078-1-pbonzini@redhat.com> (raw)
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
next reply other threads:[~2022-09-26 17:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-26 16:51 Paolo Bonzini [this message]
2022-09-27 17:07 ` [PATCH] KVM: x86: disable on 32-bit unless CONFIG_BROKEN 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220926165112.603078-1-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=seanjc@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.