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
> -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:
>>> 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,
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)
>
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 @@
>>> })
>>>
>>> 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"
>> +
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,
> +
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).