diff mbox

[4/4] Make cpu runnable after sipi

Message ID 1252830613-2185-4-git-send-email-gleb@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gleb Natapov Sept. 13, 2009, 8:30 a.m. UTC
Signed-off-by: Gleb Natapov <gleb@redhat.com>
---
 hw/apic.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Comments

Avi Kivity Sept. 13, 2009, 12:05 p.m. UTC | #1
On 09/13/2009 11:30 AM, Gleb Natapov wrote:
> Signed-off-by: Gleb Natapov<gleb@redhat.com>
> ---
>   hw/apic.c |    3 +++
>   1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/hw/apic.c b/hw/apic.c
> index 11d4759..ac5e7ba 100644
> --- a/hw/apic.c
> +++ b/hw/apic.c
> @@ -534,6 +534,9 @@ void apic_sipi(CPUState *env)
>                              env->segs[R_CS].limit, env->segs[R_CS].flags);
>       env->halted = 0;
>       s->wait_for_sipi = 0;
> +#ifdef KVM_CAP_MP_STATE
> +    env->mp_state = KVM_MP_STATE_RUNNABLE;
> +#endif
>   }
>    

-no-kvm-irqchip shouldn't use mp_state at all (since really old kernels 
don't have this ioctl).
diff mbox

Patch

diff --git a/hw/apic.c b/hw/apic.c
index 11d4759..ac5e7ba 100644
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -534,6 +534,9 @@  void apic_sipi(CPUState *env)
                            env->segs[R_CS].limit, env->segs[R_CS].flags);
     env->halted = 0;
     s->wait_for_sipi = 0;
+#ifdef KVM_CAP_MP_STATE
+    env->mp_state = KVM_MP_STATE_RUNNABLE;
+#endif
 }
 
 static void apic_deliver(APICState *s, uint8_t dest, uint8_t dest_mode,