[Xen-devel] [PATCH v3 09/24] x86/emul: Provide a wrapper to x86_emulate() to ASSERT() certain behaviour

2016-11-30 Thread Andrew Cooper
In debug builds, confirm that some properties of x86_emulate()'s behaviour actually hold. The first property, fixed in a previous change, is that retire flags are only ever set in the X86EMUL_OKAY case. While adjusting the userspace test harness to cope with ASSERT() in x86_emulate.h, fix a build

Re: [Xen-devel] [PATCH v3 09/24] x86/emul: Provide a wrapper to x86_emulate() to ASSERT() certain behaviour

2016-12-01 Thread Jan Beulich
>>> On 30.11.16 at 14:50, wrote: > In debug builds, confirm that some properties of x86_emulate()'s behaviour > actually hold. The first property, fixed in a previous change, is that retire > flags are only ever set in the X86EMUL_OKAY case. > > While adjusting the userspace test harness to cope

Re: [Xen-devel] [PATCH v3 09/24] x86/emul: Provide a wrapper to x86_emulate() to ASSERT() certain behaviour

2016-12-01 Thread Andrew Cooper
On 01/12/16 10:40, Jan Beulich wrote: > >> --- a/xen/arch/x86/x86_emulate/x86_emulate.c >> +++ b/xen/arch/x86/x86_emulate/x86_emulate.c >> @@ -2404,6 +2404,11 @@ x86_decode( >> #undef insn_fetch_bytes >> #undef insn_fetch_type >> >> +/* Undo DEBUG wrapper. */ >> +#ifdef x86_emulate >> +#undef x

Re: [Xen-devel] [PATCH v3 09/24] x86/emul: Provide a wrapper to x86_emulate() to ASSERT() certain behaviour

2016-12-01 Thread Jan Beulich
>>> On 01.12.16 at 11:58, wrote: > On 01/12/16 10:40, Jan Beulich wrote: >> >>> --- a/xen/arch/x86/x86_emulate/x86_emulate.c >>> +++ b/xen/arch/x86/x86_emulate/x86_emulate.c >>> @@ -2404,6 +2404,11 @@ x86_decode( >>> #undef insn_fetch_bytes >>> #undef insn_fetch_type >>> >>> +/* Undo DEBUG wra