Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp858lqo; Wed, 15 May 2024 18:12:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWpOtPDUD2fcxBfqhDvYmfCxDOlM2Ree7j+X6K4foTC1yaCf/wCJaR6XaxW2S1me6v1MMxCdKTJKqaz0TGpHU/f5sBtEzTN8pwIOb6Yyg== X-Google-Smtp-Source: AGHT+IGdUoXqKmXO4E1B4ey99vpQqidKmWu6lYnVnL2buqCDW9MtONJBRurncdQh0DUOUZKkvccN X-Received: by 2002:a05:6402:1746:b0:573:50a6:d3b0 with SMTP id 4fb4d7f45d1cf-57350a6d402mr11438962a12.3.1715821958879; Wed, 15 May 2024 18:12:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715821958; cv=pass; d=google.com; s=arc-20160816; b=lji39DVBcNTIA+oSzQ8//NEA85UgYYQ/llDe49sQnCqEAYSUdyY5ZN1kg5+Hq+4E/w 36UhkKH25Cz1DhIe8jJyHzvHDghuAYMwrIt7j8sUcWddqnLUtdAZYxBNnUnC+KWOERdH xilp2h1ECBin8iFqyLQO5QAN0obEp9P1W2p9Oat7NfluKmDqab6vjKnYX4RrdM2Oct28 CxONkFAFeszVPo8/n0FzD3ochTuPQc3pU32F+gX8PHXznUhFfShpOdbRALEriC24cIjn CqqQhYEOO4UhM1sBw8i5dYOENBABYUwqeHFkNh/08MkrNp2IKBkg44vArH+F00yAs6SZ vtxw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=9ZXfW82Fi7VmC8uoYroU5jb5HUDMe9CLAiXiSptB4p8=; fh=gJdrqAsd5LnEfBI2RZRhnq03gEMdyblmuBmCM3udKL0=; b=Sr6KJfqzaLq3lIDTagAYeJi3eFUowWCe4OZFW6Z2wcXepy62m7FcWC9gjU/cXRc/NF h3kY2u4pxVPQFuK6doSOB3MjeesT1Os0IIKIU+n3nvB/So4rVh2DeyEkYHFVa1qbMnLx oysJSeKsmJ7XIn7axxKaRan2P3z10pa8zfFpj6PUx51ofxw+hfR5+DLIf28zpmxaZLPT JwiHF7AKiAK2v+Cb517xMN33jNhO+ASYDDyEG+4lXNR92ZSbVFyxKA+HD/6mq1JzO+5G 0zvRPZSYXBmH6hBA3etNdZxjH6Vvz2Wq3iIDUTup/T89dau61Dh5ZYo0HOzHo20i+FGL GPDA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PgkCs4KQ; 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-180540-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180540-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. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733bec07cdsi8365358a12.159.2024.05.15.18.12.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 18:12:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180540-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PgkCs4KQ; 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-180540-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180540-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 7C9AF1F2128C for ; Thu, 16 May 2024 01:12:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CA46915A4; Thu, 16 May 2024 01:12:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="PgkCs4KQ" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (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 E1CEF7E1; Thu, 16 May 2024 01:12:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715821948; cv=none; b=gfwShVYc/GjBfRR+rzVgk4xboAfLe/5LaJ+as+LwKlRShVBvcT44Zv4+0RAr+hLsEUSMoUaVTA3Mwc0YvtV4R0nCAbFRyrhAwNk5TkFpaFl4OK0enpVirkUmehUmFaKes8sVncq072cO/GiPF38CFkN0re+0FRlYPDwGmoFQw68= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715821948; c=relaxed/simple; bh=hgapo4FsbqGvmKdLHfpqrQEAqxOcAvFCD+B4n56xWyQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ao282gBhBjennHZLTq8EI+b3QkrDsm+NvLKdaQ6S+fQJZLBb+mIes/ykK8BLeDw16xXwBT1RCCxWWKIPsb/dktyv5Y6ljNnnu1P/GI50e7M+GSfccWvbgUQtm6+QPMBgY3A2VpcKKrkE3DPHHH4Pkz7KeP4gHx/uT9dhep7SaK8= 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=PgkCs4KQ; arc=none smtp.client-ip=192.198.163.13 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=1715821946; x=1747357946; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=hgapo4FsbqGvmKdLHfpqrQEAqxOcAvFCD+B4n56xWyQ=; b=PgkCs4KQckySQjToPHvPeP/BOd7MjWHPUuo+UMpKOp6jHp8OUkt7iVQP GlroBk05XUnx5VUc6lXxrHPDYPMc/2dYiisy/z0fZCykf7ZSftvWwni7I zN+3qFcMtVFnAciW8b7HtCAUTC3IgpR7VOVws64TafuSmQbPUW3quOW0s XR0QMK3y3Y+PCfzF2lTnbufVm3vmvBAYHT0nBvGB+kqk5ot/QJVhW4+YG L9R0qB20fNdM0gVqZCm3S4qVtt+4yQjv8TdFLh9Q+RPmgXBVGxmS0L+62 jUur/H6mkcMBp3/zT9bf0Cmuibte9jKq9B6Dj4Bz1OEW9npSTuys4su5e A==; X-CSE-ConnectionGUID: Wzq7ADk8TqO1u9uHY9ZFsw== X-CSE-MsgGUID: hIyRL+RMS2aIwkilH2KaZg== X-IronPort-AV: E=McAfee;i="6600,9927,11074"; a="14857454" X-IronPort-AV: E=Sophos;i="6.08,163,1712646000"; d="scan'208";a="14857454" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 May 2024 18:12:25 -0700 X-CSE-ConnectionGUID: LeeXAIr5TTOUX4x7szUQJQ== X-CSE-MsgGUID: m0mWKw0fTwWQeZqUIDiNhA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,163,1712646000"; d="scan'208";a="31077160" Received: from xiaoyaol-hp-g830.ccr.corp.intel.com (HELO [10.124.238.14]) ([10.124.238.14]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 May 2024 18:12:21 -0700 Message-ID: <638acb8f-3cc1-4915-927d-a6e90ce8ecb7@intel.com> Date: Thu, 16 May 2024 09:12:19 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 02/16] KVM: x86/mmu: Introduce a slot flag to zap only slot leafs on slot deletion To: Sean Christopherson , Kai Huang Cc: Rick P Edgecombe , "dmatlack@google.com" , "sagis@google.com" , "linux-kernel@vger.kernel.org" , Yan Y Zhao , Erdem Aktas , "kvm@vger.kernel.org" , "pbonzini@redhat.com" , "isaku.yamahata@gmail.com" References: <20240515005952.3410568-1-rick.p.edgecombe@intel.com> <20240515005952.3410568-3-rick.p.edgecombe@intel.com> <1257b7b43472fad6287b648ec96fc27a89766eb9.camel@intel.com> <175989e7-2275-4775-9ad8-65c4134184dd@intel.com> Content-Language: en-US From: Xiaoyao Li In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/16/2024 7:20 AM, Sean Christopherson wrote: >> But again, I think it's just too overkill for TDX. We can just set the >> ZAP_LEAF_ONLY flag for the slot when it is created in KVM. > Ya, I'm convinced that adding uAPI is overkill at this point. +1. Making it configurable by userspace needs justification common enough. If it's just for TDX specific and mandatory for TDX, just make it KVM internal thing for TDX.