From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>
Cc: Sean Christopherson <sean.j.christopherson@intel.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>,
Like Xu <like.xu@linux.intel.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] KVM: SVM: drop MSR_IA32_PERF_CAPABILITIES from emulated MSRs
Date: Tue, 16 Jun 2020 18:14:27 +0200 [thread overview]
Message-ID: <20200616161427.375651-1-vkuznets@redhat.com> (raw)
state_test/smm_test selftests are failing on AMD with:
"Unexpected result from KVM_GET_MSRS, r: 51 (failed MSR was 0x345)"
MSR_IA32_PERF_CAPABILITIES is an emulated MSR indeed but only on Intel,
make svm_has_emulated_msr() skip it so it is not returned by
KVM_GET_MSR_INDEX_LIST.
Fixes: 27461da31089 ("KVM: x86/pmu: Support full width counting")
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
arch/x86/kvm/svm/svm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index 8ccfa4197d9c..2c423d64fb8f 100644
--- a/arch/x86/kvm/svm/svm.c
+++ b/arch/x86/kvm/svm/svm.c
@@ -3539,6 +3539,8 @@ static bool svm_has_emulated_msr(u32 index)
case MSR_IA32_MCG_EXT_CTL:
case MSR_IA32_VMX_BASIC ... MSR_IA32_VMX_VMFUNC:
return false;
+ case MSR_IA32_PERF_CAPABILITIES:
+ return false;
default:
break;
}
--
2.25.4
next reply other threads:[~2020-06-16 16:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-16 16:14 Vitaly Kuznetsov [this message]
2020-06-16 16:24 ` [PATCH] KVM: SVM: drop MSR_IA32_PERF_CAPABILITIES from emulated MSRs Jim Mattson
2020-06-16 16:45 ` Vitaly Kuznetsov
2020-06-16 16:52 ` Jim Mattson
2020-06-17 11:38 ` Vitaly Kuznetsov
2020-06-17 16:47 ` Jim Mattson
2020-06-17 17:17 ` Paolo Bonzini
2020-06-18 11:08 ` Vitaly Kuznetsov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200616161427.375651-1-vkuznets@redhat.com \
--to=vkuznets@redhat.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=like.xu@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=sean.j.christopherson@intel.com \
--cc=wanpengli@tencent.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).