From 8a0a9cf35bd1abc7a9a11f430a6b14e034f34ba0 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Fri, 18 Nov 2011 16:45:54 +0100 Subject: s390x: add TR function for EXECUTE Newer gcc versions (or glibc?) also generate code that tries to EXECUTE the TR opcode. Implement it so that we don't break valid guests. Reported-by: Andreas Faerber Signed-off-by: Alexander Graf --- target-s390x/op_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target-s390x/op_helper.c b/target-s390x/op_helper.c index 137bae74a..5ddc7b93c 100644 --- a/target-s390x/op_helper.c +++ b/target-s390x/op_helper.c @@ -636,6 +636,9 @@ uint32_t HELPER(ex)(uint32_t cc, uint64_t v1, uint64_t addr, uint64_t ret) case 0x700: cc = helper_xc(l, get_address(0, b1, d1), get_address(0, b2, d2)); break; + case 0xc00: + helper_tr(l, get_address(0, b1, d1), get_address(0, b2, d2)); + break; default: goto abort; break; -- cgit v1.2.3 From d194ba1cdbeee54166845b75f9186a8e401e5f07 Mon Sep 17 00:00:00 2001 From: Christian Borntraeger Date: Sun, 20 Nov 2011 23:12:03 +0000 Subject: s390: fix cpu hotplug / cpu activity on interrupts 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 Signed-off-by: Alexander Graf (cherry picked from commit 93116ac0cf9734e7b28886aedf03848b37d6785e) --- target-s390x/kvm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index 40b0ab192..b1404bfd2 100644 --- 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; -- cgit v1.2.3