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

Re: [Xen-devel] [PATCH 1/2] xen/arm32: Introduce alternative runtime patching



On Thu, Mar 16, 2017 at 05:53:38PM +0800, Wei Chen wrote:
> This patch is based on the implementation of ARM64, it introduces
> alternative runtime patching to ARM32. This allows to patch assembly
> instruction at runtime to either fix hardware bugs or optimize for
> certain hardware features on ARM32 platform.
> 
> Xen hypervisor is using ARM execution state only on ARM32 platform,
> Thumb is not used. So, the Thumb only branch instructions (CBZ, CBNZ,
> TBB and TBH) are not considered in alternatives.
> 
> The left ARM32 branch instructions are BX, BLX, BL and B. The
> instruction BX is taking a register in parameter, so we don't need to
> rewrite it. The instructions BLX, BL and B are using the similar
> encoding for the offset and will avoid specific case when extracting
> and updating the offset.
> 
> In this patch, we include alternative.h header file to livepatch.c
> directly for ARM32 compilation issues. When the alternative patching
> config is enabled, the livepatch.c will use the alternative functions.
> In this case, we should include the alternative header file to this
> file. But for ARM64, it does not include this header file directly.
> It includes this header file indirectly through:
> sched.h->domain.h->page.h->alternative.h.
> But, unfortunately, the page.h of ARM32 doesn't include alternative.h,
> and we don't have the reason to include it to ARM32 page.h now. So we
> have to include the alternative.h directly in livepatch.c.

OK, thanks for the explanation.


Could you also confirm that the test-cases for livepatching
does compile for you?

make -C xen tests

should do it (specifically I am curious if xen_hello_world_func.c
compiles fine).

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

 


Rackspace

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