Re: [Xen-devel] [PATCH v3 01/18] x86emul: catch exceptions occurring in stubs

2017-02-15 Thread Jan Beulich
>>> On 15.02.17 at 12:27, wrote: > On 15/02/17 11:06, Jan Beulich wrote: >> --- a/xen/arch/x86/x86_emulate/x86_emulate.c >> +++ b/xen/arch/x86/x86_emulate/x86_emulate.c >> @@ -604,14 +604,42 @@ do{ asm volatile ( >> #define __emulate_1op_8byte(_op, _dst, _eflags) >> #endif /* __i386__ */ >> >>

Re: [Xen-devel] [PATCH v3 01/18] x86emul: catch exceptions occurring in stubs

2017-02-15 Thread Andrew Cooper
On 15/02/17 11:06, Jan Beulich wrote: > --- a/xen/arch/x86/x86_emulate/x86_emulate.c > +++ b/xen/arch/x86/x86_emulate/x86_emulate.c > @@ -604,14 +604,42 @@ do{ asm volatile ( > #define __emulate_1op_8byte(_op, _dst, _eflags) > #endif /* __i386__ */ > > +#ifdef __XEN__ > +# define invoke_stub(pr

[Xen-devel] [PATCH v3 01/18] x86emul: catch exceptions occurring in stubs

2017-02-15 Thread Jan Beulich
Before adding more use of stubs cloned from decoded guest insns, guard ourselves against mistakes there: Should an exception (with the noteworthy exception of #PF) occur inside the stub, forward it to the guest. Since the exception fixup table entry can't encode the address of the faulting insn it