[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen: arm: force guest memory accesses to cacheable when MMU is disabled
On Wed, 8 Jan 2014, Ian Campbell wrote: > On Tue, 2014-01-07 at 20:39 +0000, Stefano Stabellini wrote: > > > diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c > > > index 124cccf..104d228 100644 > > > --- a/xen/arch/arm/domain.c > > > +++ b/xen/arch/arm/domain.c > > > @@ -219,6 +219,11 @@ static void ctxt_switch_to(struct vcpu *n) > > > else > > > hcr |= HCR_RW; > > > > > > + if ( n->arch.sctlr & SCTLR_M ) > > > + hcr &= ~(HCR_TVM|HCR_DC); > > > + else > > > + hcr |= (HCR_TVM|HCR_DC); > > > + > > > WRITE_SYSREG(hcr, HCR_EL2); > > > isb(); > > > > Is this actually needed? Shouldn't HCR be already correctly updated by > > update_sctlr? > > Not if we are switching back and forth between two guests which are in > different states. I didn't realize that HCR is not properly saved and restored during context switch. Maybe it is worth doing that instead? If nothing else for simplicity? _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |