[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/5] kvmppc: Translate eaddr for fsl_booke mmu
From: |
Liu Yu |
Subject: |
[Qemu-devel] [PATCH 4/5] kvmppc: Translate eaddr for fsl_booke mmu |
Date: |
Tue, 4 Aug 2009 17:36:07 +0800 |
Signed-off-by: Liu Yu <address@hidden>
---
target-ppc/helper.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/target-ppc/helper.c b/target-ppc/helper.c
index 6eca2e5..07e56a4 100644
--- a/target-ppc/helper.c
+++ b/target-ppc/helper.c
@@ -22,6 +22,7 @@
#include <string.h>
#include <inttypes.h>
#include <signal.h>
+#include <linux/kvm.h>
#include "cpu.h"
#include "exec-all.h"
@@ -1325,8 +1326,20 @@ static always_inline int check_physical (CPUState *env,
mmu_ctx_t *ctx,
cpu_abort(env, "MPC8xx MMU model is not implemented\n");
break;
case POWERPC_MMU_BOOKE_FSL:
- /* XXX: TODO */
- cpu_abort(env, "BookE FSL MMU model not implemented\n");
+ if (kvm_enabled()) {
+ struct kvm_translation tr;
+
+ /* For now we only debug guest kernel */
+ tr.linear_address = eaddr;
+ ret = kvm_vcpu_ioctl(env, KVM_TRANSLATE, &tr);
+ if (ret < 0)
+ return ret;
+
+ ctx->raddr = tr.physical_address;
+ } else {
+ /* XXX: TODO */
+ cpu_abort(env, "BookE FSL MMU model not implemented\n");
+ }
break;
default:
cpu_abort(env, "Unknown or invalid MMU model\n");
--
1.5.4
- [Qemu-devel] [PATCH v2 0/5] kvmppc: Add guest debug support, Liu Yu, 2009/08/04
- [Qemu-devel] [PATCH 1/5] kvmppc: Fix build error, Liu Yu, 2009/08/04
- [Qemu-devel] [PATCH 2/5] kvmppc: Synchronize booke registers, Liu Yu, 2009/08/04
- [Qemu-devel] [PATCH 3/5] kvmppc: Guest debug support, Liu Yu, 2009/08/04
- [Qemu-devel] [PATCH 4/5] kvmppc: Translate eaddr for fsl_booke mmu,
Liu Yu <=
- [Qemu-devel] [PATCH 5/5] kvmppc: guest debug init, Liu Yu, 2009/08/04
- [Qemu-devel] Re: [PATCH 4/5] kvmppc: Translate eaddr for fsl_booke mmu, Hollis Blanchard, 2009/08/19
- [Qemu-devel] RE: [PATCH 4/5] kvmppc: Translate eaddr for fsl_booke mmu, Liu Yu-B13201, 2009/08/20
- [Qemu-devel] Re: [PATCH 4/5] kvmppc: Translate eaddr for fsl_booke mmu, Alexander Graf, 2009/08/21
- [Qemu-devel] RE: [PATCH 4/5] kvmppc: Translate eaddr for fsl_booke mmu, Liu Yu-B13201, 2009/08/23
- [Qemu-devel] RE: [PATCH 4/5] kvmppc: Translate eaddr for fsl_booke mmu, Hollis Blanchard, 2009/08/24
- [Qemu-devel] Re: [PATCH 4/5] kvmppc: Translate eaddr for fsl_booke mmu, Alexander Graf, 2009/08/29