mirror of https://gitee.com/openkylin/qemu.git
kvm: Flush coalesced mmio buffer on IO window exits
We must flush pending mmio writes if we leave kvm_cpu_exec for an IO window. Otherwise we risk to loose those requests when migrating to a different host during that window. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
parent
110761987d
commit
b0c883b5e0
|
@ -918,6 +918,8 @@ int kvm_cpu_exec(CPUState *env)
|
|||
cpu_single_env = env;
|
||||
kvm_arch_post_run(env, run);
|
||||
|
||||
kvm_flush_coalesced_mmio_buffer();
|
||||
|
||||
if (ret == -EINTR || ret == -EAGAIN) {
|
||||
cpu_exit(env);
|
||||
DPRINTF("io window exit\n");
|
||||
|
@ -930,8 +932,6 @@ int kvm_cpu_exec(CPUState *env)
|
|||
abort();
|
||||
}
|
||||
|
||||
kvm_flush_coalesced_mmio_buffer();
|
||||
|
||||
ret = 0; /* exit loop */
|
||||
switch (run->exit_reason) {
|
||||
case KVM_EXIT_IO:
|
||||
|
|
Loading…
Reference in New Issue