From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Subject: Re: [PATCH 0/6] Use virtual page class key protection mechanism for speeding up guest page fault Date: Sun, 29 Jun 2014 21:26:06 +1000 Message-ID: <1404041166.31323.2.camel@pasglop> References: <1404040655-12076-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: agraf@suse.de, paulus@samba.org, linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org, kvm@vger.kernel.org To: "Aneesh Kumar K.V" Return-path: In-Reply-To: <1404040655-12076-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Sun, 2014-06-29 at 16:47 +0530, Aneesh Kumar K.V wrote: > To achieve the above we use virtual page calss protection mechanism for > covering (2) and (3). For both the above case we mark the hpte > valid, but associate the page with virtual page class index 30 and 31. > The authority mask register is configured such that class index 30 and 31 > will have read/write denied. The above change results in a key fault > for (2) and (3). This allows us to forward a NO_HPTE fault directly to guest > without doing the expensive hash pagetable lookup. So we have a measurable performance benefit (about half a second out of 8) but you didn't explain the drawback here which is to essentially make it impossible for guests to exploit virtual page class keys, or did you find a way to still make that possible ? As it-is, it's not a huge issue for Linux but we might have to care with other OSes that do care... Do we have a way in PAPR to signify to the guest that the keys are not available ? Cheers, Ben.