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

Re: [Xen-devel] [PATCH] x86/nmi: Fix shootdown of pcpus running in VMX non-root mode



>>> On 09.02.15 at 14:13, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 09/02/15 12:56, Jan Beulich wrote:
>> So wouldn't it be possible to get rid of nmi_crash() and have
>> nmi() call *nmi_handler instead of don_nmi (and nmi_handler
>> would really just become an alias of exception_table[2]?
> 
> nmi_crash() deliberately doesn't follow the handle_ist_exception path to
> avoid possibly switching stack and possibly returning back to a guest. 

Is the stack switching really dangerous here? And if it is, wouldn't
checking a suitable flag to skip it still be better than the mess of
NMI entry points?

> It has an emergency ud2 on the end to cover errors in do_nmi_crash().

That could as well be a BUG() at the end of do_nmi_crash() itself.

> Reusing exception_table[2] might be preferable to adding a new variable,
> but it would involve moving exception_table[] from rodata to data, which
> is rather less preferable overall.

Considering the purpose you need the modification for, stealing an
unused (at that time) fixmap entry and creating a writeable alias
mapping would seem a reasonable alternative to me.

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