On Thu, 18 Jul 2024 20:35:37 +0100, Ilias Stamatis wrote: > The current MMIO coalescing design has a few drawbacks which limit its > usefulness. Currently all coalesced MMIO zones use the same ring buffer. > That means that upon a userspace exit we have to handle potentially > unrelated MMIO writes synchronously. And a VM-wide lock needs to be > taken in the kernel when an MMIO exit occurs. > > Additionally, there is no direct way for userspace to be notified about > coalesced MMIO writes. If the next MMIO exit to userspace is when the > ring buffer has filled then a substantial (and unbounded) amount of time > may have passed since the first coalesced MMIO. > > [...] Applied patch 1 to kvm-x86 generic. I deliberately didn't put this in fixes or Cc: it for stable, as the bug has been around for sooo long without anyone noticing that there's basically zero chance that the bug is actively causing issues. I also reworked and expanded the changelog significantly to make it more clear why things break, what the fallout is (KVM can _sometimes_ use the full ring), and to call out that the lockless scheme that the buggy commit was preparing for never seems to have landed. Please take a gander at the changelog and holler if I messed anything up. [1/6] KVM: Fix coalesced_mmio_has_room() to avoid premature userspace exit https://github.com/kvm-x86/linux/commit/92f6d4130497 -- https://github.com/kvm-x86/linux/tree/next