diff options
author | Sean Christopherson <seanjc@google.com> | 2024-08-02 11:55:05 -0700 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2024-11-01 09:22:31 -0700 |
commit | dcb988cdac85bad177de86fbf409524eda4f9467 (patch) | |
tree | 568a19ac2ef88c59979327c44f8e0d5390313bd4 /arch/x86/include/uapi/asm/kvm.h | |
parent | bc2ca3680b30869ee9a764ab72c143070f1afec8 (diff) | |
download | linux-dcb988cdac85bad177de86fbf409524eda4f9467.tar.gz linux-dcb988cdac85bad177de86fbf409524eda4f9467.tar.bz2 linux-dcb988cdac85bad177de86fbf409524eda4f9467.zip |
KVM: x86: Quirk initialization of feature MSRs to KVM's max configuration
Add a quirk to control KVM's misguided initialization of select feature
MSRs to KVM's max configuration, as enabling features by default violates
KVM's approach of letting userspace own the vCPU model, and is actively
problematic for MSRs that are conditionally supported, as the vCPU will
end up with an MSR value that userspace can't restore. E.g. if the vCPU
is configured with PDCM=0, userspace will save and attempt to restore a
non-zero PERF_CAPABILITIES, thanks to KVM's meddling.
Link: https://lore.kernel.org/r/20240802185511.305849-4-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'arch/x86/include/uapi/asm/kvm.h')
-rw-r--r-- | arch/x86/include/uapi/asm/kvm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/uapi/asm/kvm.h b/arch/x86/include/uapi/asm/kvm.h index a8debbf2f702..88585c1de416 100644 --- a/arch/x86/include/uapi/asm/kvm.h +++ b/arch/x86/include/uapi/asm/kvm.h @@ -440,6 +440,7 @@ struct kvm_sync_regs { #define KVM_X86_QUIRK_FIX_HYPERCALL_INSN (1 << 5) #define KVM_X86_QUIRK_MWAIT_NEVER_UD_FAULTS (1 << 6) #define KVM_X86_QUIRK_SLOT_ZAP_ALL (1 << 7) +#define KVM_X86_QUIRK_STUFF_FEATURE_MSRS (1 << 8) #define KVM_STATE_NESTED_FORMAT_VMX 0 #define KVM_STATE_NESTED_FORMAT_SVM 1 |