All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Paul Mackerras <paulus@ozlabs.org>
Subject: [PATCH 4.11 22/58] KVM: PPC: Book3S HV: Ignore timebase offset on POWER9 DD1
Date: Tue, 27 Jun 2017 16:12:25 +0200	[thread overview]
Message-ID: <20170627141114.303080103@linuxfoundation.org> (raw)
In-Reply-To: <20170627141113.402913097@linuxfoundation.org>

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

  parent reply	other threads:[~2017-06-27 14:19 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-27 14:12 [PATCH 4.11 00/58] 4.11.8-stable review Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 01/58] clk: sunxi-ng: a31: Correct lcd1-ch1 clock register offset Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 02/58] clk: sunxi-ng: v3s: Fix usb otg device reset bit Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 03/58] clk: sunxi-ng: sun5i: Fix ahb_bist_clk definition Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 05/58] xen-blkback: dont leak stack data via response ring Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 06/58] ALSA: firewire-lib: Fix stall of process context at packet error Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 07/58] ALSA: pcm: Dont treat NULL chmap as a fatal error Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 08/58] ALSA: hda - Add Coffelake PCI ID Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 09/58] ALSA: hda - Apply quirks to Broxton-T, too Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 10/58] fs/exec.c: account for argv/envp pointers Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 11/58] powerpc/perf: Fix oops when kthread execs user process Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 12/58] autofs: sanity check status reported with AUTOFS_DEV_IOCTL_FAIL Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 13/58] fs/dax.c: fix inefficiency in dax_writeback_mapping_range() Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 14/58] lib/cmdline.c: fix get_options() overflow while parsing ranges Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 15/58] perf/x86/intel: Add 1G DTLB load/store miss support for SKL Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 19/58] KVM: s390: gaccess: fix real-space designation asce handling for gmap shadows Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 20/58] KVM: PPC: Book3S HV: Cope with host using large decrementer mode Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 21/58] KVM: PPC: Book3S HV: Preserve userspace HTM state properly Greg Kroah-Hartman
2017-06-27 14:12 ` Greg Kroah-Hartman [this message]
2017-06-27 14:12 ` [PATCH 4.11 23/58] KVM: PPC: Book3S HV: Context-switch EBB registers properly Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 24/58] KVM: PPC: Book3S HV: Restore critical SPRs to host values on guest exit Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 25/58] KVM: PPC: Book3S HV: Save/restore host values of debug registers Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 26/58] CIFS: Improve readdir verbosity Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 27/58] CIFS: Fix some return values in case of error in crypt_message Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 28/58] cxgb4: notify uP to route ctrlq compl to rdma rspq Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 29/58] HID: Add quirk for Dell PIXART OEM mouse Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 30/58] random: silence compiler warnings and fix race Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 31/58] signal: Only reschedule timers on signals timers have sent Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 32/58] powerpc/kprobes: Pause function_graph tracing during jprobes handling Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 33/58] powerpc/64s: Handle data breakpoints in Radix mode Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 34/58] Input: i8042 - add Fujitsu Lifebook AH544 to notimeout list Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 35/58] brcmfmac: add parameter to pass error code in firmware callback Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 36/58] brcmfmac: use firmware callback upon failure to load Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 37/58] brcmfmac: unbind all devices upon failure in firmware callback Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 38/58] time: Fix clock->read(clock) race around clocksource changes Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 39/58] time: Fix CLOCK_MONOTONIC_RAW sub-nanosecond accounting Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 40/58] arm64/vdso: Fix nsec handling for CLOCK_MONOTONIC_RAW Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 41/58] target: Fix kref->refcount underflow in transport_cmd_finish_abort Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 42/58] iscsi-target: Fix delayed logout processing greater than SECONDS_FOR_LOGOUT_COMP Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 43/58] iscsi-target: Reject immediate data underflow larger than SCSI transfer length Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 44/58] drm/radeon: add a PX quirk for another K53TK variant Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 45/58] drm/radeon: add a quirk for Toshiba Satellite L20-183 Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 48/58] drm/amdgpu: add Polaris12 DID Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 49/58] ACPI / scan: Apply default enumeration to devices with ACPI drivers Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 50/58] ACPI / scan: Fix enumeration for special SPI and I2C devices Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 52/58] drm: Fix GETCONNECTOR regression Greg Kroah-Hartman
2017-06-27 14:12   ` Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 53/58] usb: gadget: f_fs: avoid out of bounds access on comp_desc Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 54/58] spi: double time out tolerance Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 55/58] net: phy: fix marvell phy status reading Greg Kroah-Hartman
2017-06-27 14:12 ` [PATCH 4.11 56/58] netfilter: xtables: zero padding in data_to_user Greg Kroah-Hartman
2017-06-27 14:13 ` [PATCH 4.11 57/58] netfilter: xtables: fix build failure from COMPAT_XT_ALIGN outside CONFIG_COMPAT Greg Kroah-Hartman
2017-06-27 14:13 ` [PATCH 4.11 58/58] brcmfmac: fix uninitialized warning in brcmf_usb_probe_phase2() Greg Kroah-Hartman
2017-06-27 19:04 ` [PATCH 4.11 00/58] 4.11.8-stable review Guenter Roeck
2017-06-28 12:03   ` Greg Kroah-Hartman
2017-06-28 13:53 ` Shuah Khan
2017-06-28 15:22   ` Greg Kroah-Hartman

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=20170627141114.303080103@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@ozlabs.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.