Yang, Sheng wrote:
> From 4942a5c35c97e5edb6fe1303e04fb86f25cac345 Mon Sep 17 00:00:00 2001
> From: Sheng Yang <[EMAIL PROTECTED]>
> Date: Thu, 8 May 2008 16:00:57 +0800
> Subject: [PATCH 3/4] KVM: VMX: Enable NMI with in-kernel irqchip
>
>
>  static void kvm_do_inject_irq(struct kvm_vcpu *vcpu)
>  {
>       int word_index = __ffs(vcpu->arch.irq_summary);
> @@ -2146,9 +2159,11 @@ static void do_interrupt_requests(struct kvm_vcpu 
> *vcpu,
>               /*
>                * Interrupts blocked.  Wait for unblock.
>                */
> -             cpu_based_vm_exec_control |= CPU_BASED_VIRTUAL_INTR_PENDING;
> +             cpu_based_vm_exec_control |=
> +                     CPU_BASED_VIRTUAL_INTR_PENDING;
>       else
> -             cpu_based_vm_exec_control &= ~CPU_BASED_VIRTUAL_INTR_PENDING;
> +             cpu_based_vm_exec_control &=
> +                     ~CPU_BASED_VIRTUAL_INTR_PENDING;
>   

This seems spurious.

>       /* We need to handle NMIs before interrupts are enabled */
> -     if ((intr_info & INTR_INFO_INTR_TYPE_MASK) == 0x200) { /* nmi */
> +     if ((intr_info & INTR_INFO_INTR_TYPE_MASK) == 0x200) {
>               KVMTRACE_0D(NMI, vcpu, handler);
> -             asm("int $2");
> +             if (!cpu_has_virtual_nmis())
> +                     asm("int $2");
>       }
>  }
>   

That's a host nmi.  So does the PIN_BASED_VIRTUAL_NMI mean NMIs are 
handled like unacked host interrupts?

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to 
panic.


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to