public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* e500 KVM build fixes for 2.6.29
@ 2009-01-14 16:47 Hollis Blanchard
  2009-01-14 16:47 ` [PATCH 1/3] Subject: powerpc/fsl-booke: declare tlbcam_index for use in c Hollis Blanchard
       [not found] ` <1231951658-21108-1-git-send-email-hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Hollis Blanchard @ 2009-01-14 16:47 UTC (permalink / raw)
  To: avi; +Cc: kvm, kvm-ppc

Avi, these patches fix build issues in the new e500 code. Please apply for
2.6.29. Thanks!

-Hollis



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] Subject: powerpc/fsl-booke: declare tlbcam_index for use in c
  2009-01-14 16:47 e500 KVM build fixes for 2.6.29 Hollis Blanchard
@ 2009-01-14 16:47 ` Hollis Blanchard
  2009-01-14 16:47   ` [PATCH 2/3] Subject: kvm: ppc: Fix e500 warnings and some spelling problems Hollis Blanchard
  2009-01-14 16:47   ` [PATCH 3/3] Subject: kvm: ppc: Move to new TLB invalidate interface Hollis Blanchard
       [not found] ` <1231951658-21108-1-git-send-email-hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
  1 sibling, 2 replies; 6+ messages in thread
From: Hollis Blanchard @ 2009-01-14 16:47 UTC (permalink / raw)
  To: avi; +Cc: kvm, kvm-ppc, Liu Yu

From: Liu Yu <yu.liu@freescale.com>

So, KVM needs to read tlbcam_index to know exactly
which TLB1 entry is unused by host.

Signed-off-by: Liu Yu <yu.liu@freescale.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
---
 arch/powerpc/include/asm/mmu-fsl-booke.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/include/asm/mmu-fsl-booke.h b/arch/powerpc/include/asm/mmu-fsl-booke.h
index 3f941c0..4285b64 100644
--- a/arch/powerpc/include/asm/mmu-fsl-booke.h
+++ b/arch/powerpc/include/asm/mmu-fsl-booke.h
@@ -75,6 +75,8 @@
 
 #ifndef __ASSEMBLY__
 
+extern unsigned int tlbcam_index;
+
 typedef struct {
 	unsigned int	id;
 	unsigned int	active;
-- 
1.5.6.6


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] Subject: kvm: ppc: Fix e500 warnings and some spelling problems
  2009-01-14 16:47 ` [PATCH 1/3] Subject: powerpc/fsl-booke: declare tlbcam_index for use in c Hollis Blanchard
@ 2009-01-14 16:47   ` Hollis Blanchard
  2009-01-14 16:47   ` [PATCH 3/3] Subject: kvm: ppc: Move to new TLB invalidate interface Hollis Blanchard
  1 sibling, 0 replies; 6+ messages in thread
From: Hollis Blanchard @ 2009-01-14 16:47 UTC (permalink / raw)
  To: avi; +Cc: kvm, kvm-ppc, Liu Yu

From: Liu Yu <yu.liu@freescale.com>

---
 arch/powerpc/kvm/e500_emulate.c |    2 --
 arch/powerpc/kvm/e500_tlb.c     |    6 +++---
 arch/powerpc/kvm/e500_tlb.h     |    2 +-
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/kvm/e500_emulate.c b/arch/powerpc/kvm/e500_emulate.c
index d3c0c7c..7a98d4a 100644
--- a/arch/powerpc/kvm/e500_emulate.c
+++ b/arch/powerpc/kvm/e500_emulate.c
@@ -30,8 +30,6 @@ int kvmppc_core_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu,
 	int emulated = EMULATE_DONE;
 	int ra;
 	int rb;
-	int rs;
-	int rt;
 
 	switch (get_op(inst)) {
 	case 31:
diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c
index 6a50340..e3daf57 100644
--- a/arch/powerpc/kvm/e500_tlb.c
+++ b/arch/powerpc/kvm/e500_tlb.c
@@ -260,7 +260,7 @@ static inline void kvmppc_e500_deliver_tlb_miss(struct kvm_vcpu *vcpu,
 	unsigned int victim, pidsel, tsized;
 	int tlbsel;
 
-	/* since we only have tow TLBs, only lower bit is used. */
+	/* since we only have two TLBs, only lower bit is used. */
 	tlbsel = (vcpu_e500->mas4 >> 28) & 0x1;
 	victim = (tlbsel == 0) ? tlb0_get_next_victim(vcpu_e500) : 0;
 	pidsel = (vcpu_e500->mas4 >> 16) & 0xf;
@@ -402,7 +402,7 @@ int kvmppc_e500_emul_tlbivax(struct kvm_vcpu *vcpu, int ra, int rb)
 
 	ia = (ea >> 2) & 0x1;
 
-	/* since we only have tow TLBs, only lower bit is used. */
+	/* since we only have two TLBs, only lower bit is used. */
 	tlbsel = (ea >> 3) & 0x1;
 
 	if (ia) {
@@ -471,7 +471,7 @@ int kvmppc_e500_emul_tlbsx(struct kvm_vcpu *vcpu, int rb)
 	} else {
 		int victim;
 
-		/* since we only have tow TLBs, only lower bit is used. */
+		/* since we only have two TLBs, only lower bit is used. */
 		tlbsel = vcpu_e500->mas4 >> 28 & 0x1;
 		victim = (tlbsel == 0) ? tlb0_get_next_victim(vcpu_e500) : 0;
 
diff --git a/arch/powerpc/kvm/e500_tlb.h b/arch/powerpc/kvm/e500_tlb.h
index d8833f9..ab49e93 100644
--- a/arch/powerpc/kvm/e500_tlb.h
+++ b/arch/powerpc/kvm/e500_tlb.h
@@ -126,7 +126,7 @@ static inline unsigned int get_tlb_tlbsel(
 {
 	/*
 	 * Manual says that tlbsel has 2 bits wide.
-	 * Since we only have tow TLBs, only lower bit is used.
+	 * Since we only have two TLBs, only lower bit is used.
 	 */
 	return (vcpu_e500->mas0 >> 28) & 0x1;
 }
-- 
1.5.6.6


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] Subject: kvm: ppc: Move to new TLB invalidate interface
  2009-01-14 16:47 ` [PATCH 1/3] Subject: powerpc/fsl-booke: declare tlbcam_index for use in c Hollis Blanchard
  2009-01-14 16:47   ` [PATCH 2/3] Subject: kvm: ppc: Fix e500 warnings and some spelling problems Hollis Blanchard
@ 2009-01-14 16:47   ` Hollis Blanchard
  1 sibling, 0 replies; 6+ messages in thread
From: Hollis Blanchard @ 2009-01-14 16:47 UTC (permalink / raw)
  To: avi; +Cc: kvm, kvm-ppc, Liu Yu

From: Liu Yu <yu.liu@freescale.com>

Commit 2a4aca1144394653269720ffbb5a325a77abd5fa removed old method _tlbia().

Signed-off-by: Liu Yu <yu.liu@freescale.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
---
 arch/powerpc/kvm/e500_tlb.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c
index e3daf57..d437160 100644
--- a/arch/powerpc/kvm/e500_tlb.c
+++ b/arch/powerpc/kvm/e500_tlb.c
@@ -20,6 +20,7 @@
 #include <asm/kvm_ppc.h>
 #include <asm/kvm_e500.h>
 
+#include "../mm/mmu_decl.h"
 #include "e500_tlb.h"
 
 #define to_htlb1_esel(esel) (tlb1_entry_num - (esel) - 1)
@@ -158,7 +159,7 @@ void kvmppc_e500_tlb_load(struct kvm_vcpu *vcpu, int cpu)
 
 void kvmppc_e500_tlb_put(struct kvm_vcpu *vcpu)
 {
-	_tlbia();
+	_tlbil_all();
 }
 
 /* Search the guest TLB for a matching entry. */
@@ -362,11 +363,10 @@ void kvmppc_mmu_priv_switch(struct kvm_vcpu *vcpu, int usermode)
 		int i;
 
 		/* XXX Replace loop with fancy data structures. */
-		/* needn't set modified since tlbia will make TLB1 coherent */
 		for (i = 0; i < tlb1_max_shadow_size(); i++)
 			kvmppc_e500_stlbe_invalidate(vcpu_e500, 1, i);
 
-		_tlbia();
+		_tlbil_all();
 	}
 }
 
@@ -417,7 +417,7 @@ int kvmppc_e500_emul_tlbivax(struct kvm_vcpu *vcpu, int ra, int rb)
 			kvmppc_e500_gtlbe_invalidate(vcpu_e500, tlbsel, esel);
 	}
 
-	_tlbia();
+	_tlbil_all();
 
 	return EMULATE_DONE;
 }
@@ -604,7 +604,7 @@ void kvmppc_mmu_destroy(struct kvm_vcpu *vcpu)
 			kvmppc_e500_shadow_release(vcpu_e500, tlbsel, i);
 
 	/* discard all guest mapping */
-	_tlbia();
+	_tlbil_all();
 }
 
 void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 eaddr, gpa_t gpaddr,
-- 
1.5.6.6


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: e500 KVM build fixes for 2.6.29
       [not found] ` <1231951658-21108-1-git-send-email-hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
@ 2009-01-15  9:36   ` Avi Kivity
  2009-01-15 17:19     ` Hollis Blanchard
  0 siblings, 1 reply; 6+ messages in thread
From: Avi Kivity @ 2009-01-15  9:36 UTC (permalink / raw)
  To: Hollis Blanchard
  Cc: kvm-u79uwXL29TY76Z2rM5mHXA, kvm-ppc-u79uwXL29TY76Z2rM5mHXA

Hollis Blanchard wrote:
> Avi, these patches fix build issues in the new e500 code. Please apply for
> 2.6.29. Thanks!
>   

Applied for 2.6.30, but e500 isn't in 2.6.29?

-- 
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: e500 KVM build fixes for 2.6.29
  2009-01-15  9:36   ` e500 KVM build fixes for 2.6.29 Avi Kivity
@ 2009-01-15 17:19     ` Hollis Blanchard
  0 siblings, 0 replies; 6+ messages in thread
From: Hollis Blanchard @ 2009-01-15 17:19 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm, kvm-ppc

On Thu, 2009-01-15 at 11:36 +0200, Avi Kivity wrote:
> Hollis Blanchard wrote:
> > Avi, these patches fix build issues in the new e500 code. Please apply for
> > 2.6.29. Thanks!
> >   
> 
> Applied for 2.6.30, but e500 isn't in 2.6.29?

My mistake. Thanks!

-- 
Hollis Blanchard
IBM Linux Technology Center


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-01-15 17:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-14 16:47 e500 KVM build fixes for 2.6.29 Hollis Blanchard
2009-01-14 16:47 ` [PATCH 1/3] Subject: powerpc/fsl-booke: declare tlbcam_index for use in c Hollis Blanchard
2009-01-14 16:47   ` [PATCH 2/3] Subject: kvm: ppc: Fix e500 warnings and some spelling problems Hollis Blanchard
2009-01-14 16:47   ` [PATCH 3/3] Subject: kvm: ppc: Move to new TLB invalidate interface Hollis Blanchard
     [not found] ` <1231951658-21108-1-git-send-email-hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-01-15  9:36   ` e500 KVM build fixes for 2.6.29 Avi Kivity
2009-01-15 17:19     ` Hollis Blanchard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox