All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@ozlabs.org>
To: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org
Cc: Nicholas Piggin <npiggin@gmail.com>
Subject: [PATCH] KVM: PPC: Book3S HV: Add workaround for msgsync erratum on POWER9 DD1
Date: Wed, 5 Apr 2017 16:26:11 +1000	[thread overview]
Message-ID: <20170405062611.GB26143@fergus.ozlabs.ibm.com> (raw)

On POWER9 DD1 the msgsync instruction doesn't work correctly, but the
new 'darn' (deliver a random number) instruction happens to do an
equivalent function as a side effect.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
---
 arch/powerpc/kvm/book3s_hv_rmhandlers.S | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
index 6cadda5fa7d4..35d8d718e34b 100644
--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
@@ -1240,7 +1240,11 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
 	cmpwi	r12, BOOK3S_INTERRUPT_H_DOORBELL
 	bne	3f
 BEGIN_FTR_SECTION
+BEGIN_FTR_SECTION_NESTED(98)
 	PPC_MSGSYNC
+FTR_SECTION_ELSE_NESTED(98)	
+	.long	(31<<26) + (755<<1)	/* darn r0,0 */
+ALT_FTR_SECTION_END_NESTED_IFCLR(CPU_FTR_POWER9_DD1, 98)
 	lwsync
 END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)
 	lbz	r0, HSTATE_HOST_IPI(r13)
-- 
2.11.0

WARNING: multiple messages have this Message-ID (diff)
From: Paul Mackerras <paulus@ozlabs.org>
To: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org
Cc: Nicholas Piggin <npiggin@gmail.com>
Subject: [PATCH] KVM: PPC: Book3S HV: Add workaround for msgsync erratum on POWER9 DD1
Date: Wed, 05 Apr 2017 06:26:11 +0000	[thread overview]
Message-ID: <20170405062611.GB26143@fergus.ozlabs.ibm.com> (raw)

On POWER9 DD1 the msgsync instruction doesn't work correctly, but the
new 'darn' (deliver a random number) instruction happens to do an
equivalent function as a side effect.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
---
 arch/powerpc/kvm/book3s_hv_rmhandlers.S | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
index 6cadda5fa7d4..35d8d718e34b 100644
--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
@@ -1240,7 +1240,11 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
 	cmpwi	r12, BOOK3S_INTERRUPT_H_DOORBELL
 	bne	3f
 BEGIN_FTR_SECTION
+BEGIN_FTR_SECTION_NESTED(98)
 	PPC_MSGSYNC
+FTR_SECTION_ELSE_NESTED(98)	
+	.long	(31<<26) + (755<<1)	/* darn r0,0 */
+ALT_FTR_SECTION_END_NESTED_IFCLR(CPU_FTR_POWER9_DD1, 98)
 	lwsync
 END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)
 	lbz	r0, HSTATE_HOST_IPI(r13)
-- 
2.11.0


             reply	other threads:[~2017-04-05  6:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-05  6:26 Paul Mackerras [this message]
2017-04-05  6:26 ` [PATCH] KVM: PPC: Book3S HV: Add workaround for msgsync erratum on POWER9 DD1 Paul Mackerras
2017-04-05  6:41 ` Nicholas Piggin
2017-04-05  6:41   ` Nicholas Piggin

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=20170405062611.GB26143@fergus.ozlabs.ibm.com \
    --to=paulus@ozlabs.org \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=npiggin@gmail.com \
    /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 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.