From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH] xen: arm: setup sane EL1 state while building domain 0. Date: Mon, 17 Mar 2014 15:50:35 +0000 Message-ID: <532719CB.5010402@linaro.org> References: <1395070269-32356-1-git-send-email-ian.campbell@citrix.com> <532716B0.6030508@linaro.org> <1395071175.18221.47.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1395071175.18221.47.camel@kazak.uk.xensource.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@eu.citrix.com, tim@xen.org, Fu Wei , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 03/17/2014 03:46 PM, Ian Campbell wrote: > On Mon, 2014-03-17 at 15:37 +0000, Julien Grall wrote: >> void p2m_restore_state(struct vcpu *n) > > I think setup_state might be more indicative of the operation. > >> { >> register_t hcr; >> >> hcr = READ_SYSREG(HCR_EL2); >> WRITE_SYSREG(hcr & ~HCR_VM, HCR_EL2); >> isb(); > > I know we do this on context switch now but I think it is unnecessary > and I plan to remove it. Thanks to confirm, I wasn't sure if it was necessary or not. >> IHMO, it's more clear than continuing "hardcoding" setup in dom0 code. > > Are there any other potential callers? Yes ctx_to_switch, so everything related to P2M context switch is restrict to p2m.c. That why I choose this name, there is also a sister function which will save the p2m context (p2m_save_state). -- Julien Grall