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

Re: [Xen-devel] [PATCH v2] x86/emul: Split exception handling out of invoke_stub()



On 01/02/2018 09:20, Jan Beulich wrote:
>>>> On 31.01.18 at 13:50, <andrew.cooper3@xxxxxxxxxx> wrote:
>> For a release build, bloat-o-meter reports:
>>
>>   add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-5111 (-5111)
>>   function                                     old     new   delta
>>   x86_emulate                               126458  121347   -5111
>>
>> or in other words, a 4% redunction in code size from this change alone.
>>
>> The use of __LINE__ is a concern with livepatching, but any livepatch 
>> touching
>> this file is overwhemlingly likely to alter x86_emulate() anyway.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>> ---
>> CC: Jan Beulich <JBeulich@xxxxxxxx>
>>
>> v2:
>>  * Retain __LINE__.  It can't be embedded in union stub_exception_token as 
>> the
>>    full token gets written by the exception hanlder.
> And that's not what I had in mind. Instead I had thought of ...
>
>> @@ -3017,6 +3008,10 @@ x86_emulate(
>>      struct fpu_insn_ctxt fic = { .type = X86EMUL_FPU_none, .exn_raised = -1 
>> };
>>      struct x86_emulate_stub stub = {};
>>      DECLARE_ALIGNED(mmval_t, mmval);
>> +#ifdef __XEN__
>> +    union stub_exception_token stub_exn_info;
>> +    unsigned int stub_exn_line;
>> +#endif
>     struct {
>         union stub_exception_token info;
>         unsigned int line;
>     } stub_exn;
>
> Either way
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Ah ok - I'll switch to this model.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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