]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SVM: Fix the svm vmexit code for WRMSR
authorHaiwei Li <lihaiwei.kernel@gmail.com>
Mon, 2 Mar 2020 12:19:28 +0000 (20:19 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 2 Mar 2020 16:06:52 +0000 (17:06 +0100)
commit880b3a36b811472627182750e0de66a0a4654b65
tree2dfe0c5017266eba723fce760f8fa37cbee3c623
parentf18c4b78523311933a73e9ac3ce232b72082cfd3
KVM: SVM: Fix the svm vmexit code for WRMSR

In svm, exit_code for MSR writes is not EXIT_REASON_MSR_WRITE which
belongs to vmx.

According to amd manual, SVM_EXIT_MSR(7ch) is the exit_code of VMEXIT_MSR
due to RDMSR or WRMSR access to protected MSR. Additionally, the processor
indicates in the VMCB's EXITINFO1 whether a RDMSR(EXITINFO1=0) or
WRMSR(EXITINFO1=1) was intercepted.

Signed-off-by: Haiwei Li <lihaiwei@tencent.com>
Fixes: 1de34b6d3f8f ("KVM: VMX: FIXED+PHYSICAL mode single target IPI fastpath", 2019-11-21)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm.c