Re: [Xen-devel] [PATCH v4 08/20] x86emul: abstract out XCRn accesses

2018-03-08 Thread Jan Beulich
>>> On 05.03.18 at 16:56, wrote: > On 28/02/18 13:03, Jan Beulich wrote: >> @@ -5178,18 +5202,33 @@ x86_emulate( >> _regs.eflags |= X86_EFLAGS_AC; >> break; >> >> -#ifdef __XEN__ >> -case 0xd1: /* xsetbv */ >> +case 0xd0:

Re: [Xen-devel] [PATCH v4 08/20] x86emul: abstract out XCRn accesses

2018-03-05 Thread Andrew Cooper
On 28/02/18 13:03, Jan Beulich wrote: > @@ -5178,18 +5202,33 @@ x86_emulate( > _regs.eflags |= X86_EFLAGS_AC; > break; > > -#ifdef __XEN__ > -case 0xd1: /* xsetbv */ > +case 0xd0: /* xgetbv */ > generate_exception_if(vex.pfx, EXC_UD); >

[Xen-devel] [PATCH v4 08/20] x86emul: abstract out XCRn accesses

2018-02-28 Thread Jan Beulich
Use hooks, just like done for other special purpose registers. This includes moving XCR0 checks from hvmemul_get_fpu() to the emulator itself as well as adding support for XGETBV emulation. For now fuzzer reads will obtain the real values (minus the fuzzing of the hook pointer itself).