> >+return -EINVAL;
> >+}
> >+
> >+start = sec->load_addr;
> >+end = sec->load_addr + sec->sec->sh_size;
> >+
> >+for ( a = start; a < end; a++ )
> >+{
> >+unsigned long instr = (unsigned long)(&a->instr_offset +
> >a->instr_offset);
>>> On 21.04.16 at 02:31, wrote:
>> >--- a/xen/common/xsplice.c
>> >+++ b/xen/common/xsplice.c
>> >@@ -533,6 +533,39 @@ static int prepare_payload(struct payload *payload,
>> >}
>> >
>> >#ifndef CONFIG_ARM
>> >+sec = xsplice_elf_sec_by_name(elf, ".altinstructions");
>> >+if ( sec )
>>> On 21.04.16 at 02:30, wrote:
> On Wed, Apr 20, 2016 at 12:28:02AM -0600, Jan Beulich wrote:
>> >>> Konrad Rzeszutek Wilk 04/14/16 12:02 AM >>>
>> >--- a/xen/arch/x86/Makefile
>> >+++ b/xen/arch/x86/Makefile
>> >@@ -6,7 +6,11 @@ subdir-y += mm
>> >subdir-$(CONFIG_XENOPROF) += oprofile
>> >su
> >--- a/xen/common/xsplice.c
> >+++ b/xen/common/xsplice.c
> >@@ -533,6 +533,39 @@ static int prepare_payload(struct payload *payload,
> >}
> >
> >#ifndef CONFIG_ARM
> >+sec = xsplice_elf_sec_by_name(elf, ".altinstructions");
> >+if ( sec )
> >+{
> >+struct alt_instr *a,
On Wed, Apr 20, 2016 at 12:28:02AM -0600, Jan Beulich wrote:
> >>> Konrad Rzeszutek Wilk 04/14/16 12:02 AM >>>
> >--- a/xen/arch/x86/Makefile
> >+++ b/xen/arch/x86/Makefile
> >@@ -6,7 +6,11 @@ subdir-y += mm
> >subdir-$(CONFIG_XENOPROF) += oprofile
> >subdir-y += x86_64
> >
> >+ifdef CONFIG_XSP
>>> Konrad Rzeszutek Wilk 04/14/16 12:02 AM >>>
>--- a/xen/arch/x86/Makefile
>+++ b/xen/arch/x86/Makefile
>@@ -6,7 +6,11 @@ subdir-y += mm
>subdir-$(CONFIG_XENOPROF) += oprofile
>subdir-y += x86_64
>
>+ifdef CONFIG_XSPLICE
>+obj-y += alternative.o
>+else
>obj-bin-y += alternative.init.o
>+endi
From: Ross Lagerwall
Add support for applying alternative sections within xsplice payload.
At payload load time, apply an alternative sections that are found.
Also we add an test-case exercising a rather useless alternative
(patching a NOP with a NOP) - but it does exercise the code-path.
Signe