diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2013-02-01 09:06:23 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-02-01 09:06:23 -0600 |
commit | e205842bd91fbd15655ff40a4282b1ffcbc301b1 (patch) | |
tree | b4f3f0b8d149afa34c280a89c5f9ad2722530983 /hw/s390x/s390-virtio.c | |
parent | fabb60424d68b7c3af1be447a1f48c5b9ffe5123 (diff) | |
parent | 49e158785fa86f04e2d4027dd19719d8b79a4421 (diff) |
Merge remote-tracking branch 'agraf/s390-for-upstream' into staging
# By Andreas Färber
# Via Alexander Graf
* agraf/s390-for-upstream:
target-s390x: Pass S390CPU to s390_{add, del}_running_cpu()
target-s390x: Clean up cpu_inject_*() signatures
target-s390x: Fix debug output
target-s390x: Fix debug output (continued)
Diffstat (limited to 'hw/s390x/s390-virtio.c')
-rw-r--r-- | hw/s390x/s390-virtio.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/hw/s390x/s390-virtio.c b/hw/s390x/s390-virtio.c index 2a1d9ac2da..e25c330320 100644 --- a/hw/s390x/s390-virtio.c +++ b/hw/s390x/s390-virtio.c @@ -130,8 +130,10 @@ static void s390_virtio_register_hcalls(void) */ static unsigned s390_running_cpus; -void s390_add_running_cpu(CPUS390XState *env) +void s390_add_running_cpu(S390CPU *cpu) { + CPUS390XState *env = &cpu->env; + if (env->halted) { s390_running_cpus++; env->halted = 0; @@ -139,8 +141,10 @@ void s390_add_running_cpu(CPUS390XState *env) } } -unsigned s390_del_running_cpu(CPUS390XState *env) +unsigned s390_del_running_cpu(S390CPU *cpu) { + CPUS390XState *env = &cpu->env; + if (env->halted == 0) { assert(s390_running_cpus >= 1); s390_running_cpus--; |