All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] KVM: PPC: e500mc: Revert "add load inst fixup"
@ 2013-06-06 16:11 ` Mihai Caraman
  0 siblings, 0 replies; 60+ messages in thread
From: Mihai Caraman @ 2013-06-06 16:11 UTC (permalink / raw)
  To: kvm-ppc; +Cc: kvm, linuxppc-dev, Mihai Caraman

lwepx faults needs to be handled by KVM. With the current solution
the host kernel searches for the faulting address using its LPID context.
If a host translation is found we return to the lwepx instr instead of the
fixup ending up in an infinite loop.

Revert the commit 1d628af7 "add load inst fixup". We will address lwepx
issue in a subsequent patch without the need of fixups.

Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com>
---
 arch/powerpc/kvm/bookehv_interrupts.S |   26 +-------------------------
 1 files changed, 1 insertions(+), 25 deletions(-)

diff --git a/arch/powerpc/kvm/bookehv_interrupts.S b/arch/powerpc/kvm/bookehv_interrupts.S
index e8ed7d6..20c7a54 100644
--- a/arch/powerpc/kvm/bookehv_interrupts.S
+++ b/arch/powerpc/kvm/bookehv_interrupts.S
@@ -29,7 +29,6 @@
 #include <asm/asm-compat.h>
 #include <asm/asm-offsets.h>
 #include <asm/bitsperlong.h>
-#include <asm/thread_info.h>
 
 #ifdef CONFIG_64BIT
 #include <asm/exception-64e.h>
@@ -162,32 +161,9 @@
 	PPC_STL	r30, VCPU_GPR(R30)(r4)
 	PPC_STL	r31, VCPU_GPR(R31)(r4)
 	mtspr	SPRN_EPLC, r8
-
-	/* disable preemption, so we are sure we hit the fixup handler */
-	CURRENT_THREAD_INFO(r8, r1)
-	li	r7, 1
-	stw	r7, TI_PREEMPT(r8)
-
 	isync
-
-	/*
-	 * In case the read goes wrong, we catch it and write an invalid value
-	 * in LAST_INST instead.
-	 */
-1:	lwepx	r9, 0, r5
-2:
-.section .fixup, "ax"
-3:	li	r9, KVM_INST_FETCH_FAILED
-	b	2b
-.previous
-.section __ex_table,"a"
-	PPC_LONG_ALIGN
-	PPC_LONG 1b,3b
-.previous
-
+	lwepx   r9, 0, r5
 	mtspr	SPRN_EPLC, r3
-	li	r7, 0
-	stw	r7, TI_PREEMPT(r8)
 	stw	r9, VCPU_LAST_INST(r4)
 	.endif
 
-- 
1.7.4.1



^ permalink raw reply related	[flat|nested] 60+ messages in thread

end of thread, other threads:[~2013-07-11  0:17 UTC | newest]

Thread overview: 60+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-06 16:11 [PATCH 1/2] KVM: PPC: e500mc: Revert "add load inst fixup" Mihai Caraman
2013-06-06 16:11 ` Mihai Caraman
2013-06-06 16:11 ` Mihai Caraman
2013-06-06 16:11 ` [PATCH 2/2] KVM: PPC: Book3E: Get vcpu's last instruction for emulation Mihai Caraman
2013-06-06 16:11   ` Mihai Caraman
2013-06-06 16:11   ` Mihai Caraman
2013-06-28  9:20 ` [PATCH 1/2] KVM: PPC: e500mc: Revert "add load inst fixup" Mihai Caraman
2013-06-28  9:20   ` Mihai Caraman
2013-06-28  9:20   ` Mihai Caraman
2013-06-28  9:20   ` [PATCH 2/2] KVM: PPC: Book3E: Get vcpu's last instruction for emulation Mihai Caraman
2013-06-28  9:20     ` Mihai Caraman
2013-06-28  9:20     ` Mihai Caraman
2013-07-08 13:39     ` Alexander Graf
2013-07-08 13:39       ` Alexander Graf
2013-07-08 13:39       ` Alexander Graf
2013-07-09 17:13       ` Scott Wood
2013-07-09 17:13         ` Scott Wood
2013-07-09 17:13         ` Scott Wood
2013-07-09 17:44         ` Alexander Graf
2013-07-09 17:44           ` Alexander Graf
2013-07-09 17:44           ` Alexander Graf
2013-07-09 18:46           ` Scott Wood
2013-07-09 18:46             ` Scott Wood
2013-07-09 18:46             ` Scott Wood
2013-07-09 21:44             ` Alexander Graf
2013-07-09 21:44               ` Alexander Graf
2013-07-09 21:44               ` Alexander Graf
2013-07-10  0:06               ` Scott Wood
2013-07-10  0:06                 ` Scott Wood
2013-07-10  0:06                 ` Scott Wood
2013-07-10 10:15                 ` Alexander Graf
2013-07-10 10:15                   ` Alexander Graf
2013-07-10 10:15                   ` Alexander Graf
2013-07-10 18:42                   ` Scott Wood
2013-07-10 18:42                     ` Scott Wood
2013-07-10 18:42                     ` Scott Wood
2013-07-10 22:50                     ` Alexander Graf
2013-07-10 22:50                       ` Alexander Graf
2013-07-10 22:50                       ` Alexander Graf
2013-07-11  0:15                       ` Scott Wood
2013-07-11  0:15                         ` Scott Wood
2013-07-11  0:15                         ` Scott Wood
2013-07-11  0:17                         ` Alexander Graf
2013-07-11  0:17                           ` Alexander Graf
2013-07-11  0:17                           ` Alexander Graf
2013-07-09 21:45     ` Alexander Graf
2013-07-09 21:45       ` Alexander Graf
2013-07-09 21:45       ` Alexander Graf
2013-07-10  0:12       ` Scott Wood
2013-07-10  0:12         ` Scott Wood
2013-07-10  0:12         ` Scott Wood
2013-07-10 10:18         ` Alexander Graf
2013-07-10 10:18           ` Alexander Graf
2013-07-10 10:18           ` Alexander Graf
2013-07-10 18:37           ` Scott Wood
2013-07-10 18:37             ` Scott Wood
2013-07-10 18:37             ` Scott Wood
2013-07-10 22:48             ` Alexander Graf
2013-07-10 22:48               ` Alexander Graf
2013-07-10 22:48               ` Alexander Graf

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.