Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1731844lqz; Mon, 1 Apr 2024 15:55:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWnhwnYBA+etVq9rSWFzbPWUpCEJTlIhzBQLpDRUlV9lqfhmQyeEWpQFBQMwbIyGyIy9Js+VnmQVFFvE6cpOU5QFo3l1bY5KjnUU/rx5w== X-Google-Smtp-Source: AGHT+IG8UzwivDpQt1MhRO241tbBgW1Pu0v1tA0d1/lXNM7hdErCIBnc2YcIyLhIJwmbaObIMr4O X-Received: by 2002:a05:620a:d8c:b0:788:5bc2:82bf with SMTP id q12-20020a05620a0d8c00b007885bc282bfmr15767639qkl.66.1712012132645; Mon, 01 Apr 2024 15:55:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712012132; cv=pass; d=google.com; s=arc-20160816; b=SOM7KzPP69MbE9cCyY/WVdQw2EYYEnmyZjT4vraXagYLcXLy8aHfqpXwDXF/Ippz9f wOJALpQm8bd5qRONE6xtUpoR+tCqNALJHKJGhYVqxM//vihaiuqHAX0vqF3b79UO7h43 0GNVDoThUArNAckneH2ElVTySOGb0ypQAq0SMKx00boCorl6VcAQzWPaBc+XaxxRFNXx 6jz72hf33S3W1muzjgEB8H8IYnXbxH8ymZ3AMrdRPokHLDEgfpsRyrlGugYM6v7+tR0p m16IRBmOthbzEMMB9RBls9r8AfSJpYdV1gT7vnucI9q+lh9T5IpKmn3Ji4vpax3XBvUw MtZA== 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=0WgFMfMo0omLJbM1llEC42msFxZn8gzma2PiRZFz9fo=; fh=wKKMlLYb10yE9NHyBvhptOBbBiTPOVNPGlIasfX/yeM=; b=R6L8kNRUpHsd21HuHyIRzprxGo6jDJG3fIVCUepaaM0RpmIaPAO3t0oRMus6GuQHo4 clbeEOf4muo0JYptt1XXUqyI34PL5MObhvqAiFuECx0e2henYFNaBJPpiRTwm32BbUNH DjYlHYOQdCul/b7xPzB1AEunfVr9C92YnwfLsS9p/2tIxHZkhuRlypXWIw9DRua4d55g LqD+2Alj2P0c4eUoltgktHlqZyv90G3vq2Y9Jt66aceWLaVBcp9WZEqcrTIrfn79SJbD dwdqkHS9eoAzWbXM/RJDf+6F3P9+vibQqr6n3EyazNh1tIqgsH3NpuF+p22Mh3YGBkQg 87aA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DU2sZgTd; 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-127152-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127152-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id b15-20020a05620a0f8f00b0078a33ccec17si10525823qkn.577.2024.04.01.15.55.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 15:55:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-127152-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DU2sZgTd; 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-127152-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127152-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 5E6F41C21FF7 for ; Mon, 1 Apr 2024 22:55:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A42F56B99; Mon, 1 Apr 2024 22:55:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="DU2sZgTd" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 5FDBC33982; Mon, 1 Apr 2024 22:55:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712012118; cv=none; b=bgdZZlntpojsCm9MCWA/OjbByIVey/aPxRUWC59sGo9dv3K29QSItbZcIpdMJUeXsv/pondPZI4eQNQPavw/g8J0ktUoqRBPAXAfK1aDPlitabo/rAWhrhGHvcayODY1Ka8dzLlO5Ha33o+hSxPdPPDyPigRjUSIJ+LITW3epOM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712012118; c=relaxed/simple; bh=fBRLXb8M1oUe7xHcHZtau0o3gCJ7+yXoMO8c301gkPs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pNEiOc7imi/zgbDYCWNnNzsT5EOZF4bqdpBt4OyBWliwceK3VuOy9WqdqmcQP86VNcF16rdEUEfB748IRQlTxM6ZjpI0bbfrgFrxNgkhGGUVHsQwWD19DjtRV98BB2gE5KgyDs8DaCZly7zPQfTkPQZnir8Rlv6mDXZ/JFv/Xwk= 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=DU2sZgTd; arc=none smtp.client-ip=198.175.65.20 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=1712012117; x=1743548117; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=fBRLXb8M1oUe7xHcHZtau0o3gCJ7+yXoMO8c301gkPs=; b=DU2sZgTdNXzaHfb46UznpYjlUWQHWAiJ5o0Hp8K07pampC9gGbqVBhRw 5nwhc3/TDXrAKuLGadB8YZp43M861hmuZVREJk1M66qTK1ZxVhSBa+X9U x6V/EkDOb/PAbl+zKqGonSesZc5nmG4TUqhJzy5Gx88nGIoWnxM8JX6eC etCJzJk6BWcdXGjYnvU62DZ2cHloDyve4pJfsdMvBODDddXAm0iBWOhoz QFyPRfiozYQgJiFxFwg5wi5m+puL1ZF2O2K/3VFTt7VNfJoHvtcbCHk/Q MGgr+gK6r4UE3I3E55EkHE8HpaNyQNq/TP+wV64e+OS3LbllENSfcb2zU Q==; X-CSE-ConnectionGUID: rF6H24LXR4WTsSTT1sdFeg== X-CSE-MsgGUID: 1SFXi37wRJGtaLgcMZo8Tg== X-IronPort-AV: E=McAfee;i="6600,9927,11031"; a="7058422" X-IronPort-AV: E=Sophos;i="6.07,173,1708416000"; d="scan'208";a="7058422" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2024 15:55:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,173,1708416000"; d="scan'208";a="18322003" Received: from ls.sc.intel.com (HELO localhost) ([172.25.112.31]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2024 15:55:16 -0700 Date: Mon, 1 Apr 2024 15:55:15 -0700 From: Isaku Yamahata To: Binbin Wu Cc: Isaku Yamahata , Chao Gao , 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, Sean Christopherson , isaku.yamahata@linux.intel.com Subject: Re: [PATCH v19 038/130] KVM: TDX: create/destroy VM structure Message-ID: <20240401225515.GU2444378@ls.amr.corp.intel.com> References: <7a508f88e8c8b5199da85b7a9959882ddf390796.1708933498.git.isaku.yamahata@intel.com> <20240321141709.GK1994522@ls.amr.corp.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: On Fri, Mar 29, 2024 at 02:22:12PM +0800, Binbin Wu wrote: > > > On 3/21/2024 10:17 PM, Isaku Yamahata wrote: > > On Wed, Mar 20, 2024 at 01:12:01PM +0800, > > Chao Gao wrote: > > > > > > config KVM_SW_PROTECTED_VM > > > > bool "Enable support for KVM software-protected VMs" > > > > - depends on EXPERT > > This change is not needed, right? > Since you intended to use KVM_GENERIC_PRIVATE_MEM, not KVM_SW_PROTECTED_VM. Right. The fix will be something as follows. diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig index f2bc78ceaa9a..e912b128bddb 100644 --- a/arch/x86/kvm/Kconfig +++ b/arch/x86/kvm/Kconfig @@ -77,6 +77,7 @@ config KVM_WERROR config KVM_SW_PROTECTED_VM bool "Enable support for KVM software-protected VMs" + depends on EXPERT depends on KVM && X86_64 select KVM_GENERIC_PRIVATE_MEM help @@ -90,7 +91,7 @@ config KVM_SW_PROTECTED_VM config KVM_INTEL tristate "KVM for Intel (and compatible) processors support" depends on KVM && IA32_FEAT_CTL - select KVM_SW_PROTECTED_VM if INTEL_TDX_HOST + select KVM_GENERIC_PRIVATE_MEM if INTEL_TDX_HOST select KVM_GENERIC_MEMORY_ATTRIBUTES if INTEL_TDX_HOST help Provides support for KVM on processors equipped with Intel's VT -- 2.43.2 -- Isaku Yamahata