From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 88443201004; Mon, 2 Mar 2026 06:58:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772434708; cv=none; b=rB5NahE+KADceT2E33rv8vFJc1O6RQAqH5KyPUwJUj/wYiV2JBK+RWVnM9dk+rUstZbJtVVkQMoDFH7Qx5FTI9WTUZvc+LfzcCuW4hx7u0P8u2hwXfPnTrxSD0edK+D6mJ2Sex9EK9msFmXA2hdJ7c9yutpwA0GzU4Vnsx8f7dE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772434708; c=relaxed/simple; bh=QuE/TCSzAlqPVDJUGj0JHRDKd+76fYi6RJN1xDSWzNc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=rEB7H2CgED9CkeIpCDuZ+Dcz0niVr5M/NTqmCYnuUqPx5miXWdkEB7WFoWoEkuT4suqhkGDc32gJHwZ/hSwZSjM+hvNHuhLzmyzl615L60q2/KS0g9+rHpQ6fczoJUJkiTkjvh4PAg3T4XD9yaU+Pl1FPoQRBAVo9y1/lRMguZo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OZifj2He; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OZifj2He" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D62BC19423; Mon, 2 Mar 2026 06:58:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772434708; bh=QuE/TCSzAlqPVDJUGj0JHRDKd+76fYi6RJN1xDSWzNc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=OZifj2Heh2DmSYpOSLto0qL7rXlaSTJ2G5yJ2ss4heuQdoO4Twftcgmr3l8y9BiTZ AelS3AWCJQazEYl4vnWh6Q4bBV60oiOcTrTzTs9tKS17WNqcGyjsp9p2ba447pJ2VC a+GzTYsuhU+KXm6ktaBKunKT7j5Bq56zQWvtGJkdTBpvnK4esZdvHuBSF00rZl14Q7 fS4JccZPf3vKR0DLFGJAqT06mJDDLYMAuJO+BdB09PWjvw9569MYO36qqmIAtniuwV E7bHSSXILvQWuPXEwgXKHjLGReLpiqSAzAYfmkzbIdaZgkCTSGjS7Fjp78ffZwSi55 7W8/TZCIyMb5A== X-Mailer: emacs 30.2 (via feedmail 11-beta-1 I) From: Aneesh Kumar K.V To: dan.j.williams@intel.com, Alexey Kardashevskiy , x86@kernel.org Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-pci@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Sean Christopherson , Paolo Bonzini , Andy Lutomirski , Peter Zijlstra , Bjorn Helgaas , Dan Williams , Marek Szyprowski , Robin Murphy , Andrew Morton , Catalin Marinas , Michael Ellerman , Mike Rapoport , Tom Lendacky , Ard Biesheuvel , Neeraj Upadhyay , Ashish Kalra , Stefano Garzarella , Melody Wang , Seongman Lee , Joerg Roedel , Nikunj A Dadhania , Michael Roth , Suravee Suthikulpanit , Andi Kleen , Kuppuswamy Sathyanarayanan , Tony Luck , David Woodhouse , Greg Kroah-Hartman , Denis Efremov , Geliang Tang , Piotr Gregor , "Michael S. Tsirkin" , Alex Williamson , Arnd Bergmann , Jesse Barnes , Jacob Pan , Yinghai Lu , Kevin Brodsky , Jonathan Cameron , Xu Yilun , Herbert Xu , Kim Phillips , Konrad Rzeszutek Wilk , Stefano Stabellini , Claire Chang , linux-coco@lists.linux.dev, iommu@lists.linux.dev, Alexey Kardashevskiy Subject: Re: [PATCH kernel 2/9] pci/tsm: Add tsm_tdi_status In-Reply-To: <699e97d6e8be7_1cc51003c@dwillia2-mobl4.notmuch> References: <20260225053806.3311234-1-aik@amd.com> <20260225053806.3311234-3-aik@amd.com> <699e97d6e8be7_1cc51003c@dwillia2-mobl4.notmuch> Date: Mon, 02 Mar 2026 12:28:10 +0530 Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain writes: > Alexey Kardashevskiy wrote: >> Define a structure with all info about a TDI such as TDISP status, >> bind state, used START_INTERFACE options and the report digest. >> >> This will be extended and shared to the userspace. >> >> Signed-off-by: Alexey Kardashevskiy >> --- >> >> Make it uapi? We might want a sysfs node per a field so probably not. >> For now its only user is AMD SEV TIO with a plan to expose this struct >> as a whole via sysfs. > > Say more about what this uapi when sysfs already has lock+accept > indications? > > Or are you just talking about exporting the TDISP report as a binary > blob? > > I think the kernel probably wants a generic abstraction for asserting > that the tsm layer believes the report remains valid between fetch and > run. In other words I am not sure arch features like intf_report_counter > ever show up anywhere in uapi outside of debugfs. > Agreed. For CCA, we use rsi_vdev_info, but we need a generic mechanism to associate this with the report that the guest has attested. In CCA, we call rsi_vdev_get_info(vdev_id, dev_info) and later use that information in rsi_vdev_enable_dma(vdev_id, dev_info). Perhaps we could add a generation number (or meas_nonce) to the TSM netlink response and use it when accepting the device, so we can reliably bind the device measurement to the attested one? -aneesh