kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* KVM: x86: set vcpu runnable when injecting MCE
@ 2010-09-02 23:41 Marcelo Tosatti
  2010-09-05  8:17 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Marcelo Tosatti @ 2010-09-02 23:41 UTC (permalink / raw)
  To: kvm; +Cc: Avi Kivity


Otherwise an MCE exception to a halted vcpu is only injected when
vcpu is awakened due to unrelated event.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

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)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: KVM: x86: set vcpu runnable when injecting MCE
  2010-09-02 23:41 KVM: x86: set vcpu runnable when injecting MCE Marcelo Tosatti
@ 2010-09-05  8:17 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2010-09-05  8:17 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: kvm

  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<mtosatti@redhat.com>
>
> 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-05  8:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-02 23:41 KVM: x86: set vcpu runnable when injecting MCE Marcelo Tosatti
2010-09-05  8:17 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).