KVM: x86: set vcpu runnable when injecting MCE
Otherwise an MCE exception to a halted vcpu is only injected when vcpu is awakened due to unrelated event.
Signed-off-by Marcelo Tosatti <[email protected]>
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 ; }else if (!(banks[1 ] &MCI_STATUS_VAL ) || !(banks[1 ] &MCI_STATUS_UC )) {if (banks[1 ] &MCI_STATUS_VAL )
Quoted 10 lines · Marcelo Tosatti
Otherwise an MCE exception to a halted vcpu is only injected when vcpu is awakened due to unrelated event.
Signed-off-by Marcelo Tosatti<[email protected]>arch/x86/kvm/x86.c +0
-0
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