From: "Li,Rongqing" <lirongqing@baidu.com>
To: Paolo Bonzini <pbonzini@redhat.com>, Jim Mattson <jmattson@google.com>
Cc: Xiaoyao Li <xiaoyao.li@intel.com>,
LKML <linux-kernel@vger.kernel.org>,
kvm list <kvm@vger.kernel.org>,
the arch/x86 maintainers <x86@kernel.org>,
"H . Peter Anvin" <hpa@zytor.com>, Borislav Petkov <bp@alien8.de>,
Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Wanpeng Li <wanpengli@tencent.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
"Sean Christopherson" <sean.j.christopherson@intel.com>,
"wei.huang2@amd.com" <wei.huang2@amd.com>
Subject: 答复: [PATCH][v6] KVM: X86: support APERF/MPERF registers
Date: Sat, 6 Jun 2020 11:53:23 +0000 [thread overview]
Message-ID: <15a134b739614f8bbaf18ce40662f6b3@baidu.com> (raw)
In-Reply-To: <a1aa9cc5-96c7-11fe-17e1-22fe46b940f3@redhat.com>
> -----邮件原件-----
> 发件人: Paolo Bonzini [mailto:pbonzini@redhat.com]
> 发送时间: 2020年6月6日 1:22
> 收件人: Jim Mattson <jmattson@google.com>
> 抄送: Xiaoyao Li <xiaoyao.li@intel.com>; Li,Rongqing <lirongqing@baidu.com>;
> LKML <linux-kernel@vger.kernel.org>; kvm list <kvm@vger.kernel.org>; the
> arch/x86 maintainers <x86@kernel.org>; H . Peter Anvin <hpa@zytor.com>;
> Borislav Petkov <bp@alien8.de>; Ingo Molnar <mingo@redhat.com>; Thomas
> Gleixner <tglx@linutronix.de>; Wanpeng Li <wanpengli@tencent.com>; Vitaly
> Kuznetsov <vkuznets@redhat.com>; Sean Christopherson
> <sean.j.christopherson@intel.com>; wei.huang2@amd.com
> 主题: Re: [PATCH][v6] KVM: X86: support APERF/MPERF registers
>
> On 05/06/20 19:16, Jim Mattson wrote:
> >>>> @@ -4930,6 +4939,11 @@ int kvm_vm_ioctl_enable_cap(struct kvm
> *kvm,
> >>>> kvm->arch.exception_payload_enabled = cap->args[0];
> >>>> r = 0;
> >>>> break;
> >>>> + case KVM_CAP_APERFMPERF:
> >>>> + kvm->arch.aperfmperf_mode =
> >>>> + boot_cpu_has(X86_FEATURE_APERFMPERF) ?
> cap->args[0] :
> >>>> + 0;
> >>> Shouldn't check whether cap->args[0] is a valid value?
> >> Yes, only valid values should be allowed.
> >>
> >> Also, it should fail with -EINVAL if the host does not have
> >> X86_FEATURE_APERFMPERF.
> > Should enabling/disabling this capability be disallowed once vCPUs
> > have been created?
> >
>
> That's a good idea, yes.
>
> Paolo
Thank you all, I will send a new version
-Li
prev parent reply other threads:[~2020-06-06 11:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-05 1:44 [PATCH][v6] KVM: X86: support APERF/MPERF registers Li RongQing
2020-06-05 2:32 ` Xu, Like
2020-06-05 4:23 ` 答复: " Li,Rongqing
2020-06-05 5:28 ` Like Xu
2020-06-05 9:41 ` 答复: " Li,Rongqing
2020-06-05 11:15 ` Paolo Bonzini
2020-06-05 5:00 ` Xiaoyao Li
2020-06-05 6:35 ` Paolo Bonzini
2020-06-05 17:16 ` Jim Mattson
2020-06-05 17:22 ` Paolo Bonzini
2020-06-06 11:53 ` Li,Rongqing [this message]
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=15a134b739614f8bbaf18ce40662f6b3@baidu.com \
--to=lirongqing@baidu.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=sean.j.christopherson@intel.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=wei.huang2@amd.com \
--cc=x86@kernel.org \
--cc=xiaoyao.li@intel.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).