From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v2 15/15] xen/arm: gic-v3: Add support of vGICv2 when available Date: Wed, 1 Jul 2015 11:21:26 +0100 Message-ID: <5593BF26.6040403@citrix.com> References: <1435311269-3189-1-git-send-email-julien.grall@citrix.com> <1435311269-3189-16-git-send-email-julien.grall@citrix.com> <1435670173.21469.152.camel@citrix.com> <5592D1FD.1000103@citrix.com> <1435738334.21469.228.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZAF9Y-0005c6-Hv for xen-devel@lists.xenproject.org; Wed, 01 Jul 2015 10:22:04 +0000 In-Reply-To: <1435738334.21469.228.camel@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: xen-devel@lists.xenproject.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org Hi Ian, On 01/07/15 09:12, Ian Campbell wrote: > On Tue, 2015-06-30 at 18:29 +0100, Julien Grall wrote: >>> >>>> + */ >>>> + if ( v->domain->arch.vgic.version == GIC_V2 ) >>>> + val &= ~GICC_SRE_EL2_ENEL1; >>>> + else >>>> + val |= GICC_SRE_EL2_ENEL1; >>>> + WRITE_SYSREG32(val, ICC_SRE_EL2); >>>> + isb(); >>> >>> Is the isb strictly needed? I suppose we are already using rather too >>> many, perhaps a more complete audit is in order. >> >> AFAICT no, the ENEL1 doesn't gate any access to EL1 systems register in EL2. >> >> There is an isb in the caller (gic_restore_state) but I find it >> confusing because we rely on the caller doing the right thing for us. >> I'm thinking to push the isb within the callee for more clarify. > > isb's aren't free though. > >> It can be part of a bigger audit. > > Indeed, this isn't one for now/. > > Really there should probably be a single isb at the end of ctxt > save/restore and very little otherwise except where there is an absolute > need for some sort of ordering between steps. I will drop this one in the next version. Regards, -- Julien Grall