Re: [Xen-devel] [PATCH v2] x86/emul: Implement the STAC and CLAC instructions

2016-12-13 Thread Jan Beulich
>>> On 12.12.16 at 18:39, 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<<2

[Xen-devel] [PATCH v2] x86/emul: Implement the STAC and CLAC instructions

2016-12-12 Thread Andrew Cooper
Note that unlike most privilege restricted instructions, STAC and CLAC are documented to raise #UD rather than #GP[0], and indeed do so. Signed-off-by: Andrew Cooper --- CC: Jan Beulich v2: * Exclude the use of legacy prefixes. Their exclusion is undocumented but consistent with observed b