Comment 12 for bug 1966499

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Hello folks,
can you give this test kernel a try:
https://people.canonical.com/~phlin/kernel/lp-1966499-kvm-warn-flood/

Which contains the following commits:
 * KVM: VMX: prepare sync_pir_to_irr for running with APICv disabled
 * KVM: x86: Use KVM_BUG/KVM_BUG_ON to handle bugs that are fatal to the VM
 * KVM: Add infrastructure and macro to mark VM as bugged

$ uname -a
Linux fili 5.13.0-41-generic #46+lp1966499v2 SMP Fri Apr 8 05:39:48 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

I am not sure how to reproduce this issue by creating a new VM, so I have it verified on my bare-metal testing node with the hyperv_stimer test in: https://code.launchpad.net/~canonical-kernel-team/+git/kvm-unit-tests
Steps:
1. sudo apt install -y build-essential cpu-checker qemu-kvm git gcc
2. git clone -b hirsute --depth=1 https://code.launchpad.net/~canonical-kernel-team/+git/kvm-unit-tests
3. cd kvm-unit-tests; make standalone
4. sudo ./tests/hyperv_stimer

With unpatched kernel the test will fail with timeout.
And dmesg will be flooded with this warning until disk ran out of space:
  WARNING: CPU: 13 PID: 6997 at arch/x86/kvm/vmx/vmx.c:6336 vmx_sync_pir_to_irr+0x9e/0xc0 [kvm_intel]

With the patched kernel this test will pass with clean dmesg.