Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1074451pxj; Fri, 4 Jun 2021 05:35:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJye4MVYaswMasg6fgwiMP5593HbnJhEDviNdkQ75ixvMx5IPPxz1++fhmiYlfp6b9c4LfpG X-Received: by 2002:a17:907:c01:: with SMTP id ga1mr4041148ejc.80.1622810141497; Fri, 04 Jun 2021 05:35:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1622810141; cv=pass; d=google.com; s=arc-20160816; b=D5GbGJNGPZMv1pdsLP7HSLbJzj0u1PuDGnHMSrsdlJJ5Eod06TfX8xsmdPMbD6g30x 421Sqen6wtbvpfKDnbGUeL8dxdfEsXs0nh0XYZvMD2dK+GKaN0gXz28bkhmVJoLjyeFp /EZV0jIGgiGid6axTiqeGMq2swv7jmDKWqHUzvz2H0VAkTIxz1DmpRjUFM/L008iOWzz IsePw2FbO0KvfkCAQCXrZCAN7X3tUspl5+S8dU/CTHsiSmnJMcP42UsS/Ip6JcIbs61L iU/E2C9IMI8OKZRE5WuvlASJUcmyVKYOWguEz0/wVliPIGw0//CuRcnkgkySvPzda6zO aQIA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PyhPveebRlld6+RW4gtT261xWM2fTLM1RG/kyIW7xJA=; b=qPgFgLLew53cvV4hJ9ljt9BKi3bLTkFWn3ryObjw6xsSFci5g+vCIwArZrekV5EjVO V7fnfbK2yhFgjOdQqEYDBAcThR9mx6q9dYVUEn97BCGdzIqOm+8hfKWdav0K8DNGvMA1 g3Y+ccvoPiG4eLXbpOelzu0sdAwTeQMPCaN4S0c5sxcvCsVlh1FJDTP3FdHW+34QsIN5 0lmK0bXmYxk48a/TWRNKOTlE2DyzDfkBajB3l7poMhRJBEzFLVLLCOPLAC854UYqpqOT 6VqfUGe4psUTDEFy0xlrzGUuoEJJGl458BffjGyl1GSVSGrbglTD4W6T7Z/BxHawZ5fb rmnw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=nC3aFQOE; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r13si4756548eds.77.2021.06.04.05.35.09; Fri, 04 Jun 2021 05:35:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=nC3aFQOE; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230103AbhFDMfl (ORCPT + 99 others); Fri, 4 Jun 2021 08:35:41 -0400 Received: from mail-dm6nam10on2055.outbound.protection.outlook.com ([40.107.93.55]:63008 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229718AbhFDMfl (ORCPT ); Fri, 4 Jun 2021 08:35:41 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TL1375dPqtA3PQvlz2zT/KZp2YlrkTI1Rrpgc2/ZZkMLHo7qFtDFq3N8l4dAutdDsOjksmcktnp2da2ivVrKNjqDLiNDqV7oqZpXG1e9uIKnCUNaiE132Xkpbe4YK2m5xdngrhKe2r2LIuj9dTt7MyQDFQfaN9YFKbMhyQmXsYyKN+bKOPcray54dCE3zag/aBlnVndCEnvy5ltl7kizqmrVP4Om4wT3WtZU4b9GMEJlqsNU2pmIQtnUbC3zkWorZ5DGQIe6gPwcrGkPGoYXNT/9UCLguDMDId6iFkQZKKPlbTINDCb7ytd7jVvFGbXltu0uRAR+DxUzOtaP1r10MA== 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-SenderADCheck; bh=PyhPveebRlld6+RW4gtT261xWM2fTLM1RG/kyIW7xJA=; b=Y7s1Z28DzRSgwgY+CQC9ZXhIQV0LLaKV0gV0gGw5SFwW6rCx8Hp6h4z4Hlpyc3s6sJ4bZ9r0h5xXnonRZtF3nP5rP6ZKi6a9l9FBaa+yUv4p7VJ6LCp0tjz03WIcwN9oF2wuhnZ2JjtaPigqmIM+ITSY636z0d6fvIooabuNX9bh9ouW5l9qZjPXlzOU8/LETE9Sa81Gco2vcWgnscaRADVuoHIArBjYwL6PzaicKapugCfwvgqiDHTJeVdcYQLtvYDD/9GtcRpnRgqMGEkFLolnTrmgxgmhnG0MI0iMYXbp3yDKgox0hYKH9zKYt98zWpwiMk3/y9FOR9zPaR4QGA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none 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=PyhPveebRlld6+RW4gtT261xWM2fTLM1RG/kyIW7xJA=; b=nC3aFQOE+y0CdK0idrnZYQE7eM1HZE944FB+TvLLR+aMxRn0efGp3VhMC/jPJtaKV4c5Xrt5Cmp8DOAeFoXDgmy1M64VRP5l6FGZlUVYQB+16WpwHpq3wQeTkadJjk6D9GtP9Z3jkVuxsogA3m7DHiMwnOCWs9Uh8CEyp+GFLqGWYatFdysxiRADXHO4GyWNrZbMk1PUVkeMQWB4Kdjt13j80mKSjPQVRVPiCYjKOzoqK/Bj69OChopBSEaGkGPdfJd2quCtInHRaKuyfXtWdGQTfR2kXg3wcQbhnvIvheyP4JLLVYsIroUHjnM5qpCHCYVZAl+Vr5vBpSz7Dpqsyw== Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=nvidia.com; Received: from BL0PR12MB5506.namprd12.prod.outlook.com (2603:10b6:208:1cb::22) by BL1PR12MB5110.namprd12.prod.outlook.com (2603:10b6:208:312::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.22; Fri, 4 Jun 2021 12:33:53 +0000 Received: from BL0PR12MB5506.namprd12.prod.outlook.com ([fe80::3d51:a3b9:8611:684e]) by BL0PR12MB5506.namprd12.prod.outlook.com ([fe80::3d51:a3b9:8611:684e%6]) with mapi id 15.20.4195.024; Fri, 4 Jun 2021 12:33:53 +0000 Date: Fri, 4 Jun 2021 09:33:52 -0300 From: Jason Gunthorpe To: "Tian, Kevin" Cc: David Gibson , LKML , Joerg Roedel , Lu Baolu , David Woodhouse , "iommu@lists.linux-foundation.org" , "kvm@vger.kernel.org" , "Alex Williamson (alex.williamson@redhat.com)" , Jason Wang , Eric Auger , Jonathan Corbet , "Raj, Ashok" , "Liu, Yi L" , "Wu, Hao" , "Jiang, Dave" , Jacob Pan , Jean-Philippe Brucker , Kirti Wankhede , Robin Murphy Subject: Re: [RFC] /dev/ioasid uAPI proposal Message-ID: <20210604123352.GM1002214@nvidia.com> References: <20210528195839.GO1002214@nvidia.com> <20210602165838.GA1002214@nvidia.com> <20210603121105.GR1002214@nvidia.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Originating-IP: [47.55.113.94] X-ClientProxiedBy: BL1P223CA0009.NAMP223.PROD.OUTLOOK.COM (2603:10b6:208:2c4::14) To BL0PR12MB5506.namprd12.prod.outlook.com (2603:10b6:208:1cb::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from mlx.ziepe.ca (47.55.113.94) by BL1P223CA0009.NAMP223.PROD.OUTLOOK.COM (2603:10b6:208:2c4::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.24 via Frontend Transport; Fri, 4 Jun 2021 12:33:52 +0000 Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1lp91M-001dcF-4f; Fri, 04 Jun 2021 09:33:52 -0300 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 052ac075-8225-427c-5f84-08d927550330 X-MS-TrafficTypeDiagnostic: BL1PR12MB5110: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3826; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vFYUeW0r2id7OAUQQe0qfy5cQ99B8eWi1QFtPfsqVZlTmoRhN3nlwL+wc+nHKlQu9BS1uHraxEiA28ZcitG4rXtYnW8pJV1eCAvrSrACGhReuMc7jpJbfiWTeP8RjGU108EBVE+oicV5c241m6SkqxxZZjhylbZSYxsV8bn/i7dAdBmwNoDQKlCYZPX4hPItRLsZyy9tb6kFKDZFCwLufG/7KFCwjibt9sI7kRv5EkeNcFc+BmodEp0REgkFRFuuOWLyfAuqx+Q98AbhunxKmYkyHKiFj6uFtp4P2gVzETspW9Esiccua+qhEKUkLMMot5w0w9Z5MURNOxfChtngJrETxGfGjxjmucg8Edo860GlGTLsrN9Oa+/6oxSnRFWxI5L8sZYU+aab3d+npw3E+jQQRU2SPsIeWP+VLZ2Q5NSeu0pAdztmANpyc89FzifPXrpXY9uT88MMFomueJ5aCNv+ETRSqv2xPzgNTuYx9BYXAkKP3Mct0PApCa0Nxg+9S2dQ7uQ8Q4EldDY9xS2hnnWT0/ePYglYfk7t6bMRuIsSETv7udDphchoIt/2r3aCkSjquuqfZsbqELlH1Ke+vjOHAcVU2mVSr7ri7VvY8/o= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL0PR12MB5506.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(39860400002)(366004)(376002)(396003)(346002)(136003)(8676002)(4326008)(54906003)(5660300002)(8936002)(478600001)(83380400001)(316002)(1076003)(26005)(2616005)(426003)(66946007)(33656002)(66556008)(9746002)(66476007)(4744005)(2906002)(6916009)(38100700002)(7416002)(186003)(86362001)(9786002)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?AkzmKtgyWwAPNESOOzcD418XzLZ7uocEOXnYirucpZD73iPFK7ZnENaV8RNk?= =?us-ascii?Q?8Tfq7TrTbgb09CuZ7tYWRdgAzziv8wkspCaJfQ75RfP7WPVo10O6NRNBXvM7?= =?us-ascii?Q?8A44ZcgZzDVsDmMr+wOeuCU88OI6rXsGz2TdGIHB0pPBPD4BHmDApPJ8puIY?= =?us-ascii?Q?QRwOhj6ExNkcB1bN2Ve/Hex3ZLpdaXG6RqOt2Xxp/8aHvejhPP6FGIqw5Xk2?= =?us-ascii?Q?Wgt14kT5olCe5wR7kxCmqnATLO4DDh7pAQJeMzewtdLhdGfMTTXKrAFUArt3?= =?us-ascii?Q?OP7xuEX01mtnmw3PQ6JeSc1ZzLu6Wz1V9aCeNQo1PJQqlsmnyEgIXm17FX2L?= =?us-ascii?Q?zufPLLbOCJOeZR42g88NDsAgy7v3bhZ9OH8TwhZ1CKKyP/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GJXBi9bZTNI0PMbgT0cx/dVA0B4nwOCB02nxg?= =?us-ascii?Q?JxBzg7bPHQgTgoNFlQxZpoRC?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 052ac075-8225-427c-5f84-08d927550330 X-MS-Exchange-CrossTenant-AuthSource: BL0PR12MB5506.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2021 12:33:53.0533 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Np+BgI34ycW7iwDyrQHpjH0tAkHHBUJyW/WyRoqdCWYmMHFBmqvpLbY4SWgSS9SJ X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5110 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 04, 2021 at 06:08:28AM +0000, Tian, Kevin wrote: > In Qemu case the problem is that it doesn't know the list of devices > that will be attached to an IOASID when it's created. This is a guest- > side knowledge which is conveyed one device at a time to Qemu > though vIOMMU. At least for the guest side it is alot simpler because the vIOMMU being emulated will define nearly everything. qemu will just have to ask the kernel for whatever it is the guest is doing. If the kernel can't do it then qemu has to SW emulate. The no-snoop block may be the only thing that is under qemu's control because it is transparent to the guest. This will probably become clearer as people start to define what the get_info should return. Jason