[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/21] s390x: simplify virtio_ccw_reset_virtio
From: |
Paolo Bonzini |
Subject: |
[PULL 11/21] s390x: simplify virtio_ccw_reset_virtio |
Date: |
Thu, 16 Jun 2022 10:31:59 +0200 |
Call virtio_bus_reset instead of virtio_reset, so that the function
need not receive the VirtIODevice.
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/s390x/virtio-ccw.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index 15b458527e..066a387802 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -249,12 +249,12 @@ static int virtio_ccw_set_vqs(SubchDev *sch, VqInfoBlock
*info,
return 0;
}
-static void virtio_ccw_reset_virtio(VirtioCcwDevice *dev, VirtIODevice *vdev)
+static void virtio_ccw_reset_virtio(VirtioCcwDevice *dev)
{
CcwDevice *ccw_dev = CCW_DEVICE(dev);
virtio_ccw_stop_ioeventfd(dev);
- virtio_reset(vdev);
+ virtio_bus_reset(&dev->bus);
if (dev->indicators) {
release_indicator(&dev->routes.adapter, dev->indicators);
dev->indicators = NULL;
@@ -359,7 +359,7 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
ret = virtio_ccw_handle_set_vq(sch, ccw, check_len, dev->revision < 1);
break;
case CCW_CMD_VDEV_RESET:
- virtio_ccw_reset_virtio(dev, vdev);
+ virtio_ccw_reset_virtio(dev);
ret = 0;
break;
case CCW_CMD_READ_FEAT:
@@ -536,7 +536,7 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
}
if (virtio_set_status(vdev, status) == 0) {
if (vdev->status == 0) {
- virtio_ccw_reset_virtio(dev, vdev);
+ virtio_ccw_reset_virtio(dev);
}
if (status & VIRTIO_CONFIG_S_DRIVER_OK) {
virtio_ccw_start_ioeventfd(dev);
@@ -921,10 +921,9 @@ static void virtio_ccw_notify(DeviceState *d, uint16_t
vector)
static void virtio_ccw_reset(DeviceState *d)
{
VirtioCcwDevice *dev = VIRTIO_CCW_DEVICE(d);
- VirtIODevice *vdev = virtio_bus_get_device(&dev->bus);
VirtIOCCWDeviceClass *vdc = VIRTIO_CCW_DEVICE_GET_CLASS(dev);
- virtio_ccw_reset_virtio(dev, vdev);
+ virtio_ccw_reset_virtio(dev);
if (vdc->parent_reset) {
vdc->parent_reset(d);
}
--
2.36.1
- [PULL 03/21] qmp: add filtering of statistics by target vCPU, (continued)
- [PULL 03/21] qmp: add filtering of statistics by target vCPU, Paolo Bonzini, 2022/06/16
- [PULL 02/21] kvm: Support for querying fd-based stats, Paolo Bonzini, 2022/06/16
- [PULL 05/21] hmp: add basic "info stats" implementation, Paolo Bonzini, 2022/06/16
- [PULL 08/21] qmp: add filtering of statistics by name, Paolo Bonzini, 2022/06/16
- [PULL 09/21] hmp: add filtering of statistics by name, Paolo Bonzini, 2022/06/16
- [PULL 04/21] cutils: add functions for IEC and SI prefixes, Paolo Bonzini, 2022/06/16
- [PULL 06/21] qmp: add filtering of statistics by provider, Paolo Bonzini, 2022/06/16
- [PULL 01/21] qmp: Support for querying stats, Paolo Bonzini, 2022/06/16
- [PULL 07/21] hmp: add filtering of statistics by provider, Paolo Bonzini, 2022/06/16
- [PULL 10/21] block: add more commands to preconfig mode, Paolo Bonzini, 2022/06/16
- [PULL 11/21] s390x: simplify virtio_ccw_reset_virtio,
Paolo Bonzini <=
- [PULL 12/21] virtio-mmio: stop ioeventfd on legacy reset, Paolo Bonzini, 2022/06/16
- [PULL 13/21] virtio: stop ioeventfd on reset, Paolo Bonzini, 2022/06/16
- [PULL 15/21] configure: update list of preserved environment variables, Paolo Bonzini, 2022/06/16
- [PULL 18/21] build: fix check for -fsanitize-coverage-allowlist, Paolo Bonzini, 2022/06/16
- [PULL 14/21] virtio-mmio: cleanup reset, Paolo Bonzini, 2022/06/16
- [PULL 16/21] configure: cleanup -fno-pie detection, Paolo Bonzini, 2022/06/16
- [PULL 17/21] tests/vm: allow running tests in an unconfigured source tree, Paolo Bonzini, 2022/06/16
- [PULL 20/21] meson: put cross compiler info in a separate section, Paolo Bonzini, 2022/06/16
- [PULL 21/21] build: include pc-bios/ part in the ROMS variable, Paolo Bonzini, 2022/06/16
- [PULL 19/21] q35:Enable TSEG only when G_SMRAME and TSEG_EN both enabled, Paolo Bonzini, 2022/06/16