From: Roman Bolshakov <r.bolshakov@yadro.com>
To: Jessica Clarke <jrtc27@jrtc27.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>,
qemu-devel@nongnu.org, Cameron Esfahani <dirty@apple.com>,
Eduardo Habkost <ehabkost@redhat.com>
Subject: Re: [PATCH] hvf: Gate RDTSCP on CPU_BASED2_RDTSCP, not just CPU_BASED_TSC_OFFSET
Date: Wed, 18 Nov 2020 20:08:28 +0300 [thread overview]
Message-ID: <20201118170828.GF81070@SPB-NB-133.local> (raw)
In-Reply-To: <20201116200319.28138-1-jrtc27@jrtc27.com>
On Mon, Nov 16, 2020 at 08:03:19PM +0000, Jessica Clarke wrote:
> Buglink: https://bugs.launchpad.net/qemu/+bug/1894836
> Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
> ---
> target/i386/hvf/x86_cpuid.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/target/i386/hvf/x86_cpuid.c b/target/i386/hvf/x86_cpuid.c
> index 16762b6eb4..fc1f87ec57 100644
> --- a/target/i386/hvf/x86_cpuid.c
> +++ b/target/i386/hvf/x86_cpuid.c
> @@ -122,6 +122,10 @@ uint32_t hvf_get_supported_cpuid(uint32_t func, uint32_t idx,
> CPUID_PAT | CPUID_PSE36 | CPUID_EXT2_MMXEXT | CPUID_MMX |
> CPUID_FXSR | CPUID_EXT2_FXSR | CPUID_EXT2_PDPE1GB | CPUID_EXT2_3DNOWEXT |
> CPUID_EXT2_3DNOW | CPUID_EXT2_LM | CPUID_EXT2_RDTSCP | CPUID_EXT2_NX;
> + hv_vmx_read_capability(HV_VMX_CAP_PROCBASED2, &cap);
> + if (!(cap & CPU_BASED2_RDTSCP)) {
> + edx &= ~CPUID_EXT2_RDTSCP;
> + }
> hv_vmx_read_capability(HV_VMX_CAP_PROCBASED, &cap);
> if (!(cap & CPU_BASED_TSC_OFFSET)) {
> edx &= ~CPUID_EXT2_RDTSCP;
> --
> 2.28.0
>
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
Thanks,
Roman
prev parent reply other threads:[~2020-11-18 17:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-16 20:03 [PATCH] hvf: Gate RDTSCP on CPU_BASED2_RDTSCP, not just CPU_BASED_TSC_OFFSET Jessica Clarke
2020-11-17 8:42 ` Paolo Bonzini
2020-11-18 17:08 ` Roman Bolshakov [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=20201118170828.GF81070@SPB-NB-133.local \
--to=r.bolshakov@yadro.com \
--cc=dirty@apple.com \
--cc=ehabkost@redhat.com \
--cc=jrtc27@jrtc27.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/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).