xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Wei Chen <Wei.Chen@arm.com>, xen-devel@lists.xen.org
Cc: Kaly.Xin@arm.com, nd@arm.com, sstabellini@kernel.org,
	steve.capper@arm.com
Subject: Re: [PATCH v4] xen/arm32: Introduce alternative runtime patching
Date: Fri, 31 Mar 2017 15:51:51 +0100	[thread overview]
Message-ID: <6de3bb2e-20fa-dfe5-eda5-4e8409ca2d77@arm.com> (raw)
In-Reply-To: <1490944045-31578-1-git-send-email-Wei.Chen@arm.com>

Hi Wei,

On 31/03/17 08:07, 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.
>
> Signed-off-by: Wei Chen <Wei.Chen@arm.com>
> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

Reviewed-by: Julien Grall <julien.grall@arm.com>

Cheers,

-- 
Julien Grall

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

      reply	other threads:[~2017-03-31 14:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-31  7:07 [PATCH v4] xen/arm32: Introduce alternative runtime patching Wei Chen
2017-03-31 14:51 ` Julien Grall [this message]

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=6de3bb2e-20fa-dfe5-eda5-4e8409ca2d77@arm.com \
    --to=julien.grall@arm.com \
    --cc=Kaly.Xin@arm.com \
    --cc=Wei.Chen@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).