From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.53 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796313676; b=P+LpU0k9qVF1pZ9V9LG9XHV6FfNo3hMh27oZY5OLLsJ8KCLGn9Wq1HcQz2vx4BHYSBnq VgfMfi4ELEPjOlfjaPoIVuGs2FcjqWy5DC8eqVt6Hw2YXRaLhm/mktW4vXrhf3ozwjwNR 2njJ66FCJTSnP2Z/BzTzB4bJIPqoDrvlyhGgrPXjtJlXyRfAZasaK8rMm+CilZlJXDpHc zc44Y0P0wzCHCZyDr5ihWeGschV0r64MdGS13CrncJIKhhxf+i83Yo05leW8aKb9Fx5CM XfJYKCkZAC/63ghqpJ+7P0wC3oTtxwLaancRMdq2SFTunIZZO7zey0BS6D+k3SbmCsg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796313676; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=3S/zpPUApwbuILIjgQ3aie4s6zd5369trZSHJdkkFws=; b=D1nyP3anOwG2oiv4boekHmdF5cZV+XSO48Lt+YM+jazXmGWz3YX6yfeJAtE1Ve2jnPz/ uCfwduuv8vvh9GXOANZmokKmDwEJF2hx+ZtkXNvvBxwUE+MLpZR9cBpSAigVM5MXHxRb1 R8MAdso/EsqS0GRooju6j22nloHwB2Hc/rEjO+6uQIc3SE9AM9geb4iiLRy9mqTUuIL53 WQ3WNyN85/6E14Kcqsk/0GCSALPK0h2BWe0jBKKYoa0l+TOCZj7pOJ5xnDXyilmWkGvV4 Io+M0xASuGjuLY2LkFfoxe3hzdH9RjVLYSAXeEf47wRT8HV1YMIcBNd4EVxXwvBWClQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b=BQJFpF3q; arc=none smtp.remote-ip=209.85.210.53 Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 15C0B606A32C for ; Thu, 3 Dec 2026 16:01:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 15C0B606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b=BQJFpF3q Received: by mail-ot1-f53.google.com with SMTP id 46e09a7af769-84a248254f4so16243a34.0 for ; Thu, 03 Dec 2026 08:01:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1796313675; x=1796918475; darn=lists.linux.dev; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=3S/zpPUApwbuILIjgQ3aie4s6zd5369trZSHJdkkFws=; b=BQJFpF3q1h2LESOeqtQRz3yBssA8T24v3uJOp1hOe3+cVjURzDi3QP2nyf7rhU//jC LFaU7pu2+mJzZHqMnF5rRJyHTDXGmWZ+s5VloAOhDsgtfo/CwUG5CfPV6tCYkRfLh1tg SegC3WRap4QKIYkvlFHTfMxY3IG/gzMfS3rsApfgLNW6y9JHlsDlD8Uta+9wPof09xQm y0gk5H1qSWA2c3OgdZmnjswnme55H9zo2sy6o2aO/7ca5qx6vlN2RQpc5EC3pxpm0PgF cYbngGcMqZj05+JmckKjdRUs27N3kGK/MQkWJ0EjdR1k5kWugN8cIAC62qBzrbmRau8a 6gag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796313675; x=1796918475; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=3S/zpPUApwbuILIjgQ3aie4s6zd5369trZSHJdkkFws=; b=fpzARPP932rc68Ch1qPYtSoejy8QoQ/YRgPqrOOIPnD8VaWOuVBnKpFqNQ/nJ9Qs3P OYOiXEPhdjvnVdAcYSLnQWq+KDGHRbtccwNotvHCqfHvPfrOGeUXq9YUeLJjiD9fRBT3 i2csPUKCbLhHR2xtDYi1NqXHo68PZnJOzQbc1SnsGO59amIALakvfKtRrof/ctoXbyzv Hb5cdfS3awQLrGKTyabArJjJ/910fNQZLz188SgVU+s2He8iuL/Lo0sDqA5xKfHV4IGt 46uaW24bRkIDmBw3xsJPWH5e2rxWtXTtIQ5jzbPz5ieq2l+V4YRPMd9t/eGIkDgCmFsf 3Vbg== X-Forwarded-Encrypted: i=1; AL+hErFjBjTuULWXLm1Bk/veaOJtYaZnGfZlJrK1qHLVMbPM6vT+7rpqPyKhUvm09yG9csYYJ4MKFI/8@lists.linux.dev X-Gm-Message-State: APuU4Z+NgAJ2z8PewyG53QJkAAhjPPARjH0mO6cNV0/Nr/FJ4VLInoYU Zvdy4tX2788/rJ0JjoNtkqDaBST8XTeb/e3Mss6TA3cgW+dCTk9ILSPynIoh+lt58CM= X-Gm-Gg: AZFdTZfyFRTv/3PNGELTs3iDDHBr/yhCECrwHYN+SDCElJsonGri8IuLi1GeOqSRBSO 3knQ/mcxiQxR+C95waCkyyZjgDeXA9zbQdIdUn0eqjgsonjakHV1HTVXeqpjcGX1mqKWz6GDqEN UvBp6qZ3ean6YZ5JTDkUGvlEd3HoJROjPUXTf/CoPNcd/pG/hkfBrmo9f3NYeDEWetfnwaEG1wX GMTjm2vRAJtX8i208G2KtV3pHPQ+YLpto6DWoHG48KoVVM4UcWMW4tKgRjBhjhgykj9S6LU8NGG rgU2RSSMcvmNTGlnhaZthKBd4QgUbG47noFR4OQjXLJyCSUd5bYV/vYSJPKvKWfhHbBDEsuB+U4 wYRc/Hct4tbfFeHaeEbWgMYKHRQcihsArLEwVPFtd5P5PHQ2tPQz79r710IKCEYNtKiityddoA8 GgLmUtsvJzB4TQ8RMlp0GVmzOPmiiMTegpH5zuYzei2ykb6JcLtYWRAP9+xIBQXz2Uid3uXNaDF /ZKUWbl6xJjPZtDlfC50IhE+/pmjeB5FHaXBERoyjEJDUAh5haQ9v86JmUvk9CX2A2eK9gz/8xr SiqH X-Received: by 2002:a05:6830:6814:b0:862:e9e6:6297 with SMTP id 46e09a7af769-86315985934mr50025478a34.18.1796313675042; Thu, 03 Dec 2026 08:01:15 -0800 (PST) Received: from ziepe.ca ([140.209.225.78]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-863168dd6besm32223863a34.11.2026.12.03.08.01.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 08:01:14 -0800 (PST) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1xZ9FB-00000006o79-0NqF; Thu, 03 Dec 2026 12:01:13 -0400 Date: Thu, 3 Dec 2026 12:01:13 -0400 From: Jason Gunthorpe To: "Tian, Kevin" Cc: "Aneesh Kumar K.V" , "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 Message-ID: <20261203160113.GF1074888@ziepe.ca> References: <20261125081121.379481-1-aneesh.kumar@kernel.org> <20261125081121.379481-9-aneesh.kumar@kernel.org> 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; charset=us-ascii Content-Disposition: inline In-Reply-To: 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. Jason