From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbYMS-0004F9-Oy for qemu-devel@nongnu.org; Tue, 07 Oct 2014 13:15:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XbYMM-00018X-Ei for qemu-devel@nongnu.org; Tue, 07 Oct 2014 13:15:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38672) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbYML-00017i-Uu for qemu-devel@nongnu.org; Tue, 07 Oct 2014 13:15:38 -0400 Message-ID: <54341F77.6060400@redhat.com> Date: Tue, 07 Oct 2014 19:14:31 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1412356087-16115-1-git-send-email-aarcange@redhat.com> <1412356087-16115-11-git-send-email-aarcange@redhat.com> <20141006085540.GD2336@work-vm> <20141006164156.GA31075@redhat.com> <20141007170731.GO2404@work-vm> In-Reply-To: <20141007170731.GO2404@work-vm> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 10/17] mm: rmap preparation for remap_anon_pages List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert" , Linus Torvalds Cc: Robert Love , Dave Hansen , Jan Kara , KVM list , Neil Brown , Stefan Hajnoczi , qemu-devel@nongnu.org, linux-mm , KOSAKI Motohiro , Michel Lespinasse , Andrea Arcangeli , Taras Glek , Andrew Jones , Juan Quintela , Hugh Dickins , Isaku Yamahata , Mel Gorman , Sasha Levin , Android Kernel Team , "Huangpeng (Peter)" , Andres Lagar-Cavilla , Christopher Covington , Anthony Liguori , Keith Packard , Wenchao Xia , Linux API , Linux Kernel Mailing List , Andy Lutomirski , Minchan Kim , Dmitry Adamushko , Johannes Weiner , Mike Hommey , Andrew Morton , Peter Feiner Il 07/10/2014 19:07, Dr. David Alan Gilbert ha scritto: >> > >> > So I'd *much* rather have a "write()" style interface (ie _copying_ >> > bytes from user space into a newly allocated page that gets mapped) >> > than a "remap page" style interface > Something like that might work for the postcopy case; it doesn't work > for some of the other uses that need to stop a page being changed by the > guest, but then need to somehow get a copy of that page internally to QEMU, > and perhaps provide it back later. I cannot parse this. Which uses do you have in mind? Is it for QEMU-specific or is it for other applications of userfaults? As long as the page is atomically mapped, I'm not sure what the difference from remap_anon_pages are (as far as the destination page is concerned). Are you thinking of having userfaults enabled on the source as well? Paolo > remap_anon_pages worked for those cases > as well; I can't think of another current way of doing it in userspace.