diff mbox

s390: fix cpu hotplug / cpu activity on interrupts

Message ID 4ECA15E3.4010107@de.ibm.com
State New
Headers show

Commit Message

Christian Borntraeger Nov. 21, 2011, 9:12 a.m. UTC
The add_del/running_cpu code and env->halted are tracking stopped cpus.
Sleeping cpus (idle and enabled for interrupts) are waiting inside the
kernel.
No interrupt besides the restart can move a cpu from stopped to
operational. This is already handled over there. So lets just remove
the bogus wakup from the common interrupt delivery, otherwise any
interrupt will wake up a cpu, even if this cpu is stopped (Thus leading
to strange hangs on sigp restart)
    
This fixes
echo 0 > /sys/devices/system/cpu/cpu0/online
echo 1 > /sys/devices/system/cpu/cpu0/online
in the guest
   
Signed-off-by: Christian Borntraeger<borntraeger@de.ibm.com>

Comments

Alexander Graf Dec. 19, 2011, 12:48 p.m. UTC | #1
On 21.11.2011, at 10:12, Christian Borntraeger wrote:

> The add_del/running_cpu code and env->halted are tracking stopped cpus.
> Sleeping cpus (idle and enabled for interrupts) are waiting inside the
> kernel.
> No interrupt besides the restart can move a cpu from stopped to
> operational. This is already handled over there. So lets just remove
> the bogus wakup from the common interrupt delivery, otherwise any
> interrupt will wake up a cpu, even if this cpu is stopped (Thus leading
> to strange hangs on sigp restart)
> 
> This fixes
> echo 0 > /sys/devices/system/cpu/cpu0/online
> echo 1 > /sys/devices/system/cpu/cpu0/online
> in the guest
> 
> Signed-off-by: Christian Borntraeger<borntraeger@de.ibm.com>

Thanks, applied to s390-next


Alex
diff mbox

Patch

--- a/target-s390x/kvm.c
+++ b/target-s390x/kvm.c
@@ -185,9 +185,6 @@  void kvm_s390_interrupt_internal(CPUState *env, int type, uint32_t parm,
         return;
     }
 
-    s390_add_running_cpu(env);
-    qemu_cpu_kick(env);
-
     kvmint.type = type;
     kvmint.parm = parm;
     kvmint.parm64 = parm64;