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 15B86606A32C for ; Fri, 4 Dec 2026 05:07:22 +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=ubOLFNos; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FnbpIOLM 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=SYAq5pTNFKnKbIFCCvbszlsjAu6Il1Xw34jRwc1gi3I=; b=ubOLFNosmp1AQlFYTjKp6fkBLc Mh24S6Z6ZLbJTSVxXzcXf3x64rEpPJopOY5bGP19xNijNAUwHa/Pu18g8Lh1O5l5U2XOwcp1/Tp4k ZalXIamrZ8R0bHoB/qLJ3jtrorAVvnv9USVehf8lvCEZ0T1qjIp0449wOTKjY74fHX871Wu6fy2LG cZJtO2M/qupBqhg6BQlUpUpDDZsvgV4ADg7mg50X7Zp3/tIct2Drx1YiJyDjuKNdz8EY57KDBxYZO veDucZunvfxs8AVXC7SjSi//7sa0+gWmiVcQbRtgqSiUNBuakKk7rjahFVs9dk3LwLp0nAG09cFzZ 0FYySoZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZLVV-0000000GgRs-2O8G; Fri, 04 Dec 2026 05:07:05 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZLUi-0000000GgJy-2ufA for linux-arm-kernel@lists.infradead.org; Fri, 04 Dec 2026 05:06:09 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id DEA7962350; Fri, 4 Dec 2026 05:06:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7A8F1F000C2; Fri, 4 Dec 2026 05:05:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796360763; bh=SYAq5pTNFKnKbIFCCvbszlsjAu6Il1Xw34jRwc1gi3I=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=FnbpIOLMrXfvG/jmds7l/zikXyDixi0eeLgAcyQty/nm9gSq7gwTM6gs6vWf3lJec 9YDilQiy+adDrKr/i/qkcCi7SgW5KwmjSbJcA2k+xl+2tEGnXNpNg451c+n5QCmLZT vdCYv49JO7SVBUe+wyul3pSB03UuB2ZxtyNJPhJF1ndP1A9thGBa6hgIoSi2tS1RjI JBw2jbkTOWY5QiM535fWuN9QgieXGlcz2aKDuPnF7Xej2zchHUK7MLcaz6cDlM9Dwb yI7y+0wC8LB9ANpkhyptezlZvQpbTvJ13NI/M0sq00qkL9dHUDdrirTV2tPi94omsm /Z1PpCB0SsrVA== X-Mailer: emacs 31.1 (via feedmail 11-beta-1 I) From: Aneesh Kumar K.V To: "Tian, Kevin" , Jason Gunthorpe Cc: "linux-coco@lists.linux.dev" , Alex Williamson , Alexey Kardashevskiy , Bjorn Helgaas , Catalin Marinas , Jacob Pan , 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" , Lu Baolu Subject: RE: [PATCH v10 08/18] iommufd: Add a vDEVICE operation ioctl framework In-Reply-To: References: <20261125081121.379481-1-aneesh.kumar@kernel.org> <20261125081121.379481-9-aneesh.kumar@kernel.org> <20261203160113.GF1074888@ziepe.ca> Date: Fri, 04 Dec 2026 10:35:49 +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=-6.3 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 "Tian, Kevin" writes: >> From: Jason Gunthorpe >> Sent: Friday, December 4, 2026 12:01 AM >> >> On Thu, Dec 03, 2026 at 08:25:43AM +0000, Tian, Kevin wrote: >> > > From: Aneesh Kumar K.V >> > > Sent: Thursday, December 3, 2026 4:17 PM >> > > >> > > "Tian, Kevin" writes: >> > > >> > > >> From: Aneesh Kumar K.V (Arm) >> > > >> Sent: Wednesday, November 25, 2026 4:11 PM >> > > >> >> > > >> Add IOMMU_VDEVICE_OP to execute operations on a vDEVICE using >> > > >> separate >> > > >> request and response buffers. Each operation defines its request and >> > > >> response formats, with response capacity checked before changing >> device >> > > >> state. >> > > >> >> > > >> Look up the vDEVICE and check its supported_ops mask before >> > > dispatching >> > > >> an operation. Reject out-of-range operation numbers before testing >> the >> > > >> corresponding bit. Backends set the mask during vdevice_init(). >> > > >> >> > > >> This patch defines no operations. The default dispatch returns >> > > >> -EOPNOTSUPP; later patches can add operations independently. >> > > >> >> > > > >> > > > Given this is a tsm series, it'd be clearer to include related ops definition >> > > > (e.g. IOMMU_VDEVICE_OP_SET_TDISP_STATE) in this series instead of >> > > > leaving it to be dig out from your cca repo. >> > > >> > > >> > > The conclusion was that the required set of operations is still unclear. >> > > We initially had multiple operations to read or regenerate different >> > > SPDM objects. After switching to an attestation-based interface, the CCA >> > > series now has: >> > > >> > > enum iommu_vdevice_ops { >> > > IOMMU_VDEVICE_OP_SET_TDISP_STATE = 0, >> > > IOMMU_VDEVICE_OP_GET_ATTESTATION_FD = 1, >> > > }; >> > > >> > > This was not included in the series to keep the interface open until the >> > > TDX and TIO implementations help finalize the operations list. >> > > >> > >> > this series is in-progress so nothing can be considered ready. IMHO >> > including it helps understand the overall picture. You can add a note >> > that the actual definition is not finalized. >> >> We need to make a choice if SET_TDISP_STATE is an attestation op or a >> viommu op. >> >> Anyone have thoughts on that? >> >> From a guest perspective I am thinking it will be an attestaion op >> integrated into the standard SPDM workflow so guest and host have an >> identical SPDM uAPI flow to accept a device. >> > > I didn't follow the attestation part closely, so may need more background > to better understand the open here. I vaguely remember you gave an idea > about returning a ctlv fd in vdev creation, but not sure whether you already > covered all your thoughts there. > > quick feeling - if all tdisp state transitions can fit into the attestation op > then it is an unified interface used in both host and guest. then we avoid > introducing an iommufd specific route. this sounds positive. > > 'lock/unlock' sounds directly related to attestation, but I'm not sure > about 'run'. Is 'run' state triggering any specific action from attestation angle? > For a guest, we could view lock/unlock as session start/end (spdm-start/spdm-end), with run corresponding to evidence acceptance. -aneesh