From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: KVM: x86: set vcpu runnable when injecting MCE Date: Sun, 05 Sep 2010 11:17:03 +0300 Message-ID: <4C8351FF.1000702@redhat.com> References: <20100902234138.GA30976@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:1979 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753848Ab0IEIRF (ORCPT ); Sun, 5 Sep 2010 04:17:05 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o858H4N2012671 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 5 Sep 2010 04:17:04 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o858H4Ys023326 for ; Sun, 5 Sep 2010 04:17:04 -0400 In-Reply-To: <20100902234138.GA30976@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On 09/03/2010 02:41 AM, Marcelo Tosatti wrote: > Otherwise an MCE exception to a halted vcpu is only injected when > vcpu is awakened due to unrelated event. > > Signed-off-by: Marcelo Tosatti > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index 4014d6c..86127e8 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -2399,6 +2399,7 @@ static int kvm_vcpu_ioctl_x86_set_mce(struct kvm_vcpu *vcpu, > vcpu->arch.mcg_status = mce->mcg_status; > banks[1] = mce->status; > kvm_queue_exception(vcpu, MC_VECTOR); > + vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE; What happens if the vcpu is in KVM_MP_STATE_UNINITIALIZED? I guess we just don't care? -- error compiling committee.c: too many arguments to function