[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: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 14 Dec 2021 16:06:43 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=XL5SZ5t1V2LttmnHb65odBicDHWtXodGq4MhIY5Si0g=; b=FLsbA3iKOBzz9PCaAFRAANTDI9coUXZbYZpVMlStHYshdr5iNFmnAXrZ8QtzTLKwEChnT7kism9M3BeFW0cg5Jot/oan/7piI+oOOfbeB2RToxwTZjQPYB6pQqSt2JFLJBs2wFpaZoZaxPLOQxHvtlJDnIaAJ7m5/+/iwPUZjNhHDhgn3o7SXSAJ/YfOiST9EngWty17KvuV/bavUhjoJ0GQSarAhxdUmPaouNeCNaa98bZkdKrkAbGNG2jlc1ECPEQOQyiHNJ5PQozHckcklyiUo0YodNE6iKMGKMBM8aTJ5LDwalj8+57p3tIatcsDdAFEgdinJEq/+tJra7CtSg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U3TtIs1OW8hcVPWtVg/IW+JZeaRJVCcG1Z4aHCIkj8h1W6jSsFowGS0j/Gm90tT14ue1uVN28lQApkFR5bOBDgPJhYt4OMqFgUaXBXmUzeMD1rplvofHdo50XrSyodgMecPrAHRBOiIKJx5xMkXKmWHvR6QAFy4iStP516offGcfPLXYZgStw0kN4SFGb0eZSRA6nr5oXRaDAwXww2fBIkGD5lXpt18Mc+TQtjQf1Phi12dHWeefoboAfUf5PJfiULeD2RHIQxKrLyPu/98U10ezpETiM5+MzI3yAQpO8rl6x9bxn1FPNd8WAEs8T0uGHVite+JRG1pAaSNpHCNUQw==
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.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:07:11 +0000
  • Ironport-data: A9a23:gIF/4KN5Eqc3RHTvrR1TkMFynXyQoLVcMsEvi/4bfWQNrUoggjQCy WNMDTuDb67eYWD8ctpyOo2xp04H7MWHnNNkGgto+SlhQUwRpJueD7x1DKtR0wB+jCHnZBg6h ynLQoCYdKjYdpJYz/uUGuCJQUNUjMlkfZKhTr6UUsxNbVU8En5400s/w7RRbrNA2rBVPSvc4 bsenOWHULOV82Yc3rU8sv/rRLtH5ZweiRtA1rAMTakjUGz2zhH5OKk3N6CpR0YUd6EPdgKMq 0Qv+5nilo/R109F5tpICd8XeGVSKlLZFVDmZna7x8FOK/WNz8A/+v9TCRYSVatYoy6rkM139 tFLj4ShUwUnP6TnlfgkSDANRkmSPYUekFPGCX22sMjVxEzaaXr8hf5pCSnaP6VBpLwxWzsXs 6VFdnZdNXhvhMrvqF6/YvNrick5atHiIasUu216zCGfBvEjKXzGa/uSvo8DjWdt7ixINcnaY /ULMj1mUDLRXTdOOXg4A60xmvj90xETdBUH8QnI9MLb+VP71AVs1JD9PdyTfcaFLe1Wk1iZo CTa/m3/KhAcKNGbjzGC9xqEhOXCgCf6U4I6D6Cj+7hhh1j77nweDlgaWEW2pdG9i1WiQJRPJ koM4C0soKMuskuxQbHAswaQ+SDe+ERGApwJTrN8uFrlJrfoDxixHUoLU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D4b7LfCZHZKTBkXCF+r8bqbHtmsDY5ts2jU0dNT2CA5sQkDuRYTzrdHGeKjM2YabQQ/ Gnl7Z6TnebCD8qhoPRPAh2Y8Hz4/nw0L72ax8PABAqrCGIkDOT8bb/VzyVxA0XXT9jyaortT GtqX212oyT99WAjjPM3W7a6Jpb3PPn19t4HcSJzuwYMC/lhAqEbJloH5eCoDc2iuey70tCqq iHnz4Qe+BIr1/BdGC8phXgnyHmzTYV8nfnjWSVhHPyyPaJMg4SOo5kv8Z0YxHZ400vsJVXy6 RQxV+UsJJREFfpgDn9z8KgbWAlqmOE5V4Z1cIDhX1WVoUTLJVLq5YEwU9TGJAcWArn9YEcFv V0Bs203ocYTbqjVQGYgoBT+q3uYpxqdS32AHTq+/blnwS+pUoJjnfxn6ck7zI9HJFUcegy2w 2LCNUtqFh0dL5nUUtKPpZ0fSKGMB29ffvyChPgHb3GLtBPB5ufke++3F0KjNvaDaDgiqFC36 j8bA==
  • Ironport-sdr: 0bj0s8KdS9qKQ6pr/26AjE9pZXSNE1GZxOg4h5P2PlxZ3OTpUz7Mg9XLdT9QlayOQticaogUI6 MwzZLCxA4dYZTvShkLsPJMvq8Q+MJCWoErmLj+XAvWM/P3E+ECE6e7on8oszqapyN5XETsqzMe y03CZp/0iJv3NuOwMkPv1bwl1F7CT+OQEfKovuHZa8tryXi6waCqp9FMwrijxzTIb8IZMl+QjZ RXwfRDjIS8f4Lz/RHhPN3qtDQwMsxXnoqdDJBzJsXJViDP/jWjjMlw6PxyLbFsjcjiFUXUehAt tyuOlb/pxiJNUby3MscJH8dv
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

Thanks, Roger.



 


Rackspace

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