From: Paul Mackerras <paulus@samba.org>
To: Alexander Graf <agraf@suse.de>
Cc: kvm@vger.kernel.org
Subject: [PATCH 8/8] KVM: PPC: Book3S HV: Fix thinko in try_lock_hpte()
Date: Tue, 16 Oct 2012 14:07:20 +1100 [thread overview]
Message-ID: <20121016030720.GI1218@drongo> (raw)
In-Reply-To: <20121016030303.GA1218@drongo>
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>
---
arch/powerpc/include/asm/kvm_book3s_64.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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.7.10.4
prev parent reply other threads:[~2012-10-16 3:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-16 3:03 [PATCH 0/8] Various Book3s HV fixes that haven't been picked up yet Paul Mackerras
2012-10-16 3:03 ` [PATCH 1/8] KVM: PPC: Book3S HV: Allow KVM guests to stop secondary threads coming online Paul Mackerras
2012-10-16 3:04 ` [PATCH 2/8] KVM: PPC: Book3S HV: Fix some races in starting secondary threads Paul Mackerras
2012-10-16 3:04 ` [PATCH 3/8] KVM: PPC: Book3s HV: Don't access runnable threads list without vcore lock Paul Mackerras
2012-10-16 3:05 ` [PATCH 4/8] KVM: PPC: Book3S HV: Fixes for late-joining threads Paul Mackerras
2012-10-16 3:05 ` [PATCH 5/8] KVM: PPC: Book3S HV: Run virtual core whenever any vcpus in it can run Paul Mackerras
2012-10-16 3:06 ` [PATCH 6/8] KVM: PPC: Book3S HV: Fix accounting of stolen time Paul Mackerras
2012-10-16 3:06 ` [PATCH 7/8] KVM: PPC: Book3S HV: Allow DTL to be set to address 0, length 0 Paul Mackerras
2012-10-16 3:07 ` Paul Mackerras [this message]
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=20121016030720.GI1218@drongo \
--to=paulus@samba.org \
--cc=agraf@suse.de \
--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