Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2477824rdb; Mon, 12 Feb 2024 06:18:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJBtC1SwxE6NddbdG6IKiadlrTnLICPL5/pJG3W0qIVzT4Akdf5dJu/if8TyfdDwxL034D X-Received: by 2002:a17:906:4693:b0:a3c:c213:f6b0 with SMTP id a19-20020a170906469300b00a3cc213f6b0mr1312444ejr.54.1707747527341; Mon, 12 Feb 2024 06:18:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707747527; cv=pass; d=google.com; s=arc-20160816; b=Y8fdLsuwZGo9OcSAIUBES5pe4KVOf3DTpvkjervAbwZAsUUqzj407N6o6FfwmkCBA8 DfnbMnPbipUXSiZ/M4fT1+4cn6IRJqVfSxOvyG2g1SUwsfU+gTVepqICu1WO6ErFS7We L3nrU3J3XoXGTI75j0YqNK8y1lT95gR2z0Ku7Uu05M1QZdhz/whAtSy0sT82ah+Qu80a EdlXm6oPDxHpOqXMPoRA2WmM8S5ep3ajgEhuaB/pu03VFZFq9d7RLj5FA6n0TOtt7FyO gmHsxs2mVIkOZiYoLjOki5s+wptDrnVI2AinbUOc2zUoMH225JVUavQrm7fg8zEywpAy mLlA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=W48aKMa8BxxJLlskfhsAFGXteeZPFQl7GxLayCGIEtY=; fh=DrI6WUHa/OUzzEOEeeJynT6YCMbsx/gexIO+tashVME=; b=ccIwk5LgNfvqBUg+CdUySpdfwwTjQoltyDtvM8DFuJsUtSUIx39oJoAKRtvIM+f9AK gcQLTuYcam4445mcbnGdZuz4YkHysOB0O0JJQ7sZ00EpDcTAbqMZW6xrvFSGU9Ypeqv2 psy0oS/7pspItjalq8Esq6SS+3CctD8mx+4K4m59VwFAEWg2sWK9PaSY8jQ4jwC6EHXV KJf2i2MAZwMXdxsWrsLvE9EFj+lClDnq3hgv5QeSGBojrhpLb9C+HLEJKJpgPK/OBVz1 iErkfUW+WmrzbFrv1sI5tRUXMe6xYmTmOcIo8r7jLm63GOkNV7gAo2Zr6waem1pSu79W NBxw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CCrDJtbp; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-61814-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61814-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=2; AJvYcCUVcUSjbMp9k0OGLQwQAgtIHY4wKmst/ZD8rsJm7WOgkHCu1kDprQrLpPaOgG1Sr3lF9uqCQUqaXX/QbVZhsXQVAEoUvv1rgaQMtDUrhA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id k8-20020a1709063e0800b00a37cf42a47fsi235401eji.129.2024.02.12.06.18.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 06:18:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61814-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=@redhat.com header.s=mimecast20190719 header.b=CCrDJtbp; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-61814-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61814-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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 17E2C1F219E0 for ; Mon, 12 Feb 2024 14:18:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3BA6A3A8FE; Mon, 12 Feb 2024 14:18:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="CCrDJtbp" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 B7E8C28389 for ; Mon, 12 Feb 2024 14:18:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707747513; cv=none; b=mQz6vJBTt4YH0gO3hcUDIZDMjmwjF+CGwMTO8irF1L+4kVNyzlag4+RzUv5ZQ2baOcYppCPfpKl7pmm7l1gi2/1W0NrTEcU+e5cINwH2KIMpna+zuB+C3qarX9DWakgnQnnHHM028rjZe6D+FpzVKb1d47IQFtqvgaBVdn3g+5M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707747513; c=relaxed/simple; bh=ORaM05u+SQpYXSj+eXNwTONcLStVssJo6HLOruOJg0Q=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Op0tEQbqyjUg27+ESZz/vnBZ2vfWh6zIFKF80WVuF05oe8ZrMsrRZmSH+f+4UMcMUwnk6NznncklllGj6Gj7k6ghgJ2Mgc3Q/A/NGY1iw7RKtWFBYtiMsfnnONHmpKHKLBSKZ+XI+pOuHrg0oSSLmBcKUnilLtMD8ijhUDxj74Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=CCrDJtbp; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707747510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W48aKMa8BxxJLlskfhsAFGXteeZPFQl7GxLayCGIEtY=; b=CCrDJtbpjGU39ikBuQL2mnooEc6W46AIhMQVqVZ+abFzwzLXT0NytPpZ6y8eoAVuIEYEnk w/vzW/vFokUpTqzjf11g30TMIYCtIuxnkFgFoH9J+mIzV0+dG8Dq9Q9i2aMWWO/QJtWgEO WlDWIucC6UKmLSIJ/yeqDB/CNVXQD0c= Received: from mail-yw1-f199.google.com (mail-yw1-f199.google.com [209.85.128.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-65-Hg2BGmgCNRGLsj3pPOnvnw-1; Mon, 12 Feb 2024 09:18:27 -0500 X-MC-Unique: Hg2BGmgCNRGLsj3pPOnvnw-1 Received: by mail-yw1-f199.google.com with SMTP id 00721157ae682-603c0e020a6so39215717b3.0 for ; Mon, 12 Feb 2024 06:18:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707747506; x=1708352306; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W48aKMa8BxxJLlskfhsAFGXteeZPFQl7GxLayCGIEtY=; b=lVeeHmZQuXhwonN1SZB0F7iNFUozhyAAm5XCww2OYSqlldZwLowbcoaiAn6NxSSTcW Iv22Xe6cftOij3X3VzOWbH6Fn6pZ876uPOC9iGOo3btJ5ZK/i3DHS9OO4pl4wqy/oFVd qmwV9LslBImhaapw9Tygt9//bWb85qd8veRo6OTJStN5kmGJsKheQ6eBKDCfQrhdsH2P WIfDZ+ZDzLhfqAty1LnvmfuU8+k/er0qcUawY62T+lVBFDii5sLsgDwIIKqw6TnzjIQv IrvqgoziBfaAldAiwiT0bSU27OCYVbpSRYXPwJytmvoaRJYXm4g2oewz8pS7X5jYikAA G+xg== X-Gm-Message-State: AOJu0YwlH2P2UD7bNPFZoc5S4wLRHq+lYDUGdKutCKAkBZgUWZG0CFrf if23q1GsFrEpOwgwdYc0mcXGgzmH2N56TFBTo2SoekEB+vF+9acbDIAdAiYsUu0Ivhg0Qs+0egq 7qVwBH7wB8yuyFojqrwxhvYPnrHHLqw6PiOCQf+gz2TH7RMZI5a9NkYAUUA8FGpMT9FVjosKdl7 k5Fjym4kbUGDWL7KP/c+KIbHWDu4UP9gZyG1ei X-Received: by 2002:a0d:e808:0:b0:604:9ba3:13d1 with SMTP id r8-20020a0de808000000b006049ba313d1mr3962561ywe.14.1707747506598; Mon, 12 Feb 2024 06:18:26 -0800 (PST) X-Received: by 2002:a0d:e808:0:b0:604:9ba3:13d1 with SMTP id r8-20020a0de808000000b006049ba313d1mr3962543ywe.14.1707747506283; Mon, 12 Feb 2024 06:18:26 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <591420ca62f0a9ac2478c2715181201c23f8acf0.1705965635.git.isaku.yamahata@intel.com> In-Reply-To: <591420ca62f0a9ac2478c2715181201c23f8acf0.1705965635.git.isaku.yamahata@intel.com> From: Paolo Bonzini Date: Mon, 12 Feb 2024 15:18:14 +0100 Message-ID: Subject: Re: [PATCH v18 032/121] KVM: x86/mmu: introduce config for PRIVATE KVM MMU To: isaku.yamahata@intel.com Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, isaku.yamahata@gmail.com, erdemaktas@google.com, Sean Christopherson , Sagi Shahar , Kai Huang , chen.bo@intel.com, hang.yuan@intel.com, tina.zhang@intel.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jan 23, 2024 at 12:55=E2=80=AFAM wrote: > > From: Isaku Yamahata > > To keep the case of non TDX intact, introduce a new config option for > private KVM MMU support. At the moment, this is synonym for > CONFIG_INTEL_TDX_HOST && CONFIG_KVM_INTEL. The config makes it clear > that the config is only for x86 KVM MMU. Better, just put this as: config KVM_MMU_PRIVATE bool but also add a reverse dependency to KVM_INTEL: config KVM_INTEL tristate "KVM for Intel (and compatible) processors support" depends on KVM && IA32_FEAT_CTL select KVM_MMU_PRIVATE if INTEL_TDX_HOST ... This matches the usage of kvm-intel-$(INTEL_TDX_HOST) in the Makefile. Paolo > Signed-off-by: Isaku Yamahata > --- > arch/x86/kvm/Kconfig | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig > index cd3de7b9a665..fa00abb9ab39 100644 > --- a/arch/x86/kvm/Kconfig > +++ b/arch/x86/kvm/Kconfig > @@ -189,4 +189,8 @@ config KVM_MAX_NR_VCPUS > the memory footprint of each KVM guest, regardless of how many = vCPUs are > created for a given VM. > > +config KVM_MMU_PRIVATE > + def_bool y > + depends on INTEL_TDX_HOST && KVM_INTEL > + > endif # VIRTUALIZATION > -- > 2.25.1 >