From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v7 1/4] xen/arm: p2m: Clean cache PT when the IOMMU doesn't support coherent walk Date: Thu, 15 May 2014 16:24:49 +0100 Message-ID: <5374DC41.40704@linaro.org> References: <1400163385-19863-1-git-send-email-julien.grall@linaro.org> <1400163385-19863-2-git-send-email-julien.grall@linaro.org> <1400167245.19926.18.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WkxWf-000143-Bv for xen-devel@lists.xenproject.org; Thu, 15 May 2014 15:24:53 +0000 Received: by mail-ee0-f41.google.com with SMTP id t10so793997eei.28 for ; Thu, 15 May 2014 08:24:51 -0700 (PDT) In-Reply-To: <1400167245.19926.18.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, Xiantao Zhang , tim@xen.org, Jan Beulich , stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On 05/15/2014 04:20 PM, Ian Campbell wrote: > On Thu, 2014-05-15 at 15:16 +0100, Julien Grall wrote: >> Some IOMMU don't suppport coherent PT walk. When the p2m is shared with >> the CPU, Xen has to make sure the PT changes have reached the memory. >> >> Introduce new IOMMU function that will check if the IOMMU feature is enabled >> for a specified domain. >> >> On ARM, the platform can contain multiple IOMMUs. Each of them may not >> have the same set of feature. The domain parameter will be used to get the >> set of features for IOMMUs used by this domain. >> >> Signed-off-by: Julien Grall > > Acked-by: Ian Campbell for the arm bit. Thanks! >> @@ -548,10 +568,12 @@ int p2m_alloc_table(struct domain *d) >> /* Clear both first level pages */ >> p = __map_domain_page(page); >> clear_page(p); >> + clean_xen_dcache_va_range(p, PAGE_SIZE); >> unmap_domain_page(p); >> >> p = __map_domain_page(page + 1); >> clear_page(p); >> + clean_xen_dcache_va_range(p, PAGE_SIZE); > > > I wonder if we need clear_and_clean_page()? I though about it but I was too lazy to create one. I will add a helper if I need to resend this series. >> >> +enum iommu_feature >> +{ >> + IOMMU_FEAT_COHERENT_WALK, >> + IOMMU_FEAT_count, > > Lowercase? What do you mean? Regards, -- Julien Grall