Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp711525lqh; Thu, 28 Mar 2024 14:03:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWRiaycUMgNvXoWKZAY/YkCcEGV7C8S7v+/0NysQ4fFeUcs2ChjRPwCo6e97nrnxUX5uvteui+4670W02i6pLyG+5gzuhpYG458MwJlhA== X-Google-Smtp-Source: AGHT+IFCqVjZs8DnAFc1KwTtYNIhc8uM5ZLnWT6rLQca9sjZHPcqQR3jZGVHO3PqnKGQGnMWTqij X-Received: by 2002:a17:907:995a:b0:a47:527a:dad0 with SMTP id kl26-20020a170907995a00b00a47527adad0mr283988ejc.56.1711659836598; Thu, 28 Mar 2024 14:03:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711659836; cv=pass; d=google.com; s=arc-20160816; b=SNhozPV9343IHmnteJopG8WYe1tGXm1rGMC6mGI49WKTungvpBsOioRwIvBk6Psk7d tKAljNqNWUNoucZ357P99BlQtBQKM5KIJyQO1fIIuMK7l5Zx0qxWftWD249rUn0BfifY LBjB5zUsC5N+EvtUuBf0/yHJHxltp5EjeebxLZDYpZc3wfj7dEFxX822kOYyCL/mMOzr OnruQ6xXNrgMIgLUwVU7X32nBqdh7PY3WVygeb6BCx37az2fJQinIR/fI3ew2ycPYDyV LG0IIl3thYTtDMm0p8Tv2ya3fp/gruMM1wxBh5/2SdjItK0mXoFldZ66XXC+VSMUkhLC WzXA== 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=oz0kOaepg6uPLIAXf892Y9x43qyTXw73NDQ+msigkJI=; fh=P/quV/w7uXmndbL78FtEpLTNkJRPx4LJS51PzREvtL8=; b=iyLCqm227NoUHrwQB1uOrquXA4n2wP738YY+OTefwpqfZt7Yc3Z4S9UIJh4QF3bY3m sO4RfBXCNwdEilEG+Jra+GQrS/CtgqLr555AMLzNhypXRXtUXo56v0nJgljQeYBfftn/ 5kcBwOlpXFkMhZh0N+hIRkpjHicJ9JfKsluz+ls/lKSCSXYuQ1d6UjdmegXn+C7jG9JT kyzb+Bx5HSFZN8bvb+tGipEHWTElXQvzqKDxe4ZjMgzzfVqyG5NaJWKKFOBjq29sAiqQ vTBGYidqherS+D22PEJ3WYoE6zwnwjXjT3qbTeVY7UZOCdMatSoSlHIymgGnrf+q30Vb oIoQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SuEDEiXY; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-123644-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123644-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 cf19-20020a170906b2d300b00a4e22510d18si998699ejb.379.2024.03.28.14.03.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 14:03:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-123644-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=SuEDEiXY; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-123644-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123644-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 553AB1F22AEB for ; Thu, 28 Mar 2024 21:03:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 20A3A13AA2C; Thu, 28 Mar 2024 21:03:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="SuEDEiXY" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) (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 746DD2C6B1; Thu, 28 Mar 2024 21:03:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711659825; cv=none; b=R7X7a147nRAAwf3UXHNtdHh7X+3gUWsrz4LGC44YCsqghijXCd+DTao4AoiU4gp/M2xoamBx8HkkMRi7MwdBXxR9RpM0NpNzMDpRYePrnuoObD98wdGw+3WNPJP7Otp4L/ahW2ABK42d0FI3/KknaAJClvafauhm66MOnEFD/jI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711659825; c=relaxed/simple; bh=qDO/Lsc7ctYZ55C9yGW6FnXjoaC1dk7OvyZr6dxE3pE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WU0/u/A02wMTX1pLhb8IhHtQ3eYtxqiWweU9xGq4WHsxohxsucseutqMwsh7em31xLlLJ63OChA1+HYLkdRzhhB8J/3fYben/jUSjSLy/YufDIFwxTID1RB03dk6eiX4+FBsqOjN3I3PHcUQ6fgP9wIaVocDhu7/VdRb62R/C3w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=SuEDEiXY; arc=none smtp.client-ip=198.175.65.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711659823; x=1743195823; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=qDO/Lsc7ctYZ55C9yGW6FnXjoaC1dk7OvyZr6dxE3pE=; b=SuEDEiXYimNwEpm6gO+1dKWcVmmfFlB/x7D+ULQBt+JLJqoZRh8V3tx/ n2WIW+9nShvdBxsFnI9gIvmh3JyMvSNnBYYl/tDP6KvKnrYvgLMi5E6VO 0QXqywr5heo51fjkyi/lDaQny+hgX8Nwp6w0b7eqDvG0IGhu6YVhgyGfa 9FQ9z2rc+2bUDSXZ4cjV//8O97xnTonODUi3OUMCNzVlwPGbrnWla+DOL tRXWh4b8Wx3iAaN5pGoEZ5lw4On1YtXZwPqyc0Ik7aeMozpjbBLG6VH/a AZzT5W3p2OABV8weyb3VS6N0PE7KEG9uxPpj/tUSVQNxlf5TE2q1EGs2c w==; X-CSE-ConnectionGUID: F2lfdrbCRWO0Rttqxy0xlA== X-CSE-MsgGUID: /nwJawbqRoKRlsgb+U+szw== X-IronPort-AV: E=McAfee;i="6600,9927,11027"; a="6955395" X-IronPort-AV: E=Sophos;i="6.07,162,1708416000"; d="scan'208";a="6955395" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2024 14:03:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,162,1708416000"; d="scan'208";a="21281747" Received: from ls.sc.intel.com (HELO localhost) ([172.25.112.31]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2024 14:03:42 -0700 Date: Thu, 28 Mar 2024 14:03:42 -0700 From: Isaku Yamahata To: Binbin Wu 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, isaku.yamahata@linux.intel.com Subject: Re: [PATCH v19 069/130] KVM: TDX: Require TDP MMU and mmio caching for TDX Message-ID: <20240328210342.GR2444378@ls.amr.corp.intel.com> References: <94fb2094-d8ee-4bcc-a65d-489dc777b024@linux.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=utf-8 Content-Disposition: inline In-Reply-To: <94fb2094-d8ee-4bcc-a65d-489dc777b024@linux.intel.com> On Thu, Mar 28, 2024 at 01:24:27PM +0800, Binbin Wu wrote: > > > On 2/26/2024 4:26 PM, isaku.yamahata@intel.com wrote: > > From: Isaku Yamahata > > > > As TDP MMU is becoming main stream than the legacy MMU, the legacy MMU > > support for TDX isn't implemented. TDX requires KVM mmio caching. > > Can you add some description about why TDX requires mmio caching in the > changelog? Sure, will update the commit log. As the TDX guest is protected, the guest has to issue TDG.VP.VMCALL on VE. The VMM has to setup Shared-EPT entry to inject VE by setting the entry value with VE suppress bit cleared. KVM mmio caching is a feature to set the EPT entry to special value for MMIO GFN instead of the default value with suppress VE bit set. So TDX KVM wants to utilize it. Thanks, -- Isaku Yamahata