From: Richard Henderson <richard.henderson@linaro.org>
To: Roman Bolshakov <r.bolshakov@yadro.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
QEMU Developers <qemu-devel@nongnu.org>,
Cameron Esfahani <dirty@apple.com>,
John Arbuckle <programmingkidx@gmail.com>,
Hill Ma <maahiuzeon@gmail.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH] hvf: guard xgetbv call.
Date: Mon, 11 Jan 2021 07:06:22 -1000 [thread overview]
Message-ID: <259b9e96-1f69-4e4a-16ef-7034e19ed1ef@linaro.org> (raw)
In-Reply-To: <X/vUjHCd81PvEflw@SPB-NB-133.local>
On 1/10/21 6:31 PM, Roman Bolshakov wrote:
>> Also, if we're going to put this some place common, forcing the caller to do
>> the cpuid that feeds this, then we should probably make all of the startup
>> cpuid stuff common as well.
>>
>
> I proposed the version because all callers of xgetbv instruction already
> call cpuid before invoking inline xgetbv.
>
>> Note that we'd probably have to use constructor priorities to get that right
>> for util/bufferiszero.c.
>>
>
> Please correct me if I read this wrong. What you're saying is we should
> initialize cpuid in constructors and then use cached cpuid ecx in
> xgetbv() (and drop one argument, respectively)?
I would have xgetbv and all of the cpuid values cached at startup, and all
three places would read global variables.
r~
next prev parent reply other threads:[~2021-01-11 17:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-19 2:13 [PATCH] hvf: guard xgetbv call Hill Ma
2021-01-09 5:48 ` Roman Bolshakov
2021-01-09 11:42 ` Peter Maydell
2021-01-10 1:46 ` Roman Bolshakov
2021-01-10 18:34 ` Richard Henderson
2021-01-10 18:38 ` Richard Henderson
2021-01-11 4:31 ` Roman Bolshakov
2021-01-11 17:06 ` Richard Henderson [this message]
2021-01-12 7:49 ` Roman Bolshakov
2021-01-12 15:28 ` Richard Henderson
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=259b9e96-1f69-4e4a-16ef-7034e19ed1ef@linaro.org \
--to=richard.henderson@linaro.org \
--cc=dirty@apple.com \
--cc=maahiuzeon@gmail.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=programmingkidx@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=r.bolshakov@yadro.com \
--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).