From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Mackerras Date: Sat, 22 Jun 2013 23:30:41 +0000 Subject: Re: [PATCH 4/5] KVM: PPC: Book3S PR: Invalidate SLB entries properly Message-Id: <20130622233041.GG2791@iris.ozlabs.ibm.com> List-Id: References: <20130622071244.GA2791@iris.ozlabs.ibm.com> <20130622071524.GE2791@iris.ozlabs.ibm.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Alexander Graf Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org On Sat, Jun 22, 2013 at 07:48:05PM +0200, Alexander Graf wrote: > > On 22.06.2013, at 09:15, Paul Mackerras wrote: > > > At present, if the guest creates a valid SLB (segment lookaside buffer) > > entry with the slbmte instruction, then invalidates it with the slbie > > instruction, then reads the entry with the slbmfee/slbmfev instructions, > > the result of the slbmfee will have the valid bit set, even though the > > entry is not actually considered valid by the host. This is confusing, > > if not worse. This fixes it by zeroing out the orige and origv fields > > of the SLB entry structure when the entry is invalidated. > > > > Signed-off-by: Paul Mackerras > > Could you please change this to only remove the V bit from orige? I've found it very useful for debugging to see old, invalidated entries in the SLB when dumping it. The spec declares anything but the toggle of the V bit as undefined. I did it like this since the architecture (since version 2.03) specifies that slbmfee and slbmfev both return all zeroes for invalid entries. I'm not sure what you mean by your last sentence there. Paul. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Mackerras Subject: Re: [PATCH 4/5] KVM: PPC: Book3S PR: Invalidate SLB entries properly Date: Sun, 23 Jun 2013 09:30:41 +1000 Message-ID: <20130622233041.GG2791@iris.ozlabs.ibm.com> References: <20130622071244.GA2791@iris.ozlabs.ibm.com> <20130622071524.GE2791@iris.ozlabs.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org To: Alexander Graf Return-path: Received: from ozlabs.org ([203.10.76.45]:33531 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750977Ab3FVXap (ORCPT ); Sat, 22 Jun 2013 19:30:45 -0400 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Sat, Jun 22, 2013 at 07:48:05PM +0200, Alexander Graf wrote: > > On 22.06.2013, at 09:15, Paul Mackerras wrote: > > > At present, if the guest creates a valid SLB (segment lookaside buffer) > > entry with the slbmte instruction, then invalidates it with the slbie > > instruction, then reads the entry with the slbmfee/slbmfev instructions, > > the result of the slbmfee will have the valid bit set, even though the > > entry is not actually considered valid by the host. This is confusing, > > if not worse. This fixes it by zeroing out the orige and origv fields > > of the SLB entry structure when the entry is invalidated. > > > > Signed-off-by: Paul Mackerras > > Could you please change this to only remove the V bit from orige? I've found it very useful for debugging to see old, invalidated entries in the SLB when dumping it. The spec declares anything but the toggle of the V bit as undefined. I did it like this since the architecture (since version 2.03) specifies that slbmfee and slbmfev both return all zeroes for invalid entries. I'm not sure what you mean by your last sentence there. Paul.