Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp947832rwb; Thu, 8 Dec 2022 05:07:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf7AhHSkd/rlPJKvoXeDcArvAKl/imop5QnfHU9EQ6ASSR0NdaxUPJwkhcx6cvM5cCyxMS00 X-Received: by 2002:a17:906:578a:b0:7c0:ff72:d10f with SMTP id k10-20020a170906578a00b007c0ff72d10fmr11805990ejq.175.1670504860718; Thu, 08 Dec 2022 05:07:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670504860; cv=none; d=google.com; s=arc-20160816; b=OVFzEtHnVeJarycVXwG9TEQUOXAv3lMjqRM2FHJ3hNaWdLC7NDsR+tUz+lqLuh7r1J pPKK1mp4Z358sdFAddZjTgK1CCHOZeW2xjeuTCjqIKRrijAKrYMgIuZ2d8ipCb3S0/A8 Rl48YPButog3RjJLAYZWEaA0xFZtRa1LS4/IUIuo4wDPba+Bi4YtzImRSCxGLpfd6k9u nXWzzqqBZjCENsj8d5Ujpy3Ngrf8ZrRJ9EuoMaYytBMqL5Qj7dAX/7VdWJSlsJBgutWD MxEDt5AwlsT0Vpszq33MmXeAp7LxyW2Id9RprIpvObRYL0y4uAGNdGb7Nn8TXrXk0LC/ kfWw== 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=qi/aamnMuLDAzihnFhxKn6t/hBuvRxKcYgOREsgdRcM=; b=wdUbaPOY40s/tw+myHKJQCt0aGOSbZai2tVjefKGyk13POFXnPwt8ISbQfRtJgJvOj yqKZGC/3yCLYt1721NuUtM1/m6G7+3bCI+yLmzbnGOMkh1rHf5BV5LA9Ls3WmssCe0i1 1wCcSOR05cn2MzE84jc0ClZzQ41C8LHbPb94bUZG9wiZkLwGwtY7d480LdPr/LGA+CTf iGrMaKw4xjZuNNV0/KN/fSVeStoa3C78Msk/sVGCsuIwd4/utsi0nlCdp9XTDWsU0qUT zkoL/XbJH4xq+kIE/V4jfb9lmdVkFpzcsDml1Phhjl6yAj3pjV33nRPa6N5iIdzfOvDy wwow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="ZBdy+j/f"; 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 cr12-20020a170906d54c00b007707b853e46si19030634ejc.882.2022.12.08.05.07.22; Thu, 08 Dec 2022 05:07:40 -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="ZBdy+j/f"; 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 S229783AbiLHLej (ORCPT + 72 others); Thu, 8 Dec 2022 06:34:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbiLHLeg (ORCPT ); Thu, 8 Dec 2022 06:34:36 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B64A66C92; Thu, 8 Dec 2022 03:34:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670499274; x=1702035274; h=date:from:to:cc:subject:message-id:reply-to:references: mime-version:in-reply-to; bh=BNKj0Q3HaLW0QQmlzFra5ewPCCLiShH0XE7KzON/axc=; b=ZBdy+j/fchQRGmGKP7GDgoYIYvGsgJV4ZOXLhYPAn8C0c++ME7RVjpkJ cBlA8tUIxFHdKaTCPFLfgzUi8EQnBhQLOI3deLcWW7UBkWFKP0AJN8dBa SNFnztz9sNY8zj2/Frtf8hEWFtCgsJQie62pcz5dvhCBlBT0G4QN3ahA1 qclFaZFnIVcscJ5hXHqncfBMdr7Yaa3HlW+CxOMbiXG+muzeoABvVVqE/ Y6Eno96YqlLZLJpGhZuhSkqyflapfejVrEgmlr6G2gD90HUPDhZ6dsQRu k+/mVeN9omqrHS+5msglRxsGzOzTGWsQ/4TNCQfjBhl+dhG7tMMH7NTQ4 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10554"; a="315865225" X-IronPort-AV: E=Sophos;i="5.96,227,1665471600"; d="scan'208";a="315865225" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2022 03:34:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10554"; a="624670349" X-IronPort-AV: E=Sophos;i="5.96,227,1665471600"; d="scan'208";a="624670349" Received: from chaop.bj.intel.com (HELO localhost) ([10.240.193.75]) by orsmga006.jf.intel.com with ESMTP; 08 Dec 2022 03:34:22 -0800 Date: Thu, 8 Dec 2022 19:30:03 +0800 From: Chao Peng To: Xiaoyao Li 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 , Borislav Petkov , 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: <20221208113003.GE1304936@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> 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 Thu, Dec 08, 2022 at 04:37:03PM +0800, Xiaoyao Li wrote: > On 12/2/2022 2:13 PM, Chao Peng wrote: > > .. > > > Together with the change, a new config HAVE_KVM_RESTRICTED_MEM is added > > and right now it is selected on X86_64 only. > > > > From the patch implementation, I have no idea why HAVE_KVM_RESTRICTED_MEM is > needed. The reason is we want KVM further controls the feature enabling. An opt-in CONFIG_RESTRICTEDMEM can cause problem if user sets that for unsupported architectures. Here is the original discussion: https://lore.kernel.org/all/YkJLFu98hZOvTSrL@google.com/ Thanks, Chao