powerpc/kvm: is MAS6_SAS a mask or boolean?
Subsystems (2)
PATCH 1/1 powerpc/kvm: is MAS6_SAS a mask or boolean?
MAS6_SAS is not a boolean.
---MAS6_SAS is defined at arch/powerpc/include/asm/mmu-book3e.h:89:
#define MAS6_SAS 0x00000001
This looks like it's a mask rather than a boolean.
Is my patch below correct? please review.
arch/powerpc/kvm/e500_tlb.c +1 -1
@@ -498,7 +498,7 @@ int kvmppc_e500_emul_tlbsx(struct kvm_vcpu *vcpu, int rb) vcpu_e500->mas0 =MAS0_TLBSEL (tlbsel) |MAS0_ESEL (victim) |MAS0_NV (vcpu_e500->guest_tlb_nv[tlbsel]); vcpu_e500->mas1 = (vcpu_e500->mas6 &MAS6_SPID0 ) - | (vcpu_e500->mas6 & (MAS6_SAS ?MAS1_TS :0 )) + | (vcpu_e500->mas6 &MAS6_SAS ?MAS1_TS :0 ) | (vcpu_e500->mas4 &MAS4_TSIZED (~0 )); vcpu_e500->mas2 &=MAS2_EPN ; vcpu_e500->mas2 |= vcpu_e500->mas4 &MAS2_ATTRIB_MASK ;
Quoted 16 lines · Roel Kluin
MAS6_SASis not a boolean.Signed-off-by Roel Kluin <[email protected]>---
MAS6_SASis defined atarch/powerpc/include/asm/mmu-book3e.h:89:
#defineMAS6_SAS0x00000001This looks like it's a mask rather than a boolean.
Is my patch below correct? please review.
arch/powerpc/kvm/e500_tlb.c +0
-0
arch/powerpc/kvm/e500_tlb.c int kvmppc_e500_emul_tlbsx(struct kvm_vcpu *vcpu, int rb) · line 504
Quoted 8 lines
arch/powerpc/kvm/e500_tlb.c +1
-1@@ -498,7 +498,7 @@ int kvmppc_e500_emul_tlbsx(struct kvm_vcpu *vcpu, int rb) vcpu_e500->mas0 =MAS0_TLBSEL (tlbsel) |MAS0_ESEL (victim) |MAS0_NV (vcpu_e500->guest_tlb_nv[tlbsel]); vcpu_e500->mas1 = (vcpu_e500->mas6 &MAS6_SPID0 ) - | (vcpu_e500->mas6 & (MAS6_SAS ?MAS1_TS :0 )) + | (vcpu_e500->mas6 &MAS6_SAS ?MAS1_TS :0 ) | (vcpu_e500->mas4 &MAS4_TSIZED (~0 )); vcpu_e500->mas2 &=MAS2_EPN ; vcpu_e500->mas2 |= vcpu_e500->mas4 &MAS2_ATTRIB_MASK ;
This patch looks correct to me. I'll let Liu Yu (CCed) approve it though; it's his code and he has other outstanding patches in this area.
Signature · 2 lines
Hollis Blanchard IBM Linux Technology Center
Quoted 30 lines
-----Original Message-----
From: Hollis Blanchard [mailto:[email protected]]
Sent: Saturday, May 16, 2009 2:59 AM
To: Roel Kluin
Cc: [email protected]; Andrew Morton; Liu Yu-B13201
Subject: Re: [PATCH] powerpc/kvm: isMAS6_SASa mask or boolean?Quoted 7 lines · Roel Kluin
MAS6_SASis not a boolean.Signed-off-by Roel Kluin <[email protected]>---
MAS6_SASis defined atarch/powerpc/include/asm/mmu-book3e.h:89:
#defineMAS6_SAS0x00000001Review
Quoted 5 lines
This looks like it's a mask rather than a boolean.
Is my patch below correct? please review.
(quoted diff) +0
-0
b/arch/powerpc/kvm/e500_tlb.carch/powerpc/kvm/e500_tlb.c int kvmppc_e500_emul_tlbsx(struct
Quoted 4 lines
index 0e773fc..5b0b198 100644
arch/powerpc/kvm/e500_tlb.c +0
-0@@ -498,7 +498,7 @@ int kvmppc_e500_emul_tlbsx(struct
kvm_vcpu*vcpu, int rb)arch/powerpc/kvm/e500_tlb.c int kvmppc_e500_emul_tlbsx(struct · line 498
Quoted 1 line
arch/powerpc/kvm/e500_tlb.c +0
-0vcpu_e500->mas0 = MAS0_TLBSEL(tlbsel) |
MAS0_ESEL(victim)
Quoted 12 lines
arch/powerpc/kvm/e500_tlb.c int kvmppc_e500_emul_tlbsx(struct kvm_vcpu *vcpu, int rb) · line 504
Quoted 7 lines
arch/powerpc/kvm/e500_tlb.c +1
-1| MAS0_NV(vcpu_e500->guest_tlb_nv[tlbsel]); vcpu_e500->mas1 = (vcpu_e500->mas6 &MAS6_SPID0 ) - | (vcpu_e500->mas6 & (MAS6_SAS ?MAS1_TS :0 )) + | (vcpu_e500->mas6 &MAS6_SAS ?MAS1_TS :0 ) | (vcpu_e500->mas4 &MAS4_TSIZED (~0 )); vcpu_e500->mas2 &=MAS2_EPN ; vcpu_e500->mas2 |= vcpu_e500->mas4 &MAS2_ATTRIB_MASK ;This patch looks correct to me. I'll let Liu Yu (CCed) approve it though; it's his code and he has other outstanding patches in this area.
Yes. It's correct.
Looks like this won't conflict with my current work. Thanks.