[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2] x86/emul: Implement the STAC and CLAC instructions
>>> On 12.12.16 at 18:39, <andrew.cooper3@xxxxxxxxxx> wrote: > --- a/xen/arch/x86/x86_emulate/x86_emulate.c > +++ b/xen/arch/x86/x86_emulate/x86_emulate.c > @@ -433,6 +433,7 @@ typedef union { > #define CR4_OSXMMEXCPT (1<<10) > #define CR4_UMIP (1<<11) > #define CR4_OSXSAVE (1<<18) > +#define CR4_SMAP (1<<21) I don't think this is needed anymore? > @@ -4354,6 +4356,18 @@ x86_emulate( > > switch( modrm ) > { > + case 0xca: /* clac */ > + case 0xcb: /* stac */ > + vcpu_must_have(smap); > + generate_exception_if( > + lock_prefix || vex.pfx || > + (_regs.eflags & EFLG_VM) || !mode_ring0(), EXC_UD); mode_ring0() already excludes EFLAGS.VM being set. Also please use more conventional indentation here (no need to break the line before the first argument). With all of these taken care of Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |