From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: KVM on Via Nano (Isaiah) CPUs? Date: Thu, 19 Mar 2009 17:48:49 +0200 Message-ID: <49C26961.6080002@redhat.com> References: <200903180902.29139.andreas.tanz@kvt.de> <200903191610.48032.andreas.tanz@kvt.de> <49C26280.1080007@redhat.com> <200903191634.47628.andreas.tanz@kvt.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: andreas.tanz@kvt.de Return-path: Received: from mx2.redhat.com ([66.187.237.31]:53217 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750722AbZCSPsz (ORCPT ); Thu, 19 Mar 2009 11:48:55 -0400 In-Reply-To: <200903191634.47628.andreas.tanz@kvt.de> Sender: kvm-owner@vger.kernel.org List-ID: Andreas Tanz wrote: > i modded handle_exception as you said : > > 2711 printk(KERN_ERR "vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x%x\n",vcpu->arch.rmode.active); > 2712 int debug_handle_rmode_exception = handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code); > 2713 printk(KERN_ERR "vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x%x\n", debug_handle_rmode_exception > 2714 if (vcpu->arch.rmode.active && debug_handle_rmode_exception) { > This bit is broken. The original code: if (vcpu->arch.rmode.active && handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code)) { Only executes handle_rmode_exception() if rmode.active is true. Your code executes it unconditionally. You can write it as if (vcpu->arch.rmode.active && (retval = handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code))) { Please check for other cases as well. As it happens, the guest crashed immediately after entering protected mode (so rmode.active became false, triggering the bug). -- error compiling committee.c: too many arguments to function