* [PATCH] powerpc/kvm: is MAS6_SAS a mask or boolean?
@ 2009-05-15 18:48 Roel Kluin
2009-05-15 18:58 ` Hollis Blanchard
2009-05-19 5:00 ` Liu Yu-B13201
0 siblings, 2 replies; 3+ messages in thread
From: Roel Kluin @ 2009-05-15 18:48 UTC (permalink / raw)
To: kvm-ppc
MAS6_SAS is not a boolean.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
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.
diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c
index 0e773fc..5b0b198 100644
--- a/arch/powerpc/kvm/e500_tlb.c
+++ b/arch/powerpc/kvm/e500_tlb.c
@@ -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;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc/kvm: is MAS6_SAS a mask or boolean?
2009-05-15 18:48 [PATCH] powerpc/kvm: is MAS6_SAS a mask or boolean? Roel Kluin
@ 2009-05-15 18:58 ` Hollis Blanchard
2009-05-19 5:00 ` Liu Yu-B13201
1 sibling, 0 replies; 3+ messages in thread
From: Hollis Blanchard @ 2009-05-15 18:58 UTC (permalink / raw)
To: kvm-ppc
On Fri, 2009-05-15 at 20:48 +0200, Roel Kluin wrote:
> MAS6_SAS is not a boolean.
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> 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.
>
> diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c
> index 0e773fc..5b0b198 100644
> --- a/arch/powerpc/kvm/e500_tlb.c
> +++ b/arch/powerpc/kvm/e500_tlb.c
> @@ -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.
--
Hollis Blanchard
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] powerpc/kvm: is MAS6_SAS a mask or boolean?
2009-05-15 18:48 [PATCH] powerpc/kvm: is MAS6_SAS a mask or boolean? Roel Kluin
2009-05-15 18:58 ` Hollis Blanchard
@ 2009-05-19 5:00 ` Liu Yu-B13201
1 sibling, 0 replies; 3+ messages in thread
From: Liu Yu-B13201 @ 2009-05-19 5:00 UTC (permalink / raw)
To: kvm-ppc
> -----Original Message-----
> From: Hollis Blanchard [mailto:hollisb@us.ibm.com]
> Sent: Saturday, May 16, 2009 2:59 AM
> To: Roel Kluin
> Cc: kvm-ppc@vger.kernel.org; Andrew Morton; Liu Yu-B13201
> Subject: Re: [PATCH] powerpc/kvm: is MAS6_SAS a mask or boolean?
>
> On Fri, 2009-05-15 at 20:48 +0200, Roel Kluin wrote:
> > MAS6_SAS is not a boolean.
> >
> > Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> > ---
> > 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.
> >
> > diff --git a/arch/powerpc/kvm/e500_tlb.c
> b/arch/powerpc/kvm/e500_tlb.c
> > index 0e773fc..5b0b198 100644
> > --- a/arch/powerpc/kvm/e500_tlb.c
> > +++ b/arch/powerpc/kvm/e500_tlb.c
> > @@ -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.
>
Yes. It's correct.
Looks like this won't conflict with my current work.
Thanks.
Acked-by: Liu Yu <yu.liu@freescale.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-05-19 5:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-15 18:48 [PATCH] powerpc/kvm: is MAS6_SAS a mask or boolean? Roel Kluin
2009-05-15 18:58 ` Hollis Blanchard
2009-05-19 5:00 ` Liu Yu-B13201
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.