From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.198.163.19 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794203942; b=AuG84muu6DQzQR5qr4bA4p7CpqYfLx11tf2t97mbWHBPULqWm4A9Znc2ZIFnI8+VnVpN PYaNFE4Kez5vSyiOG3pMikR1bPgIWCPKkn0lJpIb7RQtfr4mXM+D8MLe2f665HQ7x0MpO 326guewk806pYa7XFG+jbYK7bqh/ElUr9MDs3lPl8h8MX5tRpnREBpmY9g9lffNtIujeV aUZfJbS3WoCzmbbU8TARifjMftQykDey7NksnLHvS3fAWpkPMxQo93j60rvQmJ2Jri9ZO Sa20xmJIAWQyjIpAyVjdZHgDLBnfgX7heDU1eL/rfMaUSDMe91Voz3M7ht2ahbXMtig== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794203942; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Message-ID:Date: MIME-Version:User-Agent:Subject:To:Cc:References:From: Content-Language:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=/E3ZtH8ojoi/vmsGrVMl6AMo0m24rPSDyRXvjqgo+0c=; b=pkO+JUuA4SouGQEnU/0GJgynq6OKy+gRMqOayn5ox6QcJ6hYZzrP3MzyRzZtq+nR0pfA AQ0wyXP0ZZhH/NxCyvnDYACfajMcokqunaLQXRy/kEUne+WIz+7Q0stxK7JgR+Ex/jN+B v46EHmhnA/Du+tMOy6ESvRSuucjBnlaPlJxmnPqY9kov+dlien0XRAFGMBP4ikeazEegK vEJh/Uk0Z0+Q3N3eWY5Foi0AcbisJzSnhRuymg+fNmkMDQalnPLsOrpxa7ScQxJBxr0jI UB/I+uYcmfCeHqrTtuHpbrfOwg6lKeKpj6qM+4/gM8FtiyienMxU0yDM8//KBq2TF0g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=n8s+c+Xs; arc=none smtp.remote-ip=192.198.163.19 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6AEA7606A321 for ; Mon, 9 Nov 2026 05:59:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6AEA7606A321 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=n8s+c+Xs DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1794203941; x=1825739941; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=OGKuaFtpJu/00zUw78GQThfCA7h7SYaZtzIWG6Z/hag=; b=n8s+c+XsSLhKKjFbsklhOU6U+BeJe+3SW+GghvcCYq47gh0iHgB4uXuH 18vd3diU8jINCdayagu5+oQDK2/nU0MkSCPL3T6ZNcOUjQ56CS1c0jDOP MOnZsU6rXhY8GlDB0dwBbQ4mX6ElxoxK0CLtrIEw6VKxKuCtYGhylI717 Nx/7SLg9LSLWs9R23boFZcKRKBW9lV99/RRsctXYCg0R70CnU7aQHXXIx +L9cxTpGAVXuSxHBi24raF6hGPgV4h0Wx/I13ek51QE6CXiBnxpJBP3A6 mE//q1CZ7zyKzvj2EYGusOJZyru7sbVY2MDHnsnUmttgAUYc74xOmWeoD A==; X-CSE-ConnectionGUID: drUoQc6PSbGqCUkZ70hxKw== X-CSE-MsgGUID: bSRtXA74QQuh2L3hbl1SBg== X-IronPort-AV: E=McAfee;i="6800,10657,11960"; a="3022707" X-IronPort-AV: E=Sophos;i="6.27,203,1787036400"; d="scan'208";a="3022707" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2026 21:59:00 -0800 X-CSE-ConnectionGUID: tjo2rXZDQNSnB4+x8NjlaA== X-CSE-MsgGUID: wjgjw2klTIuEErLWbS1uLA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,203,1787036400"; d="scan'208";a="7789063" Received: from binbinwu-mobl.ccr.corp.intel.com (HELO [10.124.245.162]) ([10.124.245.162]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2026 21:58:53 -0800 Message-ID: Date: Mon, 9 Nov 2026 13:58:51 +0800 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 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v16 03/20] KVM: selftests: Initialize the TDX VM To: Lisa Wang Cc: Andrew Jones , Ackerley Tng , Chao Gao , Chenyi Qiang , Dave Hansen , Erdem Aktas , Ira Weiny , Isaku Yamahata , Kiryl Shutsemau , linux-kselftest@vger.kernel.org, Paolo Bonzini , "Pratik R. Sampat" , Reinette Chatre , Rick Edgecombe , Roger Wang , Ryan Afranji , Sagi Shahar , Sean Christopherson , Shuah Khan , Xiaoyao Li , Oliver Upton , Jeremiah McReynolds , kvm@vger.kernel.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, x86@kernel.org References: <20261105-tdx-selftests-v16-0-2024e8fa517a@google.com> <20261105-tdx-selftests-v16-3-2024e8fa517a@google.com> From: Binbin Wu Content-Language: en-US In-Reply-To: <20261105-tdx-selftests-v16-3-2024e8fa517a@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 11/6/2026 7:46 AM, Lisa Wang wrote: > From: Sagi Shahar > > Add tdx_init_vm() to handle the mandatory VM-level initialization > sequence required for Intel TDX. > > For TDX, the VM's CPUID configuration must be "sealed" during > KVM_TDX_INIT_VM before any vCPUs are created. This is necessary because > the TDX module does not allow the host to create and initialize any > vCPUs before the VM's CPUID configuration is accepted and sealed into > the TDCS. > > Additionally, to satisfy the strict requirements of the TDH.MNG.INIT > SEAMCALL, the helper masks the KVM-supported CPUID > (kvm_get_supported_cpuid()) against the "directly configurable" bits > reported by KVM_TDX_CAPABILITIES. > > Co-developed-by: Isaku Yamahata > Signed-off-by: Isaku Yamahata > Co-developed-by: Rick Edgecombe > Signed-off-by: Rick Edgecombe > Signed-off-by: Sagi Shahar > Signed-off-by: Lisa Wang > Reviewed-by: Ira Weiny Reviewed-by: Binbin Wu