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

Re: [Xen-devel] [PATCH v5 17/28] xsplice: Add support for exception tables.



On 06/04/16 15:41, Konrad Rzeszutek Wilk wrote:
> On Fri, Apr 01, 2016 at 10:06:54AM -0600, Jan Beulich wrote:
>>>>> On 24.03.16 at 21:00, <konrad.wilk@xxxxxxxxxx> wrote:
>>> --- a/xen/common/xsplice.c
>>> +++ b/xen/common/xsplice.c
>>> @@ -573,6 +573,25 @@ static int prepare_payload(struct payload *payload,
>>>          region->frame[i].n_bugs = sec->sec->sh_size / sizeof(struct 
>>> bug_frame);
>>>      }
>>>  
>>> +#ifdef CONFIG_X86
>>> +    sec = xsplice_elf_sec_by_name(elf, ".ex_table");
>>> +    if ( sec )
>>> +    {
>>> +        if ( !sec->sec->sh_size ||
>>> +             (sec->sec->sh_size % sizeof (struct exception_table_entry)) )
>>> +        {
>>> +            dprintk(XENLOG_DEBUG, "%s%s: Wrong size of .ex_table (exp:%lu 
>>> vs %lu)!\n",
>>> +                    XSPLICE, elf->name, sizeof (struct 
>>> exception_table_entry),
>>> +                    sec->sec->sh_size);
>>> +            return -EINVAL;
>>> +        }
>>> +
>>> +        region->ex = (struct exception_table_entry *)sec->load_addr;
>>> +        region->ex_end = (struct exception_table_entry *)(sec->load_addr + 
>>> sec->sec->sh_size);
>>> +
>>> +        sort_exception_table(region->ex, region->ex_end);
>>> +    }
>>> +#endif
>> Nothing here is really x86-specific, so the earlier comment on the
>> conditionals better going away applies here too.
> But there is no sort_exception_table on ARM, nor would the sizeof work
> on ARM? Or are you saying I should add an .. empty function and
> structure for this?

Given the lack of "struct exception_table_entry" entirely on ARM, would
recommend keeping the #ifdefs, as being the far cleaner option.

Longterm, ARM should gain exception table handing.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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