summaryrefslogtreecommitdiffstats
path: root/hw/s390x
Commit message (Collapse)AuthorAgeFilesLines
* target-s390x: Pass S390CPU to s390_{add, del}_running_cpu()Andreas Färber2013-02-012-4/+10
| | | | | | | | | This prepares for moving the halted field to CPUState. Most call sites can already supply S390CPU, for some env becomes unused. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* target-s390x: Clean up cpu_inject_*() signaturesAndreas Färber2013-02-011-3/+1
| | | | | | | | | | | | | | | | | | Despite cautioning that S390CPU is needed for upcoming CPUState refactorings, commit 5d69c547d947798cba92d836d06f6e017ba2b19d (s390: I/O interrupt and machine check injection.) added functions cpu_inject_io() and cpu_inject_crw_mchk() with CPUS390XState argument, claiming consistency with cpu_inject_ext(). This complicates making cpu_interrupt() take a CPUState even more and it required to pass &cpu->env from some S390CPU-aware call sites already, creating inconsistency elsewhere. Address that. This also eliminates the need for CPUS390XState in s390_virtio_irq(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* s390: Drop set_bit usage in virtio_ccw.Cornelia Huck2013-01-291-2/+2
| | | | | | | | | | | | set_bit on indicators doesn't go well on 32 bit targets: note: expected 'long unsigned int *' but argument is of type 'uint64_t *' Switch to bit shifts instead. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> [agraf: use 1ULL instead] Signed-off-by: Alexander Graf <agraf@suse.de>
* s390: css error codes.Cornelia Huck2013-01-292-5/+5
| | | | | | | | | | | Changed error codes in the channel subsystem / virtio-ccw code (-EOPNOTSUPP -> -ENOSYS, -ERESTART -> -EINPROGRESS). This should hopefully fix building on mingw32. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* s390: Use s390_cpu_physical_memory_map for tpi.Cornelia Huck2013-01-291-1/+1
| | | | | | | Map the I/O interruption code before calling into css. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* s390: Add s390-ccw-virtio machine.Cornelia Huck2013-01-293-0/+136
| | | | | | | | | Add a new machine type, s390-ccw-virtio, making use of the virtio-ccw transport to present virtio devices as channel devices. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* s390-virtio: Check for NULL device in reset hypercallAndreas Färber2013-01-291-0/+3
| | | | | | | | | | | | s390_virtio_bus_find_mem() may return a NULL VirtIOS390Device. If called with, e.g., args[0] == 0, this leads to a segfault. Fix this by adding error handling as done for other hypercalls. Present since baf0b55a9e57b909b1f8b0f732c0b10242867418 (Implement virtio reset). Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* s390: Move hw files to hw/s390xAlexander Graf2013-01-296-3/+1065
| | | | | | | This moves all files only used by s390 system emulation to hw/s390x. Signed-off-by: Alexander Graf <agraf@suse.de> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
* s390: Make typeinfo constAlexander Graf2013-01-291-1/+1
| | | | | | All TypeInfo definitions should be const. Signed-off-by: Alexander Graf <agraf@suse.de>
* s390: Add new channel I/O based virtio transport.Cornelia Huck2013-01-293-0/+1059
| | | | | | | | Add a new virtio transport that uses channel commands to perform virtio operations. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* s390: Virtual channel subsystem support.Cornelia Huck2013-01-293-0/+1377
| | | | | | | | Provide a mechanism for qemu to provide fully virtual subchannels to the guest. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* s390: Add a hypercall registration interface.Cornelia Huck2013-01-182-0/+37
| | | | | | | | 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>
* s390: Move IPL code into a separate deviceChristian Borntraeger2013-01-182-0/+175
| | | | | | | | | | | | | | | | Lets move the code to setup IPL for external kernel or via the zipl rom into a separate file. This allows to - define a reboot handler, setting up the PSW appropriately - enhance the boot code to IPL disks that contain a bootmap that was created with zipl under LPAR or z/VM (future patch) - reuse that code for several machines (e.g. virtio-ccw and virtio-s390) - allow different machines to provide different defaults Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> [agraf: symbolify initial psw, adjust header file location, fix for QOM] Signed-off-by: Alexander Graf <agraf@suse.de>
* Make all static TypeInfos constAndreas Färber2013-01-104-5/+5
| | | | | | | | | | | | | | | | | | | | | | | Since 39bffca2030950ef6efe57c2fac8327a45ae1015 (qdev: register all types natively through QEMU Object Model), TypeInfo as used in the common, non-iterative pattern is no longer amended with information and should therefore be const. Fix the documented QOM examples: sed -i 's/static TypeInfo/static const TypeInfo/g' include/qom/object.h Since frequently the wrong examples are being copied by contributors of new devices, fix all types in the tree: sed -i 's/^static TypeInfo/static const TypeInfo/g' */*.c sed -i 's/^static TypeInfo/static const TypeInfo/g' */*/*.c This also avoids to piggy-back these changes onto real functional changes or other refactorings. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* softmmu: move remaining include files to include/ subdirectoriesPaolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* softmmu: move include files to include/sysemu/Paolo Bonzini2012-12-193-3/+3
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* misc: move include files to include/qemu/Paolo Bonzini2012-12-192-2/+2
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* monitor: move include files to include/monitor/Paolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* exec: move include files to include/exec/Paolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* janitor: do not rely on indirect inclusions of or from qemu-char.hPaolo Bonzini2012-12-191-0/+1
| | | | | | | | | Various header files rely on qemu-char.h including qemu-config.h or main-loop.h, but they really do not need qemu-char.h at all (particularly interesting is the case of the block layer!). Clean this up, and also add missing inclusions of qemu-char.h itself. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* s390x: Spelling fixes (endianess -> endianness, occured -> occurred)Stefan Weil2012-12-072-4/+4
| | | | | | | Replace also "write into" by "write to". Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* sclp: Fix uninitialized var in handle_write_event_buf().Cornelia Huck2012-11-261-1/+2
| | | | | | | | | | Some gcc versions rightly complain about a possibly unitialized rc, so let's move setting it before the QTAILQ_FOREACH(). Signed-off-by: Cornelia Huck <cornelia.huck@de.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>
* s390: sclp ascii console supportHeinz Graalfs2012-10-292-1/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | | This code adds console support by implementing SCLP's ASCII Console Data event. This is the same console as LPARs ASCII console or z/VMs sysascii. The console can be specified manually with something like -chardev stdio,id=charconsole0 -device sclpconsole,chardev=charconsole0,id=console0 Newer kernels will autodetect that console and prefer that over virtio console. When data is received from the character layer it creates a service interrupt to trigger a Read Event Data command from the guest that will pick up the received character byte-stream. When characters are echo'ed by the linux guest a Write Event Data occurs which is forwarded by the Event Facility to the console that supports a corresponding mask value. Console resizing is not supported. The character layer byte-stream is buffered using a fixed size iov buffer. 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>
* s390: sclp signal quiesce supportHeinz Graalfs2012-10-293-0/+131
| | | | | | | | | | | | | | This implements the sclp signal quiesce event via the SCLP Event Facility. This allows to gracefully shutdown a guest by using system_powerdown notifiers. It creates a service interrupt that will trigger a Read Event Data command from the guest. This code will then add an event that is interpreted by linux guests as ctrl-alt-del. 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>
* s390: sclp event supportHeinz Graalfs2012-10-295-2/+577
| | | | | | | | | | | | | | | Several SCLP features are considered to be events. Those events don't provide SCLP commands on their own, instead they are all based on Read Event Data, Write Event Data, Write Event Mask and the service interrupt. Follow-on patches will provide SCLP's Signal Quiesce (via system_powerdown) and the ASCII console. Further down the road the sclp line mode console and configuration change events (e.g. cpu hotplug) can be implemented. 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>
* s390: sclp base supportHeinz Graalfs2012-10-293-0/+195
| | | | | | | | | | | | | | | 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>
* build: move obj-TARGET-y variables to nested Makefile.objsPaolo Bonzini2012-06-071-0/+3
Also drop duplicate occurrence of device-hotplug.o. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
OpenPOWER on IntegriCloud