Skip to contentSkip to conversation

KVM: x86: set vcpu runnable when injecting MCE

PATCH Marcelo Tosatti 2 participants 2 messages Sep 2, 2010 – Sep 5, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

arch/x86/kvm/x86.c +1 -0
index 4014d6c..86127e8 100644
@@ -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)
#1 lore raw
Quoted 10 lines · Marcelo Tosatti

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

arch/x86/kvm/x86.c +0 -0
index 4014d6c..86127e8 100644

arch/x86/kvm/x86.c static int kvm_vcpu_ioctl_x86_set_mce(struct kvm_vcpu *vcpu, · line 2402

Quoted 4 lines
arch/x86/kvm/x86.c +1 -0
@@ -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?

Signature · 1 line
error compiling committee.c: too many arguments to function