Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp1250790rwe; Fri, 14 Apr 2023 17:32:59 -0700 (PDT) X-Google-Smtp-Source: AKy350a/6TUMBceUQf7UnqHDh7/acf3rPGJmDiKy+D4/SsEwjjqHkCfCtLT0JC0hXI6syEzRM3Pd X-Received: by 2002:a05:6a00:189f:b0:634:6aed:7f1 with SMTP id x31-20020a056a00189f00b006346aed07f1mr11607288pfh.5.1681518778749; Fri, 14 Apr 2023 17:32:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681518778; cv=none; d=google.com; s=arc-20160816; b=hTWEhIgnY+i9V+14CJ7YHdxED/sxVkVkyI4SgIQ4f70JQf2mkzRShx4Y1RQ9Mw2Dfb uJetJtoe9lNkPfQvnDjVXGFsaVLIhPYjOsQ72m2OZiZTAxAP58U/JPYW8btD7rZDjdv1 oNMJWglq30ppdumtdqMQjdMXymT8zNqTX6j3wrluF0rGyzvBi0ISmblUEF/4ALFGDKX0 MAu8B/R18dEm95QTJTS+KN7sMQwobL32W0IOmcR8D/nFzj8RahzVAhlHlZFnqwSo2zBn iNcivUdr1dYGJ5IEGdXXmlzVwZ9Kh2Am4+deP9p2Km+bRHRI+xlxoMGpguvvsRLgQY9v pjpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=27SavXWsOz2fFOmzF4nHb+ZNB/DHHSIE/WtD2FW1frE=; b=SJ1d5X9Fc4IFGbzz0jj5ZZgyeUSv0uFIfwol/ctKGXEr2CxbBvc7peDYihsbcGLauG /inMOjrAq2sDGk9zpxdxqVxh5wOWeIk3zdsIpsfkHVbsM7VPAxIRnvlHI63XzD9Xf1sV lVOgG1NiOPOovO8vQ7XqDvPoEwwLPM7vaZZVMjkAGcuzKWxNjePuO0mWWapJMcf5Vvfd FhMg0QGGv1v1Y6UI+uMkpgbfeSw+wl1umCN0g19tBfuCp/D759xs+pw64M/+rw318+Nc DQxygQymFqtCBrrwZRGe3R0TwUpS11XJp8mXW/BcLbDx4ty0JG+wNACXglpDwZrMbyHr Imdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=B6rYc8U7; 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 y9-20020aa79429000000b0063b1f577d29si5372053pfo.192.2023.04.14.17.32.44; Fri, 14 Apr 2023 17:32:58 -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=20221208 header.b=B6rYc8U7; 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 S229878AbjDOAGL (ORCPT + 99 others); Fri, 14 Apr 2023 20:06:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229457AbjDOAGJ (ORCPT ); Fri, 14 Apr 2023 20:06:09 -0400 Received: from mail-pl1-x64a.google.com (mail-pl1-x64a.google.com [IPv6:2607:f8b0:4864:20::64a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF609422F for ; Fri, 14 Apr 2023 17:06:07 -0700 (PDT) Received: by mail-pl1-x64a.google.com with SMTP id t7-20020a170902bc4700b001a6a8f8c1fdso880754plz.9 for ; Fri, 14 Apr 2023 17:06:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1681517167; x=1684109167; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=27SavXWsOz2fFOmzF4nHb+ZNB/DHHSIE/WtD2FW1frE=; b=B6rYc8U7DGbKYNVYius6Nr1xFvfOgiOlW1pJgKmS1NVqaLzVhoraHcl1dTphDfkPeJ VC5xCv4i9COcEmzeOrD7NEAO9JflKku7ibWDLxlUZ7QUcBWfleeW76yKHqP1vsjsIBmS xOBlD3he/x1UVQg1EYc85ePh47AslSrznw1re6kKlcbBm07C50pD2jDiYbewN+qZWOeG EnLYD2OvDfZ5pDFaBqAkHKIhzuWoraoXAEemxILSM5u/iZ8A2ZqHiRuKc9YACWyOhPPn KTvKxPW2ojdNtXyipa/8Ht7nOBbNdsa/g4dO2xbQne+AS2SegO8N4SXpGOfagfMUjir5 TCzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681517167; x=1684109167; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=27SavXWsOz2fFOmzF4nHb+ZNB/DHHSIE/WtD2FW1frE=; b=WZfnQ8q/EtmQKhzeIEYDl9n6AC9RpnWxf7jfHztb5s2t4sTr+hKEaxgZEoynUueh1w yv3/4koBnYfF62Y63bp0lSqO9c1zuD6GDrGqakPQ6MY2uDOvbh2sjkUFeO+hOvocq2F8 ULelPMjKGFANVt/GGilsSZru/c+69DgFI0cTjfY35T0hn2GyeP3ipgVG75lyqeLr2kSk btolS3QnBb2rmaxF2VYHfBkNGG6LlPQymk1CpYFPKbtz+iUvrmsa8WDkPo2EB+8aGEgj a0T9UF4IOIqhaNKDV3q6/EZGM6GgHfLjWhpU+PE0zmPncRskJ+zo878ceiEFC1M9dy3R UE1Q== X-Gm-Message-State: AAQBX9d02c6Bw37SbNlqyJbNba9Qih93NbursUdwWxTeHxFdOP1rL2Bf lZMRBhIsy2qwckl03s1B50ra7i8mSoo= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:90a:9c3:b0:246:f8f7:f568 with SMTP id 61-20020a17090a09c300b00246f8f7f568mr2063266pjo.0.1681517167336; Fri, 14 Apr 2023 17:06:07 -0700 (PDT) Date: Fri, 14 Apr 2023 17:06:06 -0700 In-Reply-To: Mime-Version: 1.0 References: Message-ID: Subject: Re: [PATCH v7 00/14] KVM: mm: fd-based approach for supporting KVM guest private memory From: Sean Christopherson To: Ackerley Tng Cc: brauner@kernel.org, kirill.shutemov@linux.intel.com, chao.p.peng@linux.intel.com, hughd@google.com, 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, linux-kselftest@vger.kernel.org, pbonzini@redhat.com, corbet@lwn.net, vkuznets@redhat.com, wanpengli@tencent.com, jmattson@google.com, joro@8bytes.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com, jlayton@kernel.org, bfields@fieldses.org, akpm@linux-foundation.org, shuah@kernel.org, rppt@kernel.org, steven.price@arm.com, mail@maciej.szmigiero.name, vbabka@suse.cz, vannapurve@google.com, yu.c.zhang@linux.intel.com, 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, qperret@google.com, michael.roth@amd.com, mhocko@suse.com, songmuchun@bytedance.com, pankaj.gupta@amd.com, linux-arch@vger.kernel.org, arnd@arndb.de, linmiaohe@huawei.com, naoya.horiguchi@nec.com, tabba@google.com, wei.w.wang@intel.com Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL 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 Fri, Apr 14, 2023, Sean Christopherson wrote: > On Fri, Apr 14, 2023, Ackerley Tng wrote: > > Sean Christopherson writes: > > > if (WARN_ON_ONCE(file->private_data)) { > > > err = -EEXIST; > > > goto err_fd; > > > } > > > > Did you intend this as a check that the backing filesystem isn't using > > the private_data field in the mapping? > > > > I think you meant file->f_mapping->private_data. > > Ya, sounds right. I should have added disclaimers that (a) I wrote this quite > quickly and (b) it's compile tested only at this point. FWIW, here's a very lightly tested version that doesn't explode on a basic selftest. https://github.com/sean-jc/linux/tree/x86/upm_base_support