From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.182 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796407487; b=rkZgFQAplj+Q0eXp8D45pRdZ2fjXUdbNZ1jz9B7PHLm1pl3na3Ct3YuBq7eIzgWemw2+ 8YaKYpRlagxN0Obr0N5yZKnWB213RZ6IMwaVlAP5OdaiIztCFWG/wC4g0a+sm5+XHLVUy gS3tiyazUpl3jZVPEUaApDYDWD2VE9DwOLbyDYVhiOljHnaWFS6zRtmuxN5SISkdmT6Fi n+PG1/IS5XkdOBCKVF8TWmWP8FxWoHrdh6mR5pdcUvtaBmgc8MKtyy2Cz6iVEURIvy9JW F/PurrLw2xXjGUp6mBX+byUVqLsSlo7lT4aZ54qy8KSeHsinh7BiERFIlNzIdFodCJg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796407487; 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=/V9le4ZMpUs33hM+HH9I61H2u34y7LjAEY0w0tWEomo=; b=tMm8480HKZpduy2KdeHHSf+huCbo+YhuzUFrs1DhoP+UYPGPbhNk6qoA1YARXfifbZM6 +qwMTen1TuwCVIwAnyhQ48NB4ulAYEBFO2O0/RwXNscZZTnZqe/4TVBt/UAHvNPrdT84R qttnebcwZfsimT1HUaaJZkJOsjsDTx+N8rfGncWjrcMNf4CVJlNASMNN9FmNHOuOszWsM +jckvtOVXigcJZWG2hQohGpkGik5wPzMaxyNF+C5685RXn8UBtFI1btDBoh/7HNgVxIo4 1/MNBsqw+lYRPA/AZD3iTKjmi+VJ8NFCsYa9RFTSXDGaJizxWng8t98FXJF/IKY+GRA== 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=nw78pZJ2; arc=none smtp.remote-ip=74.125.82.182 Received: from mail-dy1-f182.google.com (mail-dy1-f182.google.com [74.125.82.182]) (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 E4FC96070DB7 for ; Fri, 4 Dec 2026 18:04:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E4FC96070DB7 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=nw78pZJ2 Received: by mail-dy1-f182.google.com with SMTP id 5a478bee46e88-33bf40b0c8bso2802923eec.0 for ; Fri, 04 Dec 2026 10:04:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1796407486; x=1797012286; 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=/V9le4ZMpUs33hM+HH9I61H2u34y7LjAEY0w0tWEomo=; b=nw78pZJ2f3JfCz3BYp24MBQ920rOZVuz/fMfCF84U7MXitVOX7Mt5g+4Tb+u86XMcV nDkfyXAE4k2euE++ZdbFjvRzHxAh8FDo1Pqyi6l9OkSWJd2PZROnIpQ1wng6F2PjlKmg 85Y2+5fovTYXe2bhCJvPwNlKJYHY3qYeQTAlV0NL3dJsUof/Ak25xTQf0b94uIXq2KrV HCbCKl7neX/Bzk42FTcikfRjAKLUFf703GF887LtVdzizYy240FLy3vA19bllGKj7eVd xw/5FryX0hxezSvCVVK6Yh3ZASCYGOp2nyywKOvN9TdiRFgaxIaJ1/3CHheIEOwB183o gfgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796407486; x=1797012286; 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=/V9le4ZMpUs33hM+HH9I61H2u34y7LjAEY0w0tWEomo=; b=t7e3weBvX+zKG2XHcCzluBVMqtjzv2KJydF7aCeSEjTdAua9YFJsgLYjiJdSvEsSmI oBQcF6s9GzoguOQ/SXMPWmS1sLSn0EORreSPTRUqdLeNnRpoVvapjXdTT5rmulh986fH yaOkBtY4x8IzGYAV+PKcvihjjlNNHFz2fd41jRyrJYONu1m4xeOVrOIzzl1d8osBdArP tpdecNjY/beunx9MOVDgiShTcQ04PmdWq0Ay6BSSaU6BeBJUda13TxKwoaN2gi0lGLRC r0gPOd5Q1ItIVhFWKzQNI4fxjkd1BDB4RF7TOhbw3oVJwBTqrDjAqPdSGT9vUdxDRHmo JqrA== X-Forwarded-Encrypted: i=1; AL+hErEc8tQsvAnEwXbcu+NOuW0hqiEZj2/cuhCMVgGxYiUTP50ncA1CCI6cKmCn24yYFWMLkjW8aeg/Sgfl@lists.linux.dev X-Gm-Message-State: AB4q+uEk9ALba6F9RXZFKvyz02+AJECjQ8Gs0YJJJ+AoNpGMhTXftntP QSXcd/hPQG2I6ajWdmWg9b2X7aT+SGOxrGyeyivCqFVbXZy3O18be5CN9QtDnm+tbyY= X-Gm-Gg: AZFdTZdfv6uMUBvpjsKIXxKS/i1Wo7ZwYRIMxSRPnFazx0Nlccq1SUI0gWeXgMMQ1qu OpWh7ykn3tw2m/UEkedRZQXc+f8wRfDbCy0u23r0adFbCj2MDYLJPQAwZ6cfH8ub0R/AZTp/Jng SLzwwrSN1ySKgXjCqoiO6eUGNnOI92iR0BpC6uEWrPYQYxr7tGUfZdHN/lFZl49q9ZeDLGZS7V2 TsEPRCRE5ThDQxMLNgDPDZ/PDwmaWfk4iLVvZDNIVYaPzeELSwJMCv5Tml8uVGT5R0KE/bZuy6T KbXWg5wU7wINSh/noAI2nrkx3VxJogD3pQZ4JBAKL9dymNDsFDn0iTEKpgf2fIMVTFmkVp5HSep 4yxbD+Ui/Bx+aaf66MSwB296rnIx66ix/ZNFS5JkUNIPPDfcdQ2ACWbUwY0IiWuVmZScKu6OQT3 qXTpKAawGC0DTy49LWHNV85fUsPtwCQ/xd6ebiyLESv/6yykxMOGYOMVtoZhdnGSiLv2pwnSAmT K5x09ZHhhtkbQpPwWnPxTC1CdKbQYux0ebIN01Y4hmaEYtAjyQtNAfCd5Sn3flct2f6OUSqRwcw 4O/Rfbq/YONxcLd+YDQEBYM= X-Received: by 2002:a05:693c:41d8:b0:387:4d80:eebf with SMTP id 5a478bee46e88-38751fc92a7mr2750584eec.5.1796407485857; Fri, 04 Dec 2026 10:04:45 -0800 (PST) Received: from ziepe.ca ([130.41.10.206]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-387521bdedbsm9915508eec.12.2026.12.04.10.04.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 10:04:45 -0800 (PST) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1xZXeG-00000009rG9-0dgf; Fri, 04 Dec 2026 14:04:44 -0400 Date: Fri, 4 Dec 2026 14:04:44 -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: <20261204180444.GK1074888@ziepe.ca> References: <20261125081121.379481-1-aneesh.kumar@kernel.org> <20261125081121.379481-9-aneesh.kumar@kernel.org> <20261203160113.GF1074888@ziepe.ca> X-Mailing-List: linux-coco@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 Fri, Dec 04, 2026 at 03:24:55AM +0000, Tian, Kevin wrote: > 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. Yeah, that's a bit separate But you can imagine the system as a tunnel, 1) The host gets an attestation FD it reports SPDM information and the host accepts it 2) The VMM gets an attestation FD and it gives the same SPDM information and maybe a bit more, scoped to the VDEVICE, not the physical device. So collection actions on this FD (only) cause guest visible changes. 3) The guest guest an attestaion FD, and it shows the same information as #1, in the same way The attestation FD is reflecting standards based stuff, so it turns out all the vendors have or can align to it, in all three presentations. Then there are four attestation ops: Physical Guest prepare VERSION .. GET_DIGESTS TDISP LOCKED start KEY_EXCHANGE .. FINISH no change get evidence GET_MEASUREMENTS GET_MEASUREMENTS TDISP INTERFACE_REPORT accept Load IDE Keys TDISP RUN and the device trust sequence: trust=full bind pIOMMU to DMA DMA_ENABLE vIOMMU to DMA >From a user flow on the attestation FD the same code works on guest and host just as well. The goal of the secure world is to provide the fullest API surface and make it 1:1 between guest and host. I don't know how the VMM will relay the TDISP locked/run ops right now, but the guest/host side seems to be working out. > '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 SPDM, to be general, we have this notion of 'accept' which means the userspace has looked at the connection and device then approved it. Upon approval the kernel does 'something' defined by the driver that created the SPDM attestation interface. So it is fine for Guest TSM to define its accept action as RUN This is also convient because the session binding from LOCKED -> RUN, that proves nothing unlocked it, is contained entirely with a single FD under a single cookie, which seems much more robust than what we had with sysfs.. Jason