Kernel KVM-PPC virtualization development
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: KVM list <kvm@vger.kernel.org>
Cc: kvm-ppc <kvm-ppc@vger.kernel.org>, Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Paul Mackerras <paulus@samba.org>
Subject: [PATCH 12/12] KVM: PPC: Book3S HV: Fix thinko in try_lock_hpte()
Date: Tue, 30 Oct 2012 10:02:25 +0000	[thread overview]
Message-ID: <1351591345-23071-13-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1351591345-23071-1-git-send-email-agraf@suse.de>

From: Paul Mackerras <paulus@samba.org>

This fixes an error in the inline asm in try_lock_hpte() where we
were erroneously using a register number as an immediate operand.
The bug only affects an error path, and in fact the code will still
work as long as the compiler chooses some register other than r0
for the "bits" variable.  Nevertheless it should still be fixed.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 arch/powerpc/include/asm/kvm_book3s_64.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/include/asm/kvm_book3s_64.h b/arch/powerpc/include/asm/kvm_book3s_64.h
index 0dd1d86..1472a5b 100644
--- a/arch/powerpc/include/asm/kvm_book3s_64.h
+++ b/arch/powerpc/include/asm/kvm_book3s_64.h
@@ -60,7 +60,7 @@ static inline long try_lock_hpte(unsigned long *hpte, unsigned long bits)
 		     "	ori	%0,%0,%4\n"
 		     "  stdcx.	%0,0,%2\n"
 		     "	beq+	2f\n"
-		     "	li	%1,%3\n"
+		     "	mr	%1,%3\n"
 		     "2:	isync"
 		     : "=&r" (tmp), "=&r" (old)
 		     : "r" (hpte), "r" (bits), "i" (HPTE_V_HVLOCK)
-- 
1.6.0.2


  parent reply	other threads:[~2012-10-30 10:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-30 10:02 [PULL 00/12] ppc patch queue 2012-10-30 Alexander Graf
2012-10-30 10:02 ` [PATCH 01/12] KVM: PPC: 44x: fix DCR read/write Alexander Graf
2012-10-30 10:02 ` [PATCH 02/12] KVM: Documentation: Fix reentry-to-be-consistent paragraph Alexander Graf
2012-10-30 10:02 ` [PATCH 03/12] KVM: PPC: Move mtspr/mfspr emulation into own functions Alexander Graf
2012-10-30 10:02 ` [PATCH 04/12] PPC: ePAPR: Convert header to uapi Alexander Graf
2012-10-30 10:02 ` [PATCH 05/12] KVM: PPC: Book3S HV: Allow KVM guests to stop secondary threads coming online Alexander Graf
2012-10-30 10:02 ` [PATCH 06/12] KVM: PPC: Book3S HV: Fix some races in starting secondary threads Alexander Graf
2012-10-30 10:02 ` [PATCH 07/12] KVM: PPC: Book3s HV: Don't access runnable threads list without vcore lock Alexander Graf
2012-10-30 10:02 ` [PATCH 08/12] KVM: PPC: Book3S HV: Fixes for late-joining threads Alexander Graf
2012-10-30 10:02 ` [PATCH 09/12] KVM: PPC: Book3S HV: Run virtual core whenever any vcpus in it can run Alexander Graf
2012-10-30 10:02 ` [PATCH 10/12] KVM: PPC: Book3S HV: Fix accounting of stolen time Alexander Graf
2012-10-30 10:02 ` [PATCH 11/12] KVM: PPC: Book3S HV: Allow DTL to be set to address 0, length 0 Alexander Graf
2012-10-30 10:02 ` Alexander Graf [this message]
2012-10-31  1:32 ` [PULL 00/12] ppc patch queue 2012-10-30 Marcelo Tosatti
2012-10-31 10:22   ` Alexander Graf
2012-10-31 10:26     ` Avi Kivity
2012-10-31 10:34       ` Alexander Graf
2012-10-31 11:17         ` Avi Kivity
2012-10-31 11:25       ` Marcelo Tosatti
2012-10-31 12:47         ` Alexander Graf
2012-10-31 11:28     ` Marcelo Tosatti

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=1351591345-23071-13-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 \
    --cc=mtosatti@redhat.com \
    --cc=paulus@samba.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