[PATCH v2 1/3] powerpc/kvm: Remove redundant save of SIER AND MMCR2

2014-07-07 Thread Joel Stanley
These two registers are already saved in the block above. Aside from being unnecessary, by the time we get down to the second save location r8 no longer contains MMCR2, so we are clobbering the saved value with PMC5. MMCR2 primarily consists of counter freeze bits. So restoring the value of PMC5 i

[PATCH v2] Use the POWER8 Micro Partition Prefetch Engine in KVM HV on POWER8

2014-07-07 Thread Stewart Smith
The POWER8 processor has a Micro Partition Prefetch Engine, which is a fancy way of saying "has way to store and load contents of L2 or L2+MRU way of L3 cache". We initiate the storing of the log (list of addresses) using the logmpp instruction and start restore by writing to a SPR. The logmpp ins

Re: [RFC PATCH 3/4] KVM: PPC: e500: TLB emulation for IND entries

2014-07-07 Thread Scott Wood
On Thu, 2014-07-03 at 17:45 +0300, Mihai Caraman wrote: > Handle indirect entries (IND) in TLB emulation code. Translation size of IND > entries differ from the size of referred Page Tables (Linux guests now use IND > of 2MB for 4KB PTs) and this require careful tweak of the existing logic. > > TL

Re: [RFC PATCH 2/4] KVM: PPC: Book3E: Handle LRAT error exception

2014-07-07 Thread Scott Wood
On Fri, 2014-07-04 at 10:15 +0200, Alexander Graf wrote: > On 03.07.14 16:45, Mihai Caraman wrote: > > diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c > > index a192975..ab1077f 100644 > > --- a/arch/powerpc/kvm/booke.c > > +++ b/arch/powerpc/kvm/booke.c > > @@ -1286,6 +1286,46 @@

[PATCH] KVM: PPC: RTAS: Do byte swaps explicitly

2014-07-07 Thread Alexander Graf
In commit b59d9d26b we introduced implicit byte swaps for RTAS calls. Unfortunately we messed up and didn't swizzle return values properly. Also the old approach wasn't "sparse" compatible - we were randomly reading __be32 values on an LE system. Let's just do all of the swizzling explicitly with