>>> On 24.11.16 at 14:59, wrote:
> On 24/11/16 13:44, Jan Beulich wrote:
> On 23.11.16 at 16:38, wrote:
>>> --- a/xen/arch/x86/x86_emulate/x86_emulate.c
>>> +++ b/xen/arch/x86/x86_emulate/x86_emulate.c
>>> @@ -1904,6 +1904,8 @@ x86_decode(
>>> state->regs = ctxt->regs;
>>> state->ei
On 24/11/16 13:44, Jan Beulich wrote:
On 23.11.16 at 16:38, wrote:
>> --- a/xen/arch/x86/mm.c
>> +++ b/xen/arch/x86/mm.c
>> @@ -5363,8 +5363,9 @@ int ptwr_do_page_fault(struct vcpu *v, unsigned long
>> addr,
>> goto bail;
>> }
>>
>> +memset(&ptwr_ctxt, 0, sizeof(ptwr_ctxt
>>> On 23.11.16 at 16:38, wrote:
> --- a/xen/arch/x86/mm.c
> +++ b/xen/arch/x86/mm.c
> @@ -5363,8 +5363,9 @@ int ptwr_do_page_fault(struct vcpu *v, unsigned long
> addr,
> goto bail;
> }
>
> +memset(&ptwr_ctxt, 0, sizeof(ptwr_ctxt));
> +
> ptwr_ctxt.ctxt.regs = regs;
> -
At 15:38 + on 23 Nov (1479915525), Andrew Cooper wrote:
> The current code to set up emulation state is ad-hoc and error prone.
>
> * Consistently zero all emulation state structures.
> * Avoid explicitly initialising some state to 0.
> * Explicitly identify all input and output state in x8
> -Original Message-
> From: Andrew Cooper
> Sent: 23 November 2016 16:01
> To: Paul Durrant ; Xen-devel de...@lists.xen.org>
> Cc: Jan Beulich ; Tim (Xen.org) ; George
> Dunlap
> Subject: Re: [PATCH 02/15] x86/emul: Simplfy emulation state setup
>
> On 23/11/16 15:58, Paul Durrant wrote
On 23/11/16 15:58, Paul Durrant wrote:
>> diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c
>> b/xen/arch/x86/x86_emulate/x86_emulate.c
>> index 04f0dac..c5d9664 100644
>> --- a/xen/arch/x86/x86_emulate/x86_emulate.c
>> +++ b/xen/arch/x86/x86_emulate/x86_emulate.c
>> @@ -1904,6 +1904,8 @@ x86_dec
> -Original Message-
> From: Andrew Cooper [mailto:andrew.coop...@citrix.com]
> Sent: 23 November 2016 15:39
> To: Xen-devel
> Cc: Andrew Cooper ; Jan Beulich
> ; Tim (Xen.org) ; George Dunlap
> ; Paul Durrant
> Subject: [PATCH 02/15] x86/emul: Simplfy emulation state setup
>
> The curre
The current code to set up emulation state is ad-hoc and error prone.
* Consistently zero all emulation state structures.
* Avoid explicitly initialising some state to 0.
* Explicitly identify all input and output state in x86_emulate_ctxt. This
involves rearanging some fields.
* Have x86_