Re: exception vs SIGALRM race (another patch)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



22.06.2021 01:33, Jim Mattson пишет:
Maybe what you want is run->ready_for_interrupt_injection? And, if

I implemented this suggestion with
the patch below:

---

--- x86.c.old   2021-03-20 12:51:14.000000000 +0300
+++ x86.c       2021-06-26 16:51:17.366592310 +0300
@@ -4109,7 +4109,9 @@
 static int kvm_vcpu_ready_for_interrupt_injection(struct kvm_vcpu *vcpu)
 {
        return kvm_arch_interrupt_allowed(vcpu) &&
-               kvm_cpu_accept_dm_intr(vcpu);
+               kvm_cpu_accept_dm_intr(vcpu) &&
+               !vcpu->arch.exception.pending &&
+               !vcpu->arch.exception.injected;
 }

 static int kvm_vcpu_ioctl_interrupt(struct kvm_vcpu *vcpu,

---


With that change I indeed can
look into run->ready_for_interrupt_injection
and avoid the race.
That means a cpu-specific work-around
in my code, but at least that works.
But without this change,
run->ready_for_interrupt_injection
just lies.

Does this bring us any closer to the
understanding of what's going on?
If not, what should I find out next?




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux