From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Mackerras Subject: Re: [PATCH 18/19] KVM: PPC: Book3S HV: add passthrough support Date: Tue, 29 Jan 2019 15:12:41 +1100 Message-ID: <20190129041241.GA17660@blackberry> References: <20190107184331.8429-1-clg@kaod.org> <20190107191006.10648-1-clg@kaod.org> <20190107191006.10648-2-clg@kaod.org> <20190122052657.GG15124@blackberry> <20190123103009.GB29826@blackberry> <75762dbe-0f08-5b06-e376-744ff87ff4cb@kaod.org> <20190128061353.GD3237@blackberry> <38b0244d-beb6-3aee-c638-279ca570633c@kaod.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, David Gibson To: =?iso-8859-1?Q?C=E9dric?= Le Goater Return-path: Content-Disposition: inline In-Reply-To: <38b0244d-beb6-3aee-c638-279ca570633c@kaod.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org Sender: "Linuxppc-dev" List-Id: kvm.vger.kernel.org On Mon, Jan 28, 2019 at 07:26:00PM +0100, Cédric Le Goater wrote: > > Is clearing the PTEs and repopulating the VMA unsafe ? Actually, now that I come to think of it, there could be any number of VMAs (well, up to almost 64k of them), since once you have a file descriptor you can call mmap on it multiple times. The more I think about it, the more I think that getting userspace to manage the mappings with mmap() and munmap() is the right idea if it can be made to work. Paul.