Re: [Xen-devel] [PATCH v8 02/17] x86: Support indirect thunks from assembly code

2018-02-05 Thread Jan Beulich
>>> On 04.02.18 at 11:57, wrote: > On Fri, 2018-01-12 at 18:00 +, Andrew Cooper wrote: >> +#ifdef CONFIG_INDIRECT_THUNK >> +/* callq __x86_indirect_thunk_rcx */ >> +ctxt->io_emul_stub[10] = 0xe8; >> +*(int32_t *)>io_emul_stub[11] = >> +(unsigned

Re: [Xen-devel] [PATCH v8 02/17] x86: Support indirect thunks from assembly code

2018-02-04 Thread David Woodhouse
On Fri, 2018-01-12 at 18:00 +, Andrew Cooper wrote: > +#ifdef CONFIG_INDIRECT_THUNK > +    /* callq __x86_indirect_thunk_rcx */ > +    ctxt->io_emul_stub[10] = 0xe8; > +    *(int32_t *)>io_emul_stub[11] = > +    (unsigned long)__x86_indirect_thunk_rcx - (stub_va + 11 + 4); > + > +#else Is

Re: [Xen-devel] [PATCH v8 02/17] x86: Support indirect thunks from assembly code

2018-01-16 Thread Jan Beulich
>>> On 16.01.18 at 14:55, wrote: > On 15/01/18 10:28, Jan Beulich wrote: >>> ctxt->io_emul_stub[10] = 0xff; >>> ctxt->io_emul_stub[11] = 0xd1; >>> >>> +/* >>> + * 3 bytes of P6_NOPS. >>> + * TODO: untangle ideal_nops from init/livepatch Kconfig

Re: [Xen-devel] [PATCH v8 02/17] x86: Support indirect thunks from assembly code

2018-01-16 Thread Andrew Cooper
On 15/01/18 10:28, Jan Beulich wrote: >> ctxt->io_emul_stub[10] = 0xff; >> ctxt->io_emul_stub[11] = 0xd1; >> >> +/* >> + * 3 bytes of P6_NOPS. >> + * TODO: untangle ideal_nops from init/livepatch Kconfig options. >> + */ >> +memcpy(>io_emul_stub[12], "\x0f\x1f\x00",

Re: [Xen-devel] [PATCH v8 02/17] x86: Support indirect thunks from assembly code

2018-01-15 Thread Jan Beulich
>>> On 12.01.18 at 19:00, wrote: > Introduce INDIRECT_CALL and INDIRECT_JMP which either degrade to a normal > indirect branch, or dispatch to the __x86_indirect_thunk_* symbols. > > Update all the manual indirect branches in to use the new thunks. The > indirect