diff options
author | Like Xu <like.xu@linux.intel.com> | 2021-01-08 02:36:55 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-02-04 11:27:23 +0100 |
commit | d855066f81726155caf766e47eea58ae10b1fd57 (patch) | |
tree | 46b114c9ae6fcefca3a0687bb73b63191bd8d77d /arch/x86/kvm/vmx/capabilities.h | |
parent | KVM: VMX: Use x2apic_mode to avoid RDMSR when querying PI state (diff) | |
download | linux-d855066f81726155caf766e47eea58ae10b1fd57.tar.xz linux-d855066f81726155caf766e47eea58ae10b1fd57.zip |
KVM: VMX: read/write MSR_IA32_DEBUGCTLMSR from GUEST_IA32_DEBUGCTL
SVM already has specific handlers of MSR_IA32_DEBUGCTLMSR in the
svm_get/set_msr, so the x86 common part can be safely moved to VMX.
This allows KVM to store the bits it supports in GUEST_IA32_DEBUGCTL.
Add vmx_supported_debugctl() to refactor the throwing logic of #GP.
Signed-off-by: Like Xu <like.xu@linux.intel.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Message-Id: <20210108013704.134985-2-like.xu@linux.intel.com>
[Merge parts of Chenyi Qiang's "KVM: X86: Expose bus lock debug exception
to guest". - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx/capabilities.h')
-rw-r--r-- | arch/x86/kvm/vmx/capabilities.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx/capabilities.h b/arch/x86/kvm/vmx/capabilities.h index 5366ccdd134c..d0f31fcccd2b 100644 --- a/arch/x86/kvm/vmx/capabilities.h +++ b/arch/x86/kvm/vmx/capabilities.h @@ -384,4 +384,9 @@ static inline u64 vmx_get_perf_capabilities(void) return PMU_CAP_FW_WRITES; } +static inline u64 vmx_supported_debugctl(void) +{ + return 0; +} + #endif /* __KVM_X86_VMX_CAPS_H */ |