29.06.2021 00:47, Jim Mattson пишет:
On Mon, Jun 21, 2021 at 5:27 PM stsp <stsp2@xxxxxxxxx> wrote:
22.06.2021 01:33, Jim Mattson пишет:
Maybe what you want is run->ready_for_interrupt_injection? And, if
that's not set, try KVM_RUN with run->request_interrupt_window set?
static int kvm_vcpu_ready_for_interrupt_injection(struct kvm_vcpu *vcpu)
{
return kvm_arch_interrupt_allowed(vcpu) &&
!kvm_cpu_has_interrupt(vcpu) &&
!kvm_event_needs_reinjection(vcpu) &&
kvm_cpu_accept_dm_intr(vcpu);
}
So judging from this snippet,
I wouldn't bet on the right indication
from run->ready_for_interrupt_injection
In your case, vcpu->arch.exception.injected is true, so
kvm_event_needs_reinjection() returns true. Hence,
kvm_vcpu_ready_for_interrupt_injection() returns false.
Are you seeing that run->ready_for_interrupt_injection is true, or are
you just speculating?
OK, please see this commit:
https://www.lkml.org/lkml/2020/12/1/324
There is simply no such code
any longer. I don't know where
I got the above snippet, but its
not valid. The code is currently:
---
static int kvm_vcpu_ready_for_interrupt_injection(struct kvm_vcpu *vcpu)
{
return kvm_arch_interrupt_allowed(vcpu) &&
kvm_cpu_accept_dm_intr(vcpu);
}