Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1310941rwi; Wed, 19 Oct 2022 09:05:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7L3PT2Pnx88OAMYgAuB5alufNZiNjPlqwrz5acvGADyHWWAkQRoNDxhQWZ8ZcYrsh41fvS X-Received: by 2002:a17:907:7611:b0:78d:9d69:adf9 with SMTP id jx17-20020a170907761100b0078d9d69adf9mr7449217ejc.283.1666195523189; Wed, 19 Oct 2022 09:05:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666195523; cv=none; d=google.com; s=arc-20160816; b=KARthoshCS7luuGJNOU/swuOf+wK1cC6vMhcM2sZQA1f4vID+3ws+hKyarUBbcr3cn rAlOip/8pmRxfzUbpcpAWA5vrPwG7fhT0rTEX5I5rNn0C44j9yAVZDB06ZUH/rGm+5YX HKDc6rVEVAcB8n2pfeWl8y2mphBBetGyqF9/Wf0e+6IbLeWMoxPcxoJYk22gT9tPPxy6 yyp3xHagoB4N/WkDXHxGCUxDUSCDe1prUrlPn/1Gqvkkoe6r6vMioMVrpI/Yo8oJXCV1 Hqd8y3JgV32kJ9IDvLjfdoSpTn2It03BtC6VZFJDct0YgTCiB3oBdtic9LWhGPwfC/2J mCDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=8uws4B5WgtxEQQPonRBN7dDm57mj+TMYZwg9NWMF6uE=; b=NTrFL4YJid5ECANvjo33z5uNdaOODKANtzT+DLD4SY5V4MCTHGc40MaKHYl61Sw+gt qf4sEpOBBGF4lUTn3B4IXaLlgTU0ocO1wUkycIEUuFxBp6nbEfRovffIGdvtRojp7peC P2yfphGI6UOUU6TrdRMC9qs0Q57dQIZUblfwwnIXPbnMTS+wT+A+Uj+pV9YBKg6Qwp8a BPU4rI3+GpTFC/6oY0KYl2zepAFvZCu95c3anHTASxTlcScjh8z1XDmg49qU5EkizzdB yYjmJM3xFAB4e/FneCBwEB2T0TKaSW9r1IReYjwvSOr88GUd5xczN0uqOwY0XmEpgqZB r4NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=GNoRQIq9; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id by26-20020a0564021b1a00b004533149e228si12911156edb.618.2022.10.19.09.04.51; Wed, 19 Oct 2022 09:05:23 -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=@google.com header.s=20210112 header.b=GNoRQIq9; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231977AbiJSPKT (ORCPT + 99 others); Wed, 19 Oct 2022 11:10:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232635AbiJSPJc (ORCPT ); Wed, 19 Oct 2022 11:09:32 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3B6838A1F for ; Wed, 19 Oct 2022 08:03:01 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id be13so12952856lfb.4 for ; Wed, 19 Oct 2022 08:03:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=8uws4B5WgtxEQQPonRBN7dDm57mj+TMYZwg9NWMF6uE=; b=GNoRQIq9JKVsi3NBMOHtxRxaA+HyiSRxEbQwKROCIdQN7YeQVvkeCL/tBfTJ0rFShS wLv+OMed6GKtlzQERAvDIH0fS9RwWNLH1iDzg8iIFUBsQUCTCUR56HEIdBHp5w6KeZ+i ed0p1SeRI6LjurmDyBxbuv8clbnocReb3YyBgtI/ebogw01dMtsK7A/KD1lbcyPsqtH5 TaWyyc8eNama/1dRhNwUMQO8P85tBb+QCcPLfYt81cuF60S21NuSTt9ENjFqtPiqHbYW QbAZcIWW265YqQ7fQmjB0etPPuYGAVxyYuBBwAInvDjayuW/S/xhDX/aqG8lWy7/HjYu bNlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=8uws4B5WgtxEQQPonRBN7dDm57mj+TMYZwg9NWMF6uE=; b=vroUB/Kw8rF/rwtz85w67d+rNKDFHc+wAoY2Pni3Ac3LJ8t23bFpZewSavR4bo2TCw 6FcVFESxnSVs7F9gr5a9gy8qkxBQ0lT2ApzbWU8L08MIb3Uj8EdJxEKNuOVuQ9hk9tBb yIe0G3K9LuXpycmvaowPHg/FF9NkfcLKU34EfT4mXYvg0zb5jf5qyjpKedDGyJCZXU2e P8FBuWTNECYSqczYUws/PK4XzOYezcizkRUgLVcoWkAg4qMO2Olee7AIZbF63AxaF4UY fTqHW/N6WNbOzI16PpHs8iV0Pbl9vJkuh0Jit7oqIuDHc2aWiPr1VSiS4yR5+Ynd11Y8 FBcQ== X-Gm-Message-State: ACrzQf1j3fDaV53ckaSakPV8nzvW0P8YZOPr4W5WfxBfalpcLNilkOTz il5hjjw2e34ti21I2/I0coFvua7MPedevt4RqTEPpw== X-Received: by 2002:a05:6512:4cb:b0:4a2:25b6:9e73 with SMTP id w11-20020a05651204cb00b004a225b69e73mr3205357lfq.30.1666191778897; Wed, 19 Oct 2022 08:02:58 -0700 (PDT) MIME-Version: 1.0 References: <20220915142913.2213336-1-chao.p.peng@linux.intel.com> <20220915142913.2213336-6-chao.p.peng@linux.intel.com> <20221012023516.GA3218049@chaop.bj.intel.com> <20221019132308.GA3496045@chaop.bj.intel.com> In-Reply-To: <20221019132308.GA3496045@chaop.bj.intel.com> From: Fuad Tabba Date: Wed, 19 Oct 2022 16:02:22 +0100 Message-ID: Subject: Re: [PATCH v8 5/8] KVM: Register/unregister the guest private memory regions To: Chao Peng Cc: Sean Christopherson , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, linux-doc@vger.kernel.org, qemu-devel@nongnu.org, Paolo Bonzini , Jonathan Corbet , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , 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 , Michael Roth , mhocko@suse.com, Muchun Song , wei.w.wang@intel.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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 > > > This sounds good. Thank you. > > > > I like the idea of a separate Kconfig, e.g. CONFIG_KVM_GENERIC_PRIVATE_MEM or > > something. I highly doubt there will be any non-x86 users for multiple years, > > if ever, but it would allow testing the private memory stuff on ARM (and any other > > non-x86 arch) without needing full pKVM support and with only minor KVM > > modifications, e.g. the x86 support[*] to test UPM without TDX is shaping up to be > > trivial. > > CONFIG_KVM_GENERIC_PRIVATE_MEM looks good to me. That sounds good to me, and just keeping the xarray isn't really an issue for pKVM. We could end up using it instead of some of the other structures we use for tracking. Cheers, /fuad > Thanks, > Chao > > > > [*] https://lore.kernel.org/all/Y0mu1FKugNQG5T8K@google.com