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

Re: [Xen-devel] [PATCH v2 2/2] x86/hvm: add support for pcommit instruction



>>> On 08.01.16 at 02:15, <haozhong.zhang@xxxxxxxxx> wrote:
> On 01/07/16 06:53, Jan Beulich wrote:
>> >>> On 30.12.15 at 12:48, <haozhong.zhang@xxxxxxxxx> wrote:
>> > --- a/xen/arch/x86/hvm/hvm.c
>> > +++ b/xen/arch/x86/hvm/hvm.c
>> > @@ -4605,6 +4605,9 @@ void hvm_cpuid(unsigned int input, unsigned int 
>> > *eax, 
> unsigned int *ebx,
>> >  
>> >              if ( !cpu_has_clwb )
>> >                  *ebx &= ~cpufeat_mask(X86_FEATURE_CLWB);
>> > +
>> > +            if ( !cpu_has_pcommit )
>> > +                *ebx &= ~cpufeat_mask(X86_FEATURE_PCOMMIT);
>> 
>> Other than for patch 1, this not only need to stay, but needs to be
>> extended along the lines of X86_FEATURE_MPX handling.
>>
> 
> In section "PCOMMIT - Virtualization Support" of Intel Architecture
> Instruction Set Extensions Programming Reference, it says
> 
>     IA32_VMX_PROCBASED_CTLS2[53] (which enumerates support for the
>     1-setting of âPCOMMIT exitingâ) is always the same as
>     CPUID.07H:EBX.PCOMMIT[bit 22].
> 
> so checking cpu_has_pcommit is enough here.

Even if the documentation says so, I think it is appropriate (as
indicated at the very least to match with MPX handling) to add
the check (here or elsewhere), just to make obvious that both
are a prereq.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.