Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp1211706rwa; Sun, 21 Aug 2022 03:47:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR5j/WtRWVde7Is1/9/Q2x96KjtX3Vr+rthe4FN3OusZdmfjYL3wdF61qv2afNGlIUb+AYej X-Received: by 2002:a63:ea11:0:b0:41d:9296:21e6 with SMTP id c17-20020a63ea11000000b0041d929621e6mr12587544pgi.603.1661078826336; Sun, 21 Aug 2022 03:47:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661078826; cv=none; d=google.com; s=arc-20160816; b=rFEW1kCzt56T6YaYx38Dkmcba1UjfYyP47A3jILFj4TjR5e35P3IJmg+6TR5izZw5i tBizx81/2LGqQnJElb1S0EYL06WbjSrd5WKmSF2LyYNh9Cd05lnqvudAjVWZN/VGUIu4 e6p+RsEPiH5GmThvecQAfDB6fKfyv7vFY7vK7NRWqHbKnDeey2dSgpVkLnAJn/xbIjvg tkpy7LlWWuND6zafuS4fqSN/hVyF94YGJdS6LM3arjzSWsEudha8GET5rcPhWcKDk24/ dwAlk4ibi6R5VY6JWhD8uleYXGSR0upRrumEX8vTUNGHyVf5xuQrOgnz2Nw/dTVaah2g KBeA== 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:message-id:subject:cc:to:from:date:dkim-signature; bh=ezqnpfSoqTQDMJ+hJHVpOcv6CdCxoRGL+MI+YKi2ajc=; b=e5ZOH/G6hnIMvBJKLNAvKfxO3TS2hOotHvySlZ640HeVZf9m7PIuRAOvPVAWE1TziH od2e9FVZh9YB//0/P8k/OVlVZeFrAagK87JN7xV9xjAwk6CAcHoEfxx+uzaMnmFypxLM /quwaawmuRYkJ7MuCmS9QrenRQ04+UGLH8YJK7qLmLJXQ5y+vi/Z7XXHhLvXmj/UBr+m WZatJFvfwbE4xmSqA3ojJVY4LkprAUFK8X+gLBa9dx0+HKrhO1VzKbgkZbhV5ZtxjnuM FuIJlO8jaXVoqFxUWi5X8yKyd+HXAql5SlXWpHHCYJIpZ1mhHi2i1ZM4Pm9dwntyhtVn itjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=oGft0gEC; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m11-20020a65438b000000b0041d3e033ab4si10038246pgp.847.2022.08.21.03.46.55; Sun, 21 Aug 2022 03:47:06 -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=@infradead.org header.s=casper.20170209 header.b=oGft0gEC; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230208AbiHUK2M (ORCPT + 99 others); Sun, 21 Aug 2022 06:28:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230182AbiHUK2I (ORCPT ); Sun, 21 Aug 2022 06:28:08 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD7B318394; Sun, 21 Aug 2022 03:28:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ezqnpfSoqTQDMJ+hJHVpOcv6CdCxoRGL+MI+YKi2ajc=; b=oGft0gECLBoMj2UBuNjBRRw7oU +dq00PAmbDXUBvlm8/tj+3wvQ6+u1mI4tCmpI7ekjaZJY5bZRNO9OebH9SJpV1ysh/OWtfztRfWPW oh7BrM3UcOp9ibf9eSMPU5DoNPWCirAlzoF7UBdHCRQtmm6dE/aZytFO5kBG+bAYbqLdyYZzrVtt/ iuZP3zYaHC4+P7CXpDkHhx26k0MpnTHE/dEowsrIT+sGbKv23kjGfdNLUtoruLSmY1Y3DtZhd/9Hl 3LYOd+8SlRhwWalnWFB/NWtwuYs86Tc9tyA9RmJoFdeb0dwyoEDgnWuoUSo1B+PY04MuuTWMM54Av EsSC0QFw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1oPiBE-00D7rG-Sc; Sun, 21 Aug 2022 10:27:44 +0000 Date: Sun, 21 Aug 2022 11:27:44 +0100 From: Matthew Wilcox To: Hugh Dickins Cc: "Kirill A . Shutemov" , Chao Peng , 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, Paolo Bonzini , Jonathan Corbet , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H . Peter Anvin" , Jeff Layton , "J . Bruce Fields" , Andrew Morton , Shuah Khan , Mike Rapoport , Steven Price , "Maciej S . Szmigiero" , Vlastimil Babka , Vishal Annapurve , Yu Zhang , 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 , "Gupta, Pankaj" Subject: Re: [PATCH v7 00/14] KVM: mm: fd-based approach for supporting KVM guest private memory Message-ID: References: <20220706082016.2603916-1-chao.p.peng@linux.intel.com> <20220818132421.6xmjqduempmxnnu2@box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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, Aug 18, 2022 at 08:00:41PM -0700, Hugh Dickins wrote: > tmpfs and hugetlbfs and page cache are designed around sharing memory: > TDX is designed around absolutely not sharing memory; and the further > uses which Sean foresees appear not to need it as page cache either. > > Except perhaps for page migration reasons. It's somewhat incidental, > but of course page migration knows how to migrate page cache, so > masquerading as page cache will give a short cut to page migration, > when page migration becomes at all possible. I haven't read the patch series, and I'm not taking a position one way or the other on whether this is better implemented as a shmem addition or a shim that asks shmem for memory. Page migration can be done for driver memory by using PageMovable. I just rewrote how it works, so the details are top of my mind at the moment if anyone wants something explained. Commit 68f2736a8583 is the key one to look at.