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

Re: [Xen-devel] Ping: [PATCH v2 6/6] x86emul: simplify FPU handling asm() constraints



On 15/12/16 09:52, Jan Beulich wrote:
>>>> On 08.12.16 at 12:38, <JBeulich@xxxxxxxx> wrote:
>> The memory clobber is rather harsh here. However, fic.exn_raised may be
>> modified as a side effect, so we need to let the compiler know that all
>> of "fic" may be changed (preventing it from moving around accesses to
>> the exn_raised field).
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> Ping? (The v1 discussion had stalled, so at that point it seemed best
> to simply re-send with the updates to the earlier patches.)

Sorry, yes.

Having considered this further (when considering my other exception
plans), I am now more convinced the code is already latently buggy, and
fixing that latent bug avoids the need for this.

exn_raised can be set at any point between a {get,put}_fpu(), not just
within these stubs.  It therefore should already be accessed with a
volatile reference to avoid breaking C's model of the world, as the
memory clobbers here are already not sufficient.

Fixing the volatility of access to exn_raised will allow the safe
dropping of the memory clobbers, without further modifying the memory
operands.

I already have a patch to do similar improvements to the time init code
from my memory barrier series. I will see about getting that posted.

~Andrew

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

 


Rackspace

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