Thread (75 messages) 75 messages, 6 authors, 2012-10-08

Re: [Qemu-ppc] [RFC PATCH 07/17] KVM: PPC: e500: Mask ea's high 32-bits in 32/64 instr emulation

flat view

From: Alexander Graf <hidden>
Date: 2012-07-04 14:01:02
Also in: kvm

On 25.06.2012, at 14:26, Mihai Caraman wrote:
Mask high 32 bits of effective address in emulation layer, for guests =
running
in 32-bit mode.
MAS2's high-order 32 bits represents the upper 32 bits of the =
effective address
of the page. Mask it too for tlbwe instruction emulation.
Ah, there is the tlbwe masking :). Please split this into 2 patches.
quoted hunk ↗ jump to hunk
=20
Signed-off-by: Mihai Caraman <redacted>
---
arch/powerpc/kvm/e500_emulate.c |    5 ++++-
arch/powerpc/kvm/e500_tlb.c     |    2 ++
2 files changed, 6 insertions(+), 1 deletions(-)
=20
diff --git a/arch/powerpc/kvm/e500_emulate.c =
b/arch/powerpc/kvm/e500_emulate.c
quoted hunk ↗ jump to hunk
index 81288f7..94305db 100644
--- a/arch/powerpc/kvm/e500_emulate.c
+++ b/arch/powerpc/kvm/e500_emulate.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2011 Freescale Semiconductor, Inc. All rights =
reserved.
+ * Copyright (C) 2008-2012 Freescale Semiconductor, Inc. All rights =
reserved.
quoted hunk ↗ jump to hunk
 *
 * Author: Yu Liu, [off-list ref]
 *
@@ -90,6 +90,9 @@ static inline ulong kvmppc_get_ea_indexed(struct =
kvm_vcpu *vcpu, int ra, int rb)
	if (ra)
		ea +=3D kvmppc_get_gpr(vcpu, ra);
=20
+	if (!(vcpu->arch.shared->msr & MSR_CM))
+		ea &=3D 0xffffffffUL;
Since this will be in generic code, please guard it with an #ifdef =
CONFIG_BOOKE.


Alex
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help