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

Re: [PATCH 2/4] x86: always initialize xen-swiotlb when xen-pcifront is enabling


  • To: Christoph Hellwig <hch@xxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 19 May 2023 13:49:46 +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=VDQBl+uRnD5Rxb5ncMwm8f/5UoO1di+Yo3Jv2boMr5Q=; b=a/cbCsaquwgYn/k37srtbka6CKCrreEtFthMba7R9kchzLNoPF1gGs2X0+wLmAu4jO+9jFS/H/HCfA3wiXeVUYhpLU8QUBbe7iY3+46xoTwFqnE6GMqgPzFEBwyJrFAnkmLdttPv5dUm6y92Qj4YsjuUOXMyx7EYOB5B2CVyaLv/gcvHkxBkaihcymdw4CsZ8ki5Veovzl7P6fq1Vqa9+sM6XLDqKxbLU+44yODBpy2wJJ0CYBnj9iHMF7UpSX2GBgL501mgEcmLL6b2tUDPP7TzOBEKmp1Ip9G2J97JucvZ6kgqIFFIUcN4GbDKLtkrSGbdu+b594zpwxEymFOORQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J+6ZXVXyM/syUMNX9tfUX1QuZlCMIbSj1CdJWYBKw0N3vaHbq7dN3E0ln02q+dIRhKapwlQiMCfM2iFOiy6LJXjPpnH1F2ooa5EbiA+N5clY+FrEgzr+QUoIkz2Gb2mbV85kamBN+obcEYdTjPEOKYM+SSPTiTzTHJTU//DPLuwbG37UEYBQPdMb3T6w94v7GplTPhQNbeFggpj1GoKvIYjZ4r6qg/cdHc3mNB6mZwVvfZ0bY8tEI6JelruzqCMEiIs/STUwhCv2Gdwh6/W3xSF+8PDiC2/3b9mNtzL8/owptH4A8ixV9tzceESiK1iixp03utWfRo8aN0hbroSsRg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>, Ben Skeggs <bskeggs@xxxxxxxxxx>, Karol Herbst <kherbst@xxxxxxxxxx>, Lyude Paul <lyude@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, iommu@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, nouveau@xxxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 19 May 2023 12:50:15 +0000
  • Ironport-data: A9a23:a9gujK06ok6TcIRaQfbD5Qhxkn2cJEfYwER7XKvMYLTBsI5bpz0Ey WRKWzzXaP/Ya2akL4h1Pty1oR4B6JSAnNBhQVA5pC1hF35El5HIVI+TRqvS04F+DeWYFR46s J9OAjXkBJppJpMJjk71atANlVEliefTAOK6ULWeUsxIbVcMYD87jh5+kPIOjIdtgNyoayuAo tq3qMDEULOf82cc3lk8teTb8HuDgNyo4GlD5gFnNKgS1LPjvyJ94Kw3dPnZw0TQGuG4LsbiL 87fwbew+H/u/htFIrtJRZ6iLyXm6paLVeS/oiI+t5qK23CulQRrukoPD9IOaF8/ttm8t4sZJ OOhF3CHYVxB0qXkwIzxWvTDes10FfUuFLTveRBTvSEPpqF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854Ed3AUV0gK1XYdNu/0KDwQeOALP+taKH LKjfA32wZINE5nJ/iTNz0gZazuttfLnJXpbVovAAMm0hCHiXeF+aP3CB+R2zYZSndqza05+W bIvgTl7uH72svLhyP05iv21dB7idHhwtxMCIiljdUUECzljkKFdZlsQLqLuREyuaWK5EwxmN fBjh88N4BY6m/XfEuyvRzxsjOQmgoG2jvH8xu1kHHjqcv2SHYTDNdAv5tQdl/851A7tN9x/a pX1ybB3qAnRi/orWDY3ZzlRhtqnk27rT4LlvMStWVWVc87ZKVKpYIS0UtJGNMrHT786qogDO 5yZfusrMp+QBe/VTT0r2NvyNujUjAaGQqHeFELvoiv3z1fjBlCvj8l7f1auk1F2IM2SpFC6e iBGL9vjqtyQsgfar84LPsdQOOsY1a9AC7kASa3GxDKBasHM3XCp9rc+7Mu/tynf5QO0d8bhI nBalVFrmQ/EnieR/Fm5Kc7sSwlfV/NHwgEkqpllt1EU/zHNfXW2BS4ORATe5DKmYRaPiXZM8 zDTa6+TcWTalcGIrw5rDEWa6MiWEX2b/dlyurTe2j+1f4jebeawNDzQbL0GIfHNwoCdyfWPk YjNQKDVvmoqHrbFkPFvA==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 19/05/2023 1:41 pm, Christoph Hellwig wrote:
> On Fri, May 19, 2023 at 12:10:26PM +0200, Marek Marczykowski-Górecki wrote:
>> While I would say PCI passthrough is not very common for PV guests, can
>> the decision about xen-swiotlb be delayed until you can enumerate
>> xenstore to check if there are any PCI devices connected (and not
>> allocate xen-swiotlb by default if there are none)? This would
>> still not cover the hotplug case (in which case, you'd need to force it
>> with a cmdline), but at least you wouldn't loose much memory just
>> because one of your VMs may use PCI passthrough (so, you have it enabled
>> in your kernel).
> How early can we query xenstore?  We'd need to do this before setting
> up DMA for any device.

Not that early.  One supported configuration has xenstore not starting
for an indefinite period of time after boot.

> The alternative would be to finally merge swiotlb-xen into swiotlb, in
> which case we might be able to do this later.  Let me see what I can
> do there.

If that is an option, it would be great to reduce the special-cashing.

~Andrew



 


Rackspace

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