From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF9DB72 for ; Fri, 27 Aug 2021 18:24:44 +0000 (UTC) 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 Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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 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.