aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-06-11 15:33:38 +0100
committerPeter Maydell <peter.maydell@linaro.org>2015-06-11 15:33:38 +0100
commitd8e3b729cf452d2689c8669f1ec18158db29fd5a (patch)
treeaccc62ac8989a64ef70291ad1d1ca09f374d71a6 /hw/s390x
parentafa25c4bb5bd0732dca4aa0691fd4682d242925f (diff)
parent4ebc736e9938a7e88ecc785734b17145bf802a56 (diff)
downloadqemu-d8e3b729cf452d2689c8669f1ec18158db29fd5a.zip
qemu-d8e3b729cf452d2689c8669f1ec18158db29fd5a.tar.gz
qemu-d8e3b729cf452d2689c8669f1ec18158db29fd5a.tar.bz2
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
pc, acpi, virtio Most notably this includes virtio 1 patches Still not all devices converted, and not fully spec compliant, so disabled by default. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Thu Jun 11 12:53:08 2015 BST using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" * remotes/mst/tags/for_upstream: (42 commits) i386/acpi-build: fix PXB workarounds for unsupported BIOSes i386/acpi-build: more traditional _UID and _HID for PXB root buses vhost-scsi: move qdev properties into vhost-scsi.c virtio-9p-device: move qdev properties into virtio-9p-device.c virtio-serial-bus: move qdev properties into virtio-serial-bus.c virtio-rng: move qdev properties into virtio-rng.c virtio-scsi: move qdev properties into virtio-scsi.c virtio-net.h: Remove unsed DEFINE_VIRTIO_NET_PROPERTIES virtio-net: move qdev properties into virtio-net.c virtio-input: emulated devices [pci] virtio-input: core code & base class [pci] pci: add PCI_CLASS_INPUT_* virtio-pci: fill VirtIOPCIRegions early. virtio-pci: drop identical virtio_pci_cap virtio-pci: move cap type to VirtIOPCIRegion virtio-pci: move virtio_pci_add_mem_cap call to virtio_pci_modern_region_map virtio-pci: add virtio_pci_modern_region_map() virtio-pci: add virtio_pci_modern_regions_init() virtio-pci: add struct VirtIOPCIRegion for virtio-1 regions virtio-balloon: switch to virtio_add_feature ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/s390x')
-rw-r--r--hw/s390x/virtio-ccw.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index ab5fc7f..b7a88d6 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -498,15 +498,19 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
if (!(status & VIRTIO_CONFIG_S_DRIVER_OK)) {
virtio_ccw_stop_ioeventfd(dev);
}
- virtio_set_status(vdev, status);
- if (vdev->status == 0) {
- virtio_reset(vdev);
- }
- if (status & VIRTIO_CONFIG_S_DRIVER_OK) {
- virtio_ccw_start_ioeventfd(dev);
+ if (virtio_set_status(vdev, status) == 0) {
+ if (vdev->status == 0) {
+ virtio_reset(vdev);
+ }
+ if (status & VIRTIO_CONFIG_S_DRIVER_OK) {
+ virtio_ccw_start_ioeventfd(dev);
+ }
+ sch->curr_status.scsw.count = ccw.count - sizeof(status);
+ ret = 0;
+ } else {
+ /* Trigger a command reject. */
+ ret = -ENOSYS;
}
- sch->curr_status.scsw.count = ccw.count - sizeof(status);
- ret = 0;
}
break;
case CCW_CMD_SET_IND: