From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29F9CC4320E for ; Fri, 27 Aug 2021 18:24:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1065960FC4 for ; Fri, 27 Aug 2021 18:24:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229999AbhH0SZf (ORCPT ); Fri, 27 Aug 2021 14:25:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:37464 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229775AbhH0SZd (ORCPT ); Fri, 27 Aug 2021 14:25:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 847C160EFE; Fri, 27 Aug 2021 18:24:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1630088684; bh=GZgUgAVx/dgRddny0IXLMsCZm2xbh6JcZV5htCnbqUA=; h=In-Reply-To:References:Date:From:To:Cc:Subject:From; b=BuztgwPAQ3nWhde5Jc8SzsWaqUn5ics5X6QzE8+3FOMwS/HqFVkxgnJqiSIqVnVog J0Y9v+wAzEV33jtevrSterz0CgKG2iDPNJu8ZloywV3rRPAY17stVwHzbGi6DwQGvP 9UOJeFcYuPLT/0mo83z3B09pebo9hYqLUBigD8WoeIuqeueqHRn3+Km1FqBGkMjOLZ kPCNMqkVgbQPTo709ZT/BzrWmCka6sEFw69wDIfTmw65VpxNc5dYioJlLNXQN57v6A 3mTYf0PjByelXEBp7t642K9zdc5lmXYdFWqw6b9kLN+Cw02j8VV2+PbkCbfNKF7F6t Y/+oUMZr8v/rw== Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id 85DF627C005B; Fri, 27 Aug 2021 14:24:41 -0400 (EDT) Received: from imap2 ([10.202.2.52]) by compute6.internal (MEProxy); Fri, 27 Aug 2021 14:24:41 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddufedguddvgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsehttdertderreejnecuhfhrohhmpedftehn ugihucfnuhhtohhmihhrshhkihdfuceolhhuthhosehkvghrnhgvlhdrohhrgheqnecugg ftrfgrthhtvghrnhepgeejgffhtdelvdefgeefleevtdfgveekuefgkeffvdevfeefteei heeuteevkeefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homheprghnugihodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduudeiudek heeifedvqddvieefudeiiedtkedqlhhuthhopeepkhgvrhhnvghlrdhorhhgsehlihhnuh igrdhluhhtohdruhhs X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 60531A038A7; Fri, 27 Aug 2021 14:24:36 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-1125-g685cec594c-fm-20210825.001-g685cec59 Mime-Version: 1.0 Message-Id: <73319f3c-6f5e-4f39-a678-7be5fddd55f2@www.fastmail.com> In-Reply-To: References: <20210824005248.200037-1-seanjc@google.com> <307d385a-a263-276f-28eb-4bc8dd287e32@redhat.com> <40af9d25-c854-8846-fdab-13fe70b3b279@kernel.org> Date: Fri, 27 Aug 2021 11:24:13 -0700 From: "Andy Lutomirski" To: "David Hildenbrand" , "Sean Christopherson" , "Paolo Bonzini" Cc: "Vitaly Kuznetsov" , "Wanpeng Li" , "Jim Mattson" , "Joerg Roedel" , "kvm list" , "Linux Kernel Mailing List" , "Borislav Petkov" , "Andrew Morton" , "Joerg Roedel" , "Andi Kleen" , "David Rientjes" , "Vlastimil Babka" , "Tom Lendacky" , "Thomas Gleixner" , "Peter Zijlstra (Intel)" , "Ingo Molnar" , "Varad Gautam" , "Dario Faggioli" , "the arch/x86 maintainers" , linux-mm@kvack.org, linux-coco@lists.linux.dev, "Kirill A. Shutemov" , "Kirill A . Shutemov" , "Sathyanarayanan Kuppuswamy" , "Dave Hansen" , "Yu Zhang" Subject: =?UTF-8?Q?Re:_[RFC]_KVM:_mm:_fd-based_approach_for_supporting_KVM_guest_?= =?UTF-8?Q?private_memory?= Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 26, 2021, at 2:26 PM, David Hildenbrand wrote: > On 26.08.21 19:05, Andy Lutomirski wrote: > > Oof. That's quite a requirement. What's the point of the VMA once all > > this is done? > > You can keep using things like mbind(), madvise(), ... and the GUP code > with a special flag might mostly just do what you want. You won't have > to reinvent too many wheels on the page fault logic side at least. > You can keep calling the functions. The implementations working is a different story: you can't just unmap (pte_numa-style or otherwise) a private guest page to quiesce it, move it with memcpy(), and then fault it back in. In any event, adding fd-based NUMA APIs would be quite nice. Look at the numactl command.