• J
    kvm: Fix IRQ injection into full queue · 80de8ace
    Jan Kiszka 提交于
    User space may only inject interrupts during kvm_arch_pre_run if
    ready_for_interrupt_injection is set in kvm_run. But that field is
    updated on exit from KVM_RUN, so we must ensure that we enter the
    kernel after potentially queuing an interrupt, otherwise we risk to
    loose one - like it happens with the current code against latest
    kernel modules (since kvm-86) that started to queue only a single
    interrupt.
    
    Fix the problem by reordering kvm_cpu_exec.
    
    Credits go to Gleb Natapov for analyzing the issue in details.
    
    (cherry picked from commit 8c14c173)
    Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
    80de8ace
kvm-all.c 16.6 KB