lkml.org 
[lkml]   [2021]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] KVM: x86: Fix split-irqchip vs interrupt injection window request
From
Date
On 13/04/21 13:03, Lai Jiangshan wrote:
> This patch claims that it has a place to
> stash the IRQ when EFLAGS.IF=0, but inject_pending_event() seams to ignore
> EFLAGS.IF and queues the IRQ to the guest directly in the first branch
> of using "kvm_x86_ops.set_irq(vcpu)".

This is only true for pure-userspace irqchip. For split-irqchip, in
which case the "place to stash" the interrupt is
vcpu->arch.pending_external_vector.

For pure-userspace irqchip, KVM_INTERRUPT only cares about being able to
stash the interrupt in vcpu->arch.interrupt.injected. It is indeed
wrong for userspace to call KVM_INTERRUPT if the vCPU is not ready for
interrupt injection, but KVM_INTERRUPT does not return an error.

Ignoring the fact that this would be incorrect use of the API, are you
saying that the incorrect injection was not possible before this patch?

Paolo

\
 
 \ /
  Last update: 2021-04-13 14:16    [W:0.084 / U:3.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site