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

Re: [RFC PATCH 15/26] x86/alternatives: Non-emulated text poking



On Tue, Apr 07, 2020 at 10:03:12PM -0700, Ankur Arora wrote:
> +static void __maybe_unused sync_one(void)
> +{
> +     /*
> +      * We might be executing in NMI context, and so cannot use
> +      * IRET as a synchronizing instruction.
> +      *
> +      * We could use native_write_cr2() but that is not guaranteed
> +      * to work on Xen-PV -- it is emulated by Xen and might not
> +      * execute an iret (or similar synchronizing instruction)
> +      * internally.
> +      *
> +      * cpuid() would trap as well. Unclear if that's a solution
> +      * either.
> +      */
> +     if (in_nmi())
> +             cpuid_eax(1);
> +     else
> +             sync_core();
> +}

That's not thinking staight; what do you think the INT3 does when it
happens inside an NMI ?



 


Rackspace

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