xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Wei Chen <Wei.Chen@arm.com>
Cc: sstabellini@kernel.org, steve.capper@arm.com,
	xen-devel@lists.xen.org, Kaly.Xin@arm.com, julien.grall@arm.com,
	nd@arm.com
Subject: Re: [PATCH 1/2] xen/arm32: Introduce alternative runtime patching
Date: Fri, 17 Mar 2017 10:34:33 -0400	[thread overview]
Message-ID: <20170317143433.GI7915@char.us.oracle.com> (raw)
In-Reply-To: <1489658019-22486-2-git-send-email-Wei.Chen@arm.com>

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@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2017-03-17 14:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-16  9:53 [PATCH 0/2] xen/arm32: Use alternative to skip the check of pending serrors Wei Chen
2017-03-16  9:53 ` [PATCH 1/2] xen/arm32: Introduce alternative runtime patching Wei Chen
2017-03-16 15:12   ` Julien Grall
2017-03-17  6:35     ` Wei Chen
2017-03-24 10:48       ` Julien Grall
2017-03-27  9:22         ` Wei Chen
2017-03-17 14:34   ` Konrad Rzeszutek Wilk [this message]
2017-03-20  6:45     ` Wei Chen
2017-03-21 13:31       ` Konrad Rzeszutek Wilk
2017-03-16  9:53 ` [PATCH 2/2] xen/arm32: Use alternative to skip the check of pending serrors Wei Chen
2017-03-16 14:01   ` Julien Grall
2017-03-17  5:50     ` Wei Chen
2017-03-16 15:15 ` [PATCH 0/2] " Julien Grall
2017-03-20 22:08   ` Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170317143433.GI7915@char.us.oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=Kaly.Xin@arm.com \
    --cc=Wei.Chen@arm.com \
    --cc=julien.grall@arm.com \
    --cc=nd@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=steve.capper@arm.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).