From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: KVM: x86: set vcpu runnable when injecting MCE Date: Thu, 2 Sep 2010 20:41:38 -0300 Message-ID: <20100902234138.GA30976@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:57155 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752504Ab0IBXtl (ORCPT ); Thu, 2 Sep 2010 19:49:41 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o82NnfmI019614 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 2 Sep 2010 19:49:41 -0400 Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: 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; } else if (!(banks[1] & MCI_STATUS_VAL) || !(banks[1] & MCI_STATUS_UC)) { if (banks[1] & MCI_STATUS_VAL)