From: Alexander Graf <agraf@suse.de>
To: kvm-ppc@vger.kernel.org
Cc: "kvm@vger.kernel.org mailing list" <kvm@vger.kernel.org>,
Gleb Natapov <gleb@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
Scott Wood <scottwood@freescale.com>
Subject: [PATCH 4/7] kvm/ppc/e500: h2g_tlb1_rmap: esel 0 is valid
Date: Fri, 22 Mar 2013 15:26:00 +0100 [thread overview]
Message-ID: <1363962363-7968-5-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1363962363-7968-1-git-send-email-agraf@suse.de>
From: Scott Wood <scottwood@freescale.com>
Add one to esel values in h2g_tlb1_rmap, so that "no mapping" can be
distinguished from "esel 0". Note that we're not saved by the fact
that host esel 0 is reserved for non-KVM use, because KVM host esel
numbering is not the raw host numbering (see to_htlb1_esel).
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
arch/powerpc/kvm/e500_mmu_host.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kvm/e500_mmu_host.c b/arch/powerpc/kvm/e500_mmu_host.c
index a222edf..35fb80e 100644
--- a/arch/powerpc/kvm/e500_mmu_host.c
+++ b/arch/powerpc/kvm/e500_mmu_host.c
@@ -511,10 +511,10 @@ static int kvmppc_e500_tlb1_map_tlb1(struct kvmppc_vcpu_e500 *vcpu_e500,
vcpu_e500->g2h_tlb1_map[esel] |= (u64)1 << sesel;
vcpu_e500->gtlb_priv[1][esel].ref.flags |= E500_TLB_BITMAP;
if (vcpu_e500->h2g_tlb1_rmap[sesel]) {
- unsigned int idx = vcpu_e500->h2g_tlb1_rmap[sesel];
+ unsigned int idx = vcpu_e500->h2g_tlb1_rmap[sesel] - 1;
vcpu_e500->g2h_tlb1_map[idx] &= ~(1ULL << sesel);
}
- vcpu_e500->h2g_tlb1_rmap[sesel] = esel;
+ vcpu_e500->h2g_tlb1_rmap[sesel] = esel + 1;
return sesel;
}
--
1.6.0.2
next prev parent reply other threads:[~2013-03-22 14:26 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-22 14:25 [PULL 0/7] ppc patch queue 2013-03-22 Alexander Graf
2013-03-22 14:25 ` [PATCH 1/7] KVM: PPC: move tsr update in a separate function Alexander Graf
2013-03-22 14:25 ` [PATCH 2/7] KVM: PPC: Added one_reg interface for timer registers Alexander Graf
2013-03-22 14:25 ` [PATCH 3/7] KVM: PPC: booke: Added debug handler Alexander Graf
2013-03-22 14:26 ` Alexander Graf [this message]
2013-03-22 14:26 ` [PATCH 5/7] kvm/ppc/e500: g2h_tlb1_map: clear old bit before setting new bit Alexander Graf
2013-03-22 14:26 ` [PATCH 6/7] kvm/ppc/e500: eliminate tlb_refs Alexander Graf
2013-03-22 14:26 ` [PATCH 7/7] KVM: PPC: Remove unused argument to kvmppc_core_dequeue_external Alexander Graf
2013-03-24 9:45 ` [PULL 0/7] ppc patch queue 2013-03-22 Gleb Natapov
2013-03-25 22:21 ` Scott Wood
2013-03-25 22:32 ` Alexander Graf
2013-03-25 22:54 ` Scott Wood
2013-03-25 22:59 ` Alexander Graf
2013-03-25 23:16 ` Scott Wood
2013-03-25 23:35 ` Alexander Graf
2013-03-26 1:33 ` Gleb Natapov
2013-03-26 1:59 ` Paul Mackerras
2013-04-11 13:45 ` Marcelo Tosatti
2013-04-11 13:50 ` Alexander Graf
2013-04-12 20:54 ` Marcelo Tosatti
2013-04-12 20:56 ` Alexander Graf
2013-04-16 17:26 ` Alexander Graf
2013-04-16 21:28 ` Marcelo Tosatti
2013-03-26 16:37 ` Scott Wood
2013-03-31 10:49 ` Gleb Natapov
2013-03-31 11:05 ` Alexander Graf
2013-04-08 18:17 ` Scott Wood
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=1363962363-7968-5-git-send-email-agraf@suse.de \
--to=agraf@suse.de \
--cc=gleb@redhat.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=scottwood@freescale.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox