Patchwork [1/2] KVM/PPC: Fix PPC KVM e500_tlb.c build error

login
register
mail settings
Submitter yshi
Date July 2, 2009, 2:55 a.m.
Message ID <47a7508d4561874c1a052cebe1b7f42b19831393.1246502441.git.yang.shi@windriver.com>
Download mbox | patch
Permalink /patch/29383/
State Not Applicable
Headers show

Comments

yshi - July 2, 2009, 2:55 a.m.
Since include/asm/mmu-fsl-booke.h was replaced by include/asm/mmu-book3e.h,
fix e500_tlb.h to reflect the change and fix e500_tlb.c to align with the
new page size macro definition in include/asm/mmu-book3e.h.

Signed-off-by: Yang Shi <yang.shi@windriver.com>
---
 arch/powerpc/kvm/e500_tlb.c |    8 ++++----
 arch/powerpc/kvm/e500_tlb.h |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
Liu Yu-B13201 - July 2, 2009, 3:09 a.m.
This fix is already accepted in kvm.git 

> -----Original Message-----
> From: Yang Shi [mailto:yang.shi@windriver.com] 
> Sent: Thursday, July 02, 2009 10:55 AM
> To: Liu Yu-B13201; hollisb@us.ibm.com; avi@redhat.com
> Cc: kvm-ppc@vger.kernel.org; kvm@vger.kernel.org; 
> linuxppc-dev@ozlabs.org
> Subject: [PATCH 1/2] KVM/PPC: Fix PPC KVM e500_tlb.c build error
> 
> Since include/asm/mmu-fsl-booke.h was replaced by 
> include/asm/mmu-book3e.h,
> fix e500_tlb.h to reflect the change and fix e500_tlb.c to 
> align with the
> new page size macro definition in include/asm/mmu-book3e.h.
> 
> Signed-off-by: Yang Shi <yang.shi@windriver.com>
> ---
>  arch/powerpc/kvm/e500_tlb.c |    8 ++++----
>  arch/powerpc/kvm/e500_tlb.h |    2 +-
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c
> index 0e773fc..616762b 100644
> --- a/arch/powerpc/kvm/e500_tlb.c
> +++ b/arch/powerpc/kvm/e500_tlb.c
> @@ -309,7 +309,7 @@ static inline void 
> kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
>  	vcpu_e500->shadow_pages[tlbsel][esel] = new_page;
>  
>  	/* Force TS=1 IPROT=0 TSIZE=4KB for all guest mappings. */
> -	stlbe->mas1 = MAS1_TSIZE(BOOKE_PAGESZ_4K)
> +	stlbe->mas1 = MAS1_TSIZE(BOOK3E_PAGESZ_4K)
>  		| MAS1_TID(get_tlb_tid(gtlbe)) | MAS1_TS | MAS1_VALID;
>  	stlbe->mas2 = (gvaddr & MAS2_EPN)
>  		| e500_shadow_mas2_attrib(gtlbe->mas2,
> @@ -545,7 +545,7 @@ int kvmppc_e500_emul_tlbwe(struct kvm_vcpu *vcpu)
>  		case 0:
>  			/* TLB0 */
>  			gtlbe->mas1 &= ~MAS1_TSIZE(~0);
> -			gtlbe->mas1 |= MAS1_TSIZE(BOOKE_PAGESZ_4K);
> +			gtlbe->mas1 |= MAS1_TSIZE(BOOK3E_PAGESZ_4K);
>  
>  			stlbsel = 0;
>  			sesel = 
> kvmppc_e500_stlbe_map(vcpu_e500, 0, esel);
> @@ -679,14 +679,14 @@ void kvmppc_e500_tlb_setup(struct 
> kvmppc_vcpu_e500 *vcpu_e500)
>  
>  	/* Insert large initial mapping for guest. */
>  	tlbe = &vcpu_e500->guest_tlb[1][0];
> -	tlbe->mas1 = MAS1_VALID | MAS1_TSIZE(BOOKE_PAGESZ_256M);
> +	tlbe->mas1 = MAS1_VALID | MAS1_TSIZE(BOOK3E_PAGESZ_256M);
>  	tlbe->mas2 = 0;
>  	tlbe->mas3 = E500_TLB_SUPER_PERM_MASK;
>  	tlbe->mas7 = 0;
>  
>  	/* 4K map for serial output. Used by kernel wrapper. */
>  	tlbe = &vcpu_e500->guest_tlb[1][1];
> -	tlbe->mas1 = MAS1_VALID | MAS1_TSIZE(BOOKE_PAGESZ_4K);
> +	tlbe->mas1 = MAS1_VALID | MAS1_TSIZE(BOOK3E_PAGESZ_4K);
>  	tlbe->mas2 = (0xe0004500 & 0xFFFFF000) | MAS2_I | MAS2_G;
>  	tlbe->mas3 = (0xe0004500 & 0xFFFFF000) | 
> E500_TLB_SUPER_PERM_MASK;
>  	tlbe->mas7 = 0;
> diff --git a/arch/powerpc/kvm/e500_tlb.h b/arch/powerpc/kvm/e500_tlb.h
> index 45b064b..abb1bf8 100644
> --- a/arch/powerpc/kvm/e500_tlb.h
> +++ b/arch/powerpc/kvm/e500_tlb.h
> @@ -16,7 +16,7 @@
>  #define __KVM_E500_TLB_H__
>  
>  #include <linux/kvm_host.h>
> -#include <asm/mmu-fsl-booke.h>
> +#include <asm/mmu-book3e.h>
>  #include <asm/tlb.h>
>  #include <asm/kvm_e500.h>
>  
> -- 
> 1.6.0.4
> 
>
Avi Kivity - July 2, 2009, 11:19 a.m.
On 07/02/2009 06:09 AM, Liu Yu-B13201 wrote:
> This fix is already accepted in kvm.git
>    

What about the other?  Is it needed?
Liu Yu-B13201 - July 3, 2009, 1:35 a.m.
> -----Original Message-----
> From: Avi Kivity [mailto:avi@redhat.com] 
> Sent: Thursday, July 02, 2009 7:20 PM
> To: Liu Yu-B13201
> Cc: Yang Shi; hollisb@us.ibm.com; kvm-ppc@vger.kernel.org; 
> kvm@vger.kernel.org; linuxppc-dev@ozlabs.org
> Subject: Re: [PATCH 1/2] KVM/PPC: Fix PPC KVM e500_tlb.c build error
> 
> On 07/02/2009 06:09 AM, Liu Yu-B13201 wrote:
> > This fix is already accepted in kvm.git
> >    
> 
> What about the other?  Is it needed?
> 

No, it's already fixed by commit b57227e600f4ecc394d6ba3c2aaa558867b5addc.

Patch

diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c
index 0e773fc..616762b 100644
--- a/arch/powerpc/kvm/e500_tlb.c
+++ b/arch/powerpc/kvm/e500_tlb.c
@@ -309,7 +309,7 @@  static inline void kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
 	vcpu_e500->shadow_pages[tlbsel][esel] = new_page;
 
 	/* Force TS=1 IPROT=0 TSIZE=4KB for all guest mappings. */
-	stlbe->mas1 = MAS1_TSIZE(BOOKE_PAGESZ_4K)
+	stlbe->mas1 = MAS1_TSIZE(BOOK3E_PAGESZ_4K)
 		| MAS1_TID(get_tlb_tid(gtlbe)) | MAS1_TS | MAS1_VALID;
 	stlbe->mas2 = (gvaddr & MAS2_EPN)
 		| e500_shadow_mas2_attrib(gtlbe->mas2,
@@ -545,7 +545,7 @@  int kvmppc_e500_emul_tlbwe(struct kvm_vcpu *vcpu)
 		case 0:
 			/* TLB0 */
 			gtlbe->mas1 &= ~MAS1_TSIZE(~0);
-			gtlbe->mas1 |= MAS1_TSIZE(BOOKE_PAGESZ_4K);
+			gtlbe->mas1 |= MAS1_TSIZE(BOOK3E_PAGESZ_4K);
 
 			stlbsel = 0;
 			sesel = kvmppc_e500_stlbe_map(vcpu_e500, 0, esel);
@@ -679,14 +679,14 @@  void kvmppc_e500_tlb_setup(struct kvmppc_vcpu_e500 *vcpu_e500)
 
 	/* Insert large initial mapping for guest. */
 	tlbe = &vcpu_e500->guest_tlb[1][0];
-	tlbe->mas1 = MAS1_VALID | MAS1_TSIZE(BOOKE_PAGESZ_256M);
+	tlbe->mas1 = MAS1_VALID | MAS1_TSIZE(BOOK3E_PAGESZ_256M);
 	tlbe->mas2 = 0;
 	tlbe->mas3 = E500_TLB_SUPER_PERM_MASK;
 	tlbe->mas7 = 0;
 
 	/* 4K map for serial output. Used by kernel wrapper. */
 	tlbe = &vcpu_e500->guest_tlb[1][1];
-	tlbe->mas1 = MAS1_VALID | MAS1_TSIZE(BOOKE_PAGESZ_4K);
+	tlbe->mas1 = MAS1_VALID | MAS1_TSIZE(BOOK3E_PAGESZ_4K);
 	tlbe->mas2 = (0xe0004500 & 0xFFFFF000) | MAS2_I | MAS2_G;
 	tlbe->mas3 = (0xe0004500 & 0xFFFFF000) | E500_TLB_SUPER_PERM_MASK;
 	tlbe->mas7 = 0;
diff --git a/arch/powerpc/kvm/e500_tlb.h b/arch/powerpc/kvm/e500_tlb.h
index 45b064b..abb1bf8 100644
--- a/arch/powerpc/kvm/e500_tlb.h
+++ b/arch/powerpc/kvm/e500_tlb.h
@@ -16,7 +16,7 @@ 
 #define __KVM_E500_TLB_H__
 
 #include <linux/kvm_host.h>
-#include <asm/mmu-fsl-booke.h>
+#include <asm/mmu-book3e.h>
 #include <asm/tlb.h>
 #include <asm/kvm_e500.h>