[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d74d36b4-3376-2577-f81e-cb819e676fb4@redhat.com>
Date: Wed, 8 Feb 2017 17:23:18 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Radim Krčmář <rkrcmar@...hat.com>
Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
"Wu, Feng" <feng.wu@...el.com>
Subject: Re: [PATCH 6/6] kvm: x86: do not use KVM_REQ_EVENT for APICv
interrupt injection
On 07/02/2017 20:58, Radim Krčmář wrote:
>> - local_irq_disable();
>> + if (kvm_lapic_enabled(vcpu)) {
>> + /*
>> + * This handles the case where a posted interrupt was
>> + * notified with kvm_vcpu_kick.
>> + */
>> + if (kvm_x86_ops->sync_pir_to_irr)
>> + kvm_x86_ops->sync_pir_to_irr(vcpu);
> Hm, this is not working well when nesting while L1 has assigned devices:
> if the posted interrupt arrives just before local_irq_disable(), then
> we'll just enter L2 instead of doing a nested VM exit (in case we have
> interrupt exiting).
>
> And after reading the code a bit, I think we allow posted interrupts in
> L2 while L1 has assigned devices that use posted interrupts, and that it
> doesn't work.
So you mean the interrupt is delivered to L2? The fix would be to wrap
L2 entry and exit with some subset of pi_pre_block/pi_post_block.
Paolo
Powered by blists - more mailing lists