Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8274848rwb; Tue, 13 Dec 2022 04:34:37 -0800 (PST) X-Google-Smtp-Source: AA0mqf4WfQ9dz5B+ZFaxoTmSA/+KdKc+LLET9e0qn3dXxLE0wkH3bfI2J5VOw9/I8tQ0H76GEvZN X-Received: by 2002:a05:6402:17d7:b0:46c:bdf6:db5b with SMTP id s23-20020a05640217d700b0046cbdf6db5bmr17223834edy.33.1670934877521; Tue, 13 Dec 2022 04:34:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670934877; cv=none; d=google.com; s=arc-20160816; b=jSn3uR5LoNgnEKMlkrk0MM51yIw2HbnsB4LhmT1Z8/Pi4wvEtGuiK5tQI+ojPLPAZw M73+iHmKnr1nvgtdQ0oRwBFzwsz7QQwv+osQwaXxJ0zXx+rE0MZtM+D4BA0TmSV7HcvF ltctjTJRyihA6Ra7su6kPC8XnQSVwCG/3dj9J3x7wTZGgAns7eS6Bd20it90matXiAOC WU4mjGiKSIG8ct3zEn20ZnIffN+f8+qqE0fUyxVii+1l4rOICTg+1nSr8bIAabdhWHYw YEmTw2XiMJiFZyrPFPcYUQksAvkUPfm30RM927WWpUl3xUB0D8TIi7wrDKF7T0Qp8Sk7 Xvtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=8sa8MYdJza1TZG8FrrfXadf8YfOY6tbvJqlqAmBN0Yk=; b=A7qxA9l3PBpEBJdc4G3+XN52n7yNVybkubTChITgULf9ibq+RAyaQoVvJcyIu1CGag 6Ky7zczR5UuOEE3WLsXBq6trxquATvz1lir4O35uK0DPXF1sKvMFIlcdnIOxXiRy+vfh rUTa+Q8QhLHMjLC94Fw796l7ccqXEowgJVPhCa5zPmGky4hb/R9D+GkZBEigtKt2C/fW COAKEOtTjPanxTX0qUQGyxHFp3/z1kVrkly1U8iw7I/Lq4a3v+Qcup4KENR3yMyvbQeZ TemgjeeUlIBacbJHv9TIeTsv0HHAv1qjzjUNGRbsv5kZ3io+saoiooyoZuDmz7wS65iX f7QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=e967PJun; 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 n14-20020a05640205ce00b0046b1ffb7211si10775002edx.423.2022.12.13.04.34.19; Tue, 13 Dec 2022 04:34:37 -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=e967PJun; 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 S235205AbiLMMEh (ORCPT + 73 others); Tue, 13 Dec 2022 07:04:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235104AbiLMMEd (ORCPT ); Tue, 13 Dec 2022 07:04:33 -0500 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 116915FF7; Tue, 13 Dec 2022 04:04:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670933071; x=1702469071; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=Mmu9iz+w3ikTp4SbfrscqkeC55Id70T9EZSgNrTlufI=; b=e967PJunPwWLSe4kiRQX43P+//IFrMIQ64q/15C+g0aLGJzx/UbPpVuM NY9urI1m4MPM+buI+QuGwhlJj2EBnsAd6sFSirrwPVgQJZteBfp0ddnBM rrpboGVQytpHpG5fNvUnz7O7Y/PPokyQFHhpY34nC+bJgAO8NiiYlKG1M hgJZ5lJZ3+d/ieM+X9eanV+9Hr5s/htldCtZVsdv3hfUFwGoF8dD8YVwz w17jzbgLU/MqpJOIKp1FlCWoNDAYzFVNSGr0GfqZmU3fVo3u2t5th9jYf Uq7Z1SvjGBjQuziaJLHbol8UxDaFpMsLAesJMNu7VTGJS8IyzxeLEjDT8 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10559"; a="315751828" X-IronPort-AV: E=Sophos;i="5.96,241,1665471600"; d="scan'208";a="315751828" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2022 04:04:30 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10559"; a="598800801" X-IronPort-AV: E=Sophos;i="5.96,241,1665471600"; d="scan'208";a="598800801" Received: from xiaoyaol-hp-g830.ccr.corp.intel.com (HELO [10.255.31.20]) ([10.255.31.20]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2022 04:04:17 -0800 Message-ID: <4d736cc0-f249-6531-c0af-7093c2c2537f@intel.com> Date: Tue, 13 Dec 2022 20:04:14 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.5.1 Subject: Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory Content-Language: en-US To: Chao Peng 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 References: <20221202061347.1070246-1-chao.p.peng@linux.intel.com> <20221202061347.1070246-4-chao.p.peng@linux.intel.com> <20221208113003.GE1304936@chaop.bj.intel.com> From: Xiaoyao Li In-Reply-To: <20221208113003.GE1304936@chaop.bj.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HK_RANDOM_ENVFROM, HK_RANDOM_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_HI,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 12/8/2022 7:30 PM, Chao Peng wrote: > 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. HAVE_KVM_RESTRICTED_MEM is not used in this patch. It's better to introduce it in the patch that actually uses it. > Here is the original discussion: > https://lore.kernel.org/all/YkJLFu98hZOvTSrL@google.com/ > > Thanks, > Chao