Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1076170lqo; Fri, 17 May 2024 09:55:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUBXbDmaQOEB+VqAhWc7sSlvzloGGWYsXgC4aq8rwKxzHSB54pJn59T/Yq0Sb8eCIG2Mc65r8BnMKWnVzeYl02qlGxVm3RY9GNf+m/7ww== X-Google-Smtp-Source: AGHT+IFcx310+RqvB3xDiOhmvrKxAK2Su2/JfUWvl2IqRr/5qiqj6sNbSQ8yMhvoG4Gno32NEEdI X-Received: by 2002:a05:6a20:9743:b0:1af:96e8:7b9c with SMTP id adf61e73a8af0-1afde1b7014mr20626270637.47.1715964923009; Fri, 17 May 2024 09:55:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715964922; cv=pass; d=google.com; s=arc-20160816; b=MBhJJA/fHUf/KJKKuOLq7hBYbsSi6l4MCzbW2KbjC505drc+kptlH5d9PCxdet0ic1 wbx28sSJkJDSrw7D7C0e1dlbLb8bF80PplW0x++PocmVi1gsLv07DhHNmJhrdyf8P4zK oi7RyeeTt89bpL23ML2j/t0UpGWtYiMk9kEu3IDbaFvVCy7AemraWYKWXes2WcfAUl+H BKfGPbJA7834baAXqxk9HMUiFYosPSU9vTs7N3fUAi2xJOandKaizYJS0lUtf0uBKoye Jp59qg7Cq3jow1uo36eeS4zoet7qlOG08Zgkv6pqo9EmAJv+JVZM3g7thbfgMiYmHIe1 B0hQ== 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=f15KASabY0ahKhK8cucxqfa1PF9qbIQVk0lmSmVxdcc=; fh=3u1iQ6WNtA/SNcuD83TRImCfr0aWR7hjlHdQsRCSLoI=; b=KVZoZ3yB6nKdvTtXrcMFzRX16fkhPgJFYQzWKxlF59wBY7KPdBTNmNvDrsCB/98Xu+ YlSfC7sNmvsNkWER8KXXqxxEAHswFtiAUiKigJDYc8nLlEWZ/vmV1qaLdQoCiXhkpmm9 4As5NRnVkonkEx82QMU4EUs139+zYjBVn9kieIXGAivGGdesu9eY1/iUjQVr5iNsmRPk A34G2oKXBzuC5Kl6SNrHfgQdAMydSyuJY6atX8ovy7Ce1/iezIJ345Zc8SVxLdR+jJwL tCNfzTwjHoY/Xrzuw3UFu7gYBbyKVDRUcieqXexqxIolsavvJGdv4IOg8O1kYrnkC3Kx VShQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LKwiSCWx; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-182257-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182257-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-63412a4d14csi17290388a12.714.2024.05.17.09.55.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 09:55:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182257-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LKwiSCWx; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-182257-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182257-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 9EE8A287810 for ; Fri, 17 May 2024 14:59:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 05F1882D72; Fri, 17 May 2024 14:53:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="LKwiSCWx" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 C475B6A340; Fri, 17 May 2024 14:53:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715957625; cv=none; b=P0TwONB8Hy1WjK6l0ALldCMNaLRX4R6I9C7x53UqtiY8yedpvvQ6VcNGJCSo/lWlRr+EOzn2conGlFrhuOW/uZLSURZZA0c5Scdx2SsB8Siw2b+ns4i2Hf4NgK6oEpqFPSCurSjjtKlNUgev7P7USD5ZEYd9uFinBRWe9Xao+zg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715957625; c=relaxed/simple; bh=2n+h1MqlBsTJSMPhCujG6lN011O4pI0ypxnNVsJHFUM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=N8/CbSgSedLjcAq7rSmg2F4UMZrH0hjs6kwX/wFgRihKlo3DIJsoSzpo/hbYqtw2MJtxWIdeYP1RtEI7W2AcH+Z09n3YnHRXdR6xINqG+owFkm/ye/nJqvDwamdSwV/WpKXHjz9kieusPOimte4skB7e0LzT3QCgdPTKtaklyXA= 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=LKwiSCWx; arc=none smtp.client-ip=198.175.65.11 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=1715957625; x=1747493625; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=2n+h1MqlBsTJSMPhCujG6lN011O4pI0ypxnNVsJHFUM=; b=LKwiSCWxZoVu6hmcshu00yJbHNROpqAOYhEsbQNlqVo5Ph/aHC6MwyhL 8TBYevQhT8dYVT1QZ8nrKSSGdi0eYLrCyLQWHWR4/yTvKcILAWIt2UC/Q 7laxRFHisTeKgKbD0yEd27VocaM2bFMGHNVNTWnKIC1CprdTOfECmwjhu T0adE5QihQxw2DAUjjg7S64ihzphZfFJmx2qxz8qgBd3bL/1pEdf2v/Lh aXvJl8VwT3buE5xohULxeP5Ph/7JAJ5yQUHU185BuYsRjSe4Ghs/Qp3DV Qc1ZJ9qSnbAa+YH99Wg5mXyRStkgbJklRcE2CXL645JEU/vP7PXGQymGg w==; X-CSE-ConnectionGUID: GmXP6sMKTJWAs6UrP8iNTA== X-CSE-MsgGUID: Xz8rUX5ZR86W7y122n8ZmA== X-IronPort-AV: E=McAfee;i="6600,9927,11075"; a="22715279" X-IronPort-AV: E=Sophos;i="6.08,168,1712646000"; d="scan'208";a="22715279" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2024 07:53:44 -0700 X-CSE-ConnectionGUID: gtAvEW35RFaJ2q05mclWJw== X-CSE-MsgGUID: +kPeOz66SPeQE2gfER9KCA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,168,1712646000"; d="scan'208";a="36616975" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa005.jf.intel.com with ESMTP; 17 May 2024 07:53:40 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id 6C30319E; Fri, 17 May 2024 17:53:38 +0300 (EEST) Date: Fri, 17 May 2024 17:53:38 +0300 From: "Kirill A. Shutemov" To: Juergen Gross Cc: isaku.yamahata@intel.com, 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: References: <5eca97e6a3978cf4dcf1cff21be6ec8b639a66b9.1708933498.git.isaku.yamahata@intel.com> <46mh5hinsv5mup2x7jv4iu2floxmajo2igrxb3haru3cgjukbg@v44nspjozm4h> 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: On Fri, May 17, 2024 at 04:37:16PM +0200, Juergen Gross wrote: > On 17.05.24 16:32, Kirill A. Shutemov wrote: > > 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. > > No, I don't think so. > > With CONFIG_FRAME_POINTER %rbp is being saved and restored, so there is no > problem in case the seamcall is clobbering it. Could you check setup_tdparams() in your tree? Commit [SEAM-WORKAROUND] KVM: TDX: Don't use NO_RBP_MOD for backward compatibility in my tree comments out the setting TDX_CONTROL_FLAG_NO_RBP_MOD. I now remember there was problem in EDK2 using RBP. So the patch is temporary until EDK2 is fixed. -- Kiryl Shutsemau / Kirill A. Shutemov