virtio-ccw: fix build breakage on windows
event_notifier_get_fd() is not available on windows hosts. Fix this bymoving the calls to event_notifier_get_fd() to the kvm code.
Reported-by: Stefan Weil <sw@weilnetz.de>Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>...
virtio-ccw: Wire up guest and host notifies.
Guest and host notifiers are needed by vhost. We use ioeventfds forthe guest notifiers, but need to fall back on qemu injecting interruptsfor the host notifiers.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
s390/virtio-ccw: Fix virtio reset
On virtio reset we must reset the indicator to avoid stale interrupts,e.g. after a reset.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>Cc: qemu-stable@nongnu.orgSigned-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
virtio-ccw: Wire up ioeventfd.
On hosts that support ioeventfd, make use of it for host-to-guestnotifications via diagnose 500.
virtio-rng: Fix crash with non-default backend
'default_backend' isn't always set, but 'rng' is, so use that.
$ ./x86_64-softmmu/qemu-system-x86_64 -object rng-random,id=rng0,filename=/dev/random -device virtio-rng-pci,rng=rng0Segmentation fault (core dumped)...
virtio-ccw: Fix unsetting of indicators.
Interpretation of the ccws to register (configuration) indicators containeda thinko: We want to disallow reading from 0, but setting the indicatorpointer to 0 is fine.
Let's fix the handling for CCW_CMD_SET{,_CONF}_IND....
s390x/css: Fix concurrent sense.
Fix an off-by-one error when indicating availablity of concurrentsense data.
Cc: qemu-stable@nongnu.orgSigned-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
virtio-net-x: forward the netclient name and type.
This forwards the name and the type of virtio-net-x to fix the badbehaviour of "info network" command.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Message-id: 1368619970-23892-3-git-send-email-fred.konrad@greensocs.com...
S390: Merging s390_ipl_cpu and s390_ipl_reset
There is no use in have this splitted in two functions.
Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>Signed-off-by: Alexander Graf <agraf@suse.de>
S390: Add virtio-blk boot
If no kernel IPL entry is specified, boot the bios and pass if availabledevice information for the first boot device (as given by the boot index).
The provided information will be used in the next commit from the BIOS.
Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>...
S390: BIOS check for file
Add a check if the BIOS blob exists before trying to load.
virtio-serial: fix command line compatibility.
The bus name is wrong since the refactoring.
This keeps the behaviour of the command line.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>Message-id: 1367330931-12994-5-git-send-email-fred.konrad@greensocs.com...
virtio-scsi: fix the command line compatibility.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>Message-id: 1367330931-12994-6-git-send-email-fred.konrad@greensocs.com...
virtio-x-bus: force bus name to virtio-bus.
When the proxy id is set, this bus takes the name "id.0" which is expectedto be the virtio-device's first bus.
So force this name to "virtio-bus" as it is an internal bus.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>...
virtio-rng-s390: add properties.
I don't see any reason why these properties are missing.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Note: Need to apply virtio-rng-refactoring first!Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>Signed-off-by: Alexander Graf <agraf@suse.de>
S390: IPL: Use different firmware for different machines
We have a virtio-s390 and a virtio-ccw machine in QEMU. Both use vastlydifferent ways to do I/O. Having the same firmware blob for both doesn'treally make any sense.
Instead, let's parametrize the firmware file name, so that we can have...
S390: CCW: Use new, working firmware by default
Since we now have working firmware for s390-ccw in the tree, we candefault to it on our s390-ccw machine, rendering it more useful.
Signed-off-by: Alexander Graf <agraf@suse.de>
S390: Make IPL reset address dynamic
We can have different load addresses for different blobs we boot with.Make the reset IP dynamic, so that we can handle things more flexibly.
S390: IPL: Support ELF firmware
Our firmware blob is always a raw file that we load at a fixed address today.Support loading an ELF blob instead that we can map high up in memory.
This way we don't have to be so conscious about size constraints.
virtio: Fix compilation without CONFIG_VHOST_SCSI
Signed-off-by: Ed Maste <emaste@freebsd.org>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
virtio-ccw: Check indicators location.
If a guest neglected to register (secondary) indicators but still runswith notifications enabled, we might end up writing to guest zero;avoid this by checking for valid indicators and only writing to theguest and generating an interrupt if indicators have been setup....
virtio-bus: make virtio_x_bus_new static.
virtio_x_bus_new are only used in file scope.So this make them static.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Message-id: 1366791683-5350-3-git-send-email-fred.konrad@greensocs.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio: remove the function pointer.
This remove the function pointer in VirtIODevice, and use onlyVirtioDeviceClass function pointer.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Message-id: 1366791683-5350-5-git-send-email-fred.konrad@greensocs.com...
virtio: remove virtiobindings.
This remove virtio-bindings, and use class instead.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Message-id: 1366791683-5350-6-git-send-email-fred.konrad@greensocs.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-rng: add virtio-rng device.
Create virtio-rng-device which extends virtio-device, so it can be connected onvirtio-bus.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>Acked-by: Amit Shah <amit.shah@redhat.com>...
virtio-rng-s390: switch to the new API.
Here the virtio-rng-s390 is modified for the new API. The devicevirtio-rng-s390 extends virtio-s390-device as before. It creates andconnects a virtio-rng during the init. The properties are not modified.
virtio-rng-ccw: switch to the new API.
Here the virtio-rng-ccw is modified for the new API. The devicevirtio-rng-pci extends virtio-pci. It creates and connects a virtio-rng-deviceduring the init. The properties are not changed.
vhost-scsi-s390: new device supporting the tcm_vhost Linux kernel module
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Asias He <asias@redhat.com>Cc: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>...
vhost-scsi-ccw: new device supporting the tcm_vhost Linux kernel module
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virtio-scsi: create VirtIOSCSICommon
This patch refactors existing virtio-scsi code into VirtIOSCSICommonin order to allow virtio_scsi_init_common() to be used by both internalvirtio_scsi_init() and external vhost-scsi-pci code.
Cc: Michael S. Tsirkin <mst@redhat.com>...
virtio-net-s390: switch to the new API.
Here the virtio-net-s390 is modified for the new API. The devicevirtio-net-s390 extends virtio-s390-device as before. It creates andconnects a virtio-net-device during the init. The properties are not modified.
virtio-net-ccw: switch to the new API.
Here the virtio-net-ccw is modified for the new API. The devicevirtio-net-ccw extends virtio-ccw-device as before. It creates andconnects a virtio-net-device during the init. The properties are not modified.
virtio-net: add the virtio-net device.
Create virtio-net-device which extends virtio-device, so it can be connected onvirtio-bus.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>Message-id: 1365690602-22729-3-git-send-email-fred.konrad@greensocs.com...
virtio-balloon: fix dynamic properties.
To keep compatibility with the old virtio-balloon-x, add the dynamic propertiesto virtio-balloon-pci and virtio-balloon-ccw.
Cc: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>...
virtio-serial-s390: switch to the new API.
Here the virtio-serial-s390 is modified for the new API. The devicevirtio-serial-s390 extends virtio-s390-device as before. It creates andconnects a virtio-serial during the init. The properties are notmodified....
virtio-serial-ccw: switch to the new API.
Here the virtio-serial-ccw is modified for the new API. The devicevirtio-serial-ccw extends virtio-ccw-device as before. It creates andconnects a virtio-serial during the init. The properties are not modified....
virtio-serial: add the virtio-serial device.
Create virtio-serial which extends virtio-device, so it can be connectedon virtio-bus.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>...
Typo, spelling and grammatical fixes
Minor fixes to documentation and code comments.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw: move char devices to hw/char/, configure via default-configs/
hw: move headers to include/
Many of these should be cleaned up with proper qdev-/QOM-ification.Right now there are many catch-all headers in include/hw/ARCH dependingon cpu.h, and this makes it necessary to compile these files per-target.However, fixing this does not belong in these patches....
virtio-balloon-ccw: switch to the new API.
Here the virtio-balloon-ccw is modified for the new API. The devicevirtio-balloon-ccw extends virtio-ccw-device as before. It creates andconnects a virtio-balloon during the init. The properties are not modified....
virtio-ccw: Queue sanity check for notify hypercall.
Verify that the virtio-ccw notify hypercall passed a reasonablevalue for queue.
Cc: qemu-stable@nongnu.orgReported-by: Alexander Graf <agraf@suse.de>Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
virtio-scsi-s390: switch to the new API.
Here the virtio-scsi-s390 is modified for the new API. The devicevirtio-scsi-s390 extends virtio-s390-device as before. It creates andconnects a virtio-scsi during the init. The properties are not modified.
virtio-scsi-ccw: switch to new API
Here the virtio-scsi-ccw is modified for the new API. The devicevirtio-scsi-ccw extends virtio-ccw-device as before. It creates andconnects a virtio-scsi during the init. The properties are not modified.
virtio-scsi: moving host_features from properties to transport properties.
host_features field is part of the transport device. So move all thehost_features related properties into transport device.
virtio-ccw, s390-virtio: Use generic virtio-blk macro.
Now that virtio-ccw and s390-virtio define all common propertiesfor virtio-blk, we can switch to using the genericDEFINE_VIRTIO_BLK_PROPERTIES macro.
CC: Alexander Graf <agraf@suse.de>Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
s390-virtio, virtio-ccw: Add config_wce for virtio-blk.
There's no reason why we wouldn't want to make the cache modeconfigurable.
Acked-by: Alexander Graf <agraf@suse.de>Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
virtio-ccw: Add missing blk chs properties.
virtio-blk-s390: switch to the new API.
Here the virtio-blk-s390 is modified for the new API. The devicevirtio-blk-s390 extends virtio-s390-device as before. It creates andconnects a virtio-blk during the init. The properties are not modified.
virtio-blk-ccw switch to new API.
Here the virtio-ccw-s390 is modified for the new API. The devicevirtio-ccw-s390 extends virtio-ccw-device as before. It creates andconnects a virtio-ccw during the init. The properties are not modified.
virtio-x-bus: fix allow_hotplug assertion.
This set allow_hotplug for each existing virtio-x-bus, allowing therefactored devices to be hot pluggable.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Message-id: 1363624648-16906-3-git-send-email-fred.konrad@greensocs.com...
Merge remote-tracking branch 'cohuck/virtio-ccw-upstr' into staging
virtio-ccw: remove qdev_unparent in unplug routing
This patch fixes unplugging a virtio-ccw device. We nolonger need to do that in virtio-ccw since common code does nowproper handling.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>...
virtio-ccw: Wire up virtio-rng.
Make virtio-rng devices available for s390-ccw-virtio machines.
cpu: Move halted and interrupt_request fields to CPUState
Both fields are used in VMState, thus need to be moved together.Explicitly zero them on reset since they were located beforebreakpoints.
Pass PowerPCCPU to kvmppc_handle_halt().
Signed-off-by: Andreas Färber <afaerber@suse.de>
Merge remote-tracking branch 'origin/master' into staging
Allow virtio-net features for legacy s390 virtio bus
Enable all virtio-net features for the legacy s390 virtio bus. This also fixeskernel BUG at /usr/src/packages/BUILD/kernel-default-3.0.58/linux-3.0/drivers/s390/kvm/kvm_virtio.c:121!
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>...
s390/css: Fix subchannel detection
We have to consider the m bit to find the real channel subsystem whendetermining the last subchannel.
If we fail to take this into account, removal of a subchannel inthe middle of a big list of devices will stop device detection after...
s390/virtio-ccw: remove redundant call to blockdev_mark_auto_del
blockdev_mark_auto_del is already called in virtio-blk-exit.Remove the redundant call.
hw: include hw header files with full paths
Done with this script:
cd hwfor i in `find . -name '*.h' | sed 's/^..//'`; do echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,'done | sed -i -f - `find . -type f`
This is so that paths remain valid as files are moved....
hw: move qdev-monitor.o to toplevel directory
qdev-monitor.c is the only "core qdev" file that is not used inuser-mode emulation, and it does not define anything that is usedby hardware models. Remove it from the hw/ directory andremove hw/qdev-monitor.h from hw/qdev.h too; this requires...
s390/sclpconsole: prevent char layer callback during initialization
Starting a qemu with an sclp console and pressing a key very earlycan result in"qemu-system-s390x: hw/s390x/sclpconsole.c:60: receive_from_chr_layer:Assertion `scon->iov' failed."
Lets make sure that the init process is finished, since the iov is...
s390: Fix handling of iscs.
There are two ways to express an interruption subclass:- As a bitmask, as used in cr6.- As a number, as used in the I/O interruption word.
Unfortunately, we have treated to I/O interruption word as if itcontained the bitmask as well, which went unnoticed so far as...
virtio-net: pass host features to virtio_net_init
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
target-s390x: Clean up cpu_inject_*() signatures
Despite cautioning that S390CPU is needed for upcoming CPUStaterefactorings, commit 5d69c547d947798cba92d836d06f6e017ba2b19d (s390:I/O interrupt and machine check injection.) added functionscpu_inject_io() and cpu_inject_crw_mchk() with CPUS390XState argument,...
target-s390x: Pass S390CPU to s390_{add, del}_running_cpu()
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>...
s390: Add s390-ccw-virtio machine.
Add a new machine type, s390-ccw-virtio, making use of thevirtio-ccw transport to present virtio devices as channeldevices.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>Signed-off-by: Alexander Graf <agraf@suse.de>
s390: Use s390_cpu_physical_memory_map for tpi.
Map the I/O interruption code before calling into css.
s390: css error codes.
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>...
s390: Drop set_bit usage in virtio_ccw.
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>...
s390: Virtual channel subsystem support.
Provide a mechanism for qemu to provide fully virtual subchannels tothe guest.
s390: Add new channel I/O based virtio transport.
Add a new virtio transport that uses channel commands to performvirtio operations.
s390: Make typeinfo const
All TypeInfo definitions should be const.
s390: Move hw files to hw/s390x
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-virtio: Check for NULL device in reset hypercall
s390_virtio_bus_find_mem() may return a NULL VirtIOS390Device.If called with, e.g., args0 == 0, this leads to a segfault.Fix this by adding error handling as done for other hypercalls.
Present since baf0b55a9e57b909b1f8b0f732c0b10242867418 (Implement...
s390: Move IPL code into a separate device
Lets move the code to setup IPL for external kernelor 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...
s390: Add a hypercall registration interface.
Allow virtio machines to register for different diag500 functioncodes and convert s390-virtio to use it.
Make all static TypeInfos const
Since 39bffca2030950ef6efe57c2fac8327a45ae1015 (qdev: register alltypes natively through QEMU Object Model), TypeInfo as used inthe common, non-iterative pattern is no longer amended with informationand should therefore be const....
softmmu: move remaining include files to include/ subdirectories
softmmu: move include files to include/sysemu/
misc: move include files to include/qemu/
monitor: move include files to include/monitor/
exec: move include files to include/exec/
janitor: do not rely on indirect inclusions of or from qemu-char.h
Various header files rely on qemu-char.h including qemu-config.h ormain-loop.h, but they really do not need qemu-char.h at all (particularlyinteresting is the case of the block layer!). Clean this up, and also...
s390x: Spelling fixes (endianess -> endianness, occured -> occurred)
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().
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>...
s390: sclp event support
Several SCLP features are considered to be events. Those events don'tprovide SCLP commands on their own, instead they are all based onRead Event Data, Write Event Data, Write Event Mask and the serviceinterrupt. Follow-on patches will provide SCLP's Signal Quiesce (via...
s390: sclp signal quiesce support
This implements the sclp signal quiesce event via the SCLP EventFacility.This allows to gracefully shutdown a guest by using system_powerdownnotifiers. It creates a service interrupt that will trigger aRead Event Data command from the guest. This code will then add an...
s390: sclp ascii console support
This code adds console support by implementing SCLP's ASCII ConsoleData event. This is the same console as LPARs ASCII console or z/VMssysascii.
The console can be specified manually with something like-chardev stdio,id=charconsole0 -device sclpconsole,chardev=charconsole0,id=console0...
s390: sclp base support
This adds a more generic infrastructure for handling Service-Callrequests on s390. Currently we only support a small subset of ReadSCP Info directly in target-s390x. This patch provides the baseinfrastructure for supporting more commands and moves Read SCP...
build: move obj-TARGET-y variables to nested Makefile.objs
Also drop duplicate occurrence of device-hotplug.o.