Re: exception vs SIGALRM race (was: Re: guest/host mem out of sync on core2duo?)

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

 



On Mon, Jun 28, 2021 at 3:00 PM stsp <stsp2@xxxxxxxxx> wrote:
>
> 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);
> }

 It looks like Paolo may have broken this in commit 71cc849b7093
("KVM: x86: Fix split-irqchip vs interrupt injection window request").
The commit message seems focused only on
vcpu->arch.interrupt.injected. Perhaps he overlooked
vcpu->arch.exception.injected.




[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