This is a note to let you know that I've just added the patch titled
x86/hyper-v: Enable PIT shutdown quirk to the 4.14-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: x86-hyper-v-enable-pit-shutdown-quirk.patch and it can be found in the queue-4.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <sta...@vger.kernel.org> know about it. >From 1de72c706488b7be664a601cf3843bd01e327e58 Mon Sep 17 00:00:00 2001 From: Michael Kelley <mikel...@microsoft.com> Date: Sun, 4 Nov 2018 03:48:57 +0000 Subject: x86/hyper-v: Enable PIT shutdown quirk From: Michael Kelley <mikel...@microsoft.com> commit 1de72c706488b7be664a601cf3843bd01e327e58 upstream. Hyper-V emulation of the PIT has a quirk such that the normal PIT shutdown path doesn't work, because clearing the counter register restarts the timer. Disable the counter clearing on PIT shutdown. Signed-off-by: Michael Kelley <mikel...@microsoft.com> Signed-off-by: Thomas Gleixner <t...@linutronix.de> Cc: "gre...@linuxfoundation.org" <gre...@linuxfoundation.org> Cc: "de...@linuxdriverproject.org" <de...@linuxdriverproject.org> Cc: "daniel.lezc...@linaro.org" <daniel.lezc...@linaro.org> Cc: "virtualizat...@lists.linux-foundation.org" <virtualizat...@lists.linux-foundation.org> Cc: "jgr...@suse.com" <jgr...@suse.com> Cc: "akata...@vmware.com" <akata...@vmware.com> Cc: "o...@aepfle.de" <o...@aepfle.de> Cc: "a...@canonical.com" <a...@canonical.com> Cc: vkuznets <vkuzn...@redhat.com> Cc: "jasow...@redhat.com" <jasow...@redhat.com> Cc: "marcelo.ce...@canonical.com" <marcelo.ce...@canonical.com> Cc: KY Srinivasan <k...@microsoft.com> Cc: sta...@vger.kernel.org Link: https://lkml.kernel.org/r/1541303219-11142-3-git-send-email-mikel...@microsoft.com Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> --- arch/x86/kernel/cpu/mshyperv.c | 11 +++++++++++ 1 file changed, 11 insertions(+) --- a/arch/x86/kernel/cpu/mshyperv.c +++ b/arch/x86/kernel/cpu/mshyperv.c @@ -20,6 +20,7 @@ #include <linux/interrupt.h> #include <linux/irq.h> #include <linux/kexec.h> +#include <linux/i8253.h> #include <asm/processor.h> #include <asm/hypervisor.h> #include <asm/hyperv.h> @@ -243,6 +244,16 @@ static void __init ms_hyperv_init_platfo if (efi_enabled(EFI_BOOT)) x86_platform.get_nmi_reason = hv_get_nmi_reason; + /* + * Hyper-V VMs have a PIT emulation quirk such that zeroing the + * counter register during PIT shutdown restarts the PIT. So it + * continues to interrupt @18.2 HZ. Setting i8253_clear_counter + * to false tells pit_shutdown() not to zero the counter so that + * the PIT really is shutdown. Generation 2 VMs don't have a PIT, + * and setting this value has no effect. + */ + i8253_clear_counter_on_shutdown = false; + #if IS_ENABLED(CONFIG_HYPERV) /* * Setup the hook to get control post apic initialization. Patches currently in stable-queue which might be from mikel...@microsoft.com are queue-4.14/x86-hyper-v-enable-pit-shutdown-quirk.patch queue-4.14/clockevents-drivers-i8253-add-support-for-pit-shutdown-quirk.patch _______________________________________________ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel