qemu vs. kvm: When to flush the coalesced mmio buffer?
Hi again,
another subtle difference between qemu-kvm and upstream:
When we leave the guest for an IO window (KVM_RUN returns EINTR or EAGAIN), we call kvm_flush_coalesced_mmio_buffer in qemu-kvm but not in upstream. When version is better? I can't find any rationales in both git logs.
Jan
Quoted 9 lines · Jan Kiszka
Hi again,
another subtle difference between qemu-kvm and upstream:
When we leave the guest for an IO window (
KVM_RUNreturns EINTR or EAGAIN), we callkvm_flush_coalesced_mmio_bufferin qemu-kvm but not in upstream. When version is better? I can't find any rationales in both git logs.
Since coalesced mmio is used to prevent unnecessary exits to userspace if vcpu thread is already in userspace why not flush coalesced mmio buffer?
--
Gleb.
Quoted 8 lines · Jan Kiszka
Hi again,
another subtle difference between qemu-kvm and upstream:
When we leave the guest for an IO window (
KVM_RUNreturns EINTR or EAGAIN), we callkvm_flush_coalesced_mmio_bufferin qemu-kvm but not in upstream. When version is better? I can't find any rationales in both git logs.
We must flush on EINTR, otherwise a live migration can leave some mmios in the source host and not replay them on the destination host.
(plus, as Gleb says, if you're in userspace you might as well flush)
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 10 lines · Avi Kivity
Quoted 8 lines · Jan Kiszka
Hi again,
another subtle difference between qemu-kvm and upstream:
When we leave the guest for an IO window (
KVM_RUNreturns EINTR or EAGAIN), we callkvm_flush_coalesced_mmio_bufferin qemu-kvm but not in upstream. When version is better? I can't find any rationales in both git logs.
Quoted 5 lines
We must flush on EINTR, otherwise a live migration can leave some mmios in the source host and not replay them on the destination host.
(plus, as Gleb says, if you're in userspace you might as well flush)
OK, will append a fix to my series.
Thanks,
Jan