From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Subject: Re: [PATCH 18/19] KVM: PPC: Book3S HV: add passthrough support Date: Wed, 23 Jan 2019 12:07:19 +0100 Message-ID: <75762dbe-0f08-5b06-e376-744ff87ff4cb@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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, David Gibson To: Paul Mackerras , Benjamin Herrenschmidt Return-path: In-Reply-To: <20190123103009.GB29826@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/23/19 11:30 AM, Paul Mackerras wrote: > On Wed, Jan 23, 2019 at 05:45:24PM +1100, Benjamin Herrenschmidt wrote: >> On Tue, 2019-01-22 at 16:26 +1100, Paul Mackerras wrote: >>> On Mon, Jan 07, 2019 at 08:10:05PM +0100, Cédric Le Goater wrote: >>>> Clear the ESB pages from the VMA of the IRQ being pass through to the >>>> guest and let the fault handler repopulate the VMA when the ESB pages >>>> are accessed for an EOI or for a trigger. >>> >>> Why do we want to do this? >>> >>> I don't see any possible advantage to removing the PTEs from the >>> userspace mapping. You'll need to explain further. >> >> Afaik bcs we change the mapping to point to the real HW irq ESB page >> instead of the "IPI" that was there at VM init time. yes exactly. You need to clean up the pages each time. > So that makes it sound like there is a whole lot going on that hasn't > even been hinted at in the patch descriptions... It sounds like we > need a good description of how all this works and fits together > somewhere under Documentation/. OK. I have started doing so for the models merged in QEMU but not yet for KVM. I will work on it. > In any case we need much more informative patch descriptions. I > realize that it's all currently in Cedric's head, but I bet that in > two or three years' time when we come to try to debug something, it > won't be in anyone's head... I agree. So, storing the ESB VMA under the KVM device is not shocking anyone ? Thanks, C. From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Date: Wed, 23 Jan 2019 11:07:19 +0000 Subject: Re: [PATCH 18/19] KVM: PPC: Book3S HV: add passthrough support Message-Id: <75762dbe-0f08-5b06-e376-744ff87ff4cb@kaod.org> List-Id: 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> In-Reply-To: <20190123103009.GB29826@blackberry> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: Paul Mackerras , Benjamin Herrenschmidt Cc: linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, David Gibson On 1/23/19 11:30 AM, Paul Mackerras wrote: > On Wed, Jan 23, 2019 at 05:45:24PM +1100, Benjamin Herrenschmidt wrote: >> On Tue, 2019-01-22 at 16:26 +1100, Paul Mackerras wrote: >>> On Mon, Jan 07, 2019 at 08:10:05PM +0100, C=C3=A9dric Le Goater wrote: >>>> Clear the ESB pages from the VMA of the IRQ being pass through to the >>>> guest and let the fault handler repopulate the VMA when the ESB pages >>>> are accessed for an EOI or for a trigger. >>> >>> Why do we want to do this? >>> >>> I don't see any possible advantage to removing the PTEs from the >>> userspace mapping. You'll need to explain further. >> >> Afaik bcs we change the mapping to point to the real HW irq ESB page >> instead of the "IPI" that was there at VM init time. yes exactly. You need to clean up the pages each time. =20 > So that makes it sound like there is a whole lot going on that hasn't > even been hinted at in the patch descriptions... It sounds like we > need a good description of how all this works and fits together > somewhere under Documentation/. OK. I have started doing so for the models merged in QEMU but not yet=20 for KVM. I will work on it. > In any case we need much more informative patch descriptions. I > realize that it's all currently in Cedric's head, but I bet that in > two or three years' time when we come to try to debug something, it > won't be in anyone's head... I agree.=20 So, storing the ESB VMA under the KVM device is not shocking anyone ? =20 Thanks, C.