Comment 10 for bug 1917138

Revision history for this message
Guilherme G. Piccoli (gpiccoli) wrote : Re: kernel 4.15.0-136 causes dosemu2 with kvm freezes

Hi Bambang, thanks a lot for your testing! I'll need you to test one more kernel to be 100% sure of the issue and be able to fix it. Let me elaborate on what's happening.

So, since kernel 4.15.0-136 we included a very complex KVM fix for a kind of "race" in interrupt window triggered by David Woodhouse [0] and analyzed by some members of KVM community (causing a live-lock - I suggest reading [0], very informative thread). The fix was proposed in the form of a patch series containing 2 patches [1] from Paolo Bonzini. This was merged in Ubuntu though the stable tree, in the form of the following commit:

71cc849b7093 ("KVM: x86: Fix split-irqchip vs interrupt injection window request") [2]

The problem is that such commit has a companion required commit, which was not proposed in the stable tree. In fact, there was a confusion among KVM community and the stable maintainer [3], due to the lack of such missing commit - because of that, the series was removed from stable trees 4.14.y and 4.9.y, but the solo commit was merged alone in Ubuntu kernel 4.15.

My theory is that this commit alone is causing an odd behavior (specially since dosemu2 seems to make use of leagacy PIC instead of APIC), so the fix would be to merge the companion commit in Ubuntu tree:

72c3bcdcda49 ("KVM: x86: handle !lapic_in_kernel case in kvm_cpu_*_extint") [4]

It's interesting to note that after the stable confusion in [3], both commits were removed from 4.9.y and 4.14.y trees - I intend to submit both to 4.14.y tree after the next test, as well as merge it on Ubuntu kernel.

I'll defer the test for next comment, in order to not pollute this one (which is already big and a bit over-detailed).
Cheers,

Guilherme

[0] https://lore<email address hidden>/
[1] https://<email address hidden>/
[2] http://git.kernel.org/linus/71cc849b70
[3] https://<email address hidden>/
[4] http://git.kernel.org/linus/72c3bcdcda