[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 15/18] IOMMU/x86: prefill newly allocate page tables


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 14 Dec 2021 16:10:28 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=aFYHNZzwOHkEq8nsDZdIz1h5pD2dwJzLNbnpYtmgyC8=; b=FSYj6nPjHObopcYML7SFvTBpFU9EJXhcstuWrYlJd6Dlt0jif4XHS6s04bWPyiDCsevj9A///AqAvDj4Po+di432dCsnui237I+xj6jLk6i+RhpDbm2auulB5uw3n731d2CDg5+PChNzhRYj1pMunZ3p2YfGBIo8f5BqXT8SqGDdwTV3sT1+6TD78Qw8u47wEvE5f97WxZLZ1SWprQ2KMZoQNKXPH7BYkLkY35NmIlsXuzWIIONFUYR4aspr/PWARCTdZjYC5QQRfQ6OfrmGawdzvlYEXb89Pg64eQN1l7eV9Eox2s/nQDVZ5HAdC3kyRRhLidSsDzsRWmnenEGIOg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T+LHHFNkM1QPoUPtQpIje31wYd+kf6P+cRzjs0t5CBs9OrSA9/P5HDRxfbP/alxh/ai55tqTQV7tzsoFKomKhN40EGi/rZJgUs3eUurzSp1jI6BB9+m5HYgLHUjwU5dpzu3mYOskgpyQD4DsPpjUtT4moTt3ev095RgF6YdSHMWd9G7N/ZyMaNYQ1FLRdv3n2AOxhfr6qCt9o5r1NLGTdwdMJdR+WIgoE2PLx+HjlxhhqOCDdw/wjdVSvs0Mc9dp+xxKLLSgY6fCdxxyRzFMXTTJn9WTFtea/vFRG5jRZcljaidnIJE1M5rDSyxWQgvjyVT2V66hgMaaWoOTtxM9ow==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>
  • Delivery-date: Tue, 14 Dec 2021 15:10:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 14.12.2021 16:06, Roger Pau Monné wrote:
> Forgot to comment.
> 
> On Fri, Sep 24, 2021 at 11:54:58AM +0200, Jan Beulich wrote:
>> --- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
>> +++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
>> @@ -238,7 +238,7 @@ int amd_iommu_alloc_root(struct domain *
>>  
>>      if ( unlikely(!hd->arch.amd.root_table) )
>>      {
>> -        hd->arch.amd.root_table = iommu_alloc_pgtable(d);
>> +        hd->arch.amd.root_table = iommu_alloc_pgtable(d, 0);
> 
> So root tables don't get markers setup...
> 
> 
>>          if ( !hd->arch.amd.root_table )
>>              return -ENOMEM;
>>      }
>> --- a/xen/drivers/passthrough/vtd/iommu.c
>> +++ b/xen/drivers/passthrough/vtd/iommu.c
>> @@ -297,7 +297,7 @@ static uint64_t addr_to_dma_page_maddr(s
>>              goto out;
>>  
>>          pte_maddr = level;
>> -        if ( !(pg = iommu_alloc_pgtable(domain)) )
>> +        if ( !(pg = iommu_alloc_pgtable(domain, 0)) )
> 
> ...likewise here.

Yes. Plus quarantine domain's page tables also don't. Neither root
tables nor quarantine domain's are ever eligible for re-coalescing,
so there's no point having markers there.

Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.