"Enlightening" KVM: Hyper-V emulation
summary
KVM implements Hyper-V emulation and a set of specific enlightenments that materially speed Windows guests via QEMU and libvirt changes and kernel MSR hooks. Key results: the Hyper-V clock goes from ~17,000 cycles to ~400 cycles, a nested CPUID loop drops from ~21,000 to ~19,500 cycles (~10% gain), and idle Windows CPU consumption that spiked to ~30% is eliminated by synthetic timers. Most patches are upstream, HV_ALL enables them selectively, and direct synthetic timers are pending on the mailing list.
AI-written summary · about
chapters (29)
- 0:00Introduction
- 0:29What is KVM
- 0:52Linux on KVM
- 1:13Why does it happen
- 1:30How to solve it
- 2:02Writing drivers
- 2:15Clock soars
- 2:34HyperV
- 4:12Overview
- 4:28Relaxed Timing
- 5:34Virtual Epoch
- 7:33Virtualized Spinlocks
- 9:30Virtual Processor Index
- 10:11Runtime Information
- 11:06Crash Information
- 12:05HyperV Clock
- 12:55Synthetic Interrupt Controller
- 13:30Synthetic Timers
- 14:37TLB Buffer
- 15:30Paravirtualized API
- 16:02Vendors
- 16:28HP Reset
- 16:45Nested environments
- 17:03Clocks
- 18:06Enlighten VMC
- 18:48Direct Synthetic Timers
- 19:45Clock Stores
- 20:24Over Committed
- 22:38Windows Server 2016
related talks
26mLessons Learned: Optimizing KVM Performance for EHR Systems
21mEmulating Hyper-V in 2022
23mHyper-V's Virtual Secure Mode in KVM project update
31mKVM Nested Virtualization: Workings and Usecases
25mThe Qemu/KVM ecosystem: Navigating the code!
09mKVM Latency Performance Tuning
15mKeynote: KVM
45mDynamic vCPU priority boosting in KVM for latency sensitive workloads
