Re: [Xen-devel] [PATCH 2/3] x86emul: check host features alongside guest ones where needed

2016-03-14 Thread Andrew Cooper
On 14/03/2016 08:29, Jan Beulich wrote:
 On 11.03.16 at 18:41,  wrote:
>> On 11/03/16 17:34, Jan Beulich wrote:
>>> Signed-off-by: Jan Beulich 
>>>
>>> --- a/xen/arch/x86/x86_emulate/x86_emulate.c
>>> +++ b/xen/arch/x86/x86_emulate/x86_emulate.c
>>> @@ -1093,6 +1093,22 @@ static bool_t vcpu_has(
>>>  #define vcpu_must_have_cx16() vcpu_must_have(0x0001, ECX, 13)
>>>  #define vcpu_must_have_avx()  vcpu_must_have(0x0001, ECX, 28)
>>>  
>>> +#ifdef __XEN__
>>> +/*
>>> + * Note the (subtle?) difference between vcpu_must_have_() and
>>> + * vcpu_must_have(): The former only checks guest feature flags,
>>> + * while the latter also checks host ones, i.e. is required to be used when
>>> + * emulation code is using the same instruction class for carrying out the
>>> + * actual operation).
>>> + */
>> This comment is now stale.
>>
>> With this dropped, Reviewed-by: Andrew Cooper 
> I suppose you're okay with it being adjusted instead of fully dropped:
>
> /*
>  * Note the difference between vcpu_must_have_() and
>  * host_and_vcpu_must_have(): The latter needs to be used when
>  * emulation code is using the same instruction class for carrying out
>  * the actual operation.
>  */

Yes - that's great.

~Andrew

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


Re: [Xen-devel] [PATCH 2/3] x86emul: check host features alongside guest ones where needed

2016-03-14 Thread Jan Beulich
>>> On 11.03.16 at 18:41,  wrote:
> On 11/03/16 17:34, Jan Beulich wrote:
>> Signed-off-by: Jan Beulich 
>>
>> --- a/xen/arch/x86/x86_emulate/x86_emulate.c
>> +++ b/xen/arch/x86/x86_emulate/x86_emulate.c
>> @@ -1093,6 +1093,22 @@ static bool_t vcpu_has(
>>  #define vcpu_must_have_cx16() vcpu_must_have(0x0001, ECX, 13)
>>  #define vcpu_must_have_avx()  vcpu_must_have(0x0001, ECX, 28)
>>  
>> +#ifdef __XEN__
>> +/*
>> + * Note the (subtle?) difference between vcpu_must_have_() and
>> + * vcpu_must_have(): The former only checks guest feature flags,
>> + * while the latter also checks host ones, i.e. is required to be used when
>> + * emulation code is using the same instruction class for carrying out the
>> + * actual operation).
>> + */
> 
> This comment is now stale.
> 
> With this dropped, Reviewed-by: Andrew Cooper 

I suppose you're okay with it being adjusted instead of fully dropped:

/*
 * Note the difference between vcpu_must_have_() and
 * host_and_vcpu_must_have(): The latter needs to be used when
 * emulation code is using the same instruction class for carrying out
 * the actual operation.
 */

Jan


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


Re: [Xen-devel] [PATCH 2/3] x86emul: check host features alongside guest ones where needed

2016-03-11 Thread Andrew Cooper
On 11/03/16 17:34, Jan Beulich wrote:
> Signed-off-by: Jan Beulich 
>
> --- a/xen/arch/x86/x86_emulate/x86_emulate.c
> +++ b/xen/arch/x86/x86_emulate/x86_emulate.c
> @@ -1093,6 +1093,22 @@ static bool_t vcpu_has(
>  #define vcpu_must_have_cx16() vcpu_must_have(0x0001, ECX, 13)
>  #define vcpu_must_have_avx()  vcpu_must_have(0x0001, ECX, 28)
>  
> +#ifdef __XEN__
> +/*
> + * Note the (subtle?) difference between vcpu_must_have_() and
> + * vcpu_must_have(): The former only checks guest feature flags,
> + * while the latter also checks host ones, i.e. is required to be used when
> + * emulation code is using the same instruction class for carrying out the
> + * actual operation).
> + */

This comment is now stale.

With this dropped, Reviewed-by: Andrew Cooper 

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