Re: [Xen-devel] [PATCH v5 03/14] x86emul: abstract out XCRn accesses

2018-03-20 Thread George Dunlap
On 03/15/2018 01:04 PM, Jan Beulich wrote: > 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

Re: [Xen-devel] [PATCH v5 03/14] x86emul: abstract out XCRn accesses

2018-03-19 Thread Paul Durrant
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: 15 March 2018 13:04 > To: xen-devel > Cc: Andrew Cooper ; Paul Durrant > ; George Dunlap > Subject:

Re: [Xen-devel] [PATCH v5 03/14] x86emul: abstract out XCRn accesses

2018-03-15 Thread Jan Beulich
>>> On 15.03.18 at 16:41, wrote: > On 15/03/18 13:04, Jan Beulich wrote: >> --- a/xen/arch/x86/x86_emulate.c >> +++ b/xen/arch/x86/x86_emulate.c >> @@ -42,3 +42,50 @@ >> }) >> >> #include "x86_emulate/x86_emulate.c" >> + >> +int x86emul_read_xcr(unsigned int reg,

Re: [Xen-devel] [PATCH v5 03/14] x86emul: abstract out XCRn accesses

2018-03-15 Thread Andrew Cooper
On 15/03/18 13:04, Jan Beulich wrote: > --- a/xen/arch/x86/x86_emulate.c > +++ b/xen/arch/x86/x86_emulate.c > @@ -42,3 +42,50 @@ > }) > > #include "x86_emulate/x86_emulate.c" > + > +int x86emul_read_xcr(unsigned int reg, uint64_t *val, > + struct x86_emulate_ctxt *ctxt) >

Re: [Xen-devel] [PATCH v5 03/14] x86emul: abstract out XCRn accesses

2018-03-15 Thread Andrew Cooper
On 15/03/18 13:44, Jan Beulich wrote: On 15.03.18 at 14:35, wrote: >> On 15/03/18 13:04, Jan Beulich wrote: >>> static inline void x86_emul_hw_exception( >>> --- a/xen/arch/x86/x86_emulate.c >>> +++ b/xen/arch/x86/x86_emulate.c >>> @@ -42,3 +42,50 @@ >>> }) >>>

Re: [Xen-devel] [PATCH v5 03/14] x86emul: abstract out XCRn accesses

2018-03-15 Thread Jan Beulich
>>> On 15.03.18 at 14:35, wrote: > On 15/03/18 13:04, Jan Beulich wrote: >> static inline void x86_emul_hw_exception( >> --- a/xen/arch/x86/x86_emulate.c >> +++ b/xen/arch/x86/x86_emulate.c >> @@ -42,3 +42,50 @@ >> }) >> >> #include "x86_emulate/x86_emulate.c" >> +

Re: [Xen-devel] [PATCH v5 03/14] x86emul: abstract out XCRn accesses

2018-03-15 Thread Andrew Cooper
On 15/03/18 13:04, Jan Beulich wrote: > static inline void x86_emul_hw_exception( > --- a/xen/arch/x86/x86_emulate.c > +++ b/xen/arch/x86/x86_emulate.c > @@ -42,3 +42,50 @@ > }) > > #include "x86_emulate/x86_emulate.c" > + > +int x86emul_read_xcr(unsigned int reg, uint64_t *val, > +

[Xen-devel] [PATCH v5 03/14] x86emul: abstract out XCRn accesses

2018-03-15 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).