[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hvf: guard xgetbv call.
From: |
Roman Bolshakov |
Subject: |
Re: [PATCH] hvf: guard xgetbv call. |
Date: |
Tue, 12 Jan 2021 10:49:07 +0300 |
On Mon, Jan 11, 2021 at 07:06:22AM -1000, Richard Henderson wrote:
> 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.
>
It makes sense, thanks for the clarification.
Do you think it should be part of the change Hill is doing or it might
be a follow-up cleanup patch?
-Roman
- Re: [PATCH] hvf: guard xgetbv call., Roman Bolshakov, 2021/01/09
- Re: [PATCH] hvf: guard xgetbv call., Peter Maydell, 2021/01/09
- Re: [PATCH] hvf: guard xgetbv call., Roman Bolshakov, 2021/01/09
- Re: [PATCH] hvf: guard xgetbv call., Richard Henderson, 2021/01/10
- Re: [PATCH] hvf: guard xgetbv call., Richard Henderson, 2021/01/10
- Re: [PATCH] hvf: guard xgetbv call., Roman Bolshakov, 2021/01/10
- Re: [PATCH] hvf: guard xgetbv call., Richard Henderson, 2021/01/11
- Re: [PATCH] hvf: guard xgetbv call.,
Roman Bolshakov <=
- Re: [PATCH] hvf: guard xgetbv call., Richard Henderson, 2021/01/12