Re: kvm BookE and SPRGs

2009-07-10 Thread Hollis Blanchard
On Fri, 2009-07-10 at 18:10 +1000, Benjamin Herrenschmidt wrote: > On Fri, 2009-07-10 at 16:31 +1000, Benjamin Herrenschmidt wrote: > > > > I was roaming through kernel usage of SPRGs and noticed a small detail > > in kvmppc for BookE ... any reason why in OP_31_XOP_MTSPR, you > > open coded the e

RE: kvm BookE and SPRGs

2009-07-10 Thread Hollis Blanchard
On Fri, 2009-07-10 at 19:17 +1000, Benjamin Herrenschmidt wrote: > On Fri, 2009-07-10 at 17:15 +0800, Liu Yu-B13201 wrote: > > Sounds reasonable. > > > > There are some old patchset which implemented the binary patch as Ben > > described. > > > > http://marc.info/?l=kvm-ppc&m=122154653905212&w=2

Re: kvm BookE and SPRGs

2009-07-10 Thread Benjamin Herrenschmidt
On Fri, 2009-07-10 at 11:43 +0200, Alexander Graf wrote: > > What firmware out of curiosity ? The treeboot thingy ? And yes, we > > definitely need an enabling HV call, ie, we stick to traps until > it's > > On PPC32 openbios is somewhere up there. On PPC64 openbios stays where > it was on PPC32,

Re: kvm BookE and SPRGs

2009-07-10 Thread Benjamin Herrenschmidt
On Fri, 2009-07-10 at 11:39 +0200, Alexander Graf wrote: > > > Oh so we could have the emulation code mapped into the guest and could > just jump there from our trampline code, so all page faults and other > fun traps still work. > > That'd be nice :-) We can put -some- code in there yes, but

Re: kvm BookE and SPRGs

2009-07-10 Thread Alexander Graf
On 10.07.2009, at 11:39, Benjamin Herrenschmidt wrote: On Fri, 2009-07-10 at 11:18 +0200, Alexander Graf wrote: The only problem I see is that the firmware lives in the high 4k, so we'd have to have some sort of enabling HV-call too. What firmware out of curiosity ? The treeboot thingy ? An

Re: kvm BookE and SPRGs

2009-07-10 Thread Benjamin Herrenschmidt
On Fri, 2009-07-10 at 11:18 +0200, Alexander Graf wrote: > The only problem I see is that the firmware lives in the high 4k, so > we'd have to have some sort of enabling HV-call too. What firmware out of curiosity ? The treeboot thingy ? And yes, we definitely need an enabling HV call, ie, we sti

RE: kvm BookE and SPRGs

2009-07-10 Thread Benjamin Herrenschmidt
On Fri, 2009-07-10 at 19:17 +1000, Benjamin Herrenschmidt wrote: > On Fri, 2009-07-10 at 17:15 +0800, Liu Yu-B13201 wrote: > > Sounds reasonable. > > > > There are some old patchset which implemented the binary patch as Ben > > described. > > > > http://marc.info/?l=kvm-ppc&m=122154653905212&w=2

RE: kvm BookE and SPRGs

2009-07-10 Thread Benjamin Herrenschmidt
On Fri, 2009-07-10 at 17:15 +0800, Liu Yu-B13201 wrote: > Sounds reasonable. > > There are some old patchset which implemented the binary patch as Ben > described. > > http://marc.info/?l=kvm-ppc&m=122154653905212&w=2 > http://marc.info/?l=kvm-ppc&m=122154657905306&w=2 > Interesting. Any reason

RE: kvm BookE and SPRGs

2009-07-10 Thread Liu Yu-B13201
> -Original Message- > From: kvm-ppc-ow...@vger.kernel.org > [mailto:kvm-ppc-ow...@vger.kernel.org] On Behalf Of Alexander Graf > Sent: Friday, July 10, 2009 4:43 PM > To: Benjamin Herrenschmidt > Cc: kvm-ppc@vger.kernel.org; Hollis Blanchard; Avi Kivity > Subje

Re: kvm BookE and SPRGs

2009-07-10 Thread Benjamin Herrenschmidt
On Fri, 2009-07-10 at 10:42 +0200, Alexander Graf wrote: > > IMHO paravirt stuff can be really useful, but should stay in the > guest. I don't really like the idea of adding binary patching of > guests in the hypervisor more than for dcbz where I didn't see another > way to do it. > I wasn't

Re: kvm BookE and SPRGs

2009-07-10 Thread Alexander Graf
Hi Ben, On 10.07.2009, at 10:10, Benjamin Herrenschmidt wrote: On Fri, 2009-07-10 at 16:31 +1000, Benjamin Herrenschmidt wrote: I was roaming through kernel usage of SPRGs and noticed a small detail in kvmppc for BookE ... any reason why in OP_31_XOP_MTSPR, you open coded the emulation of

Re: kvm BookE and SPRGs

2009-07-10 Thread Benjamin Herrenschmidt
On Fri, 2009-07-10 at 16:31 +1000, Benjamin Herrenschmidt wrote: > > I was roaming through kernel usage of SPRGs and noticed a small detail > in kvmppc for BookE ... any reason why in OP_31_XOP_MTSPR, you > open coded the emulation of SPRG0..3, but 4...7 are handled > in kvmppc_core_emulate_mtspr(