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

Re: [Xen-devel] [PATCH] x86emul: suppress general register update upon AVX gather failures



>>> On 01.04.19 at 16:04, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 29/03/2019 09:39, Jan Beulich wrote:
>> --- a/xen/arch/x86/x86_emulate/x86_emulate.c
>> +++ b/xen/arch/x86/x86_emulate/x86_emulate.c
>> @@ -8547,6 +8547,9 @@ x86_emulate(
>>          invoke_stub("", "", "+m" (mask) : "a" (&mask));
>>          put_stub(stub);
>>  
>> +        if ( rc != X86EMUL_OKAY )
>> +            goto done;
> 
> This obviously is needed to fix the problem as it manifested for George,
> but in the case that we take a fault/retry on iteration 0, shouldn't we
> skip the writeback as well?

No, not really, or at least not in all cases:

"If the data size and index size are different, part of the destination
 register and part of the mask register do not correspond to any
 elements being gathered. This instruction sets those parts to zero. It
 may do this to one or both of those registers even if the instruction
 triggers an exception, and even if the instruction triggers the
 exception before gathering any elements."

I realize this is all "may", but iirc I had tried it out on some of the
hardware I have, and it indeed did so there.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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