From: Roel Kluin <roel.kluin@gmail.com>
To: kvm-ppc@vger.kernel.org
Subject: [PATCH] powerpc/kvm: is MAS6_SAS a mask or boolean?
Date: Fri, 15 May 2009 18:48:29 +0000 [thread overview]
Message-ID: <4A0DB8FD.3070604@gmail.com> (raw)
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;
next reply other threads:[~2009-05-15 18:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-15 18:48 Roel Kluin [this message]
2009-05-15 18:58 ` [PATCH] powerpc/kvm: is MAS6_SAS a mask or boolean? Hollis Blanchard
2009-05-19 5:00 ` Liu Yu-B13201
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A0DB8FD.3070604@gmail.com \
--to=roel.kluin@gmail.com \
--cc=kvm-ppc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.