From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v3 13/13] drivers/passthrough: arm: Add support for SMMU drivers Date: Wed, 19 Mar 2014 10:44:19 +0000 Message-ID: <53297503.4010708@linaro.org> 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> <1395225305.10203.45.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" 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 1WQDyw-0004Ap-VA for xen-devel@lists.xenproject.org; Wed, 19 Mar 2014 10:44:23 +0000 Received: by mail-we0-f180.google.com with SMTP id p61so6944934wes.11 for ; Wed, 19 Mar 2014 03:44:21 -0700 (PDT) In-Reply-To: <1395225305.10203.45.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: xen-devel@lists.xenproject.org, Jan Beulich , tim@xen.org, Xiantao Zhang , stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org Hi Ian, On 19/03/14 10:35, Ian Campbell wrote: > 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). Ok. I will update the comment. Regards, -- Julien Grall