From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Subject: Re: [PATCH 18/19] KVM: PPC: Book3S HV: add passthrough support Date: Tue, 29 Jan 2019 18:44:50 +0100 Message-ID: <2fd9b526-347d-a1d5-925b-bc633231de64@kaod.org> 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> <20190129041241.GA17660@blackberry> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, David Gibson To: Paul Mackerras Return-path: In-Reply-To: <20190129041241.GA17660@blackberry> Content-Language: en-US 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 1/29/19 5:12 AM, Paul Mackerras wrote: > 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. We might be able to mmap() and munmap() regions of ESB pages in the RTAS call "ibm,change-msi". I think that's the right spot for it. Thanks, C.