From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 40D74414438 for ; Wed, 14 Oct 2026 06:27:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791959252; cv=none; b=EJE9+GyEIYgxLqO0V1JNt/gZ/Xlak5SgEKSfK95UkN8izEm8N0HZn5sBY1MEBF6XAiiyjs+uy+ZoqfbtR87S+C8+krPPomnBgP7XQHAad2GK/mA8Toai5J72Ry4qrxTFXO27zDUs+SOhu6ivuwfZ1sYlW4iIIvJ8/1acSAT7z40= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791959252; c=relaxed/simple; bh=ymRKRwWEolm17glJS8skH7f5fDFclMzxXYAshHo32BM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=seneHhg+Qfl1ifwE77uQ6FhrTRSOKCzqOrM6g1KtYXn5PN1KEYdSdSw1yN7Xg5Bey0pxjwyAD5Ebzi1Q270BXFdCxfVI++kNWCxTllzGkq7KP7pBqGV7axui3CjzY8BPGNTImbNOJGBDpYo17xdRn06VAO7lH27i4w4+TVBopPs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=YPGq6ENc; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="YPGq6ENc" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4a1ad2e2391so10595555e9.0 for ; Tue, 13 Oct 2026 23:27:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1791959247; x=1792564047; darn=lists.linux.dev; h=content-transfer-encoding:content-type:in-reply-to:autocrypt :content-language:from:references:cc:to:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to:content-type; bh=p/b7jAuRdElkm76Qs8iHwa7PyYm8EqE5Ut+YVV4k7T8=; b=YPGq6ENcHmd5akwBrhb4NUwJMHq+Yj+J4eIune+cmDRiH4s9YbNzBG8lAIo1urRPwZ 9zzqnjQ7Pin7i0bbPVcuhOChx8lXAI7T4cq/+1V2hw4hdc3AE+otfD9V2NiMweB0Adf+ ZntaCEOnTCr6uDfxWapm3kKWWrcn7DGOG8UKyZa7pwgkgDPis2PoZ3j2v6QFV8p2sbL6 9CwRg7Fr52zPUa9OSasNaVmoyQ8X+OcD+2CjM+9iWXNrkbURtoyb3uFri0ABxK1vB92v KRJEBleXzZiVsRs24bWec6lGVZdX7LW2Cc+qlyeO5avi+OCU3BEpM+q3HrkbBftnXr7G W4xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791959247; x=1792564047; h=content-transfer-encoding:content-type:in-reply-to:autocrypt :content-language:from:references:cc:to:subject:user-agent :mime-version:date:message-id:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=p/b7jAuRdElkm76Qs8iHwa7PyYm8EqE5Ut+YVV4k7T8=; b=VIl2uze1mhJMygjTmIRAg8hgwEaoSzSJyty9yfqyi8ME8rmwWy0Jqy7k/+yryuTTF9 VR+S4gRsmp7fyfSskkh0iaWvdNDK+Z7se3HtPzBRdBIsSwKmkW0W99k+XUD7FL66rfD2 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-4a18e4ca869mr265070395e9.19.1791959247476; Tue, 13 Oct 2026 23:27:27 -0700 (PDT) Received: from [192.168.0.20] (nborisov.ddns.nbis.net. [185.218.66.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48de0514ab1sm12518966f8f.0.2026.10.13.23.27.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Oct 2026 23:27:26 -0700 (PDT) Message-ID: Date: Wed, 14 Oct 2026 09:27:24 +0300 Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH 02/15] x86/tdx: Add TDCM hypercall wrapper for TDX Connect To: "Duan, Zhenzhong" , "x86@kernel.org" , "linux-coco@lists.linux.dev" , "linux-kernel@vger.kernel.org" Cc: "dave.hansen@linux.intel.com" , "tglx@kernel.org" , "mingo@redhat.com" , "bp@alien8.de" , "hpa@zytor.com" , "Hansen, Dave" , "kas@kernel.org" , "Edgecombe, Rick P" , "jgg@nvidia.com" , "nicolinc@nvidia.com" , "aik@amd.com" , "aneesh.kumar@kernel.org" , "seanjc@google.com" , "pbonzini@redhat.com" , "yilun.xu@linux.intel.com" , "Gao, Chao" , "Verma, Vishal L" , "Li, Xiaoyao" , "Tian, Kevin" , "Peng, Chao P" References: <20260924041032.1096569-1-zhenzhong.duan@intel.com> <20260924041032.1096569-3-zhenzhong.duan@intel.com> <54846068-d545-4591-b850-2980ce57f40e@suse.com> From: Nikolay Borisov Content-Language: en-US Autocrypt: addr=nik.borisov@suse.com; keydata= xsFNBGcrpvIBEAD5cAR5+qu30GnmPrK9veWX5RVzzbgtkk9C/EESHy9Yz0+HWgCVRoNyRQsZ 7DW7vE1KhioDLXjDmeu8/0A8u5nFMqv6d1Gt1lb7XzSAYw7uSWXLPEjFBtz9+fBJJLgbYU7G OpTKy6gRr6GaItZze+r04PGWjeyVUuHZuncTO7B2huxcwIk9t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8TAyGN3M8zYf/A5Zx VcGgX4J4MhRUoPQNrzmVlrrtE2KILHxQZx5eQyPgixPXri42oG5ePEXZoLU5GFRYSPjjTYmP ypyTPN7uoWLfw4TxJqWCGRLsjnkwvyN3R4161Dty4Uhzqp1IkNhl3ifTDYEvbnmHaNvlvvna 7+9jjEBDEFYDMuO/CA8UtoVQXjy5gtOhZZkEsptfwQYc+E9U99yxGofDul7xH41VdXGpIhUj 4wjd3IbgaCiHxxj/M9eM99ybu5asvHyMo3EFPkyWxZsBlUN/riFXGspG4sT0cwOUhG2ZnExv XXhOGKs/y3VGhjZeCDWZ+0ZQHPCL3HUebLxW49wwLxvXU6sLNfYnTJxdqn58Aq4sBXW5Un0Q vfbd9VFV/bKFfvUscYk2UKPi9vgn1hY38IfmsnoS8b0uwDq75IBvup9pYFyNyPf5SutxhFfP JDjakbdjBoYDWVoaPbp5KAQ2VQRiR54lir/inyqGX+dwzPX/F4OHfB5RTiAFLJliCxniKFsM d8eHe88jWjm6/ilx4IlLl9/MdVUGjLpBi18X7ejLz3U2quYD8DBAGzCjy49wJ4Di4qQjblb2 pTXoEyM2L6E604NbDu0VDvHg7EXh1WwmijEu28c/hEB6DwtzslLpBSsJV0s1/jE= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 14.10.26 г. 9:19 ч., Duan, Zhenzhong wrote: > > >> -----Original Message----- >> From: Nikolay Borisov >> Subject: Re: [RFC PATCH 02/15] x86/tdx: Add TDCM hypercall wrapper for TDX >> Connect >> >> >> >> On 24.09.26 г. 7:10 ч., Zhenzhong Duan wrote: >>> TDX Connect is a TDX feature that enables secure device assignment, >>> allowing a TDX guest to directly interact with TEE-IO capable devices. >>> >>> The TEE-IO Device Control and Management (TDCM) hypercall >>> (TDG.VP.VMCALL, defined in TDX GHCI v2.0 specification) is the >>> primary interface through which a TDX guest issues device management >>> commands to the host. The host processes these commands and returns >>> responses via a shared memory buffer. >> >> This patch contradicts what's going in patch 5. Because you make it >> sound as if TDCM is yet another leaf of VP.VMCALL, but then in patch 5 >> you introduce the polling code to read the result. And there is not >> enough information in the changelogs to understand why this added >> complexity is needed. Isn't TDCM handled synchronously by the VMM as the >> rest of the tdcalls, is it perhaps handled by TDX NRX module? > > TDG.VP.VMCALL is the leaf used to submit a TDCM request. The VMM’s > return from that VMCALL acknowledges the request; it does not > necessarily mean the device-management operation has completed. GHCI > defines asynchronous completion for potentially long-running operations. But this is essentially an implementation detail, and currently we don't have the host implementation. In that case this choice must be spelled out. > > GHCI describes polling the shared status and event notification as > completion mechanisms. This series uses polling with a timeout; it does > not use event notification. TDCM is not implemented by the NRX module, > although some host-side operations initiated by TDCM may use NRX > internally. Right, those operation falls within the TDX connect spec. And TDCM is just a subset of the VP.VMCALL interface used for tdx connect management, in that sense it's not a "separate entity" i.e a discrete module but just a collection of functionality, implemented in the VMM? > > I’ll clarify the submission-versus-completion distinction in this > patch’s changelog and explain the polling choice in patch 5. > > Thanks > Zhenzhong >