From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH 5/5] AMD IOMMU: widen NUMA nodes to be allocated from Date: Thu, 5 Mar 2015 17:30:53 +0000 Message-ID: <54F892CD.2000300@citrix.com> References: <54EF315902000078000640FF@mail.emea.novell.com> <54EF341C020000780006416C@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8374801752820528359==" Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YTZnO-0000Lt-6l for xen-devel@lists.xenproject.org; Thu, 05 Mar 2015 17:42:50 +0000 In-Reply-To: <54EF341C020000780006416C@mail.emea.novell.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: Jan Beulich , xen-devel Cc: Dario Faggioli , Aravind Gopalakrishnan , suravee.suthikulpanit@amd.com List-Id: xen-devel@lists.xenproject.org --===============8374801752820528359== Content-Type: multipart/alternative; boundary="------------010303090806050206060302" --------------010303090806050206060302 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit On 26/02/15 13:56, Jan Beulich wrote: > --- a/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h > +++ b/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h > @@ -158,12 +158,12 @@ static inline unsigned long region_to_pa > return (PAGE_ALIGN(addr + size) - (addr & PAGE_MASK)) >> PAGE_SHIFT; > } > > -static inline struct page_info* alloc_amd_iommu_pgtable(void) > +static inline struct page_info *alloc_amd_iommu_pgtable(struct domain *d) > { > struct page_info *pg; > void *vaddr; > > - pg = alloc_domheap_page(NULL, 0); > + pg = alloc_domheap_page(d, MEMF_no_owner); Same comment as with the VT-d side of things. This should be based on the proximity information of the IOMMU, not of the owning domain. ~Andrew > if ( pg == NULL ) > return 0; > vaddr = __map_domain_page(pg); > > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel --------------010303090806050206060302 Content-Type: text/html; charset="windows-1252" Content-Length: 1831 Content-Transfer-Encoding: quoted-printable
On 26/02/15 13:56, Jan Beulich wrote:
--- a/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h
+++ b/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h
@@ -158,12 +158,12 @@ static inline unsigned long region_to_pa
     return (PAGE_ALIGN(addr + size) - (addr & PAGE_MASK)) >> PAGE_SHIFT;
 }
 
-static inline struct page_info* alloc_amd_iommu_pgtable(void)
+static inline struct page_info *alloc_amd_iommu_pgtable(struct domain *d)
 {
     struct page_info *pg;
     void *vaddr;
 
-    pg =3D alloc_domheap_page(NULL, 0);
+    pg =3D alloc_domheap_page(d, MEMF_no_owner);

Same comment as with the VT-d side of things.=A0 This should be based on the proximity information of the IOMMU, not of the owning domain.

~Andrew

     if ( pg =3D=3D NULL )
         return 0;
     vaddr =3D __map_domain_page(pg);





_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

--------------010303090806050206060302-- --===============8374801752820528359== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============8374801752820528359==--