Re: [Qemu-devel] [PATCH 5/5] target-i386: implement PKE for TCG

2016-02-17 Thread Paolo Bonzini
On 09/02/2016 19:13, Richard Henderson wrote: >> >> +{ >> +if ((env->cr[4] & CR4_PKE_MASK) == 0) { >> +raise_exception_err_ra(env, EXCP06_ILLOP, 0, GETPC()); >> +return; >> +} > > The document I have says #GP for this case, not #UD. The text says #GP, the "Protected Mode

Re: [Qemu-devel] [PATCH 5/5] target-i386: implement PKE for TCG

2016-02-09 Thread Richard Henderson
On 02/10/2016 04:13 AM, Paolo Bonzini wrote: @@ -157,6 +157,7 @@ #define HF_SMAP_SHIFT 23 /* CR4.SMAP */ #define HF_IOBPT_SHIFT 24 /* an io breakpoint enabled */ #define HF_OSXSAVE_SHIFT25 /* CR4.OSXSAVE */ +#define HF_PKE_SHIFT26 /* CR4.PKE enabled */ I don't belie

[Qemu-devel] [PATCH 5/5] target-i386: implement PKE for TCG

2016-02-09 Thread Paolo Bonzini
This includes setting up TLB permissions, the new RDPKRU/WRPKRU instructions, and XSAVE support. Signed-off-by: Paolo Bonzini --- target-i386/cpu.c | 2 +- target-i386/cpu.h | 8 ++- target-i386/fpu_helper.c | 54 +++ target-i386