From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796360764; b=oxbtXpS57vF9N8aN8+W8bouK/oXBwKujtxs/O81kM3WB5LPrxrDkYlNhr4c3QiX6zJbo Q02DprS5cfiNB1++T1drb1yz/YMv6fnFb36+CeKCuUZsCXhehgb/V7KcvqZWSFrgb75+g 9S8njUlXa7Y+ZcCWHI35GNosufhflRDGPiovQCWCLmD4bS/2o3AJ23Pi0OqchzxQmkxei HduQFFBCt0iJstMJuhftfjR7m6cxxV3hB2ckByVL5BLnV82pJlaj7TWdBYeAykg5E1E1Z nm+tSSd+SwyuZzV5Yj70KssYwPaOy0pYw2M4q+2qR/HAqf4uz/fNLsHkgwvZ695E6pA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796360764; h=Received:DKIM-Signature:X-Mailer:From:To:Cc:Subject:In-Reply-To: References:Date:Message-ID:MIME-Version:Content-Type; bh=SYAq5pTNFKnKbIFCCvbszlsjAu6Il1Xw34jRwc1gi3I=; b=lGD3vqwPm08gaiqBiYWc9bsojXNkui5yqt7w84VtIXVKDnhk1MKg0vbx+TeDkxhSMOGK KF0qbrA0cO8SUEn6yatoAuV08598803KEKL1cb0jD4dCHvYbdNjObZkPP/CJcUf+yc/FB 4GBFdj9Jj/oHrK6gbO/benHeKSriF6NJ7GfeQJVJmnodTe2Jb/AhG9odKUzjAnPGTYpNi m10PTrK4HJCKzHn7+Y3QO13BzgrZFyASI2MbCC1i0qFXpCqqc566YsGlwar1uFP2eUa7W FRUGxYJuIF5zNeGB+mBbPYC7rNX0MoEVtl9Zs8vPFQZo67XwB9GuF7+KykrWZIsxemA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FnbpIOLM; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5090606A32C; Fri, 4 Dec 2026 05:06:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FnbpIOLM 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-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain "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