lkml.org 
[lkml]   [2021]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/2] KVM: x86: Fix split-irqchip vs interrupt injection window request
Date
On 15/04/21 02:59, Lai Jiangshan wrote:
> The next call to inject_pending_event() will reach here AT FIRST with
> vcpu->arch.exception.injected==false and vcpu->arch.exception.pending==false
>
>> ... if (!vcpu->arch.exception.pending) {
>> if (vcpu->arch.nmi_injected) {
>> static_call(kvm_x86_set_nmi)(vcpu);
>> can_inject = false;
>> } else if (vcpu->arch.interrupt.injected) {
>> static_call(kvm_x86_set_irq)(vcpu);
>> can_inject = false;
>
> And comes here and vcpu->arch.interrupt.injected is true for there is
> an interrupt queued by KVM_INTERRUPT for pure user irqchip. It then does
> the injection of the interrupt without checking the EFLAGS.IF.

Ok, understood now. Yeah, that could be a problem for userspace irqchip
so we should switch it to use pending_external_vector instead. Are you
going to write the patch or should I?

Thanks!

Paolo

> My question is that what stops the next call to inject_pending_event()
> to reach here when KVM_INTERRUPT is called with exepction pending.

\
 
 \ /
  Last update: 2021-04-15 08:08    [W:0.075 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site