[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 5/7] x86/traps: Lift all non-entrypoint logic in entry_int82() up into C

On 04/05/17 11:28, Jan Beulich wrote:
>>>> On 04.05.17 at 12:16, <andrew.cooper3@xxxxxxxxxx> wrote:
>> On 04/05/17 11:01, Andrew Cooper wrote:
>> --- a/xen/arch/x86/x86_64/compat/entry.S
>> +++ b/xen/arch/x86/x86_64/compat/entry.S
>> @@ -21,6 +21,7 @@ ENTRY(entry_int82)
>>          mov   %rsp, %rdi
>>          call  do_entry_int82
>> +        jmp   compat_test_all_events
>>  /* %rbx: struct vcpu */
>>  ENTRY(compat_test_all_events)
>> This only currently works because the ALIGN hidden in ENTRY() happens to
>> be safe to execute through, but we shouldn't rely on this,
> Why not? ALIGN is the way it is for a reason.

It still doesn't strike me as a safe or sensible thing to rely on, and
will become forbidden if/when we decide to borrow some of the objtool
improvements from Linux.

>> and a single predicted jump is probably faster to execute than
>> a line of single-byte nops.
> I'm not sure about this, but it's possible. A question is whether we
> really should force 0x90 fillers in ALIGN, rather than having the
> assembler use multi-bytes NOPs when suitable.

I've been experimenting and it appears that some ALIGNs are reduced to
multibyte nops, while others aren't.  I can't find any consistency.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.