public inbox for kvm-ppc@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: kvm-ppc <kvm-ppc@vger.kernel.org>
Cc: kvm list <kvm@vger.kernel.org>, Avi Kivity <avi@redhat.com>
Subject: [PATCH 06/16] KVM: PPC: Book3S: PR: Optimize entry path
Date: Sun, 06 May 2012 14:20:50 +0000	[thread overview]
Message-ID: <1336314060-32640-7-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1336314060-32640-1-git-send-email-agraf@suse.de>

By shuffling a few instructions around we can execute more memory
loads in parallel, giving us a small performance boost.

With this patch and a simple priviledged SPR access loop guest, I get
a speed bump from 2013052 to 2035607 exits per second.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 arch/powerpc/kvm/book3s_segment.S |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/kvm/book3s_segment.S b/arch/powerpc/kvm/book3s_segment.S
index 0676ae2..6bae0a9 100644
--- a/arch/powerpc/kvm/book3s_segment.S
+++ b/arch/powerpc/kvm/book3s_segment.S
@@ -128,24 +128,25 @@ no_dcbz32_on:
 	/* First clear RI in our current MSR value */
 	li	r0, MSR_RI
 	andc	r6, r6, r0
-	MTMSR_EERI(r6)
-	mtsrr0	r9
-	mtsrr1	r4
 
 	PPC_LL	r0, SVCPU_R0(r3)
 	PPC_LL	r1, SVCPU_R1(r3)
 	PPC_LL	r2, SVCPU_R2(r3)
-	PPC_LL	r4, SVCPU_R4(r3)
 	PPC_LL	r5, SVCPU_R5(r3)
-	PPC_LL	r6, SVCPU_R6(r3)
 	PPC_LL	r7, SVCPU_R7(r3)
 	PPC_LL	r8, SVCPU_R8(r3)
-	PPC_LL	r9, SVCPU_R9(r3)
 	PPC_LL	r10, SVCPU_R10(r3)
 	PPC_LL	r11, SVCPU_R11(r3)
 	PPC_LL	r12, SVCPU_R12(r3)
 	PPC_LL	r13, SVCPU_R13(r3)
 
+	MTMSR_EERI(r6)
+	mtsrr0	r9
+	mtsrr1	r4
+
+	PPC_LL	r4, SVCPU_R4(r3)
+	PPC_LL	r6, SVCPU_R6(r3)
+	PPC_LL	r9, SVCPU_R9(r3)
 	PPC_LL	r3, (SVCPU_R3)(r3)
 
 	RFI
-- 
1.6.0.2


  parent reply	other threads:[~2012-05-06 14:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-06 14:20 [PULL 00/16] ppc patch queue 2012-05-06 Alexander Graf
2012-05-06 14:20 ` [PATCH 01/16] KVM: Use minimum and maximum address mapped by TLB1 Alexander Graf
2012-05-06 14:20 ` [PATCH 02/16] KVM: PPC: Use clockevent multiplier and shifter for decrementer Alexander Graf
2012-05-06 14:20 ` [PATCH 03/16] KVM: PPC: bookehv: Use a Macro for saving/restoring guest registers to/from their 64 b Alexander Graf
2012-05-06 14:20 ` [PATCH 04/16] KVM: PPC: Restrict PPC_[L|ST]D macro to asm code Alexander Graf
2012-05-06 14:20 ` [PATCH 05/16] KVM: PPC: booke(hv): Fix save/restore of guest accessible SPRGs Alexander Graf
2012-05-06 14:20 ` Alexander Graf [this message]
2012-05-06 14:20 ` [PATCH 07/16] KVM: PPC: Book3S: PR: No isync in slbie path Alexander Graf
2012-05-06 14:20 ` [PATCH 08/16] KVM: PPC: bookehv: Use lwz/stw instead of PPC_LL/PPC_STL for 32-bit fields Alexander Graf
2012-05-06 14:20 ` [PATCH 09/16] KVM: PPC: Fix stbux emulation Alexander Graf
2012-05-06 14:20 ` [PATCH 10/16] KVM: PPC: Fix PR KVM on POWER7 bare metal Alexander Graf
2012-05-06 14:20 ` [PATCH 11/16] KVM: PPC: Book3S: Enable IRQs during exit handling Alexander Graf
2012-05-06 14:20 ` [PATCH 12/16] KVM: PPC: bookehv: Fix r8/r13 storing in level exception handler Alexander Graf
2012-05-06 14:20 ` [PATCH 13/16] kvm/book3s: Make kernel emulated H_PUT_TCE available for "PR" KVM Alexander Graf
2012-05-06 14:20 ` [PATCH 14/16] kvm/powerpc: Add new ioctl to retreive server MMU infos Alexander Graf
2012-05-06 14:20 ` [PATCH 15/16] KVM: PPC: Emulator: clean up instruction parsing Alexander Graf
2012-05-06 14:21 ` [PATCH 16/16] KVM: PPC: Emulator: clean up SPR reads and writes Alexander Graf
2012-05-08 14:01 ` [PULL 00/16] ppc patch queue 2012-05-06 Avi Kivity

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=1336314060-32640-7-git-send-email-agraf@suse.de \
    --to=agraf@suse.de \
    --cc=avi@redhat.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox