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

Re: [RFC PATCH 1/5] x86/xen: disable swiotlb for xen pvh


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 15 Mar 2023 07:49:55 +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=jzbVl/yx5DrEE6/AjikLXbhVVWbYOKgadlMTX5tIky0=; b=ksFv/4W6hERb6StSGK7bjp+4ECt4bhwxLvPegIouq6JVrQcjpmE20Zd0SKHMUkyc9/4IMcvkxOj6SK5N+xIxmoC02jnhhW1LYf1YYgkV+eZirTsahTz2UfIosCln5ssYvyKn9xZQ8/W1AORqzFP+OhtcnUfgr1YWiT/2SQQ7Rrk5AERetAziwS43UVucMsjdIB1VjP7uIq+qf/SJpCq+NA9t89X7tVAq58NVxX/dFUk3NvDg+b7kEIJoyqPfh4tNJFNEAr1q3vvJs35Dt/aWjbQd/lKXk8ShF1GmC2XMWJcfiue9IHcdWIN/1tAF7GLBHMzrBQwWfKgdKncdgyzZNw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TtnsFPvRI+ZCQTi6LDD1S9e0ihawTzV3SkGeWaXLE09RhbU4u1yw84di+bAAk8gy5ju0SbJuulFX4UeRYoEP480kmhyH7J7ClO/j9MT2Xs+CWbuKyawAhO5Ly7GDFU5+hVlEEEgSwDZDrq52vmzGaIY7nn7X3eXO/gboSL8HpZLLqD3DmXUlfaScuSrJUv6zsivuqArig/NymP0oKHD+4cFsAsWzyu8AIIgsjLG6rIE0w78G/8FOeR9IX+3Wh5zlIiIne6ENG11V+CZRyRfmMJkN7JD0emcF3e1e6bVqApvJCidDiW9HSPxLepnijj4XoY3yzpuNrP5g29Gg6Zvf/g==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Huang Rui <ray.huang@xxxxxxx>, Alex Deucher <alexander.deucher@xxxxxxx>, Christian König <christian.koenig@xxxxxxx>, Stewart Hildebrand <Stewart.Hildebrand@xxxxxxx>, Xenia Ragiadakou <burzalodowa@xxxxxxxxx>, Honglei Huang <honglei1.huang@xxxxxxx>, Julia Zhang <julia.zhang@xxxxxxx>, Chen Jiqian <Jiqian.Chen@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, amd-gfx@xxxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 15 Mar 2023 06:50:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 15.03.2023 01:52, Stefano Stabellini wrote:
> On Mon, 13 Mar 2023, Jan Beulich wrote:
>> On 12.03.2023 13:01, Huang Rui wrote:
>>> Xen PVH is the paravirtualized mode and takes advantage of hardware
>>> virtualization support when possible. It will using the hardware IOMMU
>>> support instead of xen-swiotlb, so disable swiotlb if current domain is
>>> Xen PVH.
>>
>> But the kernel has no way (yet) to drive the IOMMU, so how can it get
>> away without resorting to swiotlb in certain cases (like I/O to an
>> address-restricted device)?
> 
> I think Ray meant that, thanks to the IOMMU setup by Xen, there is no
> need for swiotlb-xen in Dom0. Address translations are done by the IOMMU
> so we can use guest physical addresses instead of machine addresses for
> DMA. This is a similar case to Dom0 on ARM when the IOMMU is available
> (see include/xen/arm/swiotlb-xen.h:xen_swiotlb_detect, the corresponding
> case is XENFEAT_not_direct_mapped).

But how does Xen using an IOMMU help with, as said, address-restricted
devices? They may still need e.g. a 32-bit address to be programmed in,
and if the kernel has memory beyond the 4G boundary not all I/O buffers
may fulfill this requirement.

Jan



 


Rackspace

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