Skip to content

i8253: Fix PIT shutdown quirk on Hyper-V

Michael Kelley lkml virtualization 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesNew
  2. v12 patches 3 repliesSuperseded

Changes in v2 from the cover letter

* Instead of a function call to check if running on Hyper-V, use a global variable to control whether the counter register is zero'ed. [Juergen Gross & Thomas Gleixner]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2i8253: Add support for PIT shutdown quirkdrivers/clocksource/i8253.c include/linux/i8253.h+13 -20 replies
2/2x86/hyper-v: Enable PIT shutdown quirkarch/x86/kernel/cpu/mshyperv.c+11 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] i8253: Fix PIT shutdown quirk on Hyper-V

pit_shutdown() doesn't work on Hyper-V because of a quirk in the PIT emulation. This problem exists in all versions of Hyper-V and had not been noticed previously. When the counter register is set to zero, the emulated PIT continues to interrupt @18.2 HZ.

Account for this quirk by adding a global variable in the i8253 code that controls whether the counter register is zero'ed. Then in Hyper-V initialization code, override the default setting so the counter register is not zero'ed.

Changes in v2:
* Instead of a function call to check if running on Hyper-V, use a global variable to control whether the counter register is zero'ed. [Juergen Gross & Thomas Gleixner]

Michael Kelley (2):
i8253: Add support for PIT shutdown quirk
x86/hyper-v: Enable PIT shutdown quirk

 arch/x86/kernel/cpu/mshyperv.c | 11 +++++++++++
 drivers/clocksource/i8253.c    | 14 ++++++++++++--
 include/linux/i8253.h          |  1 +
 3 files changed, 24 insertions(+), 2 deletions(-)
Signature · 1 line
1.8.3.1