Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1550505pxb; Fri, 27 Aug 2021 11:25:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5hlAthHh9E+juE1YZZDkzpHQgazMOhdBlCzj1kGpIwtDdpET3nHYFa9XJ3X9djJMtNCK1 X-Received: by 2002:a5e:8349:: with SMTP id y9mr3208064iom.34.1630088755559; Fri, 27 Aug 2021 11:25:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630088755; cv=none; d=google.com; s=arc-20160816; b=h5GEevoSwMQXySSVMnz21eWnowMYJFt8C7lwqDiIqe5Q3doyw5LgZZ9lFe2bck+1Ly wqORj0i6GcAmeOQ1Hgkfm/USPfFhQVwA7SSvZLhDr0CZGYruL5zG1SNWSqwqrKScQCgX zlyeG20O3VG/8YaGsdM2+gwcecJir7DLfhdlpb/RBaEt51KvkY083UW/XLT0sxGvcKK6 2SRp6FZgBubmTpWK2JGr1ntnesH7JunbjahJJEEgGuchPQIEw59L2WZ/YH/TMBItKUDN H0R0V42YFKhXsAY7Y1wMor4jkuKjDn9W58nagapAo5CyKCna66uBtG2FeAgkGu1y9dUE gtqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:dkim-signature; bh=Yw+QEwtX3EtKognFLgg4Xxt2Boi9Cj61XknYcL6iIB4=; b=Z1HgUG/bDYxlBE/lHjz85aSzWmA8p5/MtJ6Zg4DpkXTX/C7CSOaaglEQkJNFoxURZz um4os/TMD+6VdQK56UsXGZJXACGMK0hoyJnQOw2Qg5kZa0S+LmKVDe47XruKA77gORQ0 buAEmHHK34C2+FAZZ5BhCrl5asLDJ80HXKFHOMmH0RDm67llby6Xy2FBkoUUurvS2hqv XoyWB4or+llTBD4BazZttFsHe+3LS74jXc5TvzOSZsroU1cCF8CWTrxcwq5T5++U/jb2 Yc292axGQ9W4n5MQgE7pYOwRRFMFFDEzjZ8SeV6WMKmPUZ/fLEmzuyRNRhs+uv6Nvw/v duGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BuztgwPA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p14si6037929ilq.108.2021.08.27.11.25.44; Fri, 27 Aug 2021 11:25:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BuztgwPA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229967AbhH0SZe (ORCPT + 99 others); Fri, 27 Aug 2021 14:25:34 -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.