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

Re: [Xen-devel] [PATCH] xen: vmx: Use an INT 2 call to process real NMI's instead of self_nmi() in VMEXIT handler



>>> On 13.11.12 at 14:39, Tim Deegan <tim@xxxxxxx> wrote:
> At 13:29 +0000 on 13 Nov (1352813350), Ian Campbell wrote:
>> On Tue, 2012-11-13 at 13:21 +0000, Malcolm Crossley wrote:
>> > --- a/xen/arch/x86/hvm/vmx/vmx.c
>> > +++ b/xen/arch/x86/hvm/vmx/vmx.c
>> > @@ -2442,7 +2442,7 @@ void vmx_vmexit_handler(struct cpu_user_
>> >                   (X86_EVENTTYPE_NMI << 8) )
>> >                  goto exit_and_crash;
>> >              HVMTRACE_0D(NMI);
>> > -            self_nmi(); /* Real NMI, vector 2: normal processing. */
>> > +            asm("int $2"); /* Real NMI, vector 2: normal processing. */
>> 
>>                asm volatile("...")
>> 
>> I think? Otherwise this could potentially get hoisted up
> 
> Good catch.  Hoisted would be fine, but it could also be entirely
> discarded. :)
> 
>> Do we need any clobbers? Specifically I'm thinking of memory since
>> taking an int2 ought to preserve register state.
> 
> I don't think so - nothing on this path depends on the actual behaviour
> of the NMI handler.

We should still add it, as the NMI handler does modify global
memory. Even if you can't spot any dependency now, it would
be a rather hard to debug problem if there was, or if there ever
gets something added to that effect.

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®.