[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qemu-s390x] [PULL 10/19] s390-bios: Extend find_dev() for non-virtio de
From: |
Cornelia Huck |
Subject: |
[qemu-s390x] [PULL 10/19] s390-bios: Extend find_dev() for non-virtio devices |
Date: |
Thu, 25 Apr 2019 15:21:25 +0200 |
From: "Jason J. Herne" <address@hidden>
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>
Reviewed-by: Cornelia Huck <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Thomas Huth <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 e403b5f733e4..d04ea8972a0c 100644
--- a/pc-bios/s390-ccw/main.c
+++ b/pc-bios/s390-ccw/main.c
@@ -52,6 +52,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;
@@ -65,15 +71,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.17.2
- [qemu-s390x] [PULL 00/19] first batch of s390x patches for 4.1, Cornelia Huck, 2019/04/25
- [qemu-s390x] [PULL 02/19] s390-bios: decouple cio setup from virtio, Cornelia Huck, 2019/04/25
- [qemu-s390x] [PULL 01/19] s390 vfio-ccw: Add bootindex property and IPLB data, Cornelia Huck, 2019/04/25
- [qemu-s390x] [PULL 03/19] s390-bios: decouple common boot logic from virtio, Cornelia Huck, 2019/04/25
- [qemu-s390x] [PULL 04/19] s390-bios: Clean up cio.h, Cornelia Huck, 2019/04/25
- [qemu-s390x] [PULL 05/19] s390-bios: Decouple channel i/o logic from virtio, Cornelia Huck, 2019/04/25
- [qemu-s390x] [PULL 06/19] s390-bios: Map low core memory, Cornelia Huck, 2019/04/25
- [qemu-s390x] [PULL 07/19] s390-bios: ptr2u32 and u32toptr, Cornelia Huck, 2019/04/25
- [qemu-s390x] [PULL 08/19] s390-bios: Support for running format-0/1 channel programs, Cornelia Huck, 2019/04/25
- [qemu-s390x] [PULL 10/19] s390-bios: Extend find_dev() for non-virtio devices,
Cornelia Huck <=
- [qemu-s390x] [PULL 09/19] s390-bios: cio error handling, Cornelia Huck, 2019/04/25
- [qemu-s390x] [PULL 12/19] s390-bios: Refactor virtio to run channel programs via cio, Cornelia Huck, 2019/04/25
- [qemu-s390x] [PULL 11/19] s390-bios: Factor finding boot device out of virtio code path, Cornelia Huck, 2019/04/25
- [qemu-s390x] [PULL 13/19] s390-bios: Use control unit type to determine boot method, Cornelia Huck, 2019/04/25
- [qemu-s390x] [PULL 14/19] s390-bios: Add channel command codes/structs needed for dasd-ipl, Cornelia Huck, 2019/04/25
- [qemu-s390x] [PULL 15/19] s390-bios: Support booting from real dasd device, Cornelia Huck, 2019/04/25
- [qemu-s390x] [PULL 16/19] s390-bios: Use control unit type to find bootable devices, Cornelia Huck, 2019/04/25
- [qemu-s390x] [PULL 19/19] exec: Introduce qemu_maxrampagesize() and rename qemu_getrampagesize(), Cornelia Huck, 2019/04/25
- [qemu-s390x] [PULL 18/19] s390x/kvm: Configure page size after memory has actually been initialized, Cornelia Huck, 2019/04/25
- [qemu-s390x] [PULL 17/19] pc-bios/s390: Update firmware images, Cornelia Huck, 2019/04/25