Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1168747lqo; Fri, 17 May 2024 12:57:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVkbHbIzC2yT1hUrX4ZkSaK0u3s0XGmKnmmJEFQEZUmC8kL2ZmB2B7uDBq9QzZxKOTxfqCfRXKmeEbcRFki0tmvbatdtM8Zi/rsFTzErw== X-Google-Smtp-Source: AGHT+IHr2LFkdj+4IRD5jejTpADnoNlt8sRZZslYYKwZWqIODC6FMwuyXLwiin6gEddVtykwgOC7 X-Received: by 2002:a17:906:5393:b0:a59:bacc:b07f with SMTP id a640c23a62f3a-a5a2d672f6bmr1617953366b.52.1715975853666; Fri, 17 May 2024 12:57:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715975853; cv=pass; d=google.com; s=arc-20160816; b=gLxRaNQGOh4+xWRJJcnRmNPGy7INipPnya2LL9XPaheS9mML0e3NECEmzGua/LcA9K /zS0LHGsyBCQnuxQaBga+NjrJHp0t8jQ6VdTyx0uWiEAExPywvgVFMm+1B5+w58WUYTo Vz7DZoV6q1T0UsVjj/FAOFeKAuqhV7eVftoUpMWW6e3dWp2TKPDWLu/z0bIouehufSN2 VpP7OJ/+A6iYh4O1aYXWieiURlKwy1daCNdkFVQHjify6nTsyzaNlUPAI3Zyauqww1pU rMl0kgZzRtBxA1va0Wm/wKLfHWx6H6bv3P99MnIlObwHoBFxN5CgPwXr0I/NRPodMWPr 5WaQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xMM4MzyphkI5FFs0678BuMqWymTUO+XW9yKTVkR0hL0=; fh=MR0LZfWXWnpQgNWVyfzmafwe/1J3aFEmPiReYcC4tHg=; b=CPsaWrSOj3yzB/1O957OCUrjHqS4TSjfytwo6X24Nu9OtQY7AOlpk5LJrlDioWLakD CGnDw0uGtdK0k0TMRdkW6SD3YudMIu0dI9BE8wWUNvDD1vw8hjsPf2/glAmk8jZflk6z DzNsjMb79JVz/3hOCIPlL1XdHj01h/r/6SBzIS9W7OzJClRhgG8GO+4WN4gFsTST+5zQ gjba41hCcA6eNUcUQSEFwfVWw+SV7kot/wJh3k0HVS9EipLnHXTgDdhnsJ2oelqxs4pI RQ6UP8RiVOUfAmRJ2y4/mAfmWoRY8tpn2LJvZJipZK9DGohaFiBNmWxKZDc8OadYUhL5 n7hg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZPafAyJg; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-182208-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182208-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a1797cdeesi1034567366b.259.2024.05.17.12.57.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 12:57:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182208-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZPafAyJg; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-182208-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182208-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2D6E01F25CEB for ; Fri, 17 May 2024 14:32:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7EC0E883D; Fri, 17 May 2024 14:32:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ZPafAyJg" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 4C62E28FF; Fri, 17 May 2024 14:32:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715956333; cv=none; b=bTDPB1F4VJrALjrDQcZDp/TDSxqOR+WQzZjCyYFSd8O8/6jCQhgrfiit/NUgrvu7CAg6d7lPmhmjtHGMZr0ul25SjNHMseJ6szFkLDV1KiUON+uCz3EhOd+UiGmGYXZpLX5GKpNmUoYlbFW6KXuqlBRxXsHC0HBd2CHHFIt0YOw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715956333; c=relaxed/simple; bh=+aLRNa4yOp0ylfObvM77jP/z9GCYIpiglc9Gsv9Qu1o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=q8Fq6PZVdric0ZVJKVAfZAx6iav1IC1S+VMEsjpOC7bnIpQjrOPazKE7Jk0QC4cf+Zt3uGJKyda/HEfYU6wwx1d6foCMB4XW5Ls8CAYVf/JR/lg8Q2dESpAXNRrzmusLAxfS5s0KirWrCfE80A5Gvm3i9lINNtustsv3aAsTUG4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ZPafAyJg; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715956332; x=1747492332; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=+aLRNa4yOp0ylfObvM77jP/z9GCYIpiglc9Gsv9Qu1o=; b=ZPafAyJgbTDkIxC3AuY+F0THkXLrJJWJX9Xjgrbznfy6AROnyRS83xHd 7PStvhl1Rzqp8WJLAbbBO7eHyVCYPMPQCNtD7Qiux8wWOhRS8QFYCJto9 Y5/ilXQDXDxH18ycbHcZicUQAabmv/x+5Ir6CIbiYEMVpkQ7ao6oDxCwf lI8CeCQGs/pU0nqWO4V/4kXpn8ZKu06+oyuxfnqZmxp63f8zDqmOtuWD0 xsfd8Wd4h+74Il89UTZDt2TG+tRoMj7H0itXKtxbZ/SuxWQkMHhf1bnb6 FzrzDOg/720AnNZG9Tqn//XlL57shQTtMI1VD8jH0/Fo5fl3KVC4ZdQ2U w==; X-CSE-ConnectionGUID: yIUb6zbpTYCBMCL+/Ms2sg== X-CSE-MsgGUID: 9TRvF2lUS2qjcb8DzHN2gQ== X-IronPort-AV: E=McAfee;i="6600,9927,11075"; a="11976826" X-IronPort-AV: E=Sophos;i="6.08,167,1712646000"; d="scan'208";a="11976826" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2024 07:32:11 -0700 X-CSE-ConnectionGUID: L7CyFOoMR1mh2UCbouDRzg== X-CSE-MsgGUID: 7WE9tLshR9Czrld1/fPBMg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,167,1712646000"; d="scan'208";a="31820082" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa009.fm.intel.com with ESMTP; 17 May 2024 07:32:09 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id AA84619E; Fri, 17 May 2024 17:32:07 +0300 (EEST) Date: Fri, 17 May 2024 17:32:07 +0300 From: "Kirill A. Shutemov" To: isaku.yamahata@intel.com Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, isaku.yamahata@gmail.com, Paolo Bonzini , erdemaktas@google.com, Sean Christopherson , Sagi Shahar , Kai Huang , chen.bo@intel.com, hang.yuan@intel.com, tina.zhang@intel.com, Xiaoyao Li Subject: Re: [PATCH v19 039/130] KVM: TDX: initialize VM with TDX specific parameters Message-ID: <46mh5hinsv5mup2x7jv4iu2floxmajo2igrxb3haru3cgjukbg@v44nspjozm4h> References: <5eca97e6a3978cf4dcf1cff21be6ec8b639a66b9.1708933498.git.isaku.yamahata@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5eca97e6a3978cf4dcf1cff21be6ec8b639a66b9.1708933498.git.isaku.yamahata@intel.com> On Mon, Feb 26, 2024 at 12:25:41AM -0800, isaku.yamahata@intel.com wrote: > @@ -725,6 +967,17 @@ static int __init tdx_module_setup(void) > > tdx_info->nr_tdcs_pages = tdcs_base_size / PAGE_SIZE; > > + /* > + * Make TDH.VP.ENTER preserve RBP so that the stack unwinder > + * always work around it. Query the feature. > + */ > + if (!(tdx_info->features0 & MD_FIELD_ID_FEATURES0_NO_RBP_MOD) && > + !IS_ENABLED(CONFIG_FRAME_POINTER)) { I think it supposed to be IS_ENABLED(CONFIG_FRAME_POINTER). "!" shouldn't be here. > + pr_err("Too old version of TDX module. Consider upgrade.\n"); > + ret = -EOPNOTSUPP; > + goto error_out; > + } > + > return 0; > -- Kiryl Shutsemau / Kirill A. Shutemov