[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 09/13] xen: arm: Set EL1 register width in HCR_EL2 during context switch.
On Wed, 17 Apr 2013, Ian Campbell wrote: > Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> I would be tempted to get rid of all these ifdef and just rely on the fact that on ARMv7 is_pv32_domain always returns 1. > xen/arch/arm/domain.c | 7 +++++++ > xen/include/asm-arm/processor.h | 3 +++ > 2 files changed, 10 insertions(+), 0 deletions(-) > > diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c > index 08bb132..20bb6c7 100644 > --- a/xen/arch/arm/domain.c > +++ b/xen/arch/arm/domain.c > @@ -203,6 +203,13 @@ static void ctxt_switch_to(struct vcpu *n) > > isb(); > > +#ifdef CONFIG_ARM_64 > + if ( is_pv32_domain(n->domain) ) > + hcr &= ~HCR_RW; > + else > + hcr |= HCR_RW; > +#endif > + > WRITE_SYSREG(hcr, HCR_EL2); > isb(); > > diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h > index 1681ebf..32c441b 100644 > --- a/xen/include/asm-arm/processor.h > +++ b/xen/include/asm-arm/processor.h > @@ -41,6 +41,9 @@ > #define HSCTLR_BASE 0x30c51878 > > /* HCR Hyp Configuration Register */ > +#ifdef CONFIG_ARM_64 > +#define HCR_RW (1<<31) > +#endif > #define HCR_TGE (1<<27) > #define HCR_TVM (1<<26) > #define HCR_TTLB (1<<25) > -- > 1.7.2.5 > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |