Re: [PATCH 2/2] KVM: x86: Fix split-irqchip vs interrupt injection window request

From: Paolo Bonzini
Date: Tue Apr 13 2021 - 08:10:14 EST


On 12/04/21 23:43, Sean Christopherson wrote:
where kvm_arch_interrupt_allowed() checks EFLAGS.IF (and an edge case related to
nested virtualization). KVM also captures EFLAGS.IF in vcpu->run->if_flag.
For whatever reason, QEMU checks both vcpu->run flags before injecting an IRQ,
maybe to handle a case where QEMU itself clears EFLAGS.IF?

It's mostly obsolete code (that will be deprecated in the next version and removed in about a year) so I wouldn't read much into it. if_flag itself is obsolete; it is not provided by SEV-ES, and a useless subset of ready_for_interrupt_injection.

Paolo