summaryrefslogtreecommitdiffstats
path: root/hw/s390x/virtio-ccw.c
diff options
context:
space:
mode:
authorEric Farman2021-06-18 01:25:36 +0200
committerCornelia Huck2021-06-21 08:48:21 +0200
commit0599a046acf1b625e97cef0aa702b5d86528c642 (patch)
treef56070fca37d6ca5acea5e4fa86cc1356cd9ec4a /hw/s390x/virtio-ccw.c
parents390x/css: Split out the IRB sense data (diff)
downloadqemu-0599a046acf1b625e97cef0aa702b5d86528c642.tar.gz
qemu-0599a046acf1b625e97cef0aa702b5d86528c642.tar.xz
qemu-0599a046acf1b625e97cef0aa702b5d86528c642.zip
s390x/css: Refactor IRB construction
Currently, all subchannel types have "sense data" copied into the IRB.ECW space, and a couple flags enabled in the IRB.SCSW and IRB.ESW. But for passthrough (vfio-ccw) subchannels, this data isn't populated in the first place, so enabling those flags leads to unexpected behavior if the guest tries to process the sense data (zeros) in the IRB.ECW. Let's add a subchannel callback that builds these portions of the IRB, and move the existing code into a routine for those virtual subchannels. The passthrough subchannels will be able to piggy-back onto this later. Signed-off-by: Eric Farman <farman@linux.ibm.com> Message-Id: <20210617232537.1337506-4-farman@linux.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'hw/s390x/virtio-ccw.c')
-rw-r--r--hw/s390x/virtio-ccw.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index 220b9efcf9..d68888fccd 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -753,6 +753,7 @@ static void virtio_ccw_device_realize(VirtioCcwDevice *dev, Error **errp)
sch->id.reserved = 0xff;
sch->id.cu_type = VIRTIO_CCW_CU_TYPE;
sch->do_subchannel_work = do_subchannel_work_virtual;
+ sch->irb_cb = build_irb_virtual;
ccw_dev->sch = sch;
dev->indicators = NULL;
dev->revision = -1;