Message ID | 1259761702-4041-4-git-send-email-glommer@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 7e1ce15..65ad2a1 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -825,6 +825,11 @@ static int kvm_get_mp_state(CPUState *env) return ret; } env->mp_state = mp_state.mp_state; + + if (kvm_irqchip_in_kernel()) { + env->halted = (env->mp_state == KVM_MP_STATE_HALTED); + } + return 0; }
If we are using in-kernel irqchip, halted state belongs in the kernel. So everytime we grab kernel's idea of mpstate, we also need to propagate halted state to userspace. Signed-off-by: Glauber Costa <glommer@redhat.com> --- target-i386/kvm.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)