Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1218056pxb; Fri, 1 Apr 2022 07:40:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1OwTLcEUNRbj/leVBOoZ7jMegmbzeUpaW66kebarGvJpX23ZSEWCE0Z525j1jA2WB1SYD X-Received: by 2002:a05:6402:2342:b0:419:e86:c7d5 with SMTP id r2-20020a056402234200b004190e86c7d5mr21368487eda.92.1648824011433; Fri, 01 Apr 2022 07:40:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648824011; cv=none; d=google.com; s=arc-20160816; b=X/+ITNBqg4TPKIDVdFjw5Sm75qzixK8KYfc02SlDJYkXApMMWxibGehw1x2HCGUUjp s7eaGYpLO5mO/WHeObSZOUgOVkBFLVrneC7Dr7BmdSPzs5B2ziJwSJrPzrJnOwy3k2eW epPTu2G3BhkL3rbkf9o1BJX3G52/QnpgFOydd4dLHyQm6e1Fjy//NoGZCxeDd+8ePTK0 dk9PDF9X9yfEcnFVFsQkpUJrAkbaVPRf0hCnJDxmORlPXAS737z9B/gGNfg2zjIsrxJ7 /h64P/zvi3wXIXilLmImiwULeOy4XjicJI4xqG81twadVeVCjPDbFWSpzxPP9N2BxA+V SS1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=nNihfbCPFPKgRuh1c+LKjypAStK/v3ZLEFCnBd5V9n8=; b=iamMDdKg2etfEUPmurNdl4AhAe+vWk/4dXk2L+BO9EGC3OB4Sj2Sj8wAjN4RFIcZo9 0t1FBLW9ddoLdHaOQDrrpFHY1Y+IAyiF/AXOczDbkM+MvSwxaKNyFd7X74UZyDaX4W18 gfsVuCpNbHTFC9QMwbv2ZOSYLfMH3ynGulZE2MxszXS1SkWxgrMQSAWXs74AWmgjJxal pAxRgy8gsfYiEWRfWH0oA12c2AJAWc1rm22LIdclkHZP7/lZ21lbNGFS257wvXVbD9wi OFO18xXEx5Ap4NbqADwIVs/MNz8qs+1CtrUu/TlhDiaiWsHOTUf+sYm4Lx+SGTsZrZ8/ Q8Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="f/lzI4II"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i14-20020a50e14e000000b0041978615fbfsi1827941edl.379.2022.04.01.07.39.46; Fri, 01 Apr 2022 07:40:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="f/lzI4II"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243984AbiDACPW (ORCPT + 99 others); Thu, 31 Mar 2022 22:15:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243955AbiDACPV (ORCPT ); Thu, 31 Mar 2022 22:15:21 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B4863BA67; Thu, 31 Mar 2022 19:13:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648779212; x=1680315212; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=Cbc+NbdBXMFjQ6S0uqFsxm3h2/TeIJaRHelS0Ywburs=; b=f/lzI4IIAuU7nRSBAEDlmh45+1i5tbMG94sdY0/7cBQLHrwjwu56BUKW CZDUtPpnX/b4GOX7llAi3TLW8nGWu+EyF0ZDNBOR9+LF4uUxiTuIY7eXS IRDrKdc4vHCtj/UJj4IsqVh3rotWksHyrt/TpJM2SqaCbXnltJ0+tnaj0 28OKId1ivAqc0l9vo87zDAUsFMn/+xTRH6gDnpaMmzizL7C7QOstGJA8F 18QAXtEIJ2hG1jVCVxkK5AqJr9qGkX4+sHv1gZZX5mlY09NgE+YW4J7ZM 5EjgJRUMeqcVV6QHuDH8/YSSy5wLD7QbsfKzBRwfrUhBADwiQqxqH0OtK g==; X-IronPort-AV: E=McAfee;i="6200,9189,10303"; a="257602917" X-IronPort-AV: E=Sophos;i="5.90,225,1643702400"; d="scan'208";a="257602917" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2022 19:13:31 -0700 X-IronPort-AV: E=Sophos;i="5.90,225,1643702400"; d="scan'208";a="521026646" Received: from tswork-mobl.amr.corp.intel.com (HELO khuang2-desk.gar.corp.intel.com) ([10.254.29.39]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2022 19:13:29 -0700 Message-ID: <9e01bc014df60e215ba17432c06b6854f6dae3f8.camel@intel.com> Subject: Re: [RFC PATCH v5 032/104] KVM: x86/mmu: introduce config for PRIVATE KVM MMU From: Kai Huang To: Isaku Yamahata Cc: isaku.yamahata@intel.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Paolo Bonzini , Jim Mattson , erdemaktas@google.com, Connor Kuehl , Sean Christopherson Date: Fri, 01 Apr 2022 15:13:27 +1300 In-Reply-To: <20220401015130.GE2084469@ls.amr.corp.intel.com> References: <770235e7fed04229b81c334e2477374374cea901.1646422845.git.isaku.yamahata@intel.com> <55fa888b31bae80bf72cbdbdf6f27401ea4ccc5c.camel@intel.com> <20220401015130.GE2084469@ls.amr.corp.intel.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-1.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2022-03-31 at 18:51 -0700, Isaku Yamahata wrote: > On Fri, Apr 01, 2022 at 12:23:28AM +1300, > Kai Huang wrote: > > > On Fri, 2022-03-04 at 11:48 -0800, isaku.yamahata@intel.com 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 new flag make it clear > > > that the config is only for x86 KVM MMU. > > > > > > 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 2b1548da00eb..2db590845927 100644 > > > --- a/arch/x86/kvm/Kconfig > > > +++ b/arch/x86/kvm/Kconfig > > > @@ -136,4 +136,8 @@ config KVM_MMU_AUDIT > > > config KVM_EXTERNAL_WRITE_TRACKING > > > bool > > > > > > +config KVM_MMU_PRIVATE > > > + def_bool y > > > + depends on INTEL_TDX_HOST && KVM_INTEL > > > + > > > endif # VIRTUALIZATION > > > > I am really not sure why need this. Roughly looking at MMU related patches this > > new config option is hardly used. You have many code changes related to > > handling private/shared but they are not under this config option. > > I don't want to use CONFIG_INTEL_TDX_HOST in KVM MMU code. I think the change > to KVM MMU should be a sort of independent from TDX. But it seems failed based > on your feedback. Why do you need to use any config? As I said majority of your changes to MMU are not under any config. But I'll leave this to maintainer/reviewers. -- Thanks, -Kai