From d855066f81726155caf766e47eea58ae10b1fd57 Mon Sep 17 00:00:00 2001 From: Like Xu Date: Fri, 8 Jan 2021 09:36:55 +0800 Subject: 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 Reviewed-by: Andi Kleen 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 --- arch/x86/kvm/vmx/capabilities.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/x86/kvm/vmx/capabilities.h') 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 */ -- cgit v1.2.3