Re: [PULL 3.8 0/1] ppc patch queue 2013-01-18 for 3.8

2013-01-18 Thread Gleb Natapov
On Fri, Jan 18, 2013 at 12:48:25AM +0100, Alexander Graf wrote: Hi Marcelo / Gleb, This is my current patch queue for ppc against 3.8. Please pull. It contains a bug fix for an issue that Ben Collins ran into, where a guest would just abort because it traps during an unknown instruction.

Re: [PULL 3.8 0/1] ppc patch queue 2013-01-18 for 3.8

2013-01-18 Thread Alexander Graf
On 18.01.2013, at 11:55, Gleb Natapov wrote: On Fri, Jan 18, 2013 at 12:48:25AM +0100, Alexander Graf wrote: Hi Marcelo / Gleb, This is my current patch queue for ppc against 3.8. Please pull. It contains a bug fix for an issue that Ben Collins ran into, where a guest would just abort

Re: [PULL 3.8 0/1] ppc patch queue 2013-01-18 for 3.8

2013-01-18 Thread Ben Collins
On Jan 18, 2013, at 7:14 AM, Alexander Graf ag...@suse.de wrote: On 18.01.2013, at 11:55, Gleb Natapov wrote: On Fri, Jan 18, 2013 at 12:48:25AM +0100, Alexander Graf wrote: Hi Marcelo / Gleb, This is my current patch queue for ppc against 3.8. Please pull. It contains a bug fix for

Re: [PATCH 2/6] KVM: PPC: E500: Explicitly mark shadow maps invalid

2013-01-18 Thread Alexander Graf
On 18.01.2013, at 04:05, Scott Wood wrote: On 01/17/2013 08:34:53 PM, Alexander Graf wrote: When we invalidate shadow TLB maps on the host, we don't mark them as not valid. But we should. Fix this by removing the E500_TLB_VALID from their flags when invalidating. Signed-off-by: Alexander

[PATCH v3 0/8] KVM: PPC: e500: Shadow TLB Improvements v3

2013-01-18 Thread Alexander Graf
This patch set improves the shadow TLB handling of our e500 target. The really important bit here is that with these patches applied, we can map guest TLB1 entries into the host's TLB0. This gives a significant performance improvement as you can see below. Alex v1 - v2: - new patch: Move

[PATCH 3/8] KVM: PPC: E500: Propagate errors when shadow mapping

2013-01-18 Thread Alexander Graf
When shadow mapping a page, mapping this page can fail. In that case we don't have a shadow map. Take this case into account, otherwise we might end up writing bogus TLB entries into the host TLB. While at it, also move the write_stlbe() calls into the respective TLBn handlers. Signed-off-by:

[PATCH 7/8] KVM: PPC: E500: Make clear_tlb_refs and clear_tlb1_bitmap static

2013-01-18 Thread Alexander Graf
Host shadow TLB flushing is logic that the guest TLB code should have no insight about. Declare the internal clear_tlb_refs and clear_tlb1_bitmap functions static to the host TLB handling file. Instead of these, we can use the already exported kvmppc_core_flush_tlb(). This gives us a common API

[PATCH 8/8] KVM: PPC: E500: Remove kvmppc_e500_tlbil_all usage from guest TLB code

2013-01-18 Thread Alexander Graf
The guest TLB handling code should not have any insight into how the host TLB shadow code works. kvmppc_e500_tlbil_all() is a function that is used for distinction between e500v2 and e500mc (E.HV) on how to flush shadow entries. This function really is private between the e500.c/e500mc.c file and

[PATCH 4/8] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-18 Thread Alexander Graf
When emulating tlbwe, we want to automatically map the entry that just got written in our shadow TLB map, because chances are quite high that it's going to be used very soon. Today this happens explicitly, duplicating all the logic that is in kvmppc_mmu_map() already. Just call that one instead.

[PATCH 6/8] KVM: PPC: e500: Implement TLB1-in-TLB0 mapping

2013-01-18 Thread Alexander Graf
When a host mapping fault happens in a guest TLB1 entry today, we map the translated guest entry into the host's TLB1. This isn't particularly clever when the guest is mapped by normal 4k pages, since these would be a lot better to put into TLB0 instead. This patch adds the required logic to map

[PATCH 1/8] KVM: PPC: E500: Move write_stlbe higher

2013-01-18 Thread Alexander Graf
Later patches want to call the function and it doesn't have dependencies on anything below write_host_tlbe. Move it higher up in the file. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500_tlb.c | 32 1 files changed, 16 insertions(+), 16

[PATCH 2/8] KVM: PPC: E500: Explicitly mark shadow maps invalid

2013-01-18 Thread Alexander Graf
When we invalidate shadow TLB maps on the host, we don't mark them as not valid. But we should. Fix this by removing the E500_TLB_VALID from their flags when invalidating. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500_tlb.c | 13 ++--- 1 files changed, 10