[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] hvf: guard xgetbv call.

From: Richard Henderson
Subject: Re: [PATCH] hvf: guard xgetbv call.
Date: Mon, 11 Jan 2021 07:06:22 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]