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=1796102712; b=yf1rnRyZsjsObipbxg9qS7tIMfxToc1ra+Rt/u1Ue8BiiGfneMXyA7R0Ynm12d9v9Sr8 HGGv4CSASoPV6NixbGaslIUD1xfO3GJjSDBZrTkhcTkDnKTNJJF63Ib8ss3wYxFfCj5xA shT2eCgRUEsAOl+DxdYGO5t3DycHOvENhU9eYdZ16BuyC4oLV0pzdsx/CdWyzKUWTtcZp j/+MRPDW3km1qHD++zOqplBNtaB4xxQpi8RM5JrbGUchxMkX1XhAhzhQfSQ4ZB/kYOf7u NC+XakZ1lYIuOFLwLVTy+CfSvplPPeXr1HK/nX6UDH4QCgZ5dMj7nvVu7Z3hI1JvlNA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796102712; h=Received:DKIM-Signature:X-Mailer:From:To:Cc:Subject:In-Reply-To: References:Date:Message-ID:MIME-Version:Content-Type; bh=qLLnv/LCBr55RKcJsbUhy17dW6pYjZus9CfaVan69gA=; b=T+b33avc6i/mkUyuDl4n3ekTyXiovxWHpNfP7tnzj8s+S3uJOYJPAQfgWHGwDZ7GlIFJ 6utMqoxHr9HI0DE1JAksLK6TVgu22BrRxRrvYDgwTl9QfnoKg/YCfsEXFgRjG7hEgKOnH GMln2hGxrn+SznhHAlmrDXtMcoEVFUxE8dzuyhxj9Bbsb4nMuMGZITcMb73oi0ejc4pmX 6jBVSrKVk3aZKGYoWHtv8xVRv2S9D6hNpoWKe96N2BqMLJt9sghUOGTj4iv5EXmWEnxwW bUnR4DOvzWps/CGcxCtvroauIRpUwMxyPSK4sMdHc6ZzGFWiTfh5ni15kSVH6Ns7KxA== 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=dpivx+1A; 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 866AE606A31A; Tue, 1 Dec 2026 05:25:12 +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=dpivx+1A Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D4C01F00893; Tue, 1 Dec 2026 05:25:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796102712; bh=qLLnv/LCBr55RKcJsbUhy17dW6pYjZus9CfaVan69gA=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=dpivx+1Aj8UHZ5TdBLXg24Q+FqaeBxU1AMjsjbwdx2rk5EclNM5vOIKy/O9MtzcHw k8QEuU+kjHN+X+zk27hZSD13eLXt9Qy7ppGIPEiWG2g/15Jjgb4DPhORR3RG8PcQNb JdXr3Qcey5tlTbXdkbvqhkWLytZsrSdEY3F+JcLo7NKQGTH7m4L0O9I1osTF8+scDo qTxUx7Yb7ybviWledEKtjyTzqJJhqvjCEoyAIvkG8lvVVuaEvOl1JSxB+0dbDi0VZx tKsL6FYoLHHFW1PSXxSLu82qbnS1FK+VHDgQ402cbVFmtPEBmxFezqswqiWG8n9JzS +OvjxePHVvwIg== X-Mailer: emacs 31.1 (via feedmail 11-beta-1 I) From: Aneesh Kumar K.V To: Jason Gunthorpe , Alexey Kardashevskiy , Borislav Petkov , Jonathan Corbet , Dave Hansen , "H. Peter Anvin" , Kiryl Shutsemau , kvm@vger.kernel.org, linux-coco@lists.linux.dev, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, Lukas Wunner , Ingo Molnar , Randy Dunlap , Rick Edgecombe , Shuah Khan , Shuah Khan , Thomas Gleixner , x86@kernel.org Cc: Jiri Pirko , patches@lists.linux.dev, Yeoreum Yun Subject: Re: [PATCH tsm 2/4] attestation: Move the ARM Realm Token tsm_report driver In-Reply-To: <2-v1-56c8df81fd64+16c-att_start_jgg@nvidia.com> References: <2-v1-56c8df81fd64+16c-att_start_jgg@nvidia.com> Date: Tue, 01 Dec 2026 10:55:02 +0530 Message-ID: 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 Jason Gunthorpe writes: > drivers/virt/coco/arm-cca-guest/main.c is a bit broadly named, but it is > the driver for the Root of Trust inside the RMM, which the guest accesses > only through RSI calls. > > This is commonly called the "Realm Token". It also has 4 measurement > registers, but there is no driver for them in Linux yet. > > Move it into drivers/attestation/arm/cca-guest.c. > > The simple rename takes the arm_smccc_driver for SMC_RSI_ABI_VERSION along > with it. This isn't going to work long term, but Yeoreum has some good > ideas on how to split multi-function SMCCC interfaces into > subsystem-specific drivers that will solve this. > [ ... 150 lines skipped ... ] That creates quite a bit of confusion around the guest driver. The CoCo driver, arm-cca-guest.ko, will gain many additional features. The model I have been working towards is for arm-cca-guest.ko to be the driver for the arm-rsi device and, depending on the relevant conditions, register with different subsystems. For example, it registers an attestation device by calling: attestation_cca_guest_register(dsc->realm_dev, dsc->binding, tsm); attestation_cca_guest_register() will be provided by attestation-cca-guest.ko, with the implementation in drivers/attestation/arm/cca/da-guest.c. IMHO, drivers/virt/coco should remain the location of the CoCo driver, which should manage the arm-rsi device. Once tsm_report is moved to the attestation framework, the cca-guest attestation driver would similarly provide the corresponding registration functions. -aneesh