[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 08/10] s390x/css: add ORB to SubchDev
From: |
Halil Pasic |
Subject: |
[Qemu-devel] [PATCH 08/10] s390x/css: add ORB to SubchDev |
Date: |
Fri, 5 May 2017 19:35:05 +0200 |
Since we are going to need a migration compatibility breaking change to
activate ChannelSubSys migration let us use the opportunity to introduce
ORB to the SubchDev before that (otherwise we would need separate
handling e.g. a compat property).
The ORB will be useful for implementing IDA, or async handling of
subchannel work.
Signed-off-by: Halil Pasic <address@hidden>
Reviewed-by: Guenther Hutzl <address@hidden>
---
hw/s390x/css.c | 35 +++++++++++++++++++++++++++++++++++
include/hw/s390x/css.h | 1 +
2 files changed, 36 insertions(+)
diff --git a/hw/s390x/css.c b/hw/s390x/css.c
index 94338b2..d9a0fb9 100644
--- a/hw/s390x/css.c
+++ b/hw/s390x/css.c
@@ -163,6 +163,36 @@ static const VMStateDescription vmstate_sense_id = {
}
};
+static const VMStateDescription vmstate_orb = {
+ .name = "s390_orb",
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .fields = (VMStateField[]) {
+ VMSTATE_UINT32(intparm, ORB),
+ VMSTATE_UINT16(ctrl0, ORB),
+ VMSTATE_UINT8(lpm, ORB),
+ VMSTATE_UINT8(ctrl1, ORB),
+ VMSTATE_UINT32(cpa, ORB),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
+static bool vmstate_schdev_orb_needed(void *opaque)
+{
+ return css_migration_enabled();
+}
+
+static const VMStateDescription vmstate_schdev_orb = {
+ .name = "s390_subch_dev/orb",
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .needed = vmstate_schdev_orb_needed,
+ .fields = (VMStateField[]) {
+ VMSTATE_STRUCT(orb, SubchDev, 1, vmstate_orb, ORB),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
static int subch_dev_post_load(void *opaque, int version_id);
static void subch_dev_pre_save(void *opaque);
@@ -187,6 +217,10 @@ const VMStateDescription vmstate_subch_dev = {
VMSTATE_BOOL(ccw_fmt_1, SubchDev),
VMSTATE_UINT8(ccw_no_data_cnt, SubchDev),
VMSTATE_END_OF_LIST()
+ },
+ .subsections = (const VMStateDescription * []) {
+ &vmstate_schdev_orb,
+ NULL
}
};
@@ -1234,6 +1268,7 @@ int css_do_ssch(SubchDev *sch, ORB *orb)
if (channel_subsys.chnmon_active) {
css_update_chnmon(sch);
}
+ sch->orb = *orb;
sch->channel_prog = orb->cpa;
/* Trigger the start function. */
s->ctrl |= (SCSW_FCTL_START_FUNC | SCSW_ACTL_START_PEND);
diff --git a/include/hw/s390x/css.h b/include/hw/s390x/css.h
index e67ac5c..dbe093e 100644
--- a/include/hw/s390x/css.h
+++ b/include/hw/s390x/css.h
@@ -88,6 +88,7 @@ struct SubchDev {
bool thinint_active;
uint8_t ccw_no_data_cnt;
uint16_t migrated_schid; /* used for missmatch detection */
+ ORB orb;
/* transport-provided data: */
int (*ccw_cb) (SubchDev *, CCW1);
void (*disable_cb)(SubchDev *);
--
2.10.2
- Re: [Qemu-devel] [PATCH 06/10] virtio-ccw: use vmstate way for config migration, (continued)
- Re: [Qemu-devel] [PATCH 06/10] virtio-ccw: use vmstate way for config migration, Dr. David Alan Gilbert, 2017/05/08
- Re: [Qemu-devel] [PATCH 06/10] virtio-ccw: use vmstate way for config migration, Halil Pasic, 2017/05/08
- Re: [Qemu-devel] [PATCH 06/10] virtio-ccw: use vmstate way for config migration, Dr. David Alan Gilbert, 2017/05/08
- Re: [Qemu-devel] [PATCH 06/10] virtio-ccw: use vmstate way for config migration, Halil Pasic, 2017/05/10
- Re: [Qemu-devel] [PATCH 06/10] virtio-ccw: use vmstate way for config migration, Dr. David Alan Gilbert, 2017/05/15
- Re: [Qemu-devel] [PATCH 06/10] virtio-ccw: use vmstate way for config migration, Halil Pasic, 2017/05/16
- Re: [Qemu-devel] [PATCH 06/10] virtio-ccw: use vmstate way for config migration, Dr. David Alan Gilbert, 2017/05/19
- Re: [Qemu-devel] [PATCH 06/10] virtio-ccw: use vmstate way for config migration, Halil Pasic, 2017/05/19
- Re: [Qemu-devel] [PATCH 06/10] virtio-ccw: use vmstate way for config migration, Dr. David Alan Gilbert, 2017/05/19
[Qemu-devel] [PATCH 07/10] s390x/css: remove unused subch_dev_(load|save), Halil Pasic, 2017/05/05
[Qemu-devel] [PATCH 08/10] s390x/css: add ORB to SubchDev,
Halil Pasic <=
[Qemu-devel] [PATCH 10/10] s390x/css: use SubchDev.orb, Halil Pasic, 2017/05/05
[Qemu-devel] [PATCH 09/10] s390x/css: turn on channel subsystem migration, Halil Pasic, 2017/05/05