lkml.org 
[lkml]   [2015]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 6/6] KVM: nVMX: Enable nested posted interrupt processing


On 02/02/2015 16:33, Wincy Van wrote:
> static void vmx_accomp_nested_posted_intr(struct kvm_vcpu *vcpu)
> {
> struct vcpu_vmx *vmx = to_vmx(vcpu);
>
> if (is_guest_mode(vcpu) &&
> vmx->nested.posted_intr_nv != -1 &&
> pi_test_on(vmx->nested.pi_desc))
> kvm_apic_set_irr(vcpu,
> vmx->nested.posted_intr_nv);
> }
>
> Then we will get an nested-vmexit in vmx_check_nested_events, that
> posted intr will be handled by L1 immediately.
> This mechanism will also emulate the hardware's behavior: If a posted
> intr was not accomplished by hardware, we will get an interrupt with
> POSTED_INTR_NV.

Yes.

> Would this be better?

I think you do not even need a new bit. You can use KVM_REQ_EVENT and
(to complete my suggestion, which was not enough) do the above in
vmx_check_nested_events.

Paolo


\
 
 \ /
  Last update: 2015-02-02 17:21    [W:0.241 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site