[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 3/4] x86: use optimal NOPs to fill the SMEP/SMAP placeholders
On 17/03/16 08:03, Jan Beulich wrote: > Alternatives patching code picks the most suitable NOPs for the > running system, so simply use it to replace the pre-populated ones. > > Use an arbitrary, always available feature to key off from, but > hide this behind the new X86_FEATURE_ALWAYS. > > Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> > --- > v3: Re-base. > v2: Introduce and use X86_FEATURE_ALWAYS. > > --- a/xen/arch/x86/x86_64/compat/entry.S > +++ b/xen/arch/x86/x86_64/compat/entry.S > @@ -175,12 +175,7 @@ compat_bad_hypercall: > ENTRY(compat_restore_all_guest) > ASSERT_INTERRUPTS_DISABLED > .Lcr4_orig: > - ASM_NOP8 /* testb $3,UREGS_cs(%rsp) */ > - ASM_NOP2 /* jpe .Lcr4_alt_end */ > - ASM_NOP8 /* mov CPUINFO_cr4...(%rsp), %rax */ > - ASM_NOP6 /* and $..., %rax */ > - ASM_NOP8 /* mov %rax, CPUINFO_cr4...(%rsp) */ > - ASM_NOP3 /* mov %rax, %cr4 */ > + .skip (.Lcr4_alt_end - .Lcr4_alt) - (. - .Lcr4_orig), 0x90 > .Lcr4_orig_end: > .pushsection .altinstr_replacement, "ax" > .Lcr4_alt: This hunk should live in patch 2. Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |