From: Ian Campbell Subject: Re: [PATCH 31/45] xen: arm: guest context switching. Date: Thu, 14 Feb 2013 14:50:19 +0000 Message-ID: <1360853419.20449.417.camel@zakaz.uk.xensource.com> References: <1358956576.17440.60.camel@zakaz.uk.xensource.com> <1358956611-8432-31-git-send-email-ian.campbell@citrix.com> <20130214144316.GA83752@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130214144316.GA83752@ocelot.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tim Deegan Cc: Stefano Stabellini , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org 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 > > --- > > 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 Thanks, Ian.