Commit Graph

28 Commits

Author SHA1 Message Date
Andreas Färber bdc44640cb cpu: Use QTAILQ for CPU list
Introduce CPU_FOREACH(), CPU_FOREACH_SAFE() and CPU_NEXT() shorthand
macros.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-09-03 12:25:55 +02:00
Christian Borntraeger f077847572 s390: Implement load normal reset
kdump on s390 uses a load normal reset to bring the system in a defined
state by doing a subsystem reset. The issuing CPUs will have an initial
CPU reset, all other CPUs will have a CPU reset as defined in POP (no
register content will change).

Implement this as architectured.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
2013-08-30 14:16:48 +02:00
Eugene (jno) Dvurechenski 268846ba93 s390/kvm: basic implementation of diagnose 308 subcode 6
Linux uses a check for subcode 6 to decide if other subcodes are
available. Provide a minimal implementation for subcode 6, as well
as for subcode 5.

Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
[Move code from kvm.c into misc_helper.c]
2013-08-30 12:48:25 +02:00
Alex Bligh bc72ad6754 aio / timers: Switch entire codebase to the new timer API
This is an autogenerated patch using scripts/switch-timer-api.

Switch the entire code base to using the new timer API.

Note this patch may introduce some line length issues.

Signed-off-by: Alex Bligh <alex@alex.org.uk>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-08-22 19:14:24 +02:00
Cornelia Huck 28e942f86d s390: Add a hypercall registration interface.
Allow virtio machines to register for different diag500 function
codes and convert s390-virtio to use it.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2013-01-18 19:07:47 +01:00
Stefan Weil a158986d85 s390x: Remove inline function ebcdic_put and related data from cpu.h
The function is only used in misc_helper.c, so move it to that file.

This reduces the size of debug executables (compiled without optimization)
because they get unused code and data for each compilation which includes
cpu.h.

Executables with optimization don't change their size.

ebcdic2ascii is currently unused and could be removed (not done here).

The array ascii2ebcdic must be accessed with an unsigned index, therefore
(int)ascii[i] was replaced by (uint8_t)ascii[i]. The old code would have
failed for a signed char less than 0. The current code only converts
"QEMU" and spaces to EBCDIC, so there is no problem today.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2013-01-18 19:07:47 +01:00
Richard Henderson dc458df91d target-s390: Convert SERVC
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:43 -08:00
Richard Henderson d14b3e09b2 target-s390: Convert STSI
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:43 -08:00
Richard Henderson 39a5003c89 target-s390: Convert STCKE
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:43 -08:00
Richard Henderson e805a0d39e target-s390: Convert SPX, STPX
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:43 -08:00
Richard Henderson c4f0a863c3 target-s390: Convert SPT, STPT
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:42 -08:00
Richard Henderson dd3eb7b54f target-s390: Convert SCKC, STCKC
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:42 -08:00
Richard Henderson 434c91a5f4 target-s390: Convert STCK
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:42 -08:00
Richard Henderson 3528979951 target-s390: Convert SCK
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:42 -08:00
Richard Henderson 71bd666963 target-s390: Convert STIDP
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:42 -08:00
Richard Henderson b4e2bd3563 target-s390: Send signals for divide
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:37 -08:00
Richard Henderson d5a103cd6e target-s390: Reorg exception handling
Make the user path more like the system path.  Prepare for more kinds
of runtime exceptions.  Rename ILC to ILEN to make it clear that we
want to pass around a full instruction length, rather than a "code"
that happens to be stored one bit left in a larger field.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:00:28 -08:00
Andreas Färber 501a7ce727 Merge branch 'master' of git://git.qemu.org/qemu into qom-cpu
Adapt header include paths.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-12-23 00:40:49 +01:00
Andreas Färber 1bc22652d6 kvm: Pass CPUState to kvm_vcpu_ioctl()
Adapt helper functions to pass X86CPU / PowerPCCPU / S390CPU.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-12-19 14:09:31 +01:00
Paolo Bonzini 9c17d615a6 softmmu: move include files to include/sysemu/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19 08:32:45 +01:00
Paolo Bonzini 1de7afc984 misc: move include files to include/qemu/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19 08:32:39 +01:00
Paolo Bonzini 022c62cbbc exec: move include files to include/exec/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19 08:31:31 +01:00
Heinz Graalfs f6c98f9286 s390: sclp base support
This adds a more generic infrastructure for handling Service-Call
requests on s390. Currently we only support a small subset of Read
SCP Info directly in target-s390x. This patch provides the base
infrastructure for supporting more commands and moves Read SCP
Info.
In the future we could add additional commands for hotplug, call
home and event handling.

Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2012-10-29 19:41:55 +01:00
Avi Kivity 0e8a6d47af s390: avoid reaching into memory core internals
use cpu_physical_memory_is_io() instead.

Signed-off-by: Avi Kivity <avi@redhat.com>
2012-10-22 14:50:07 +02:00
Richard Henderson 0d404541b2 target-s390x: Use CPU_LOG_INT
Three places in the interrupt code did we not honor the mask.

Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-09-27 21:44:36 +02:00
Blue Swirl 19b0516fb4 target-s390x: switch to AREG0 free mode
Add an explicit CPUState parameter instead of relying on AREG0.

Remove temporary wrappers and switch to AREG0 free mode.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
[agraf: fix conflicts]
Signed-off-by: Alexander Graf <agraf@suse.de>
2012-09-10 13:38:33 +02:00
Blue Swirl 089f5c0692 target-s390x: avoid AREG0 for misc helpers
Make misc helpers take a parameter for CPUState instead
of relying on global env.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
[agraf: fix conflict]
Signed-off-by: Alexander Graf <agraf@suse.de>
2012-09-10 13:38:33 +02:00
Blue Swirl aea1e885b2 target-s390x: rename op_helper.c to misc_helper.c
Now op_helper.c contains miscellaneous helpers, rename
it to misc_helper.c.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
[agraf: fix conflict]
Signed-off-by: Alexander Graf <agraf@suse.de>
2012-09-10 13:38:32 +02:00