Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp518905pxv; Thu, 15 Jul 2021 09:19:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZqJuxCE7p6bGxxIsdnh/ULgp4B7KjD+6rCRrrRSlckbR2PG8Z1EhObob4c3Nc2nnx4CSv X-Received: by 2002:a92:c907:: with SMTP id t7mr3190639ilp.267.1626365941067; Thu, 15 Jul 2021 09:19:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626365941; cv=none; d=google.com; s=arc-20160816; b=p3FS8yoOavaxycgMh4oYUd3EXngqEcgX80/NSL/HQH4dfV1ipcWWbFPUYSTx4n8Unu aMG8MfztlyS50/GqvPHczxTvL+2eDo9Yusf1+2PS4pMWQWprvOJjwSq8xaaRHHxZBtKh K8gGJJSCuy8tRxFQUONzm1RLaIR6yXzT78mfPPU3W2r5jRAteGwMKAaytpRoCPdnr+bG MW3ANv9VD8Wh+bdSZaXb7QYUcfhB/H8Dg3KHA0df6xDgb60peBcNNY3vI8+3V+h57HoY rU4MJjR+rdn03y8w8wFjsfmkZYnkYZ7OMP9iBpHCwv1ncMmI0Tv3k91hPJJ/ffis/+7p xeTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=DkYXoL6dF6bJLrc2ZbLK7bYmedAVGajDzFCu5ohMP6Q=; b=mEaQvbhwaZsAHcsZ8NOCxbADNssk5rrkBoex7k5rFmuWINDipenHG3ycrLhyvprAkF YFfTazNydIMeoyULhqU22ZACvyqhl6M/RTpvj13qP+AJIq/6NGjhwJwDaqC8QS8/iveK qQH2vtvxnLbJlItzOb6AVm9BR9sH5s64xiv9T4Jje7EvTbcE05NjG9hkqs/dEc7wvnWO IVyrSIw2S9Md583jZxDp9bCBXg0E/r5izguljBXzOFGeWPydVlg5ZO8OqGbMvgNWaCbw pWqJVdl+/MAJiFr/eLNN8VQ3K3Fz4KQ8yrMpMjvqVPNEPDG2PS5CWNExrHydI5dsL77O SiWg== ARC-Authentication-Results: i=1; mx.google.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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w21si7737937jah.86.2021.07.15.09.18.46; Thu, 15 Jul 2021 09:19:01 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234120AbhGOOBR (ORCPT + 99 others); Thu, 15 Jul 2021 10:01:17 -0400 Received: from mga05.intel.com ([192.55.52.43]:20638 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229637AbhGOOBR (ORCPT ); Thu, 15 Jul 2021 10:01:17 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10045"; a="296191419" X-IronPort-AV: E=Sophos;i="5.84,242,1620716400"; d="scan'208";a="296191419" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2021 06:58:24 -0700 X-IronPort-AV: E=Sophos;i="5.84,242,1620716400"; d="scan'208";a="494592190" Received: from otc-nc-03.jf.intel.com (HELO otc-nc-03) ([10.54.39.36]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2021 06:58:23 -0700 Date: Thu, 15 Jul 2021 06:57:57 -0700 From: "Raj, Ashok" To: Jason Gunthorpe Cc: "Tian, Kevin" , Shenming Lu , "Alex Williamson (alex.williamson@redhat.com)" , Jean-Philippe Brucker , David Gibson , Jason Wang , "parav@mellanox.com" , "Enrico Weigelt, metux IT consult" , Paolo Bonzini , Joerg Roedel , Eric Auger , Jonathan Corbet , "Liu, Yi L" , "Wu, Hao" , "Jiang, Dave" , Jacob Pan , Kirti Wankhede , Robin Murphy , "kvm@vger.kernel.org" , "iommu@lists.linux-foundation.org" , David Woodhouse , LKML , Lu Baolu , "wanghaibin.wang@huawei.com" Subject: Re: [RFC v2] /dev/iommu uAPI proposal Message-ID: <20210715135757.GC590891@otc-nc-03> References: <7ea349f8-8c53-e240-fe80-382954ba7f28@huawei.com> <20210715124813.GC543781@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210715124813.GC543781@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 15, 2021 at 09:48:13AM -0300, Jason Gunthorpe wrote: > On Thu, Jul 15, 2021 at 06:49:54AM +0000, Tian, Kevin wrote: > > > No. You are right on this case. I don't think there is a way to > > differentiate one mdev from the other if they come from the > > same parent and attached by the same guest process. In this > > case the fault could be reported on either mdev (e.g. the first > > matching one) to get it fixed in the guest. > > If the IOMMU can't distinguish the two mdevs they are not isolated > and would have to share a group. Since group sharing is not supported > today this seems like a non-issue Does this mean we have to prevent 2 mdev's from same pdev being assigned to the same guest?