[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 12/15] s390-bios: Refactor virtio to run channel pro
From: |
Jason J. Herne |
Subject: |
[Qemu-devel] [PATCH 12/15] s390-bios: Refactor virtio to run channel programs via cio |
Date: |
Wed, 12 Dec 2018 09:11:15 -0500 |
Now that we have a Channel I/O library let's modify virtio boot code to
make use of it for running channel programs.
Signed-off-by: Jason J. Herne <address@hidden>
---
pc-bios/s390-ccw/virtio.c | 21 ++-------------------
1 file changed, 2 insertions(+), 19 deletions(-)
diff --git a/pc-bios/s390-ccw/virtio.c b/pc-bios/s390-ccw/virtio.c
index aa9da72..5fb49e2 100644
--- a/pc-bios/s390-ccw/virtio.c
+++ b/pc-bios/s390-ccw/virtio.c
@@ -92,30 +92,13 @@ int drain_irqs(SubChannelId schid)
static int run_ccw(VDev *vdev, int cmd, void *ptr, int len)
{
Ccw1 ccw = {};
- CmdOrb orb = {};
- int r;
-
- enable_subchannel(vdev->schid);
-
- /* start subchannel command */
- orb.fmt = 1;
- orb.cpa = (u32)(long)&ccw;
- orb.lpm = 0x80;
ccw.cmd_code = cmd;
ccw.cda = (long)ptr;
ccw.count = len;
- r = ssch(vdev->schid, &orb);
- /*
- * XXX Wait until device is done processing the CCW. For now we can
- * assume that a simple tsch will have finished the CCW processing,
- * but the architecture allows for asynchronous operation
- */
- if (!r) {
- r = drain_irqs(vdev->schid);
- }
- return r;
+ enable_subchannel(vdev->schid);
+ return do_cio(vdev->schid, ptr2u32(&ccw), CCW_FMT1);
}
static void vring_init(VRing *vr, VqInfo *info)
--
2.7.4
- Re: [Qemu-devel] [PATCH 02/15] s390-bios: decouple cio setup from virtio, (continued)
- [Qemu-devel] [PATCH 03/15] s390-bios: decouple common boot logic from virtio, Jason J. Herne, 2018/12/12
- [Qemu-devel] [PATCH 01/15] s390 vfio-ccw: Add bootindex property and IPLB data, Jason J. Herne, 2018/12/12
- [Qemu-devel] [PATCH 07/15] s390-bios: Decouple channel i/o logic from virtio, Jason J. Herne, 2018/12/12
- [Qemu-devel] [PATCH 05/15] s390-bios: Factor finding boot device out of virtio code path, Jason J. Herne, 2018/12/12
- [Qemu-devel] [PATCH 04/15] s390-bios: Extend find_dev() for non-virtio devices, Jason J. Herne, 2018/12/12
- [Qemu-devel] [PATCH 12/15] s390-bios: Refactor virtio to run channel programs via cio,
Jason J. Herne <=
- [Qemu-devel] [PATCH 06/15] s390-bios: Clean up cio.h, Jason J. Herne, 2018/12/12
- [Qemu-devel] [PATCH 13/15] s390-bios: Use control unit type to determine boot method, Jason J. Herne, 2018/12/12
- [Qemu-devel] [PATCH 09/15] s390-bios: ptr2u32 and u32toptr, Jason J. Herne, 2018/12/12
- [Qemu-devel] [PATCH 08/15] s390-bios: Map low core memory, Jason J. Herne, 2018/12/12
- [Qemu-devel] [PATCH 10/15] s390-bios: Support for running format-0/1 channel programs, Jason J. Herne, 2018/12/12
- [Qemu-devel] [PATCH 11/15] s390-bios: cio error handling, Jason J. Herne, 2018/12/12