[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 04/15] s390-bios: Extend find_dev() for non-virtio d
From: |
Jason J. Herne |
Subject: |
[Qemu-devel] [PATCH 04/15] s390-bios: Extend find_dev() for non-virtio devices |
Date: |
Tue, 29 Jan 2019 08:29:11 -0500 |
We need a method for finding the subchannel of a dasd device. Let's
modify find_dev to handle this since it mostly does what we need. Up to
this point find_dev has been specific to only virtio devices.
Signed-off-by: Jason J. Herne <address@hidden>
Acked-by: Halil Pasic <address@hidden>
---
pc-bios/s390-ccw/main.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/pc-bios/s390-ccw/main.c b/pc-bios/s390-ccw/main.c
index 67df421..7e3f65e 100644
--- a/pc-bios/s390-ccw/main.c
+++ b/pc-bios/s390-ccw/main.c
@@ -49,6 +49,12 @@ unsigned int get_loadparm_index(void)
return atoui(loadparm_str);
}
+/*
+ * Find the subchannel connected to the given device (dev_no) and fill in the
+ * subchannel information block (schib) with the connected subchannel's info.
+ * NOTE: The global variable blk_schid is updated to contain the subchannel
+ * information.
+ */
static bool find_dev(Schib *schib, int dev_no)
{
int i, r;
@@ -62,15 +68,15 @@ static bool find_dev(Schib *schib, int dev_no)
if (!schib->pmcw.dnv) {
continue;
}
- if (!virtio_is_supported(blk_schid)) {
- continue;
- }
+
/* Skip net devices since no IPLB is created and therefore no
- * no network bootloader has been loaded
+ * network bootloader has been loaded
*/
- if (virtio_get_device_type() == VIRTIO_ID_NET && dev_no < 0) {
+ if (virtio_is_supported(blk_schid) &&
+ virtio_get_device_type() == VIRTIO_ID_NET && dev_no < 0) {
continue;
}
+
if ((dev_no < 0) || (schib->pmcw.dev == dev_no)) {
return true;
}
--
2.7.4
- [Qemu-devel] [PATCH 03/15] s390-bios: decouple common boot logic from virtio, (continued)
- [Qemu-devel] [PATCH 03/15] s390-bios: decouple common boot logic from virtio, Jason J. Herne, 2019/01/29
- [Qemu-devel] [PATCH 08/15] s390-bios: Map low core memory, Jason J. Herne, 2019/01/29
- [Qemu-devel] [PATCH 06/15] s390-bios: Clean up cio.h, Jason J. Herne, 2019/01/29
- [Qemu-devel] [PATCH 10/15] s390-bios: Support for running format-0/1 channel programs, Jason J. Herne, 2019/01/29
- [Qemu-devel] [PATCH 02/15] s390-bios: decouple cio setup from virtio, Jason J. Herne, 2019/01/29
- [Qemu-devel] [PATCH 11/15] s390-bios: cio error handling, Jason J. Herne, 2019/01/29
- [Qemu-devel] [PATCH 04/15] s390-bios: Extend find_dev() for non-virtio devices,
Jason J. Herne <=
- [Qemu-devel] [PATCH 13/15] s390-bios: Use control unit type to determine boot method, Jason J. Herne, 2019/01/29
- [Qemu-devel] [PATCH 15/15] s390-bios: Support booting from real dasd device, Jason J. Herne, 2019/01/29
- [Qemu-devel] [PATCH 09/15] s390-bios: ptr2u32 and u32toptr, Jason J. Herne, 2019/01/29
- [Qemu-devel] [PATCH 12/15] s390-bios: Refactor virtio to run channel programs via cio, Jason J. Herne, 2019/01/29
- [Qemu-devel] [PATCH 14/15] s390-bios: Add channel command codes/structs needed for dasd-ipl, Jason J. Herne, 2019/01/29
- Re: [Qemu-devel] [qemu-s390x] [PATCH 00/15] s390: vfio-ccw dasd ipl support, Jason J. Herne, 2019/01/29
- Re: [Qemu-devel] [PATCH 00/15] s390: vfio-ccw dasd ipl support, no-reply, 2019/01/31