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

Re: [Xen-devel] [PATCH v2 18/20] xen/arm32/livepatch: Add BPICALLIS to helper to invalidate all instruction caches



On Thu, Sep 01, 2016 at 04:13:30PM +0100, Julien Grall wrote:
> Hi Konrad,
> 
> On 25/08/16 14:37, Konrad Rzeszutek Wilk wrote:
> > When we are flushing the cache we are most likley also want
> > to flush the branch predictor too. Hence add this.
> 
> I think it makes more sense to fold this patch into #18 because ICIALLUIS

I squashed it in " xen/arm32: Add an helper to invalidate all instruction 
caches"

> may flush the branch predictor if the instruction cache is separate (see
> Table B4-35 in ARM DDI 0406C.c).
> 
> Therefore we need to be consistent and also flush the branch predictor for
> unified cache.
> 
> > 
> > Suggested-by: Julien Grall <julien.grall@xxxxxxx>
> > Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> > 
> > ---
> > Cc: Julien Grall <julien.grall@xxxxxxx>
> > Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> > 
> > v2: First submission
> > ---
> >  xen/arch/arm/livepatch.c         | 3 +++
> >  xen/include/asm-arm/arm32/page.h | 5 ++++-
> >  2 files changed, 7 insertions(+), 1 deletion(-)
> > 
> > diff --git a/xen/arch/arm/livepatch.c b/xen/arch/arm/livepatch.c
> > index c290602..cdb8d65 100644
> > --- a/xen/arch/arm/livepatch.c
> > +++ b/xen/arch/arm/livepatch.c
> > @@ -45,6 +45,9 @@ void arch_livepatch_revive(void)
> >      /*
> >       * Nuke the instruction cache. Data cache has been cleaned before in
> >       * arch_livepatch_apply_jmp.
> > +     *
> > +     * Need to flush the branch predictor for ARMv7 as it may be
> > +     * architecturally visible to the software (see B2.2.4 in ARM DDI 
> > 0406C.b).
> 
> I don't think this comment belongs to livepatch.c. It describes the behavior
> internal behavior of invalidate_icache.

Moved it to be right above invalidate_icache in 
xen/include/asm-arm/arm32/page.h.

Thanks!

_______________________________________________
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®.