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

Re: [Xen-devel] [PATCH 31/45] xen: arm: guest context switching.



On Thu, 2013-02-14 at 14:43 +0000, Tim Deegan wrote:
> At 15:56 +0000 on 23 Jan (1358956597), Ian Campbell wrote:
> > One side effect of this is that we now save the full 64-bit
> > TTBR[0,1] even on a 32-bit hypervisor. This is needed anyway to
> > support LPAE guests (although this patch doesn't implement anything
> > other than the context switch).
> > 
> > Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> > ---
> >  xen/arch/arm/domain.c        |  113 
> > +++++++++++++++++++++++++-----------------
> >  xen/arch/arm/traps.c         |   14 +++---
> >  xen/include/asm-arm/cpregs.h |   21 +++++++-
> >  xen/include/asm-arm/domain.h |   29 ++++++++---
> >  4 files changed, 115 insertions(+), 62 deletions(-)
> > 
> > diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
> > index 077521e..0323552 100644
> > --- a/xen/arch/arm/domain.c
> > +++ b/xen/arch/arm/domain.c
> > @@ -41,55 +41,67 @@ void idle_loop(void)
> >  static void ctxt_switch_from(struct vcpu *p)
> >  {
> >      /* CP 15 */
> > -    p->arch.csselr = READ_CP32(CSSELR);
> > +    p->arch.csselr = READ_SYSREG(CSSELR_EL1);
> >  
> >      /* Control Registers */
> > -    p->arch.actlr = READ_CP32(ACTLR);
> > -    p->arch.sctlr = READ_CP32(SCTLR);
> > -    p->arch.cpacr = READ_CP32(CPACR);
> > +    p->arch.actlr = READ_SYSREG(ACTLR_EL1);
> > +    p->arch.sctlr = READ_SYSREG(SCTLR_EL1);
> > +    p->arch.cpacr = READ_SYSREG(CPACR_EL1);
> >  
> > -    p->arch.contextidr = READ_CP32(CONTEXTIDR);
> > -    p->arch.tpidrurw = READ_CP32(TPIDRURW);
> > -    p->arch.tpidruro = READ_CP32(TPIDRURO);
> > -    p->arch.tpidrprw = READ_CP32(TPIDRPRW);
> > +    p->arch.contextidr = READ_SYSREG(CONTEXTIDR_EL1);
> > +    p->arch.tpidrurw = READ_SYSREG(TPIDR_EL0); /* XXX names */
> 
> XXX names indeed. :)

Do you think:
        s/tpidrurw/tpidr_el0/
        s/tpidrprw/tpidr_el1/
        s/tpidruro/tpidrro_el0/
        
would be an improvement? They are all pretty aweful but the consistent
answer would be to use the aarch64 names.

>   Otherwise:
> 
> Acked-by: Tim Deegan <tim@xxxxxxx>

Thanks,
Ian.



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


 


Rackspace

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