Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp5680956rwj; Wed, 21 Dec 2022 05:54:53 -0800 (PST) X-Google-Smtp-Source: AMrXdXvb0mZohwOilRFn7lj7zqpYcHtSoi8j9Awc1aPBePPVJWgg+qEml/U7ER87534ODq86UZ7F X-Received: by 2002:a17:906:f117:b0:7c1:9aa2:a36d with SMTP id gv23-20020a170906f11700b007c19aa2a36dmr5413526ejb.5.1671630893103; Wed, 21 Dec 2022 05:54:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671630893; cv=none; d=google.com; s=arc-20160816; b=svqmeZbzYaMl96/awMSprGP7FujAGT/UjwIk3tuhYLhn4yS59TEEy/U6GJe6Q7wAsa 50PFgFJHRmBd0lsVGzOHCKOBMwZduGOjqwWbjsCBAI7DZWnt3jYQA3nBIIUf3/cQX0ub ZvlYRZZGHD7yDhR+7MDZryyqKNvESKfFTG8lkDBnSZsczyEBjpU1XZnZpne/wlIPZ6my t1bIAc0/m+GNxBP0JwpookvU5oUa152OUl9C3UyqqU8cxs0pGKs2kIETRTC0K36djmNB ZZF0bAT4GSUSb4O7cNytGF0uMSSd6+3NkrNAZve8J6nWuUMh5nke3RV5hHGxq8UyRU2A 7e4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=zBUceTxpT7H9MNXVSFHGjKQn56UCY/sFM7g1gUite6w=; b=JF78CMtouNyNQW82PDo6GykqajSSn0mIvQEh5//QMizmMSv4fS12RzWdV5C60U2cH0 iQMGHgQU1PRWZ8VxWEg9l/1YGANkIK5SKysvmWjfwxDSmrOSYOomR28ZVyqcxs5QkfTP 9s0bjeGhkrmDGH3lhwF+AnT9j6aosonEjIrdl0tjtkDF7hXkcAhf87Ohc5uqSBz2xE4R Tpw+rx8oLgUQ4b1J1XEGdMPMQKBOj9BSU+AYG0Oc/OXx0ImEP0oR6sm55nPBZVdOCkhZ QQcj/214t0AMPeEAZF5XgaJlThhMXxDmDajoP2HhFuTitPDwZtMVkXzJmT6wnnLQ+Dpk zRcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Hta25vIZ; 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 qh10-20020a170906ecaa00b007c0ef00a05csi10906030ejb.922.2022.12.21.05.54.37; Wed, 21 Dec 2022 05:54:53 -0800 (PST) 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=Hta25vIZ; 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 S229823AbiLUNrT (ORCPT + 68 others); Wed, 21 Dec 2022 08:47:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230072AbiLUNrP (ORCPT ); Wed, 21 Dec 2022 08:47:15 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0BE36475; Wed, 21 Dec 2022 05:47:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671630434; x=1703166434; h=date:from:to:cc:subject:message-id:reply-to:references: mime-version:in-reply-to; bh=Ey/uI44qPCpd4ueyxtxDLkQhSghq6Fbj8dB2OhBP0No=; b=Hta25vIZugyt08XE12XPlw8wi4ujV3wir82IZS9dfVva9Cgnwz9KC31f ei5ocTRN2lF9EQU/d8dqZW4jc7lrGKFNdwTw3RUQh+zuWkI/m63+AFwRW 4I+TY2JNyVNzQB67IxQBnS8Kgl3CosleTrM4pUovIMXLKNxSCoP+3xrCA ERQBCx8OG6yd8z+WCpRRmVQJUi+hDzEzKQJqYUQsgvpWL8he8TtaAVtdj dfBM3PWzqKV6YbegjQ+TAdtKUZh3x4aO2yR0AQ9E6Qs9WGUh1PPnzdn1u fn9up1uI31MzP3z7GTFB/13ku2WvXwL/4NptD6RS4YYVXbkur1vUb7L4J w==; X-IronPort-AV: E=McAfee;i="6500,9779,10567"; a="318568460" X-IronPort-AV: E=Sophos;i="5.96,262,1665471600"; d="scan'208";a="318568460" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2022 05:47:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10567"; a="651402272" X-IronPort-AV: E=Sophos;i="5.96,262,1665471600"; d="scan'208";a="651402272" Received: from chaop.bj.intel.com (HELO localhost) ([10.240.193.75]) by orsmga002.jf.intel.com with ESMTP; 21 Dec 2022 05:47:03 -0800 Date: Wed, 21 Dec 2022 21:42:46 +0800 From: Chao Peng To: Borislav Petkov Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, linux-doc@vger.kernel.org, qemu-devel@nongnu.org, Paolo Bonzini , Jonathan Corbet , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Arnd Bergmann , Naoya Horiguchi , Miaohe Lin , x86@kernel.org, "H . Peter Anvin" , Hugh Dickins , Jeff Layton , "J . Bruce Fields" , Andrew Morton , Shuah Khan , Mike Rapoport , Steven Price , "Maciej S . Szmigiero" , Vlastimil Babka , Vishal Annapurve , Yu Zhang , "Kirill A . Shutemov" , luto@kernel.org, jun.nakajima@intel.com, dave.hansen@intel.com, ak@linux.intel.com, david@redhat.com, aarcange@redhat.com, ddutile@redhat.com, dhildenb@redhat.com, Quentin Perret , tabba@google.com, Michael Roth , mhocko@suse.com, wei.w.wang@intel.com Subject: Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory Message-ID: <20221221134246.GB1766136@chaop.bj.intel.com> Reply-To: Chao Peng References: <20221202061347.1070246-1-chao.p.peng@linux.intel.com> <20221202061347.1070246-4-chao.p.peng@linux.intel.com> <20221220074318.GC1724933@chaop.bj.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE 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 Tue, Dec 20, 2022 at 10:55:44AM +0100, Borislav Petkov wrote: > On Tue, Dec 20, 2022 at 03:43:18PM +0800, Chao Peng wrote: > > RESTRICTEDMEM is needed by TDX_HOST, not TDX_GUEST. > > Which basically means that RESTRICTEDMEM should simply depend on KVM. > Because you can't know upfront whether KVM will run a TDX guest or a SNP > guest and so on. > > Which then means that RESTRICTEDMEM will practically end up always > enabled in KVM HV configs. That's right, CONFIG_RESTRICTEDMEM is always selected for supported KVM architectures (currently x86_64). > > > The only reason to add another HAVE_KVM_RESTRICTED_MEM is some code only > > works for 64bit[*] and CONFIG_RESTRICTEDMEM is not sufficient to enforce > > that. > > This is what I mean with "we have too many Kconfig items". :-\ Yes I agree. One way to remove this is probably additionally checking CONFIG_64BIT instead. Thanks, Chao > > -- > Regards/Gruss, > Boris. > > https://people.kernel.org/tglx/notes-about-netiquette