Avi Kivity wrote: > Gleb Natapov wrote: >> Signed-off-by: Gleb Natapov <gleb@xxxxxxxxxx> >> > > This is actually not just a rewrite, but also a bugfix: > >> INTR_INFO); >> @@ -3289,34 +3288,42 @@ static void vmx_complete_interrupts(struct >> vcpu_vmx *vmx) >> vmx->vnmi_blocked_time += >> ktime_to_ns(ktime_sub(ktime_get(), vmx->entry_time)); >> >> + vmx->vcpu.arch.nmi_injected = false; >> + kvm_clear_exception_queue(&vmx->vcpu); >> + kvm_clear_interrupt_queue(&vmx->vcpu); >> + >> + if (!idtv_info_valid) >> + return; >> + >> vector = idt_vectoring_info & VECTORING_INFO_VECTOR_MASK; >> type = idt_vectoring_info & VECTORING_INFO_TYPE_MASK; >> - if (vmx->vcpu.arch.nmi_injected) { >> + >> + switch(type) { >> + case INTR_TYPE_NMI_INTR: >> + vmx->vcpu.arch.nmi_injected = true; >> /* >> > > The existing code would leave nmi_injected == false if we exit on > NMI_INTR, so we drop an NMI here. > I think NMI_INTR and nmi_injected always go together. However, the rework looks good and more logical to me, too. Will see that I can give this (more precisely -v2) a try with our scenarios ASAP. Jan
Attachment:
signature.asc
Description: OpenPGP digital signature