Re: [Xen-devel] [PATCH v2 12/13] fuzz/x86_emulate: Set and fuzz more CPU state

2017-10-10 Thread George Dunlap
On 10/06/2017 12:56 PM, Jan Beulich wrote: On 25.09.17 at 16:26, wrote: >> @@ -597,6 +599,47 @@ static const struct x86_emulate_ops all_fuzzer_ops = { >> }; >> #undef SET >> >> +static void _set_fpu_state(char *fxsave, bool store) >> +{ >> +if ( cpu_has_fxsr ) >> +{ >> +st

Re: [Xen-devel] [PATCH v2 12/13] fuzz/x86_emulate: Set and fuzz more CPU state

2017-10-06 Thread Jan Beulich
>>> On 25.09.17 at 16:26, wrote: > @@ -597,6 +599,47 @@ static const struct x86_emulate_ops all_fuzzer_ops = { > }; > #undef SET > > +static void _set_fpu_state(char *fxsave, bool store) > +{ > +if ( cpu_has_fxsr ) > +{ > +static union __attribute__((__aligned__(16))) { > +

Re: [Xen-devel] [PATCH v2 12/13] fuzz/x86_emulate: Set and fuzz more CPU state

2017-10-06 Thread Jan Beulich
>>> On 06.10.17 at 12:50, wrote: > On 10/06/2017 10:57 AM, Jan Beulich wrote: > On 05.10.17 at 19:08, wrote: >>> On 10/04/2017 09:28 AM, Jan Beulich wrote: >>> On 25.09.17 at 16:26, wrote: > @@ -597,6 +599,47 @@ static const struct x86_emulate_ops all_fuzzer_ops = > { > };

Re: [Xen-devel] [PATCH v2 12/13] fuzz/x86_emulate: Set and fuzz more CPU state

2017-10-06 Thread George Dunlap
On 10/06/2017 07:10 AM, Jan Beulich wrote: George Dunlap 10/05/17 7:08 PM >>> >> On 10/04/2017 09:28 AM, Jan Beulich wrote: >> On 25.09.17 at 16:26, wrote: @@ -597,6 +599,47 @@ static const struct x86_emulate_ops all_fuzzer_ops = { }; #undef SET +static void

Re: [Xen-devel] [PATCH v2 12/13] fuzz/x86_emulate: Set and fuzz more CPU state

2017-10-06 Thread George Dunlap
On 10/06/2017 10:57 AM, Jan Beulich wrote: On 05.10.17 at 19:08, wrote: >> On 10/04/2017 09:28 AM, Jan Beulich wrote: >> On 25.09.17 at 16:26, wrote: @@ -597,6 +599,47 @@ static const struct x86_emulate_ops all_fuzzer_ops = { }; #undef SET +static void _set_f

Re: [Xen-devel] [PATCH v2 12/13] fuzz/x86_emulate: Set and fuzz more CPU state

2017-10-06 Thread Jan Beulich
>>> On 05.10.17 at 19:08, wrote: > On 10/04/2017 09:28 AM, Jan Beulich wrote: > On 25.09.17 at 16:26, wrote: >>> @@ -597,6 +599,47 @@ static const struct x86_emulate_ops all_fuzzer_ops = { >>> }; >>> #undef SET >>> >>> +static void _set_fpu_state(char *fxsave, bool store) >>> +{ >>> +

Re: [Xen-devel] [PATCH v2 12/13] fuzz/x86_emulate: Set and fuzz more CPU state

2017-10-05 Thread Jan Beulich
>>> George Dunlap 10/05/17 7:08 PM >>> >On 10/04/2017 09:28 AM, Jan Beulich wrote: > On 25.09.17 at 16:26, wrote: >>> @@ -597,6 +599,47 @@ static const struct x86_emulate_ops all_fuzzer_ops = { >>> }; >>> #undef SET >>> >>> +static void _set_fpu_state(char *fxsave, bool store) >>> +{ >>>

Re: [Xen-devel] [PATCH v2 12/13] fuzz/x86_emulate: Set and fuzz more CPU state

2017-10-05 Thread George Dunlap
On 10/04/2017 09:28 AM, Jan Beulich wrote: On 25.09.17 at 16:26, wrote: >> @@ -597,6 +599,47 @@ static const struct x86_emulate_ops all_fuzzer_ops = { >> }; >> #undef SET >> >> +static void _set_fpu_state(char *fxsave, bool store) >> +{ >> +if ( cpu_has_fxsr ) >> +{ >> +st

Re: [Xen-devel] [PATCH v2 12/13] fuzz/x86_emulate: Set and fuzz more CPU state

2017-10-04 Thread Jan Beulich
>>> On 25.09.17 at 16:26, wrote: > @@ -597,6 +599,47 @@ static const struct x86_emulate_ops all_fuzzer_ops = { > }; > #undef SET > > +static void _set_fpu_state(char *fxsave, bool store) > +{ > +if ( cpu_has_fxsr ) > +{ > +static union __attribute__((__aligned__(16))) { > +

[Xen-devel] [PATCH v2 12/13] fuzz/x86_emulate: Set and fuzz more CPU state

2017-09-25 Thread George Dunlap
x86_emulate() operates not only on state passed to it in cpu_user_regs, but also on state currently found on the cpu: namely, the FPU and XMM registers. At the moment, we re-zero (and/or re-initialize) cpu_user_regs on every invocation, but leave the cpu-stored state alone. In "persistent mode",