Re: [PULL 0/8] ppc patch queue 2013-01-10

2013-01-17 Thread Alexander Graf
On 14.01.2013, at 10:03, Gleb Natapov wrote: On Thu, Jan 10, 2013 at 01:45:04PM +0100, Alexander Graf wrote: Hi Marcelo / Gleb, This is my current patch queue for ppc. Please pull. Highlights this time: - Book3S: enable potential sPAPR guest emulation on PR KVM on pHyp - BookE:

RE: [PATCH 5/8] KVM: PPC: debug stub interface parameter defined

2013-01-17 Thread Bhushan Bharat-R65777
-Original Message- From: Paul Mackerras [mailto:pau...@samba.org] Sent: Thursday, January 17, 2013 12:53 PM To: Bhushan Bharat-R65777 Cc: kvm-ppc@vger.kernel.org; k...@vger.kernel.org; ag...@suse.de; Bhushan Bharat- R65777 Subject: Re: [PATCH 5/8] KVM: PPC: debug stub interface

Re: [PULL 0/8] ppc patch queue 2013-01-10

2013-01-17 Thread Gleb Natapov
On Thu, Jan 17, 2013 at 11:53:38AM +0100, Alexander Graf wrote: On 14.01.2013, at 10:03, Gleb Natapov wrote: On Thu, Jan 10, 2013 at 01:45:04PM +0100, Alexander Graf wrote: Hi Marcelo / Gleb, This is my current patch queue for ppc. Please pull. Highlights this time: -

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

2013-01-17 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/3] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-17 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] KVM: PPC: Emulate dcbf

2013-01-17 Thread Alexander Graf
Guests can trigger MMIO exits using dcbf. Since we don't emulate cache incoherent MMIO, just do nothing and move on. Reported-by: Ben Collins be...@servergy.com Signed-off-by: Alexander Graf ag...@suse.de Tested-by: Ben Collins be...@servergy.com --- arch/powerpc/kvm/emulate.c |2 ++ 1 files

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

2013-01-17 Thread Alexander Graf
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. Alex The following changes since commit

[PATCH 1/1] KVM: PPC: Emulate dcbf

2013-01-17 Thread Alexander Graf
Guests can trigger MMIO exits using dcbf. Since we don't emulate cache incoherent MMIO, just do nothing and move on. Reported-by: Ben Collins be...@servergy.com Signed-off-by: Alexander Graf ag...@suse.de Tested-by: Ben Collins be...@servergy.com CC: sta...@vger.kernel.org ---

Re: [PATCH 1/3] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-17 Thread Scott Wood
On 01/17/2013 04:50:39 PM, Alexander Graf wrote: @@ -1024,9 +1001,11 @@ void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 eaddr, gpa_t gpaddr, { struct kvmppc_vcpu_e500 *vcpu_e500 = to_e500(vcpu); struct tlbe_priv *priv; - struct kvm_book3e_206_tlb_entry *gtlbe, stlbe; +

Re: [PATCH 1/3] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-17 Thread Alexander Graf
On 18.01.2013, at 01:11, Scott Wood wrote: On 01/17/2013 04:50:39 PM, Alexander Graf wrote: @@ -1024,9 +1001,11 @@ void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 eaddr, gpa_t gpaddr, { struct kvmppc_vcpu_e500 *vcpu_e500 = to_e500(vcpu); struct tlbe_priv *priv; -struct

Re: [PATCH 1/3] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-17 Thread Alexander Graf
On 18.01.2013, at 01:20, Alexander Graf wrote: On 18.01.2013, at 01:11, Scott Wood wrote: On 01/17/2013 04:50:39 PM, Alexander Graf wrote: @@ -1024,9 +1001,11 @@ void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 eaddr, gpa_t gpaddr, { struct kvmppc_vcpu_e500 *vcpu_e500 =

Re: [PATCH 1/3] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-17 Thread Scott Wood
On 01/17/2013 06:29:56 PM, Alexander Graf wrote: On 18.01.2013, at 01:20, Alexander Graf wrote: On 18.01.2013, at 01:11, Scott Wood wrote: It also seems like it would be cleaner to just invalidate the old entry in tlbwe, and then this function doesn't need to change at all. I am a

Re: [PATCH 1/3] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-17 Thread Scott Wood
On 01/17/2013 06:20:03 PM, Alexander Graf wrote: On 18.01.2013, at 01:11, Scott Wood wrote: On 01/17/2013 04:50:39 PM, Alexander Graf wrote: @@ -1024,9 +1001,11 @@ void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 eaddr, gpa_t gpaddr, { struct kvmppc_vcpu_e500 *vcpu_e500 =

Re: [PATCH 1/3] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-17 Thread Alexander Graf
On 18.01.2013, at 01:47, Scott Wood wrote: On 01/17/2013 06:20:03 PM, Alexander Graf wrote: On 18.01.2013, at 01:11, Scott Wood wrote: On 01/17/2013 04:50:39 PM, Alexander Graf wrote: @@ -1024,9 +1001,11 @@ void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 eaddr, gpa_t gpaddr, {

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

2013-01-17 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/6] KVM: PPC: e500: Implement TLB1-in-TLB0 mapping

2013-01-17 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 v2 0/6] KVM: PPC: e500: Shadow TLB Improvements v2

2013-01-17 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

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

2013-01-17 Thread Scott Wood
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 Graf ag...@suse.de ---