Gleb Natapov wrote: > On Wed, Sep 24, 2008 at 02:56:40PM +0200, Jan Kiszka wrote: >>> We should do something like this: >>> >>> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c >>> index 046a91b..860e66d 100644 >>> --- a/arch/x86/kvm/vmx.c >>> +++ b/arch/x86/kvm/vmx.c >>> @@ -2826,10 +2826,20 @@ static int handle_task_switch(struct kvm_vcpu >>> *vcpu, struct kvm_run *kvm_run) >>> unsigned long exit_qualification; >>> u16 tss_selector; >>> int reason; >>> + struct vcpu_vmx *vmx = to_vmx(vcpu); >>> >>> exit_qualification = vmcs_readl(EXIT_QUALIFICATION); >>> >>> reason = (u32)exit_qualification >> 30; >>> + >>> + if (reason == TASK_SWITCH_GATE && vmx->vcpu.arch.nmi_injected && >>> + (vmx->idt_vectoring_info & VECTORING_INFO_VALID_MASK) && >>> + (vmx->idt_vectoring_info & VECTORING_INFO_TYPE_MASK) == >>> INTR_TYPE_NMI_INTR) { >>> + vcpu->arch.nmi_injected = false; >>> + vmcs_set_bits(GUEST_INTERRUPTIBILITY_INFO, >>> + GUEST_INTR_STATE_NMI); >>> + printk(KERN_DEBUG"NMI cause task switch. No need to >>> reinject\n"); >>> + } >> OK, I just think we are not supposed to set GUEST_INTR_STATE_NMI without >> cpu_has_virtual_nmis(). Otherwise looks reasonable. Have you tested >> this? Does it make your 2003 power-off? >> > It does power-off, but hands during reboot. Looking at it right now.
Yeah, with your patch I'm getting a totally different Blue Screen on spurious manual NMI injection: "Hardware Malfunction Call your hardware vendor for support" 8) Jan -- Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html