|
|
26ba25 |
From 4772dbd9b905b7b304f24fe3d2e4ca8ba0a18816 Mon Sep 17 00:00:00 2001
|
|
|
26ba25 |
From: Cornelia Huck <cohuck@redhat.com>
|
|
|
26ba25 |
Date: Tue, 15 May 2018 07:33:46 +0000
|
|
|
26ba25 |
Subject: virtio-ccw: common reset handler
|
|
|
26ba25 |
|
|
|
26ba25 |
All the different virtio ccw devices use the same reset handler,
|
|
|
26ba25 |
so let's move setting it into the base virtio ccw device class.
|
|
|
26ba25 |
|
|
|
26ba25 |
CC: qemu-stable@nongnu.org
|
|
|
26ba25 |
Reviewed-by: Thomas Huth <thuth@redhat.com>
|
|
|
26ba25 |
Reviewed-by: David Hildenbrand <david@redhat.com>
|
|
|
26ba25 |
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
|
|
|
26ba25 |
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
|
|
|
26ba25 |
(cherry picked from commit 0c53057adb04d254bc09511880670c92ab185fc6)
|
|
|
26ba25 |
---
|
|
|
26ba25 |
hw/s390x/virtio-ccw.c | 13 +------------
|
|
|
26ba25 |
1 file changed, 1 insertion(+), 12 deletions(-)
|
|
|
26ba25 |
|
|
|
26ba25 |
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
|
|
|
26ba25 |
index 8720e46..2db8cc6 100644
|
|
|
26ba25 |
--- a/hw/s390x/virtio-ccw.c
|
|
|
26ba25 |
+++ b/hw/s390x/virtio-ccw.c
|
|
|
26ba25 |
@@ -1348,7 +1348,6 @@ static void virtio_ccw_net_class_init(ObjectClass *klass, void *data)
|
|
|
26ba25 |
|
|
|
26ba25 |
k->realize = virtio_ccw_net_realize;
|
|
|
26ba25 |
k->unrealize = virtio_ccw_unrealize;
|
|
|
26ba25 |
- dc->reset = virtio_ccw_reset;
|
|
|
26ba25 |
dc->props = virtio_ccw_net_properties;
|
|
|
26ba25 |
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
|
|
|
26ba25 |
}
|
|
|
26ba25 |
@@ -1376,7 +1375,6 @@ static void virtio_ccw_blk_class_init(ObjectClass *klass, void *data)
|
|
|
26ba25 |
|
|
|
26ba25 |
k->realize = virtio_ccw_blk_realize;
|
|
|
26ba25 |
k->unrealize = virtio_ccw_unrealize;
|
|
|
26ba25 |
- dc->reset = virtio_ccw_reset;
|
|
|
26ba25 |
dc->props = virtio_ccw_blk_properties;
|
|
|
26ba25 |
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
|
|
|
26ba25 |
}
|
|
|
26ba25 |
@@ -1404,7 +1402,6 @@ static void virtio_ccw_serial_class_init(ObjectClass *klass, void *data)
|
|
|
26ba25 |
|
|
|
26ba25 |
k->realize = virtio_ccw_serial_realize;
|
|
|
26ba25 |
k->unrealize = virtio_ccw_unrealize;
|
|
|
26ba25 |
- dc->reset = virtio_ccw_reset;
|
|
|
26ba25 |
dc->props = virtio_ccw_serial_properties;
|
|
|
26ba25 |
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
|
|
|
26ba25 |
}
|
|
|
26ba25 |
@@ -1432,7 +1429,6 @@ static void virtio_ccw_balloon_class_init(ObjectClass *klass, void *data)
|
|
|
26ba25 |
|
|
|
26ba25 |
k->realize = virtio_ccw_balloon_realize;
|
|
|
26ba25 |
k->unrealize = virtio_ccw_unrealize;
|
|
|
26ba25 |
- dc->reset = virtio_ccw_reset;
|
|
|
26ba25 |
dc->props = virtio_ccw_balloon_properties;
|
|
|
26ba25 |
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
|
|
|
26ba25 |
}
|
|
|
26ba25 |
@@ -1460,7 +1456,6 @@ static void virtio_ccw_scsi_class_init(ObjectClass *klass, void *data)
|
|
|
26ba25 |
|
|
|
26ba25 |
k->realize = virtio_ccw_scsi_realize;
|
|
|
26ba25 |
k->unrealize = virtio_ccw_unrealize;
|
|
|
26ba25 |
- dc->reset = virtio_ccw_reset;
|
|
|
26ba25 |
dc->props = virtio_ccw_scsi_properties;
|
|
|
26ba25 |
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
|
|
|
26ba25 |
}
|
|
|
26ba25 |
@@ -1487,7 +1482,6 @@ static void vhost_ccw_scsi_class_init(ObjectClass *klass, void *data)
|
|
|
26ba25 |
|
|
|
26ba25 |
k->realize = vhost_ccw_scsi_realize;
|
|
|
26ba25 |
k->unrealize = virtio_ccw_unrealize;
|
|
|
26ba25 |
- dc->reset = virtio_ccw_reset;
|
|
|
26ba25 |
dc->props = vhost_ccw_scsi_properties;
|
|
|
26ba25 |
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
|
|
|
26ba25 |
}
|
|
|
26ba25 |
@@ -1524,7 +1518,6 @@ static void virtio_ccw_rng_class_init(ObjectClass *klass, void *data)
|
|
|
26ba25 |
|
|
|
26ba25 |
k->realize = virtio_ccw_rng_realize;
|
|
|
26ba25 |
k->unrealize = virtio_ccw_unrealize;
|
|
|
26ba25 |
- dc->reset = virtio_ccw_reset;
|
|
|
26ba25 |
dc->props = virtio_ccw_rng_properties;
|
|
|
26ba25 |
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
|
|
|
26ba25 |
}
|
|
|
26ba25 |
@@ -1564,7 +1557,6 @@ static void virtio_ccw_crypto_class_init(ObjectClass *klass, void *data)
|
|
|
26ba25 |
|
|
|
26ba25 |
k->realize = virtio_ccw_crypto_realize;
|
|
|
26ba25 |
k->unrealize = virtio_ccw_unrealize;
|
|
|
26ba25 |
- dc->reset = virtio_ccw_reset;
|
|
|
26ba25 |
dc->props = virtio_ccw_crypto_properties;
|
|
|
26ba25 |
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
|
|
|
26ba25 |
}
|
|
|
26ba25 |
@@ -1603,7 +1595,6 @@ static void virtio_ccw_gpu_class_init(ObjectClass *klass, void *data)
|
|
|
26ba25 |
|
|
|
26ba25 |
k->realize = virtio_ccw_gpu_realize;
|
|
|
26ba25 |
k->unrealize = virtio_ccw_unrealize;
|
|
|
26ba25 |
- dc->reset = virtio_ccw_reset;
|
|
|
26ba25 |
dc->props = virtio_ccw_gpu_properties;
|
|
|
26ba25 |
dc->hotpluggable = false;
|
|
|
26ba25 |
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
|
|
|
26ba25 |
@@ -1632,7 +1623,6 @@ static void virtio_ccw_input_class_init(ObjectClass *klass, void *data)
|
|
|
26ba25 |
|
|
|
26ba25 |
k->realize = virtio_ccw_input_realize;
|
|
|
26ba25 |
k->unrealize = virtio_ccw_unrealize;
|
|
|
26ba25 |
- dc->reset = virtio_ccw_reset;
|
|
|
26ba25 |
dc->props = virtio_ccw_input_properties;
|
|
|
26ba25 |
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
|
|
|
26ba25 |
}
|
|
|
26ba25 |
@@ -1736,6 +1726,7 @@ static void virtio_ccw_device_class_init(ObjectClass *klass, void *data)
|
|
|
26ba25 |
dc->realize = virtio_ccw_busdev_realize;
|
|
|
26ba25 |
dc->unrealize = virtio_ccw_busdev_unrealize;
|
|
|
26ba25 |
dc->bus_type = TYPE_VIRTUAL_CSS_BUS;
|
|
|
26ba25 |
+ dc->reset = virtio_ccw_reset;
|
|
|
26ba25 |
}
|
|
|
26ba25 |
|
|
|
26ba25 |
static const TypeInfo virtio_ccw_device_info = {
|
|
|
26ba25 |
@@ -1812,7 +1803,6 @@ static void virtio_ccw_9p_class_init(ObjectClass *klass, void *data)
|
|
|
26ba25 |
|
|
|
26ba25 |
k->unrealize = virtio_ccw_unrealize;
|
|
|
26ba25 |
k->realize = virtio_ccw_9p_realize;
|
|
|
26ba25 |
- dc->reset = virtio_ccw_reset;
|
|
|
26ba25 |
dc->props = virtio_ccw_9p_properties;
|
|
|
26ba25 |
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
|
|
|
26ba25 |
}
|
|
|
26ba25 |
@@ -1862,7 +1852,6 @@ static void vhost_vsock_ccw_class_init(ObjectClass *klass, void *data)
|
|
|
26ba25 |
k->unrealize = virtio_ccw_unrealize;
|
|
|
26ba25 |
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
|
|
|
26ba25 |
dc->props = vhost_vsock_ccw_properties;
|
|
|
26ba25 |
- dc->reset = virtio_ccw_reset;
|
|
|
26ba25 |
}
|
|
|
26ba25 |
|
|
|
26ba25 |
static void vhost_vsock_ccw_instance_init(Object *obj)
|
|
|
26ba25 |
--
|
|
|
26ba25 |
1.8.3.1
|
|
|
26ba25 |
|