All of lore.kernel.org
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: paulus@ozlabs.org, gregkh@linuxfoundation.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "KVM: PPC: Book3S HV: Ignore timebase offset on POWER9 DD1" has been added to the 4.11-stable tree
Date: Mon, 26 Jun 2017 08:15:34 +0200	[thread overview]
Message-ID: <14984577342434@kroah.com> (raw)


This is a note to let you know that I've just added the patch titled

    KVM: PPC: Book3S HV: Ignore timebase offset on POWER9 DD1

to the 4.11-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     kvm-ppc-book3s-hv-ignore-timebase-offset-on-power9-dd1.patch
and it can be found in the queue-4.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 3d3efb68c19e539f0535c93a5258c1299270215f Mon Sep 17 00:00:00 2001
From: Paul Mackerras <paulus@ozlabs.org>
Date: Tue, 6 Jun 2017 14:35:30 +1000
Subject: KVM: PPC: Book3S HV: Ignore timebase offset on POWER9 DD1

From: Paul Mackerras <paulus@ozlabs.org>

commit 3d3efb68c19e539f0535c93a5258c1299270215f upstream.

POWER9 DD1 has an erratum where writing to the TBU40 register, which
is used to apply an offset to the timebase, can cause the timebase to
lose counts.  This results in the timebase on some CPUs getting out of
sync with other CPUs, which then results in misbehaviour of the
timekeeping code.

To work around the problem, we make KVM ignore the timebase offset for
all guests on POWER9 DD1 machines.  This means that live migration
cannot be supported on POWER9 DD1 machines.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/powerpc/kvm/book3s_hv.c |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -1481,6 +1481,14 @@ static int kvmppc_set_one_reg_hv(struct
 		r = set_vpa(vcpu, &vcpu->arch.dtl, addr, len);
 		break;
 	case KVM_REG_PPC_TB_OFFSET:
+		/*
+		 * POWER9 DD1 has an erratum where writing TBU40 causes
+		 * the timebase to lose ticks.  So we don't let the
+		 * timebase offset be changed on P9 DD1.  (It is
+		 * initialized to zero.)
+		 */
+		if (cpu_has_feature(CPU_FTR_POWER9_DD1))
+			break;
 		/* round up to multiple of 2^24 */
 		vcpu->arch.vcore->tb_offset =
 			ALIGN(set_reg_val(id, *val), 1UL << 24);


Patches currently in stable-queue which might be from paulus@ozlabs.org are

queue-4.11/kvm-ppc-book3s-hv-preserve-userspace-htm-state-properly.patch
queue-4.11/kvm-ppc-book3s-hv-cope-with-host-using-large-decrementer-mode.patch
queue-4.11/kvm-ppc-book3s-hv-save-restore-host-values-of-debug-registers.patch
queue-4.11/kvm-ppc-book3s-hv-context-switch-ebb-registers-properly.patch
queue-4.11/kvm-ppc-book3s-hv-ignore-timebase-offset-on-power9-dd1.patch
queue-4.11/kvm-ppc-book3s-hv-restore-critical-sprs-to-host-values-on-guest-exit.patch

                 reply	other threads:[~2017-06-26  6:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=14984577342434@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=paulus@ozlabs.org \
    --cc=stable-commits@vger.kernel.org \
    --cc=stable@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 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.