Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1675766 > unrolled thread

[PATCH 4.11 22/58] KVM: PPC: Book3S HV: Ignore timebase offset on POWER9 DD1

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2017-06-27 16:20 +0200
Last post2017-06-27 16:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.11 22/58] KVM: PPC: Book3S HV: Ignore timebase offset on POWER9 DD1 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-27 16:20 +0200

#1675766 — [PATCH 4.11 22/58] KVM: PPC: Book3S HV: Ignore timebase offset on POWER9 DD1

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-27 16:20 +0200
Subject[PATCH 4.11 22/58] KVM: PPC: Book3S HV: Ignore timebase offset on POWER9 DD1
Message-ID<tWZvt-1FM-71@gated-at.bofh.it>
4.11-stable review patch.  If anyone has any objections, please let me know.

------------------

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);

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web