linux/Documentation/virt/kvm
Jim Mattson b058c30cdf KVM: x86: Introduce KVM_X86_QUIRK_VMCS12_ALLOW_FREEZE_IN_SMM
commit e2ffe85b6d upstream.

Add KVM_X86_QUIRK_VMCS12_ALLOW_FREEZE_IN_SMM to allow L1 to set
FREEZE_IN_SMM in vmcs12's GUEST_IA32_DEBUGCTL field, as permitted
prior to commit 6b1dd26544 ("KVM: VMX: Preserve host's
DEBUGCTLMSR_FREEZE_IN_SMM while running the guest").  Enable the quirk
by default for backwards compatibility (like all quirks); userspace
can disable it via KVM_CAP_DISABLE_QUIRKS2 for consistency with the
constraints on WRMSR(IA32_DEBUGCTL).

Note that the quirk only bypasses the consistency check.  The vmcs02 bit is
still owned by the host, and PMCs are not frozen during virtualized SMM.
In particular, if a host administrator decides that PMCs should not be
frozen during physical SMM, then L1 has no say in the matter.

Fixes: 095686e6fc ("KVM: nVMX: Check vmcs12->guest_ia32_debugctl on nested VM-Enter")
Cc: stable@vger.kernel.org
Signed-off-by: Jim Mattson <jmattson@google.com>
Link: https://patch.msgid.link/20260205231537.1278753-1-jmattson@google.com
[sean: tag for stable@, clean-up and fix goofs in the comment and docs]
Signed-off-by: Sean Christopherson <seanjc@google.com>
[Rename quirk. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-03-19 16:08:24 +01:00
..
arm KVM: arm64: Introduce KVM_REG_ARM_VENDOR_HYP_BMAP_2 2025-02-26 13:30:36 -08:00
devices Documentation: KVM: Update GICv3 docs for GICv5 hosts 2025-10-13 14:40:58 +01:00
loongarch Loongarch: KVM: Add KVM hypercalls documentation for LoongArch 2024-09-05 14:30:35 -06:00
s390 Documentation: s390-diag.rst: Document diag500(STORAGE LIMIT) subfunction 2024-11-07 10:26:24 +01:00
x86 KVM: x86: Fix hypercalls docs section number order 2025-09-22 07:51:36 -07:00
api.rst KVM: x86: Introduce KVM_X86_QUIRK_VMCS12_ALLOW_FREEZE_IN_SMM 2026-03-19 16:08:24 +01:00
halt-polling.rst KVM: Update halt polling documentation to note that KVM has 4 module params 2024-06-03 08:51:51 -07:00
index.rst Loongarch: KVM: Add KVM hypercalls documentation for LoongArch 2024-09-05 14:30:35 -06:00
locking.rst KVM: x86/mmu: Don't force atomic update if only the Accessed bit is volatile 2025-02-14 07:16:45 -08:00
ppc-pv.rst Documentation: KVM: make corrections to ppc-pv.rst 2023-06-16 08:20:53 -06:00
review-checklist.rst Documentation: Fix spelling mistakes 2025-09-03 15:35:52 -06:00
vcpu-requests.rst Documentation: KVM: make corrections to vcpu-requests.rst 2023-06-16 08:20:53 -06:00