[PATCH 1/2] KVM: PPC: Book3S HV: Cleanup kvmppc_load/save_fp

Subsystems: kernel virtual machine for powerpc (kvm/powerpc), linux for powerpc (32-bit and 64-bit), the rest

STALE4365d

5 messages, 3 authors, 2014-08-27 · open the first message on its own page

[PATCH 1/2] KVM: PPC: Book3S HV: Cleanup kvmppc_load/save_fp

From: Michael Neuling <hidden>
Date: 2014-08-19 04:59:32

This cleans up kvmppc_load/save_fp.  It removes unnecessary isyncs.  It also
removes the unnecessary resetting of the MSR bits on exit of kvmppc_save_fp.

Signed-off-by: Michael Neuling <redacted>
Signed-off-by: Paul Mackerras <redacted>
---
 arch/powerpc/kvm/book3s_hv_rmhandlers.S | 2 --
 1 file changed, 2 deletions(-)
diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
index f0c4db7..c4bd2d7 100644
--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
@@ -2434,7 +2434,6 @@ BEGIN_FTR_SECTION
 END_FTR_SECTION_IFSET(CPU_FTR_VSX)
 #endif
 	mtmsrd	r8
-	isync
 	addi	r3,r3,VCPU_FPRS
 	bl	store_fp_state
 #ifdef CONFIG_ALTIVEC
@@ -2470,7 +2469,6 @@ BEGIN_FTR_SECTION
 END_FTR_SECTION_IFSET(CPU_FTR_VSX)
 #endif
 	mtmsrd	r8
-	isync
 	addi	r3,r4,VCPU_FPRS
 	bl	load_fp_state
 #ifdef CONFIG_ALTIVEC
-- 
1.9.1

[PATCH 2/2] KVM: PPC: Book3S HV: Add register name when loading toc

From: Michael Neuling <hidden>
Date: 2014-08-19 04:59:33

Add 'r' to register name r2 in kvmppc_hv_enter.

Also update comment at the top of kvmppc_hv_enter to indicate that R2/TOC is
non-volatile.

Signed-off-by: Michael Neuling <redacted>
Signed-off-by: Paul Mackerras <redacted>
---
 arch/powerpc/kvm/book3s_hv_rmhandlers.S | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
index c4bd2d7..1e8c480 100644
--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
@@ -355,6 +355,7 @@ kvmppc_hv_entry:
 	 * MSR = ~IR|DR
 	 * R13 = PACA
 	 * R1 = host R1
+	 * R2 = TOC
 	 * all other volatile GPRS = free
 	 */
 	mflr	r0
@@ -503,7 +504,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
 toc_tlbie_lock:
 	.tc	native_tlbie_lock[TC],native_tlbie_lock
 	.previous
-	ld	r3,toc_tlbie_lock@toc(2)
+	ld	r3,toc_tlbie_lock@toc(r2)
 #ifdef __BIG_ENDIAN__
 	lwz	r8,PACA_LOCK_TOKEN(r13)
 #else
-- 
1.9.1

Re: [PATCH 1/2] KVM: PPC: Book3S HV: Cleanup kvmppc_load/save_fp

From: Paul Mackerras <hidden>
Date: 2014-08-19 05:24:10

On Tue, Aug 19, 2014 at 02:59:29PM +1000, Michael Neuling wrote:
This cleans up kvmppc_load/save_fp.  It removes unnecessary isyncs.
NAK - they are necessary on PPC970, which we (still) support.  You
could put them in a feature section if they are really annoying you.
 It also
removes the unnecessary resetting of the MSR bits on exit of kvmppc_save_fp.
... except it doesn't. :)  That got folded into e4e38121507a ("KVM:
PPC: Book3S HV: Add transactional memory support").

Paul.

Re: [PATCH 1/2] KVM: PPC: Book3S HV: Cleanup kvmppc_load/save_fp

From: Michael Neuling <hidden>
Date: 2014-08-19 05:36:48

On Tue, 2014-08-19 at 15:24 +1000, Paul Mackerras wrote:
On Tue, Aug 19, 2014 at 02:59:29PM +1000, Michael Neuling wrote:
quoted
This cleans up kvmppc_load/save_fp.  It removes unnecessary isyncs.
=20
NAK - they are necessary on PPC970, which we (still) support.  You
could put them in a feature section if they are really annoying you.
I'm not fussed, but we should at least have a comment there for why we
need them.
quoted
 It also
removes the unnecessary resetting of the MSR bits on exit of kvmppc_sav=
e_fp.
=20
... except it doesn't. :)  That got folded into e4e38121507a ("KVM:
PPC: Book3S HV: Add transactional memory support").
Arrh, thanks.  This patch was cleaning up stuff from an old local tree
and couldn't see where it had been upstreamed.  I missed this.

Mikey

Re: [PATCH 2/2] KVM: PPC: Book3S HV: Add register name when loading toc

From: Alexander Graf <hidden>
Date: 2014-08-27 11:20:52


On 19.08.14 06:59, Michael Neuling wrote:
Add 'r' to register name r2 in kvmppc_hv_enter.

Also update comment at the top of kvmppc_hv_enter to indicate that R2/TOC is
non-volatile.

Signed-off-by: Michael Neuling <redacted>
Signed-off-by: Paul Mackerras <redacted>
Thanks, applied to kvm-ppc-queue.


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