From: "Jan Beulich" Subject: Re: [PATCH 5/5] AMD IOMMU: widen NUMA nodes to be allocated from Date: Fri, 06 Mar 2015 07:50:12 +0000 Message-ID: <54F96A440200007800066D57@mail.emea.novell.com> References: <54EF315902000078000640FF@mail.emea.novell.com> <54EF341C020000780006416C@mail.emea.novell.com> <54F892CD.2000300@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 1YTn1Q-00084q-Hn for xen-devel@lists.xenproject.org; Fri, 06 Mar 2015 07:50:12 +0000 In-Reply-To: <54F892CD.2000300@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: xen-devel , Dario Faggioli , Aravind Gopalakrishnan , suravee.suthikulpanit@amd.com List-Id: xen-devel@lists.xenproject.org >>> On 05.03.15 at 18:30, wrote: > 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. I think I buy this argument on the VT-d side (under the assumption that there's going to be at least one IOMMU per node), but I'm not sure here: The most modern AMD box I have has just a single IOMMU for 4 nodes it reports. Jan