From: Hollis Blanchard Date: Fri, 03 Apr 2009 15:36:03 +0000 Subject: Re: MMU tricks for NetBSD guests Message-Id: <1238772963.6997.24.camel@slate.austin.ibm.com> List-Id: References: <1238702893.31662.215.camel@slate.austin.ibm.com> In-Reply-To: <1238702893.31662.215.camel@slate.austin.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org On Fri, 2009-04-03 at 00:52 +0200, Alexander Graf wrote: > > That sounds a lot like what I imlemented for real mode on 970. I > assume the PID is similar to a full SLB context and AS=1/AS=0 is > just > another bit that could as well be in the PID? Mostly... however, when an interrupt occurs, AS is set to 0 and PID remains unchanged. Also, AS can have different settings for instruction and data fetches. (I've been abbreviating as "MSR[AS]", but technically I should be writing "MSR[IS] for instructions or MSR[DS] for data"). > So what we do on 970[1] is we treat real mode as "yet another vsid". > 970 translates EA -> VA -> RA. It looks like booke does the same, with > the VSID coming from the PID. Exactly -- Book E uses AS | PID to provide the VSID, while Book S uses the SLB. The Book E way is much simpler, and also avoids the effective address collision problem we ran into on 970, because AS/PID don't depend on the EA. -- Hollis Blanchard IBM Linux Technology Center