From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs Date: Thu, 13 May 2021 10:50:30 -0300 Message-ID: <20210513135030.GF1002214@nvidia.com> References: <20210427172432.GE1370958@nvidia.com> <20210429002149.GZ1370958@nvidia.com> <20210503160530.GL1370958@nvidia.com> <20210504181537.GC1370958@nvidia.com> <7e5c2276-ca1c-a8af-c15f-72a7c83c8bfa@ozlabs.ru> <20210505163902.GG1370958@nvidia.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LV/70pglIClI+WWS32XYL5zD2ywvBpVyxovVe/GLPn4=; b=k5lszGhPf/48Y/1ZUK5IeebOukgDOr8jqBxi9VJ552O9rbAaDEjH6fz0QYD3qPRnx+YFiT6EszrrONRVj0cG7knGU8AxhhXDGv/UyZqiVHRI1xfq8+AcyUmjXtsUDXZDcmWM1BejOktuZoqqbdqeqPnZdcMS9axFs7Ha0JY02Xc0dEVEhK7icJICvZBqLgfJ9riXK6bbh9rVYJrYTqWaC/xnSSLdWmJVh4OICdvW9/7pIpDQGsUmbqsQhc2JPKD28ZJ4gOBWkI1JowUNWhnTky+upc+desOwphLIkUZ/px6WrtJDrSOonvFccSyjJrBH2Bu08Bj71dEMzfZPVNdI3A== Content-Disposition: inline In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: David Gibson Cc: Alexey Kardashevskiy , Alex Williamson , "Liu, Yi L" , Jacob Pan , Auger Eric , Jean-Philippe Brucker , "Tian, Kevin" , LKML , Joerg Roedel , Lu Baolu , David Woodhouse , "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org" , "cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Tejun Heo , Li Zefan , Johannes Weiner , Jean-Philippe Brucker , Jonathan Corbet , "Raj, Ashok" On Thu, May 13, 2021 at 04:07:07PM +1000, David Gibson wrote: > On Wed, May 05, 2021 at 01:39:02PM -0300, Jason Gunthorpe wrote: > > On Wed, May 05, 2021 at 02:28:53PM +1000, Alexey Kardashevskiy wrote: > > > > > This is a good feature in general when let's say there is a linux supported > > > device which has a proprietary device firmware update tool which only exists > > > as an x86 binary and your hardware is not x86 - running qemu + vfio in full > > > emulation would provide a way to run the tool to update a physical device. > > > > That specific use case doesn't really need a vIOMMU though, does it? > > Possibly not, but the mechanics needed to do vIOMMU on different host > IOMMU aren't really different from what you need for a no-vIOMMU > guest. For very simple vIOMMUs this might be true, but this new features of nesting PASID, migration, etc, etc all make the vIOMMU complicated and emuluating it completely alot harder. Stuffing a vfio-pci into a guest and creating a physical map using a single IOASID is comparably trivial. Jason