From: Ian Campbell Subject: Re: [PATCH v3 13/13] drivers/passthrough: arm: Add support for SMMU drivers Date: Wed, 19 Mar 2014 10:35:05 +0000 Message-ID: <1395225305.10203.45.camel@kazak.uk.xensource.com> References: <1394552999-14171-1-git-send-email-julien.grall@linaro.org> <1394552999-14171-14-git-send-email-julien.grall@linaro.org> <1395161689.11824.27.camel@kazak.uk.xensource.com> <5328ABB6.3030307@linaro.org> 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 1WQDq1-0002nq-TW for xen-devel@lists.xenproject.org; Wed, 19 Mar 2014 10:35:25 +0000 In-Reply-To: <5328ABB6.3030307@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: xen-devel@lists.xenproject.org, Jan Beulich , tim@xen.org, Xiantao Zhang , stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On Tue, 2014-03-18 at 20:25 +0000, Julien Grall wrote: > >> +static __init void arm_smmu_device_reset(struct arm_smmu_device *smmu) > >> +{ > >> +[...] > >> + /* Don't upgrade barriers */ > >> + reg &= ~(SMMU_sCR0_BSU_MASK << SMMU_sCR0_BSU_SHIFT); > > > > No? Is that safe when a vcpu migrates around pCPUs? > > From the SMMU doc 9.6.3, this field is only used when client devices are > not mapped to a translation context banks. > > By default, the policy in Xen is to deny every transaction that doesn't > have a valid mapping. So we are safe. > > I can update the comment if you want, or even better removing this code. I think adding the explanation you just gave would do the job. Even if you were to remove the code an explanation of why it doesn't mess with the BSU mask would still be valuable I think (but I think setting it to a known value even if it is unused would be best). Ian.