From: Tao Xu <tao3.xu@intel.com>
To: "pbonzini@redhat.com" <pbonzini@redhat.com>
Cc: "ehabkost@redhat.com" <ehabkost@redhat.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"Liu, Jingqi" <jingqi.liu@intel.com>,
"mtosatti@redhat.com" <mtosatti@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"rth@twiddle.net" <rth@twiddle.net>
Subject: Re: [PATCH RESEND v6 1/2] x86/cpu: Add support for UMONITOR/UMWAIT/TPAUSE
Date: Fri, 18 Oct 2019 09:00:08 +0800 [thread overview]
Message-ID: <60857ac6-ec04-2197-235c-d20600001a02@intel.com> (raw)
In-Reply-To: <1731d87f-f07a-916f-90a7-346b593d821e@intel.com>
Hi Paolo,
Ping :)
On 10/11/2019 3:49 PM, Tao Xu wrote:
> On 10/11/2019 3:41 PM, Xu, Tao3 wrote:
> [...]
>> diff --git a/target/i386/kvm.c b/target/i386/kvm.c
>> index 11b9c854b5..a465c893b5 100644
>> --- a/target/i386/kvm.c
>> +++ b/target/i386/kvm.c
>> @@ -401,6 +401,12 @@ uint32_t kvm_arch_get_supported_cpuid(KVMState
>> *s, uint32_t function,
>> if (host_tsx_blacklisted()) {
>> ret &= ~(CPUID_7_0_EBX_RTM | CPUID_7_0_EBX_HLE);
>> }
>> + } else if (function == 7 && index == 0 && reg == R_ECX) {
>> + if (enable_cpu_pm) {
>> + ret |= CPUID_7_0_ECX_WAITPKG;
>> + } else {
>> + ret &= ~CPUID_7_0_ECX_WAITPKG;
>> + }
>
> Hi Paolo,
>
> I am sorry because I realize in KVM side, I keep cpuid mask WAITPKG as 0:
>
> F(CLDEMOTE) | F(MOVDIRI) | F(MOVDIR64B) | 0 /*WAITPKG*/;
>
> Therefore in QEMU side, we need to add CPUID_7_0_ECX_WAITPKG when
> enable_cpu_pm is on. Otherwise, QEMU can't get this CPUID.
>
> Could you review this part again? Thank you very much!
>
> Tao
next prev parent reply other threads:[~2019-10-18 1:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-11 7:41 [PATCH RESEND v6 0/2] x86: Enable user wait instructions Tao Xu
2019-10-11 7:41 ` [PATCH RESEND v6 1/2] x86/cpu: Add support for UMONITOR/UMWAIT/TPAUSE Tao Xu
2019-10-11 7:49 ` Tao Xu
2019-10-18 1:00 ` Tao Xu [this message]
2019-10-11 7:41 ` [PATCH RESEND v6 2/2] target/i386: Add support for save/load IA32_UMWAIT_CONTROL MSR Tao Xu
2019-10-22 16:50 ` [PATCH RESEND v6 0/2] x86: Enable user wait instructions Paolo Bonzini
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=60857ac6-ec04-2197-235c-d20600001a02@intel.com \
--to=tao3.xu@intel.com \
--cc=ehabkost@redhat.com \
--cc=jingqi.liu@intel.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).