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