From: Cornelia Huck <cohuck@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Eric Farman" <farman@linux.ibm.com>,
qemu-s390x@nongnu.org, "Cornelia Huck" <cohuck@redhat.com>,
qemu-devel@nongnu.org, "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [PULL v2 6/9] hw/s390x/ccw: Register qbus type in abstract TYPE_CCW_DEVICE parent
Date: Thu, 20 May 2021 19:05:16 +0200 [thread overview]
Message-ID: <20210520170519.300951-7-cohuck@redhat.com> (raw)
In-Reply-To: <20210520170519.300951-1-cohuck@redhat.com>
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
Instead of having all TYPE_CCW_DEVICE children set the bus type to
TYPE_VIRTUAL_CSS_BUS, do it once in the abstract parent.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Eric Farman <farman@linux.ibm.com>
Message-Id: <20210424145313.3287400-1-f4bug@amsat.org>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
hw/s390x/3270-ccw.c | 1 -
hw/s390x/ccw-device.c | 1 +
hw/s390x/ccw-device.h | 1 +
hw/s390x/s390-ccw.c | 2 --
hw/s390x/virtio-ccw.c | 1 -
5 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/hw/s390x/3270-ccw.c b/hw/s390x/3270-ccw.c
index 25e628f57573..13e93d8d8f61 100644
--- a/hw/s390x/3270-ccw.c
+++ b/hw/s390x/3270-ccw.c
@@ -158,7 +158,6 @@ static void emulated_ccw_3270_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
device_class_set_props(dc, emulated_ccw_3270_properties);
- dc->bus_type = TYPE_VIRTUAL_CSS_BUS;
dc->realize = emulated_ccw_3270_realize;
dc->hotpluggable = false;
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
diff --git a/hw/s390x/ccw-device.c b/hw/s390x/ccw-device.c
index c9707110e9c8..95f269ab441e 100644
--- a/hw/s390x/ccw-device.c
+++ b/hw/s390x/ccw-device.c
@@ -59,6 +59,7 @@ static void ccw_device_class_init(ObjectClass *klass, void *data)
k->refill_ids = ccw_device_refill_ids;
device_class_set_props(dc, ccw_device_properties);
dc->reset = ccw_device_reset;
+ dc->bus_type = TYPE_VIRTUAL_CSS_BUS;
}
const VMStateDescription vmstate_ccw_dev = {
diff --git a/hw/s390x/ccw-device.h b/hw/s390x/ccw-device.h
index 832c78cd4213..6dff95225df1 100644
--- a/hw/s390x/ccw-device.h
+++ b/hw/s390x/ccw-device.h
@@ -14,6 +14,7 @@
#include "qom/object.h"
#include "hw/qdev-core.h"
#include "hw/s390x/css.h"
+#include "hw/s390x/css-bridge.h"
struct CcwDevice {
DeviceState parent_obj;
diff --git a/hw/s390x/s390-ccw.c b/hw/s390x/s390-ccw.c
index 242491a1aea0..c227c77984ce 100644
--- a/hw/s390x/s390-ccw.c
+++ b/hw/s390x/s390-ccw.c
@@ -176,10 +176,8 @@ static void s390_ccw_instance_init(Object *obj)
static void s390_ccw_class_init(ObjectClass *klass, void *data)
{
- DeviceClass *dc = DEVICE_CLASS(klass);
S390CCWDeviceClass *cdc = S390_CCW_DEVICE_CLASS(klass);
- dc->bus_type = TYPE_VIRTUAL_CSS_BUS;
cdc->realize = s390_ccw_realize;
cdc->unrealize = s390_ccw_unrealize;
}
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index 92b950e09a13..220b9efcf945 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -1234,7 +1234,6 @@ static void virtio_ccw_device_class_init(ObjectClass *klass, void *data)
k->unplug = virtio_ccw_busdev_unplug;
dc->realize = virtio_ccw_busdev_realize;
dc->unrealize = virtio_ccw_busdev_unrealize;
- dc->bus_type = TYPE_VIRTUAL_CSS_BUS;
device_class_set_parent_reset(dc, virtio_ccw_reset, &vdc->parent_reset);
}
--
2.31.1
next prev parent reply other threads:[~2021-05-20 17:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-20 17:05 [PULL v2 0/9] s390x update Cornelia Huck
2021-05-20 17:05 ` [PULL v2 1/9] target/s390x: Fix translation exception on illegal instruction Cornelia Huck
2021-05-20 17:05 ` [PULL v2 2/9] target/arm: Make sure that commpage's tb->size != 0 Cornelia Huck
2021-05-20 17:05 ` [PULL v2 3/9] target/xtensa: Make sure that " Cornelia Huck
2021-05-20 17:05 ` [PULL v2 4/9] accel/tcg: Assert that tb->size != 0 after translation Cornelia Huck
2021-05-20 17:05 ` [PULL v2 5/9] vfio-ccw: Permit missing IRQs Cornelia Huck
2021-05-20 17:05 ` Cornelia Huck [this message]
2021-05-20 17:05 ` [PULL v2 7/9] vfio-ccw: Attempt to clean up all IRQs on error Cornelia Huck
2021-05-20 17:05 ` [PULL v2 8/9] target/i386: Make sure that vsyscall's tb->size != 0 Cornelia Huck
2021-05-20 17:05 ` [PULL v2 9/9] tests/tcg/x86_64: add vsyscall smoke test Cornelia Huck
2021-05-20 19:11 ` [PULL v2 0/9] s390x update Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210520170519.300951-7-cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=f4bug@amsat.org \
--cc=farman@linux.ibm.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).