From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3E823C43334 for ; Wed, 6 Jul 2022 18:04:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JPmgNdzUMLz1QJfXzpO/IRNJPCu52TL6rGAudA+hBYo=; b=uhXNIKB2wjeMtd cH2eioC67ijG2JB1ZKPAHEN4RAgvZrdiW5vPDt1Ptz48vw9eA8Gn0E40cbyBVR/ZqyfmgRr/nqnDD iK6+DXw4CIY+2IN/+O1/wiY0p23bGQt+8Zlkwb+Cw1UFh/ykiquU8ISVgXxXeKDkRYZHqOcusYd+b lGyodePGkVV81XSn8+FwGGNIEy+jqK/fo9XEhI3BxTZxu1SuBXizvKQkjcqQbHz1JgvLnbBsfwnSu aEgxTDhAZbDyZ9RRyjQfJWT/FlsElrSvnZMW985tpxSSZGleQp+DzpB0XGLiKiKNfucAZyTWmT5Xx 9K45SMcP4OZXeJFi1Sng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o99NC-00BtT8-Qa; Wed, 06 Jul 2022 18:03:38 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o99N7-00BtRV-9n for linux-arm-kernel@lists.infradead.org; Wed, 06 Jul 2022 18:03:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657130612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VBlFjIiB9ZC4gvoYyy90cQtMpZILwrGOgeqSFzZ8m1s=; b=TooONBB8Getq8NC8ax3AdKUa8n9owvM3tuzhMhxpLP4aKZh29UWUDpIxf5k5jUGmSvaRNg 4deIJhDy4GcZrBSqPVCN6bg9XqtzBbaBPguUMB00e/Ll6PIiNvJKsX3++1JQTxqJYOxJ8P VT0sRuHpK6mjXtNtC2VuGKAxWruaU9Y= Received: from mail-io1-f70.google.com (mail-io1-f70.google.com [209.85.166.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-245-9V5XUvu0N9CLbYxj0NhREw-1; Wed, 06 Jul 2022 14:03:28 -0400 X-MC-Unique: 9V5XUvu0N9CLbYxj0NhREw-1 Received: by mail-io1-f70.google.com with SMTP id d11-20020a6bb40b000000b006727828a19fso8545111iof.15 for ; Wed, 06 Jul 2022 11:03:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=VBlFjIiB9ZC4gvoYyy90cQtMpZILwrGOgeqSFzZ8m1s=; b=4zbFVXwOswDlhRHGNFXMA012Lc2q38l9QHM7LL+6apq8/wI6xFYYVDgLfeZguLe83b VOaUjAsTtYIbRiscru2uL5375jtFiBoN6A6DQmFWJjDvSN+hyr+Ecb9if0DcjwpIyrz1 y/frpVy2Onu/UOELhWzKc51oG5Y11Fx+XIGfqdObSxjCjyfqyKxk2JHVWr3EvaV+Wihw zUkxH1zlpNClJpZI2fsSxF+M3hKVX56pZ0rfBIvj0c/ne3IX3+EUZ3jJg7N41lMYZ8IP ZcY3XPISybsHz14W4Xk8S30ylWzBMFslBf8aqR7pw/Il0vKfcpTDBkf7Zat03QYhIa2C Mz+Q== X-Gm-Message-State: AJIora/qRxoA75vFhAwL3yLus4jm6pRDqEp1REkLCQeKuUkPW+ztyf0M Yb9sXFIHxV4QDiS8HB6ddEP/B+iJFnHnlp65NsS7Kiy5gOxH8sHHJIdO/ZmxQOt1F6/gnUyjK6h RnoAlvXA46xt6OezQwhVGGSX/b5r7ogZgKnc= X-Received: by 2002:a05:6638:218f:b0:33c:caf0:a61c with SMTP id s15-20020a056638218f00b0033ccaf0a61cmr26531501jaj.198.1657130608168; Wed, 06 Jul 2022 11:03:28 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tABH1Ic8RqUAALPXzLJn+RofmhnwMLRPJ18ZPWLjNFSi2aNVbpdWUQPpp6mJB+LAKijjE03g== X-Received: by 2002:a05:6638:218f:b0:33c:caf0:a61c with SMTP id s15-20020a056638218f00b0033ccaf0a61cmr26531473jaj.198.1657130607865; Wed, 06 Jul 2022 11:03:27 -0700 (PDT) Received: from redhat.com ([38.15.36.239]) by smtp.gmail.com with ESMTPSA id co14-20020a0566383e0e00b0033efe711a37sm1538401jab.35.2022.07.06.11.03.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jul 2022 11:03:27 -0700 (PDT) Date: Wed, 6 Jul 2022 12:03:25 -0600 From: Alex Williamson To: Nicolin Chen Subject: Re: [PATCH v5 0/5] cover-letter: Simplify vfio_iommu_type1 attach/detach routine Message-ID: <20220706120325.4741ff34.alex.williamson@redhat.com> In-Reply-To: References: <20220701214455.14992-1-nicolinc@nvidia.com> <20220706114217.105f4f61.alex.williamson@redhat.com> Organization: Red Hat MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=alex.williamson@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220706_110333_465998_C976D4ED X-CRM114-Status: GOOD ( 28.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-s390@vger.kernel.org, marcan@marcan.st, mjrosato@linux.ibm.com, virtualization@lists.linux-foundation.org, thierry.reding@gmail.com, will@kernel.org, alyssa@rosenzweig.io, jean-philippe@linaro.org, kvm@vger.kernel.org, zhang.lyra@gmail.com, joro@8bytes.org, jonathanh@nvidia.com, iommu@lists.linux.dev, jgg@nvidia.com, yangyingliang@huawei.com, orsonzhai@gmail.com, gerald.schaefer@linux.ibm.com, kevin.tian@intel.com, sven@svenpeter.dev, linux-arm-msm@vger.kernel.org, john.garry@huawei.com, christophe.jaillet@wanadoo.fr, thunder.leizhen@huawei.com, linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org, chenxiang66@hisilicon.com, dwmw2@infradead.org, cohuck@redhat.com, linux-kernel@vger.kernel.org, robdclark@gmail.com, suravee.suthikulpanit@amd.com, baolin.wang7@gmail.com, robin.murphy@arm.com, baolu.lu@linux.intel.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 6 Jul 2022 10:53:52 -0700 Nicolin Chen wrote: > On Wed, Jul 06, 2022 at 11:42:17AM -0600, Alex Williamson wrote: > > > On Fri, 1 Jul 2022 14:44:50 -0700 > > Nicolin Chen wrote: > > > > > This is a preparatory series for IOMMUFD v2 patches. It enforces error > > > code -EMEDIUMTYPE in iommu_attach_device() and iommu_attach_group() when > > > an IOMMU domain and a device/group are incompatible. It also drops the > > > useless domain->ops check since it won't fail in current environment. > > > > > > These allow VFIO iommu code to simplify its group attachment routine, by > > > avoiding the extra IOMMU domain allocations and attach/detach sequences > > > of the old code. > > > > > > Worths mentioning the exact match for enforce_cache_coherency is removed > > > with this series, since there's very less value in doing that as KVM will > > > not be able to take advantage of it -- this just wastes domain memory. > > > Instead, we rely on Intel IOMMU driver taking care of that internally. > > > > > > This is on github: > > > https://github.com/nicolinc/iommufd/commits/vfio_iommu_attach > > > > How do you foresee this going in, I'm imagining Joerg would merge the > > first patch via the IOMMU tree and provide a topic branch that I'd > > merge into the vfio tree along with the remaining patches. Sound > > right? Thanks, > > We don't have any build dependency between the IOMMU change and > VFIO changes, yet, without the IOMMU one, any iommu_attach_group() > failure now would be a hard failure without a chance falling back > to a new_domain, which is slightly different from the current flow. > > For a potential existing use case that relies on reusing existing > domain, I think it'd be safer to have Joerg acking the first change > so you merge them all? Thank! Works for me, I'll look for buy-in + ack from Joerg. Thanks, Alex _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel