From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64AE6606A32C for ; Thu, 3 Dec 2026 13:15:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Z7RzCaCj; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=PAmLP8hW DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=5iYwn9r5ItKcN+qaZcNU19to3FSlMpBZ1Ft/EHNJN4Y=; b=Z7RzCaCjSFCMkfeJr/WeA4hxGI Fg9INGQlGYIaC5DOyqWoo4tpD1GYds9rPtrek9hrkODTA3am0DHBrU0qiQDtS4CCkXAYMrNad8CQo l5MtbhsiWnwFXCRPvdM/OGQxZBQOZ8z1QmllS3r+dmMYvcxSAqilueqVci3zJdH3tpNqQOEoyfHIR Q+LqvHBNBYRc1WyAZZclXPWWK2lwweYsaCcdeCtkF9Rflote4w2gD3pICMDP8KP6vUI3nnAMiCUvX 3K1GP+NojHTgIobyROBrETlZPRm6JxHtGVfpPW09zMWohVnnAY9uM2OYMfQPbv61q9ob1sLbPdT5g 8WXbfrzA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ6eT-0000000EhHk-0rot; Thu, 03 Dec 2026 13:15:09 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ6eR-0000000EhHW-2fFE for linux-arm-kernel@lists.infradead.org; Thu, 03 Dec 2026 13:15:07 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id EE0A040985; Thu, 3 Dec 2026 13:15:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 238FE1F0089F; Thu, 3 Dec 2026 13:14:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796303705; bh=5iYwn9r5ItKcN+qaZcNU19to3FSlMpBZ1Ft/EHNJN4Y=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=PAmLP8hWc9XYYwYxeYGh/duS1YX/TUn50BPk1R6f5Bj1VNb+gzSPedshoPkvplahF itxWOpazZfFBIqGY4LUxR+D8hOY26NS+j9n2ZB6itkHQ84Iq+uGB833Rmm1IOYoBHP +fYBXqyrPzcVU9IkNylIei8TGp4GinXb3K1qP+LMc/1Y252FgomflGojqLDQxumF6n R++LC7BGSAlmv3lyAvLgvTaW7FumBwvmydKDBAQk9cHn2aTjALQOUe7QR61HrtMzq2 mByGMnZbw9LuOJBTOa0kfJ1c1yuei0Qm9VZwHZtUz6N/5cUw8/8xH+ZVStqYxdDmz9 5d2KK3bYB8EdQ== X-Mailer: emacs 31.1 (via feedmail 11-beta-1 I) From: Aneesh Kumar K.V To: "Tian, Kevin" , "linux-coco@lists.linux.dev" Cc: Alex Williamson , Alexey Kardashevskiy , Bjorn Helgaas , Catalin Marinas , Jacob Pan , Jason Gunthorpe , Joerg Roedel , Jonathan Cameron , Jonathan Hunter , Krishna Reddy , Lukas Wunner , Nicolin Chen , Robin Murphy , Samuel Ortiz , Shameer Kolothum , Steven Price , Suravee Suthikulpanit , Suzuki K Poulose , Thierry Reding , Vasant Hegde , Will Deacon , Xu Yilun , Ashish Kalra , Herbert Xu , Jonathan Cameron , Tom Lendacky , "kvm@vger.kernel.org" , "iommu@lists.linux.dev" , "linux-arm-kernel@lists.infradead.org" , "linux-pci@vger.kernel.org" , "linux-tegra@vger.kernel.org" , "patches@lists.linux.dev" Subject: RE: [PATCH v10 00/18] iommufd: TSM-backed virtual IOMMUs for confidential guests In-Reply-To: References: <20261125081121.379481-1-aneesh.kumar@kernel.org> Date: Thu, 03 Dec 2026 18:44:51 +0530 Message-ID: X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-5.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Aneesh Kumar K.V writes: > "Tian, Kevin" writes: > >>> From: Aneesh Kumar K.V (Arm) >>> Sent: Wednesday, November 25, 2026 4:11 PM >>> >>> This series adds IOMMUFD and PCI/TSM infrastructure for assigning PCI >>> devices to confidential guests. A TEE Security Manager (TSM) can provide a >>> virtual IOMMU (vIOMMU), and an IOMMUFD vDEVICE object represents a >>> physical >>> device within that virtual IOMMU. >>> >>> The series adds a common framework for operations on vDEVICE objects and >>> updates lifetime management to keep the VM and device-security resources >>> available while those objects are in use. >>> >>> The Arm CCA backend is provided in a separate series, together with >>> operations for TEE Device Interface Security Protocol (TDISP) state changes >>> and access to cached device-attestation objects. >>> >>> The full series, including the Arm CCA backend, is available at: >>> >>> https://git.gitlab.arm.com/linux-arm/linux-cca.git >>> branch: cca/topics/7.4/cca-da-integration-v2 >>> >>> Notes: >>> * Codex was used to assist with commit message formatting and code >>> rearrangement. >>> >>> Changes from v9: >>> https://lore.kernel.org/all/20261116081935.85372-1- >>> aneesh.kumar@kernel.org >>> * Split the PCI/TSM get/put helpers from removal of the legacy bind/unbind >>> interface. >>> * Split the TSM lookup/reference helpers from their IOMMUFD >>> callers >>> * Replace allocated PCI/TSM contexts with get/put helpers that update the >>> DSM user count on PF0. Remove unused context accessors and >>> pci_tsm_is_configured(). >>> * Add a tagged union for the physical IOMMU and TSM pointers in a >>> vIOMMU. >>> >> >> I think this is respun too quickly. As Jason pointed out there are many dependencies >> here, so it's still far from landing. It would be better to allow more time between >> versions to ensure receiving as much feedback as possible from key stakeholders >> (Jason, Alexey, etc.) >> > > One reason for the quick respin was to accommodate feedback from related > discussions in other threads. The last two patches and their locking > will be simplified further based on: > > https://patch.msgid.link/20261123083337.2731019-9-aneesh.kumar@kernel.org > > So you can skip reviewing those patches for now. > To elaborate, with the changes I have ready, PF0 removal retries the disconnect until dsm_context_users reaches zero. While waiting, it drops pci_tsm_rwsem and waits on the tsm_dev::disconnect_wait wait queue. This allows pci_dsm_context_put() to release assignment references and wake the waiter. PF0 removal therefore waits for the disconnect to complete. TSM unregistration disconnects all DSMs using the same checks and wait/retry mechanism. Once they are disconnected, it drops the initial user reference taken during tsm_register() and waits for a completion while the remaining users, such as vIOMMUs, release their references. This considerably simplifies the last two patches. Based on your earlier feedback, I will wait another week before sending these changes? -aneesh