All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: kvm@vger.kernel.org
Cc: Avi Kivity <avi@redhat.com>, kvm-ppc <kvm-ppc@vger.kernel.org>,
	Hollis Blanchard <hollisb@us.ibm.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Kevin Wolf <kwolf@redhat.com>,
	bphilips@suse.de, Marcelo Tosatti <mtosatti@redhat.com>
Subject: [PATCH 12/27] Add book3s_64 guest MMU
Date: Wed, 21 Oct 2009 17:03:18 +0200	[thread overview]
Message-ID: <1256137413-15256-13-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1256137413-15256-12-git-send-email-agraf@suse.de>

To be able to run a guest, we also need to implement a guest MMU.

This patch adds MMU handling for Book3s_64 guests.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 arch/powerpc/kvm/book3s_64_mmu.c |  469 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 469 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/kvm/book3s_64_mmu.c

diff --git a/arch/powerpc/kvm/book3s_64_mmu.c b/arch/powerpc/kvm/book3s_64_mmu.c
new file mode 100644
index 0000000..be9c846
--- /dev/null
+++ b/arch/powerpc/kvm/book3s_64_mmu.c
@@ -0,0 +1,469 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 2, as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ * Copyright SUSE Linux Products GmbH 2009
+ *
+ * Authors: Alexander Graf <agraf@suse.de>
+ */
+
+#include <linux/types.h>
+#include <linux/string.h>
+#include <linux/kvm.h>
+#include <linux/kvm_host.h>
+#include <linux/highmem.h>
+
+#include <asm/tlbflush.h>
+#include <asm/kvm_ppc.h>
+#include <asm/kvm_book3s.h>
+
+// #define DEBUG_MMU
+
+static void kvmppc_mmu_book3s_64_reset_msr(struct kvm_vcpu *vcpu)
+{
+	kvmppc_set_msr(vcpu, MSR_SF);
+}
+
+static struct kvmppc_slb *kvmppc_mmu_book3s_64_find_slbe(struct kvmppc_vcpu_book3s *vcpu_book3s,
+						   gva_t eaddr)
+{
+	int i;
+	u64 esid = GET_ESID(eaddr);
+	u64 esid_1t = GET_ESID_1T(eaddr);
+
+	for (i = 0; i < vcpu_book3s->slb_nr; i++) {
+		u64 cmp_esid = esid;
+
+		if (!vcpu_book3s->slb[i].valid)
+			continue;
+
+		if (vcpu_book3s->slb[i].large)
+			cmp_esid = esid_1t;
+
+		if (vcpu_book3s->slb[i].esid == cmp_esid)
+			return &vcpu_book3s->slb[i];
+	}
+
+#ifdef DEBUG_MMU
+	printk(KERN_ERR "KVM: No SLB entry found for 0x%lx [%llx | %llx]\n", eaddr, esid, esid_1t);
+	for (i = 0; i < vcpu_book3s->slb_nr; i++) {
+	    if (vcpu_book3s->slb[i].vsid)
+		printk(KERN_ERR "  %d: %c%c %llx %llx\n", i, vcpu_book3s->slb[i].valid ? 'v' : ' ',
+							vcpu_book3s->slb[i].large ? 'l' : ' ',
+							vcpu_book3s->slb[i].esid,
+							vcpu_book3s->slb[i].vsid);
+	}
+#endif
+
+	return NULL;
+}
+
+static u64 kvmppc_mmu_book3s_64_ea_to_vp(struct kvm_vcpu *vcpu, gva_t eaddr, bool data)
+{
+	struct kvmppc_slb *slb = kvmppc_mmu_book3s_64_find_slbe(to_book3s(vcpu), eaddr);
+
+	if (!slb)
+		return 0;
+
+	if (slb->large)
+		return (((u64)eaddr >> 12) & 0xfffffff) | (((u64)slb->vsid) << 28);
+
+	return (((u64)eaddr >> 12) & 0xffff) | (((u64)slb->vsid) << 16);
+}
+
+static int kvmppc_mmu_book3s_64_get_pagesize(struct kvmppc_slb *slbe)
+{
+	return slbe->large ? 24 : 12;
+}
+
+static u32 kvmppc_mmu_book3s_64_get_page(struct kvmppc_slb *slbe, gva_t eaddr)
+{
+	int p = kvmppc_mmu_book3s_64_get_pagesize(slbe);
+	return ((eaddr & 0xfffffff) >> p);
+}
+
+static hva_t kvmppc_mmu_book3s_64_get_pteg(struct kvmppc_vcpu_book3s *vcpu_book3s,
+				     struct kvmppc_slb *slbe, gva_t eaddr,
+				     bool second)
+{
+	u64 hash, pteg, htabsize;
+	u32 page;
+	hva_t r;
+
+	page = kvmppc_mmu_book3s_64_get_page(slbe, eaddr);
+	htabsize = ((1 << ((vcpu_book3s->sdr1 & 0x1f) + 11)) - 1);
+
+	hash = slbe->vsid ^ page;
+	if (second)
+		hash = ~hash;
+	hash &= ((1ULL << 39ULL) - 1ULL);
+	hash &= htabsize;
+	hash <<= 7ULL;
+
+	pteg = vcpu_book3s->sdr1 & 0xfffffffffffc0000ULL;
+	pteg |= hash;
+
+#ifdef DEBUG_MMU
+	printk(KERN_INFO "MMU: page=0x%x sdr1=0x%llx pteg=0x%llx vsid=0x%llx\n", page, vcpu_book3s->sdr1, pteg, slbe->vsid);
+#endif
+
+	r = gfn_to_hva(vcpu_book3s->vcpu.kvm, pteg >> PAGE_SHIFT);
+	if (kvm_is_error_hva(r))
+		return r;
+	return r | (pteg & ~PAGE_MASK);
+}
+
+static u64 kvmppc_mmu_book3s_64_get_avpn(struct kvmppc_slb *slbe, gva_t eaddr)
+{
+	int p = kvmppc_mmu_book3s_64_get_pagesize(slbe);
+	u64 avpn;
+
+	avpn = kvmppc_mmu_book3s_64_get_page(slbe, eaddr);
+	avpn |= slbe->vsid << (28 - p);
+
+	if (p < 24)
+		avpn >>= ((80 - p) - 56) - 8;
+	else
+		avpn <<= 8;
+
+	return avpn;
+}
+
+static int kvmppc_mmu_book3s_64_xlate(struct kvm_vcpu *vcpu, gva_t eaddr,
+				struct kvmppc_pte *gpte, bool data)
+{
+	struct kvmppc_vcpu_book3s *vcpu_book3s = to_book3s(vcpu);
+	struct kvmppc_slb *slbe;
+	hva_t ptegp;
+	u64 pteg[16];
+	u64 avpn = 0;
+	int i;
+	u8 key = 0;
+	bool found = false;
+	bool perm_err = false;
+	int second = 0;
+
+	slbe = kvmppc_mmu_book3s_64_find_slbe(vcpu_book3s, eaddr);
+	if (!slbe)
+		goto no_seg_found;
+
+do_second:
+	ptegp = kvmppc_mmu_book3s_64_get_pteg(vcpu_book3s, slbe, eaddr, second);
+	if (kvm_is_error_hva(ptegp))
+		goto no_page_found;
+
+	avpn = kvmppc_mmu_book3s_64_get_avpn(slbe, eaddr);
+
+	if(copy_from_user(pteg, (void __user *)ptegp, sizeof(pteg))) {
+		printk(KERN_ERR "KVM can't copy data from 0x%lx!\n", ptegp);
+		goto no_page_found;
+	}
+
+	if ((vcpu->arch.msr & MSR_PR) && slbe->Kp)
+		key = 4;
+	else if (!(vcpu->arch.msr & MSR_PR) && slbe->Ks)
+		key = 4;
+
+	for (i=0; i<16; i+=2) {
+		u64 v = pteg[i];
+		u64 r = pteg[i+1];
+
+		// Valid check
+		if (!(v & HPTE_V_VALID))
+			continue;
+		// Hash check
+		if ((v & HPTE_V_SECONDARY) != second)
+			continue;
+
+		// AVPN compare
+		if (HPTE_V_AVPN_VAL(avpn) == HPTE_V_AVPN_VAL(v)) {
+			u8 pp = (r & HPTE_R_PP) | key;
+			int eaddr_mask = 0xFFF;
+
+			gpte->eaddr = eaddr;
+			gpte->vpage = kvmppc_mmu_book3s_64_ea_to_vp(vcpu, eaddr, data);
+			if (slbe->large)
+				eaddr_mask = 0xFFFFFF;
+			gpte->raddr = (r & HPTE_R_RPN) | (eaddr & eaddr_mask);
+			gpte->may_execute = ((r & HPTE_R_N) ? false : true);
+			gpte->may_read = false;
+			gpte->may_write = false;
+
+			switch (pp) {
+			case 0:
+			case 1:
+			case 2:
+			case 6:
+				gpte->may_write = true;
+				/* fall through */
+			case 3:
+			case 5:
+			case 7:
+				gpte->may_read = true;
+				break;
+			}
+
+			if (!gpte->may_read) {
+				perm_err = true;
+				continue;
+			}
+#ifdef DEBUG_MMU
+			printk(KERN_ERR "KVM MMU: Translated 0x%lx [0x%llx] -> 0x%llx -> 0x%llx\n",
+					eaddr, avpn, gpte->vpage, gpte->raddr);
+#endif
+			found = true;
+			break;
+		}
+	}
+
+	// Update PTE R and C bits, so the guest's swapper knows we used the page
+	if (found) {
+		u32 oldr = pteg[i+1];
+
+		if (gpte->may_read)
+			pteg[i+1] |= HPTE_R_R; // Accessed flag
+		if (gpte->may_write)
+			pteg[i+1] |= HPTE_R_C; // Dirty flag
+#ifdef DEBUG_MMU_PTE
+		else
+			printk(KERN_INFO "KVM: Mapping read-only page!\n");
+#endif
+
+		// Write back into the PTEG
+		if (pteg[i+1] != oldr)
+			copy_to_user((void __user *)ptegp, pteg, sizeof(pteg));
+
+		return 0;
+	} else {
+#ifdef DEBUG_MMU
+		printk(KERN_ERR "KVM MMU: No PTE found (ea=0x%lx sdr1=0x%llx ptegp=0x%lx)\n",
+				eaddr, to_book3s(vcpu)->sdr1, ptegp);
+		for (i=0; i<16; i+=2)
+			printk(KERN_ERR "   %02d: 0x%llx - 0x%llx (0x%llx)\n",
+					i, pteg[i], pteg[i+1], avpn);
+#endif
+
+		if (!second) {
+			second = HPTE_V_SECONDARY;
+			goto do_second;
+		}
+	}
+
+
+no_page_found:
+
+
+	if (perm_err)
+		return -EPERM;
+
+	return -ENOENT;
+
+no_seg_found:
+
+#ifdef DEBUG_MMU
+	printk(KERN_ERR "KVM MMU: Trigger segment fault\n");
+#endif
+	return -EINVAL;
+}
+
+static void kvmppc_mmu_book3s_64_slbmte(struct kvm_vcpu *vcpu, u64 rs, u64 rb)
+{
+	struct kvmppc_vcpu_book3s *vcpu_book3s;
+	u64 esid, esid_1t;
+	int slb_nr;
+	struct kvmppc_slb *slbe;
+
+#ifdef DEBUG_MMU
+	printk(KERN_ERR "KVM MMU: slbmte(0x%llx, 0x%llx)\n", rs, rb);
+#endif
+
+	vcpu_book3s = to_book3s(vcpu);
+
+	esid = GET_ESID(rb);
+	esid_1t = GET_ESID_1T(rb);
+	slb_nr = rb & 0xfff;
+
+	if (slb_nr > vcpu_book3s->slb_nr)
+		return;
+
+	slbe = &vcpu_book3s->slb[slb_nr];
+
+	slbe->large = (rs & SLB_VSID_L) ? 1 : 0;
+	slbe->esid  = slbe->large ? esid_1t : esid;
+	slbe->vsid  = rs >> 12;
+	slbe->valid = (rb & SLB_ESID_V) ? 1 : 0;
+	slbe->Ks    = (rs & SLB_VSID_KS) ? 1 : 0;
+	slbe->Kp    = (rs & SLB_VSID_KP) ? 1 : 0;
+	slbe->nx    = (rs & SLB_VSID_N) ? 1 : 0;
+	slbe->class = (rs & SLB_VSID_C) ? 1 : 0;
+
+	slbe->orige = rb & (ESID_MASK | SLB_ESID_V);
+	slbe->origv = rs;
+
+	/* Map the new segment */
+	kvmppc_mmu_map_segment(vcpu, esid << SID_SHIFT);
+}
+
+static u64 kvmppc_mmu_book3s_64_slbmfee(struct kvm_vcpu *vcpu, u64 slb_nr)
+{
+	struct kvmppc_vcpu_book3s *vcpu_book3s = to_book3s(vcpu);
+	struct kvmppc_slb *slbe;
+
+	if (slb_nr > vcpu_book3s->slb_nr)
+		return 0;
+
+	slbe = &vcpu_book3s->slb[slb_nr];
+
+	return slbe->orige;
+}
+
+static u64 kvmppc_mmu_book3s_64_slbmfev(struct kvm_vcpu *vcpu, u64 slb_nr)
+{
+	struct kvmppc_vcpu_book3s *vcpu_book3s = to_book3s(vcpu);
+	struct kvmppc_slb *slbe;
+
+	if (slb_nr > vcpu_book3s->slb_nr)
+		return 0;
+
+	slbe = &vcpu_book3s->slb[slb_nr];
+
+	return slbe->origv;
+}
+
+static void kvmppc_mmu_book3s_64_slbie(struct kvm_vcpu *vcpu, u64 ea)
+{
+	struct kvmppc_vcpu_book3s *vcpu_book3s = to_book3s(vcpu);
+	struct kvmppc_slb *slbe;
+
+#ifdef DEBUG_MMU
+	printk(KERN_ERR "KVM MMU: slbie(0x%llx)\n", ea);
+#endif
+
+	slbe = kvmppc_mmu_book3s_64_find_slbe(vcpu_book3s, ea);
+
+	if (!slbe)
+		return;
+
+#ifdef DEBUG_MMU
+	printk(KERN_ERR "KVM MMU: slbie(0x%llx, 0x%llx)\n", ea, slbe->esid);
+#endif
+
+	slbe->valid = false;
+
+	kvmppc_mmu_map_segment(vcpu, ea);
+}
+
+static void kvmppc_mmu_book3s_64_slbia(struct kvm_vcpu *vcpu)
+{
+	struct kvmppc_vcpu_book3s *vcpu_book3s = to_book3s(vcpu);
+	int i;
+
+#ifdef DEBUG_MMU
+	printk(KERN_ERR "KVM MMU: slbia()\n");
+#endif
+	for (i = 1; i < vcpu_book3s->slb_nr; i++)
+		vcpu_book3s->slb[i].valid = false;
+
+	if (vcpu->arch.msr & MSR_IR) {
+		kvmppc_mmu_flush_segments(vcpu);
+		kvmppc_mmu_map_segment(vcpu, vcpu->arch.pc);
+	}
+}
+
+static void kvmppc_mmu_book3s_64_mtsrin(struct kvm_vcpu *vcpu, u32 srnum, ulong value)
+{
+	u64 rb = 0, rs = 0;
+
+	/* ESID = srnum */
+	rb |= (srnum & 0xf) << 28;
+	/* Set the valid bit */
+	rb |= 1 << 27;
+	/* Index = ESID */
+	rb |= srnum;
+
+	/* VSID = VSID */
+	rs |= (value & 0xfffffff) << 12;
+	/* flags = flags */
+	rs |= ((value >> 27) & 0xf) << 9;
+
+	kvmppc_mmu_book3s_64_slbmte(vcpu, rs, rb);
+}
+
+static void kvmppc_mmu_book3s_64_tlbie(struct kvm_vcpu *vcpu, ulong va, bool large)
+{
+	u64 mask = 0xFFFFFFFFFULL;
+#ifdef DEBUG_MMU
+	printk(KERN_ERR "KVM MMU: tlbie(0x%lx)\n", va);
+#endif
+	if (large)
+		mask = 0xFFFFFF000ULL;
+	kvmppc_mmu_pte_vflush(vcpu, va >> 12, mask);
+}
+
+static int kvmppc_mmu_book3s_64_esid_to_vsid(struct kvm_vcpu *vcpu, u64 esid,
+					     u64 *vsid)
+{
+	switch (vcpu->arch.msr & (MSR_DR|MSR_IR)) {
+	case 0:
+		*vsid = (VSID_REAL >> 16) | esid;
+		break;
+	case MSR_IR:
+		*vsid = (VSID_REAL_IR >> 16) | esid;
+		break;
+	case MSR_DR:
+		*vsid = (VSID_REAL_DR >> 16) | esid;
+		break;
+	case MSR_DR|MSR_IR:
+	{
+		ulong ea;
+		struct kvmppc_slb *slb;
+		ea = esid << SID_SHIFT;
+		slb = kvmppc_mmu_book3s_64_find_slbe(to_book3s(vcpu), ea);
+		if (slb)
+			*vsid = slb->vsid;
+		else
+			return -ENOENT;
+
+		break;
+	}
+	default:
+		BUG();
+		break;
+	}
+
+	return 0;
+}
+
+static bool kvmppc_mmu_book3s_64_is_dcbz32(struct kvm_vcpu *vcpu)
+{
+	return (to_book3s(vcpu)->hid[5] & 0x80);
+}
+
+void kvmppc_mmu_book3s_64_init(struct kvm_vcpu *vcpu)
+{
+	struct kvmppc_mmu *mmu = &vcpu->arch.mmu;
+
+	mmu->mfsrin = NULL;
+	mmu->mtsrin = kvmppc_mmu_book3s_64_mtsrin;
+	mmu->slbmte = kvmppc_mmu_book3s_64_slbmte;
+	mmu->slbmfee = kvmppc_mmu_book3s_64_slbmfee;
+	mmu->slbmfev = kvmppc_mmu_book3s_64_slbmfev;
+	mmu->slbie = kvmppc_mmu_book3s_64_slbie;
+	mmu->slbia = kvmppc_mmu_book3s_64_slbia;
+	mmu->xlate = kvmppc_mmu_book3s_64_xlate;
+	mmu->reset_msr = kvmppc_mmu_book3s_64_reset_msr;
+	mmu->tlbie = kvmppc_mmu_book3s_64_tlbie;
+	mmu->esid_to_vsid = kvmppc_mmu_book3s_64_esid_to_vsid;
+	mmu->ea_to_vp = kvmppc_mmu_book3s_64_ea_to_vp;
+	mmu->is_dcbz32 = kvmppc_mmu_book3s_64_is_dcbz32;
+}
-- 
1.6.0.2


WARNING: multiple messages have this Message-ID (diff)
From: Alexander Graf <agraf@suse.de>
To: kvm@vger.kernel.org
Cc: Avi Kivity <avi@redhat.com>, kvm-ppc <kvm-ppc@vger.kernel.org>,
	Hollis Blanchard <hollisb@us.ibm.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Kevin Wolf <kwolf@redhat.com>,
	bphilips@suse.de, Marcelo Tosatti <mtosatti@redhat.com>
Subject: [PATCH 12/27] Add book3s_64 guest MMU
Date: Wed, 21 Oct 2009 15:03:18 +0000	[thread overview]
Message-ID: <1256137413-15256-13-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1256137413-15256-12-git-send-email-agraf@suse.de>

To be able to run a guest, we also need to implement a guest MMU.

This patch adds MMU handling for Book3s_64 guests.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 arch/powerpc/kvm/book3s_64_mmu.c |  469 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 469 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/kvm/book3s_64_mmu.c

diff --git a/arch/powerpc/kvm/book3s_64_mmu.c b/arch/powerpc/kvm/book3s_64_mmu.c
new file mode 100644
index 0000000..be9c846
--- /dev/null
+++ b/arch/powerpc/kvm/book3s_64_mmu.c
@@ -0,0 +1,469 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 2, as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ * Copyright SUSE Linux Products GmbH 2009
+ *
+ * Authors: Alexander Graf <agraf@suse.de>
+ */
+
+#include <linux/types.h>
+#include <linux/string.h>
+#include <linux/kvm.h>
+#include <linux/kvm_host.h>
+#include <linux/highmem.h>
+
+#include <asm/tlbflush.h>
+#include <asm/kvm_ppc.h>
+#include <asm/kvm_book3s.h>
+
+// #define DEBUG_MMU
+
+static void kvmppc_mmu_book3s_64_reset_msr(struct kvm_vcpu *vcpu)
+{
+	kvmppc_set_msr(vcpu, MSR_SF);
+}
+
+static struct kvmppc_slb *kvmppc_mmu_book3s_64_find_slbe(struct kvmppc_vcpu_book3s *vcpu_book3s,
+						   gva_t eaddr)
+{
+	int i;
+	u64 esid = GET_ESID(eaddr);
+	u64 esid_1t = GET_ESID_1T(eaddr);
+
+	for (i = 0; i < vcpu_book3s->slb_nr; i++) {
+		u64 cmp_esid = esid;
+
+		if (!vcpu_book3s->slb[i].valid)
+			continue;
+
+		if (vcpu_book3s->slb[i].large)
+			cmp_esid = esid_1t;
+
+		if (vcpu_book3s->slb[i].esid = cmp_esid)
+			return &vcpu_book3s->slb[i];
+	}
+
+#ifdef DEBUG_MMU
+	printk(KERN_ERR "KVM: No SLB entry found for 0x%lx [%llx | %llx]\n", eaddr, esid, esid_1t);
+	for (i = 0; i < vcpu_book3s->slb_nr; i++) {
+	    if (vcpu_book3s->slb[i].vsid)
+		printk(KERN_ERR "  %d: %c%c %llx %llx\n", i, vcpu_book3s->slb[i].valid ? 'v' : ' ',
+							vcpu_book3s->slb[i].large ? 'l' : ' ',
+							vcpu_book3s->slb[i].esid,
+							vcpu_book3s->slb[i].vsid);
+	}
+#endif
+
+	return NULL;
+}
+
+static u64 kvmppc_mmu_book3s_64_ea_to_vp(struct kvm_vcpu *vcpu, gva_t eaddr, bool data)
+{
+	struct kvmppc_slb *slb = kvmppc_mmu_book3s_64_find_slbe(to_book3s(vcpu), eaddr);
+
+	if (!slb)
+		return 0;
+
+	if (slb->large)
+		return (((u64)eaddr >> 12) & 0xfffffff) | (((u64)slb->vsid) << 28);
+
+	return (((u64)eaddr >> 12) & 0xffff) | (((u64)slb->vsid) << 16);
+}
+
+static int kvmppc_mmu_book3s_64_get_pagesize(struct kvmppc_slb *slbe)
+{
+	return slbe->large ? 24 : 12;
+}
+
+static u32 kvmppc_mmu_book3s_64_get_page(struct kvmppc_slb *slbe, gva_t eaddr)
+{
+	int p = kvmppc_mmu_book3s_64_get_pagesize(slbe);
+	return ((eaddr & 0xfffffff) >> p);
+}
+
+static hva_t kvmppc_mmu_book3s_64_get_pteg(struct kvmppc_vcpu_book3s *vcpu_book3s,
+				     struct kvmppc_slb *slbe, gva_t eaddr,
+				     bool second)
+{
+	u64 hash, pteg, htabsize;
+	u32 page;
+	hva_t r;
+
+	page = kvmppc_mmu_book3s_64_get_page(slbe, eaddr);
+	htabsize = ((1 << ((vcpu_book3s->sdr1 & 0x1f) + 11)) - 1);
+
+	hash = slbe->vsid ^ page;
+	if (second)
+		hash = ~hash;
+	hash &= ((1ULL << 39ULL) - 1ULL);
+	hash &= htabsize;
+	hash <<= 7ULL;
+
+	pteg = vcpu_book3s->sdr1 & 0xfffffffffffc0000ULL;
+	pteg |= hash;
+
+#ifdef DEBUG_MMU
+	printk(KERN_INFO "MMU: page=0x%x sdr1=0x%llx pteg=0x%llx vsid=0x%llx\n", page, vcpu_book3s->sdr1, pteg, slbe->vsid);
+#endif
+
+	r = gfn_to_hva(vcpu_book3s->vcpu.kvm, pteg >> PAGE_SHIFT);
+	if (kvm_is_error_hva(r))
+		return r;
+	return r | (pteg & ~PAGE_MASK);
+}
+
+static u64 kvmppc_mmu_book3s_64_get_avpn(struct kvmppc_slb *slbe, gva_t eaddr)
+{
+	int p = kvmppc_mmu_book3s_64_get_pagesize(slbe);
+	u64 avpn;
+
+	avpn = kvmppc_mmu_book3s_64_get_page(slbe, eaddr);
+	avpn |= slbe->vsid << (28 - p);
+
+	if (p < 24)
+		avpn >>= ((80 - p) - 56) - 8;
+	else
+		avpn <<= 8;
+
+	return avpn;
+}
+
+static int kvmppc_mmu_book3s_64_xlate(struct kvm_vcpu *vcpu, gva_t eaddr,
+				struct kvmppc_pte *gpte, bool data)
+{
+	struct kvmppc_vcpu_book3s *vcpu_book3s = to_book3s(vcpu);
+	struct kvmppc_slb *slbe;
+	hva_t ptegp;
+	u64 pteg[16];
+	u64 avpn = 0;
+	int i;
+	u8 key = 0;
+	bool found = false;
+	bool perm_err = false;
+	int second = 0;
+
+	slbe = kvmppc_mmu_book3s_64_find_slbe(vcpu_book3s, eaddr);
+	if (!slbe)
+		goto no_seg_found;
+
+do_second:
+	ptegp = kvmppc_mmu_book3s_64_get_pteg(vcpu_book3s, slbe, eaddr, second);
+	if (kvm_is_error_hva(ptegp))
+		goto no_page_found;
+
+	avpn = kvmppc_mmu_book3s_64_get_avpn(slbe, eaddr);
+
+	if(copy_from_user(pteg, (void __user *)ptegp, sizeof(pteg))) {
+		printk(KERN_ERR "KVM can't copy data from 0x%lx!\n", ptegp);
+		goto no_page_found;
+	}
+
+	if ((vcpu->arch.msr & MSR_PR) && slbe->Kp)
+		key = 4;
+	else if (!(vcpu->arch.msr & MSR_PR) && slbe->Ks)
+		key = 4;
+
+	for (i=0; i<16; i+=2) {
+		u64 v = pteg[i];
+		u64 r = pteg[i+1];
+
+		// Valid check
+		if (!(v & HPTE_V_VALID))
+			continue;
+		// Hash check
+		if ((v & HPTE_V_SECONDARY) != second)
+			continue;
+
+		// AVPN compare
+		if (HPTE_V_AVPN_VAL(avpn) = HPTE_V_AVPN_VAL(v)) {
+			u8 pp = (r & HPTE_R_PP) | key;
+			int eaddr_mask = 0xFFF;
+
+			gpte->eaddr = eaddr;
+			gpte->vpage = kvmppc_mmu_book3s_64_ea_to_vp(vcpu, eaddr, data);
+			if (slbe->large)
+				eaddr_mask = 0xFFFFFF;
+			gpte->raddr = (r & HPTE_R_RPN) | (eaddr & eaddr_mask);
+			gpte->may_execute = ((r & HPTE_R_N) ? false : true);
+			gpte->may_read = false;
+			gpte->may_write = false;
+
+			switch (pp) {
+			case 0:
+			case 1:
+			case 2:
+			case 6:
+				gpte->may_write = true;
+				/* fall through */
+			case 3:
+			case 5:
+			case 7:
+				gpte->may_read = true;
+				break;
+			}
+
+			if (!gpte->may_read) {
+				perm_err = true;
+				continue;
+			}
+#ifdef DEBUG_MMU
+			printk(KERN_ERR "KVM MMU: Translated 0x%lx [0x%llx] -> 0x%llx -> 0x%llx\n",
+					eaddr, avpn, gpte->vpage, gpte->raddr);
+#endif
+			found = true;
+			break;
+		}
+	}
+
+	// Update PTE R and C bits, so the guest's swapper knows we used the page
+	if (found) {
+		u32 oldr = pteg[i+1];
+
+		if (gpte->may_read)
+			pteg[i+1] |= HPTE_R_R; // Accessed flag
+		if (gpte->may_write)
+			pteg[i+1] |= HPTE_R_C; // Dirty flag
+#ifdef DEBUG_MMU_PTE
+		else
+			printk(KERN_INFO "KVM: Mapping read-only page!\n");
+#endif
+
+		// Write back into the PTEG
+		if (pteg[i+1] != oldr)
+			copy_to_user((void __user *)ptegp, pteg, sizeof(pteg));
+
+		return 0;
+	} else {
+#ifdef DEBUG_MMU
+		printk(KERN_ERR "KVM MMU: No PTE found (ea=0x%lx sdr1=0x%llx ptegp=0x%lx)\n",
+				eaddr, to_book3s(vcpu)->sdr1, ptegp);
+		for (i=0; i<16; i+=2)
+			printk(KERN_ERR "   %02d: 0x%llx - 0x%llx (0x%llx)\n",
+					i, pteg[i], pteg[i+1], avpn);
+#endif
+
+		if (!second) {
+			second = HPTE_V_SECONDARY;
+			goto do_second;
+		}
+	}
+
+
+no_page_found:
+
+
+	if (perm_err)
+		return -EPERM;
+
+	return -ENOENT;
+
+no_seg_found:
+
+#ifdef DEBUG_MMU
+	printk(KERN_ERR "KVM MMU: Trigger segment fault\n");
+#endif
+	return -EINVAL;
+}
+
+static void kvmppc_mmu_book3s_64_slbmte(struct kvm_vcpu *vcpu, u64 rs, u64 rb)
+{
+	struct kvmppc_vcpu_book3s *vcpu_book3s;
+	u64 esid, esid_1t;
+	int slb_nr;
+	struct kvmppc_slb *slbe;
+
+#ifdef DEBUG_MMU
+	printk(KERN_ERR "KVM MMU: slbmte(0x%llx, 0x%llx)\n", rs, rb);
+#endif
+
+	vcpu_book3s = to_book3s(vcpu);
+
+	esid = GET_ESID(rb);
+	esid_1t = GET_ESID_1T(rb);
+	slb_nr = rb & 0xfff;
+
+	if (slb_nr > vcpu_book3s->slb_nr)
+		return;
+
+	slbe = &vcpu_book3s->slb[slb_nr];
+
+	slbe->large = (rs & SLB_VSID_L) ? 1 : 0;
+	slbe->esid  = slbe->large ? esid_1t : esid;
+	slbe->vsid  = rs >> 12;
+	slbe->valid = (rb & SLB_ESID_V) ? 1 : 0;
+	slbe->Ks    = (rs & SLB_VSID_KS) ? 1 : 0;
+	slbe->Kp    = (rs & SLB_VSID_KP) ? 1 : 0;
+	slbe->nx    = (rs & SLB_VSID_N) ? 1 : 0;
+	slbe->class = (rs & SLB_VSID_C) ? 1 : 0;
+
+	slbe->orige = rb & (ESID_MASK | SLB_ESID_V);
+	slbe->origv = rs;
+
+	/* Map the new segment */
+	kvmppc_mmu_map_segment(vcpu, esid << SID_SHIFT);
+}
+
+static u64 kvmppc_mmu_book3s_64_slbmfee(struct kvm_vcpu *vcpu, u64 slb_nr)
+{
+	struct kvmppc_vcpu_book3s *vcpu_book3s = to_book3s(vcpu);
+	struct kvmppc_slb *slbe;
+
+	if (slb_nr > vcpu_book3s->slb_nr)
+		return 0;
+
+	slbe = &vcpu_book3s->slb[slb_nr];
+
+	return slbe->orige;
+}
+
+static u64 kvmppc_mmu_book3s_64_slbmfev(struct kvm_vcpu *vcpu, u64 slb_nr)
+{
+	struct kvmppc_vcpu_book3s *vcpu_book3s = to_book3s(vcpu);
+	struct kvmppc_slb *slbe;
+
+	if (slb_nr > vcpu_book3s->slb_nr)
+		return 0;
+
+	slbe = &vcpu_book3s->slb[slb_nr];
+
+	return slbe->origv;
+}
+
+static void kvmppc_mmu_book3s_64_slbie(struct kvm_vcpu *vcpu, u64 ea)
+{
+	struct kvmppc_vcpu_book3s *vcpu_book3s = to_book3s(vcpu);
+	struct kvmppc_slb *slbe;
+
+#ifdef DEBUG_MMU
+	printk(KERN_ERR "KVM MMU: slbie(0x%llx)\n", ea);
+#endif
+
+	slbe = kvmppc_mmu_book3s_64_find_slbe(vcpu_book3s, ea);
+
+	if (!slbe)
+		return;
+
+#ifdef DEBUG_MMU
+	printk(KERN_ERR "KVM MMU: slbie(0x%llx, 0x%llx)\n", ea, slbe->esid);
+#endif
+
+	slbe->valid = false;
+
+	kvmppc_mmu_map_segment(vcpu, ea);
+}
+
+static void kvmppc_mmu_book3s_64_slbia(struct kvm_vcpu *vcpu)
+{
+	struct kvmppc_vcpu_book3s *vcpu_book3s = to_book3s(vcpu);
+	int i;
+
+#ifdef DEBUG_MMU
+	printk(KERN_ERR "KVM MMU: slbia()\n");
+#endif
+	for (i = 1; i < vcpu_book3s->slb_nr; i++)
+		vcpu_book3s->slb[i].valid = false;
+
+	if (vcpu->arch.msr & MSR_IR) {
+		kvmppc_mmu_flush_segments(vcpu);
+		kvmppc_mmu_map_segment(vcpu, vcpu->arch.pc);
+	}
+}
+
+static void kvmppc_mmu_book3s_64_mtsrin(struct kvm_vcpu *vcpu, u32 srnum, ulong value)
+{
+	u64 rb = 0, rs = 0;
+
+	/* ESID = srnum */
+	rb |= (srnum & 0xf) << 28;
+	/* Set the valid bit */
+	rb |= 1 << 27;
+	/* Index = ESID */
+	rb |= srnum;
+
+	/* VSID = VSID */
+	rs |= (value & 0xfffffff) << 12;
+	/* flags = flags */
+	rs |= ((value >> 27) & 0xf) << 9;
+
+	kvmppc_mmu_book3s_64_slbmte(vcpu, rs, rb);
+}
+
+static void kvmppc_mmu_book3s_64_tlbie(struct kvm_vcpu *vcpu, ulong va, bool large)
+{
+	u64 mask = 0xFFFFFFFFFULL;
+#ifdef DEBUG_MMU
+	printk(KERN_ERR "KVM MMU: tlbie(0x%lx)\n", va);
+#endif
+	if (large)
+		mask = 0xFFFFFF000ULL;
+	kvmppc_mmu_pte_vflush(vcpu, va >> 12, mask);
+}
+
+static int kvmppc_mmu_book3s_64_esid_to_vsid(struct kvm_vcpu *vcpu, u64 esid,
+					     u64 *vsid)
+{
+	switch (vcpu->arch.msr & (MSR_DR|MSR_IR)) {
+	case 0:
+		*vsid = (VSID_REAL >> 16) | esid;
+		break;
+	case MSR_IR:
+		*vsid = (VSID_REAL_IR >> 16) | esid;
+		break;
+	case MSR_DR:
+		*vsid = (VSID_REAL_DR >> 16) | esid;
+		break;
+	case MSR_DR|MSR_IR:
+	{
+		ulong ea;
+		struct kvmppc_slb *slb;
+		ea = esid << SID_SHIFT;
+		slb = kvmppc_mmu_book3s_64_find_slbe(to_book3s(vcpu), ea);
+		if (slb)
+			*vsid = slb->vsid;
+		else
+			return -ENOENT;
+
+		break;
+	}
+	default:
+		BUG();
+		break;
+	}
+
+	return 0;
+}
+
+static bool kvmppc_mmu_book3s_64_is_dcbz32(struct kvm_vcpu *vcpu)
+{
+	return (to_book3s(vcpu)->hid[5] & 0x80);
+}
+
+void kvmppc_mmu_book3s_64_init(struct kvm_vcpu *vcpu)
+{
+	struct kvmppc_mmu *mmu = &vcpu->arch.mmu;
+
+	mmu->mfsrin = NULL;
+	mmu->mtsrin = kvmppc_mmu_book3s_64_mtsrin;
+	mmu->slbmte = kvmppc_mmu_book3s_64_slbmte;
+	mmu->slbmfee = kvmppc_mmu_book3s_64_slbmfee;
+	mmu->slbmfev = kvmppc_mmu_book3s_64_slbmfev;
+	mmu->slbie = kvmppc_mmu_book3s_64_slbie;
+	mmu->slbia = kvmppc_mmu_book3s_64_slbia;
+	mmu->xlate = kvmppc_mmu_book3s_64_xlate;
+	mmu->reset_msr = kvmppc_mmu_book3s_64_reset_msr;
+	mmu->tlbie = kvmppc_mmu_book3s_64_tlbie;
+	mmu->esid_to_vsid = kvmppc_mmu_book3s_64_esid_to_vsid;
+	mmu->ea_to_vp = kvmppc_mmu_book3s_64_ea_to_vp;
+	mmu->is_dcbz32 = kvmppc_mmu_book3s_64_is_dcbz32;
+}
-- 
1.6.0.2


  reply	other threads:[~2009-10-21 15:03 UTC|newest]

Thread overview: 245+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-21 15:03 [PATCH 00/27] Add KVM support for Book3s_64 (PPC64) hosts v5 Alexander Graf
2009-10-21 15:03 ` Alexander Graf
2009-10-21 15:03 ` [PATCH 01/27] Move dirty logging code to sub-arch Alexander Graf
2009-10-21 15:03   ` Alexander Graf
     [not found]   ` <1256137413-15256-2-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2009-10-21 15:03     ` [PATCH 02/27] Pass PVR in sregs Alexander Graf
2009-10-21 15:03       ` Alexander Graf
2009-10-21 15:03       ` [PATCH 03/27] Add Book3s definitions Alexander Graf
2009-10-21 15:03         ` Alexander Graf
2009-10-21 15:03         ` [PATCH 04/27] Add Book3s fields to vcpu structs Alexander Graf
2009-10-21 15:03           ` Alexander Graf
2009-10-21 15:03           ` [PATCH 05/27] Add asm/kvm_book3s.h Alexander Graf
2009-10-21 15:03             ` Alexander Graf
2009-10-21 15:03             ` [PATCH 06/27] Add Book3s_64 intercept helpers Alexander Graf
2009-10-21 15:03               ` Alexander Graf
2009-10-21 15:03               ` [PATCH 07/27] Add book3s_64 highmem asm code Alexander Graf
2009-10-21 15:03                 ` Alexander Graf
     [not found]                 ` <1256137413-15256-8-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2009-10-21 15:03                   ` [PATCH 08/27] Add SLB switching code for entry/exit Alexander Graf
2009-10-21 15:03                     ` Alexander Graf
     [not found]                     ` <1256137413-15256-9-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2009-10-21 15:03                       ` [PATCH 09/27] Add interrupt handling code Alexander Graf
2009-10-21 15:03                         ` Alexander Graf
     [not found]                         ` <1256137413-15256-10-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2009-10-21 15:03                           ` [PATCH 10/27] Add book3s.c Alexander Graf
2009-10-21 15:03                             ` Alexander Graf
2009-10-21 15:03                             ` [PATCH 11/27] Add book3s_64 Host MMU handling Alexander Graf
2009-10-21 15:03                               ` Alexander Graf
2009-10-21 15:03                               ` Alexander Graf [this message]
2009-10-21 15:03                                 ` [PATCH 12/27] Add book3s_64 guest MMU Alexander Graf
     [not found]                                 ` <1256137413-15256-13-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2009-10-21 15:03                                   ` [PATCH 13/27] Add book3s_32 " Alexander Graf
2009-10-21 15:03                                     ` Alexander Graf
     [not found]                                     ` <1256137413-15256-14-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2009-10-21 15:03                                       ` [PATCH 14/27] Add book3s_64 specific opcode emulation Alexander Graf
2009-10-21 15:03                                         ` Alexander Graf
     [not found]                                         ` <1256137413-15256-15-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2009-10-21 15:03                                           ` [PATCH 15/27] Add mfdec emulation Alexander Graf
2009-10-21 15:03                                             ` Alexander Graf
     [not found]                                             ` <1256137413-15256-16-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2009-10-21 15:03                                               ` [PATCH 16/27] Add desktop PowerPC specific emulation Alexander Graf
2009-10-21 15:03                                                 ` Alexander Graf
     [not found]                                                 ` <1256137413-15256-17-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2009-10-21 15:03                                                   ` [PATCH 17/27] Make head_64.S aware of KVM real mode code Alexander Graf
2009-10-21 15:03                                                     ` Alexander Graf
2009-10-21 15:03                                                     ` [PATCH 18/27] Add Book3s_64 offsets to asm-offsets.c Alexander Graf
2009-10-21 15:03                                                       ` Alexander Graf
     [not found]                                                       ` <1256137413-15256-19-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2009-10-21 15:03                                                         ` [PATCH 19/27] Export symbols for KVM module Alexander Graf
2009-10-21 15:03                                                           ` Alexander Graf
     [not found]                                                           ` <1256137413-15256-20-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2009-10-21 15:03                                                             ` [PATCH 20/27] Split init_new_context and destroy_context Alexander Graf
2009-10-21 15:03                                                               ` Alexander Graf
     [not found]                                                               ` <1256137413-15256-21-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2009-10-21 15:03                                                                 ` [PATCH 21/27] Export KVM symbols for module Alexander Graf
2009-10-21 15:03                                                                   ` Alexander Graf
2009-10-21 15:03                                                                   ` [PATCH 22/27] Add fields to PACA Alexander Graf
2009-10-21 15:03                                                                     ` Alexander Graf
     [not found]                                                                     ` <1256137413-15256-23-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2009-10-21 15:03                                                                       ` [PATCH 23/27] Export new PACA constants in asm-offsets Alexander Graf
2009-10-21 15:03                                                                         ` Alexander Graf
2009-10-21 15:03                                                                         ` [PATCH 24/27] Include Book3s_64 target in buildsystem Alexander Graf
2009-10-21 15:03                                                                           ` Alexander Graf
     [not found]                                                                           ` <1256137413-15256-25-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2009-10-21 15:03                                                                             ` [PATCH 25/27] Fix trace.h Alexander Graf
2009-10-21 15:03                                                                               ` Alexander Graf
2009-10-21 15:03                                                                               ` [PATCH 26/27] Use Little Endian for Dirty Bitmap Alexander Graf
2009-10-21 15:03                                                                                 ` Alexander Graf
     [not found]                                                                                 ` <1256137413-15256-27-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2009-10-21 15:03                                                                                   ` [PATCH 27/27] Use hrtimers for the decrementer Alexander Graf
2009-10-21 15:03                                                                                     ` Alexander Graf
     [not found]                                                                         ` <1256137413-15256-24-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2009-10-29  2:50                                                                           ` [PATCH 23/27] Export new PACA constants in asm-offsets Benjamin Herrenschmidt
2009-10-29  2:50                                                                             ` Benjamin Herrenschmidt
2009-10-29  2:50                                                                       ` [PATCH 22/27] Add fields to PACA Benjamin Herrenschmidt
2009-10-29  2:50                                                                         ` Benjamin Herrenschmidt
2009-10-29  2:48                                                                 ` [PATCH 20/27] Split init_new_context and destroy_context Benjamin Herrenschmidt
2009-10-29  2:48                                                                   ` Benjamin Herrenschmidt
2009-10-29  2:46                                                             ` [PATCH 19/27] Export symbols for KVM module Benjamin Herrenschmidt
2009-10-29  2:46                                                               ` Benjamin Herrenschmidt
2009-10-29  2:53                                                               ` Alexander Graf
2009-10-29  2:53                                                                 ` Alexander Graf
2009-10-29  2:45                                                         ` [PATCH 18/27] Add Book3s_64 offsets to asm-offsets.c Benjamin Herrenschmidt
2009-10-29  2:45                                                           ` Benjamin Herrenschmidt
     [not found]                                                     ` <1256137413-15256-18-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2009-10-29  2:45                                                       ` [PATCH 17/27] Make head_64.S aware of KVM real mode code Benjamin Herrenschmidt
2009-10-29  2:45                                                         ` Benjamin Herrenschmidt
2009-10-21 15:22 ` [PATCH 00/27] Add KVM support for Book3s_64 (PPC64) hosts v5 Alexander Graf
2009-10-21 15:22   ` Alexander Graf
     [not found] ` <1256137413-15256-1-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2009-10-22 13:26   ` Arnd Bergmann
2009-10-22 13:26     ` Arnd Bergmann
2009-10-23  0:33   ` Hollis Blanchard
2009-10-23  0:33     ` Hollis Blanchard
     [not found]     ` <1256258028.7495.34.camel-6XWu2dSDoRTcKpUcGLbliUEOCMrvLtNR@public.gmane.org>
2009-10-25 13:01       ` Avi Kivity
2009-10-25 13:01         ` Avi Kivity
     [not found]         ` <4AE44C14.8040507-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-10-26 21:18           ` Hollis Blanchard
2009-10-26 21:18             ` Hollis Blanchard
2009-10-29  2:55           ` Benjamin Herrenschmidt
2009-10-29  2:55             ` Benjamin Herrenschmidt
2009-10-26 22:46 ` Olof Johansson
2009-10-26 23:06   ` Olof Johansson
     [not found]   ` <20091026230632.GB5366-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
2009-10-26 23:20     ` Hollis Blanchard
2009-10-26 23:20       ` Hollis Blanchard
2009-10-26 23:21       ` Olof Johansson
2009-10-26 23:21         ` Olof Johansson
2009-10-27  8:56         ` Avi Kivity
2009-10-27  8:56           ` Avi Kivity
2009-10-27 13:42           ` Alexander Graf
2009-10-27 13:42             ` Alexander Graf
     [not found]             ` <8E92E3B9-39D5-4D71-8B8E-96B49430B67B-l3A5Bk7waGM@public.gmane.org>
2009-10-27 15:49               ` Avi Kivity
2009-10-27 15:49                 ` Avi Kivity
  -- strict thread matches above, loose matches on Subject: below --
2009-10-30 15:47 [PATCH 00/27] Add KVM support for Book3s_64 (PPC64) hosts v6 Alexander Graf
2009-10-30 15:47 ` Alexander Graf
2009-10-30 15:47 ` Alexander Graf
2009-10-30 15:47 ` [PATCH 02/27] Pass PVR in sregs Alexander Graf
2009-10-30 15:47   ` Alexander Graf
2009-10-30 15:47   ` Alexander Graf
2009-10-30 15:47 ` [PATCH 04/27] Add Book3s fields to vcpu structs Alexander Graf
2009-10-30 15:47   ` Alexander Graf
2009-10-30 15:47   ` Alexander Graf
2009-10-30 15:47 ` [PATCH 05/27] Add asm/kvm_book3s.h Alexander Graf
2009-10-30 15:47   ` Alexander Graf
2009-10-30 15:47   ` Alexander Graf
2009-10-30 15:47 ` [PATCH 06/27] Add Book3s_64 intercept helpers Alexander Graf
2009-10-30 15:47   ` Alexander Graf
2009-10-30 15:47   ` Alexander Graf
2009-10-30 15:47 ` [PATCH 11/27] Add book3s_64 Host MMU handling Alexander Graf
2009-10-30 15:47   ` Alexander Graf
2009-10-30 15:47   ` Alexander Graf
     [not found]   ` <1256917647-6200-12-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2009-11-01 23:39     ` Michael Neuling
2009-11-01 23:39       ` Michael Neuling
2009-11-01 23:39       ` Michael Neuling
2009-11-02  9:26       ` Alexander Graf
2009-11-02  9:26         ` Alexander Graf
2009-11-02  9:26         ` Alexander Graf
2009-10-30 15:47 ` [PATCH 17/27] Make head_64.S aware of KVM real mode code Alexander Graf
2009-10-30 15:47   ` Alexander Graf
2009-10-30 15:47   ` Alexander Graf
2009-10-30 15:47 ` [PATCH 18/27] Add Book3s_64 offsets to asm-offsets.c Alexander Graf
2009-10-30 15:47   ` Alexander Graf
2009-10-30 15:47   ` Alexander Graf
     [not found] ` <1256917647-6200-1-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2009-10-30 15:47   ` [PATCH 01/27] Move dirty logging code to sub-arch Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47   ` [PATCH 03/27] Add Book3s definitions Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47   ` [PATCH 07/27] Add book3s_64 highmem asm code Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47   ` [PATCH 08/27] Add SLB switching code for entry/exit Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-11-01 23:23     ` Michael Neuling
2009-11-01 23:23       ` Michael Neuling
2009-11-01 23:23       ` Michael Neuling
     [not found]       ` <6695.1257117827-/owAOxkjmzZAfugRpC6u6w@public.gmane.org>
2009-11-02  9:23         ` Alexander Graf
2009-11-02  9:23           ` Alexander Graf
2009-11-02  9:23           ` Alexander Graf
     [not found]           ` <00BF2D99-F2CE-4204-B4B4-0D113FD54CE6-l3A5Bk7waGM@public.gmane.org>
2009-11-02  9:39             ` Michael Neuling
2009-11-02  9:39               ` Michael Neuling
2009-11-02  9:39               ` Michael Neuling
2009-11-02  9:59               ` Alexander Graf
2009-11-02  9:59                 ` Alexander Graf
2009-11-02  9:59                 ` Alexander Graf
2009-10-30 15:47   ` [PATCH 09/27] Add interrupt handling code Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47   ` [PATCH 10/27] Add book3s.c Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47   ` [PATCH 12/27] Add book3s_64 guest MMU Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47   ` [PATCH 13/27] Add book3s_32 " Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47   ` [PATCH 14/27] Add book3s_64 specific opcode emulation Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-11-03  8:47     ` Segher Boessenkool
2009-11-03  8:47       ` Segher Boessenkool
     [not found]       ` <A1CBD511-FF08-48BB-A8D6-9F66E20F770B-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
2009-11-03  9:06         ` Alexander Graf
2009-11-03  9:06           ` Alexander Graf
2009-11-03  9:06           ` Alexander Graf
2009-11-03 21:38           ` Benjamin Herrenschmidt
2009-11-03 21:38             ` Benjamin Herrenschmidt
2009-11-04  8:43             ` Arnd Bergmann
2009-11-04  8:43               ` Arnd Bergmann
2009-11-04  8:47               ` Benjamin Herrenschmidt
2009-11-04  8:47                 ` Benjamin Herrenschmidt
2009-11-04 11:35                 ` Alexander Graf
2009-11-04 11:35                   ` Alexander Graf
2009-11-04 11:35                   ` Alexander Graf
2009-11-05  0:53           ` Segher Boessenkool
2009-11-05  0:53             ` Segher Boessenkool
2009-11-05 10:09             ` Alexander Graf
2009-11-05 10:09               ` Alexander Graf
2009-11-05 10:09               ` Alexander Graf
2009-10-30 15:47   ` [PATCH 15/27] Add mfdec emulation Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47   ` [PATCH 16/27] Add desktop PowerPC specific emulation Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47   ` [PATCH 19/27] Export symbols for KVM module Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47     ` Alexander Graf
     [not found]     ` <1256917647-6200-20-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2009-10-31  4:37       ` Stephen Rothwell
2009-10-31  4:37         ` Stephen Rothwell
2009-10-31  4:37         ` Stephen Rothwell
     [not found]         ` <20091031153719.10a4e61b.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
2009-10-31 12:02           ` Alexander Graf
2009-10-31 12:02             ` Alexander Graf
2009-10-31 12:02             ` Alexander Graf
2009-10-30 15:47   ` [PATCH 20/27] Split init_new_context and destroy_context Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-31  4:40     ` Stephen Rothwell
2009-10-31  4:40       ` Stephen Rothwell
2009-10-31  4:40       ` Stephen Rothwell
2009-10-31 21:20       ` Alexander Graf
2009-10-31 21:20         ` Alexander Graf
2009-10-31 21:20         ` Alexander Graf
2009-10-31 21:37         ` Benjamin Herrenschmidt
2009-10-31 21:37           ` Benjamin Herrenschmidt
2009-10-30 15:47   ` [PATCH 21/27] Export KVM symbols for module Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47   ` [PATCH 22/27] Add fields to PACA Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47   ` [PATCH 27/27] Use hrtimers for the decrementer Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-10-30 15:47     ` Alexander Graf
2009-11-05  6:03   ` [PATCH 00/27] Add KVM support for Book3s_64 (PPC64) hosts v6 Benjamin Herrenschmidt
2009-11-05  6:03     ` Benjamin Herrenschmidt
2009-11-05  6:03     ` Benjamin Herrenschmidt
2009-10-30 15:47 ` [PATCH 23/27] Export new PACA constants in asm-offsets Alexander Graf
2009-10-30 15:47   ` Alexander Graf
2009-10-30 15:47   ` Alexander Graf
2009-10-30 15:47 ` [PATCH 24/27] Include Book3s_64 target in buildsystem Alexander Graf
2009-10-30 15:47   ` Alexander Graf
2009-10-30 15:47   ` Alexander Graf
2009-10-30 15:47 ` [PATCH 25/27] Fix trace.h Alexander Graf
2009-10-30 15:47   ` Alexander Graf
2009-10-30 15:47   ` Alexander Graf
2009-10-30 15:47 ` [PATCH 26/27] Use Little Endian for Dirty Bitmap Alexander Graf
2009-10-30 15:47   ` Alexander Graf
2009-10-30 15:47   ` Alexander Graf
2009-09-29  8:18 [PATCH 12/27] Add book3s_64 guest MMU Alexander Graf
2009-09-29  8:17 [PATCH 00/27] Add KVM support for Book3s_64 (PPC64) hosts v4 Alexander Graf
2009-09-30  8:42 ` Avi Kivity
2009-09-30  8:47 ` Alexander Graf
2009-09-30  8:59 ` Avi Kivity
2009-09-30  9:11 ` Alexander Graf
2009-09-30  9:24 ` Avi Kivity
2009-09-30  9:37 ` Alexander Graf
2009-10-02  0:26 ` Benjamin Herrenschmidt
2009-10-02  0:32 ` Benjamin Herrenschmidt
2009-10-03 10:08 ` Avi Kivity
2009-10-03 10:58 ` Benjamin Herrenschmidt
2009-10-03 11:10 ` Benjamin Herrenschmidt

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=1256137413-15256-13-git-send-email-agraf@suse.de \
    --to=agraf@suse.de \
    --cc=arnd@arndb.de \
    --cc=avi@redhat.com \
    --cc=benh@kernel.crashing.org \
    --cc=bphilips@suse.de \
    --cc=hollisb@us.ibm.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=kwolf@redhat.com \
    --cc=mtosatti@redhat.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 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.