Skip to content

s390-ccw bios fixes and clean-ups

Thomas Huth qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest12 patches 1 replyIn review
  2. v112 patches 15 repliesSuperseded

Changes in v2 from the cover letter

- Renamed VIRTIO_DASD_BLOCK_SIZE to VIRTIO_DASD_DEFAULT_BLOCK_SIZE (affects patch 2 and 3)
- Check whether block size is 0 in the third patch
- Collected Reviewed-bys

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12pc-bios/s390-ccw: Add a proper prototype for main()pc-bios/s390-ccw/main.c pc-bios/s390-ccw/s390-ccw.h+2 -20 replies
2/12pc-bios/s390-ccw/virtio: Introduce a macro for the DASD block sizepc-bios/s390-ccw/virtio-blkdev.c pc-bios/s390-ccw/virtio.h+2 -11 reply
3/12pc-bios/s390-ccw/bootmap: Improve the guessing logic in zipl_load_vblk()pc-bios/s390-ccw/bootmap.c+23 -40 replies
4/12pc-bios/s390-ccw/virtio-blkdev: Simplify/fix virtio_ipl_disk_is_valid()pc-bios/s390-ccw/virtio-blkdev.c pc-bios/s390-ccw/virtio.h+7 -360 replies
5/12pc-bios/s390-ccw/virtio-blkdev: Remove virtio_assume_scsi()pc-bios/s390-ccw/virtio-blkdev.c pc-bios/s390-ccw/virtio.h+0 -250 replies
6/12pc-bios/s390-ccw/virtio: Set missing status bits while initializingpc-bios/s390-ccw/virtio.c+14 -40 replies
7/12pc-bios/s390-ccw/virtio: Read device config after feature negotiationpc-bios/s390-ccw/virtio.c+3 -40 replies
8/12pc-bios/s390-ccw/virtio: Beautify the code for reading virtqueue configurationpc-bios/s390-ccw/virtio.c+2 -30 replies
9/12pc-bios/s390-ccw: Split virtio-scsi code from virtio_blk_setup_device()pc-bios/s390-ccw/main.c pc-bios/s390-ccw/virtio-blkdev.c pc-bios/s390-ccw/virtio-scsi.c +1 more+38 -270 replies
10/12pc-bios/s390-ccw/virtio-blkdev: Request the right feature bitspc-bios/s390-ccw/virtio-blkdev.c+4 -00 replies
11/12pc-bios/s390-ccw/virtio: Remove "extern" keyword from prototypespc-bios/s390-ccw/virtio.h+6 -60 replies
12/12pc-bios/s390-ccw/netboot.mak: Ignore Clang's warnings about GNU extensionspc-bios/s390-ccw/netboot.mak+5 -20 replies

Reviews trailers per patch

9 of 12 patches have a Reviewed-by or Acked-by.

PatchEric FarmanCornelia HuckChristian Borntraeger
1/12R-b R-b
2/12R-b R-b
3/12
4/12R-b
5/12R-b
6/12R-b R-b A-b
7/12R-b R-b
8/12R-b R-b
9/12R-b
10/12
11/12R-b
12/12

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 00/12] s390-ccw bios fixes and clean-ups

The s390-ccw bios currently fails to boot a guest that has been installed into a partition on a DASD drive with 4k sectors. While trying to fix this, I noticed a couple of other problems and possibilites for clean-ups that this series is trying to address now.

The first patch is an old one which I already sent out a year ago, but it got never included since there were no other bios-related patches pending and this patch alone never justified a bios rebuild.

The main problem (with the bios not getting the geometry right) comes from the virtio_disk_is_scsi() [sic] function in the file pc-bios/s390-ccw/virtio-blkdev.c - this more or less always currently reports that the geometry is wrong for virtio-block devices, which causes the code to call virtio_assume_scsi() that sets a "guessed" geometry with 512-byte sectors. To get this fixed and cleaned up, a couple of other preparing patches were necessary, which you can find in patches 2 - 5.

While working on the above problem, I also noticed that the virtio init sequence is not done according to the virtio specification. It's currently not a problem since QEMU is very forgiving, but we should clean this up anyway to be sure to avoid future problems. This is done in patches 6 - 10.

Patch 11 simply beautifies up an oddity in a header, and patch 12 silences a compiler warning with Clang.

I know, it's more than one topic in this series now, but I wanted to send them out as one series since some of the patches depend on each other and I've got to rebuild the bios images at the end anyway, so it's easier to keep everything together.

v2:
- Renamed VIRTIO_DASD_BLOCK_SIZE to VIRTIO_DASD_DEFAULT_BLOCK_SIZE (affects patch 2 and 3)
- Check whether block size is 0 in the third patch
- Collected Reviewed-bys

Thomas Huth (12):
pc-bios/s390-ccw: Add a proper prototype for main() pc-bios/s390-ccw/virtio: Introduce a macro for the DASD block size pc-bios/s390-ccw/bootmap: Improve the guessing logic in
zipl_load_vblk()
pc-bios/s390-ccw/virtio-blkdev: Simplify/fix
virtio_ipl_disk_is_valid()
pc-bios/s390-ccw/virtio-blkdev: Remove virtio_assume_scsi() pc-bios/s390-ccw/virtio: Set missing status bits while initializing pc-bios/s390-ccw/virtio: Read device config after feature negotiation pc-bios/s390-ccw/virtio: Beautify the code for reading virtqueue
configuration
pc-bios/s390-ccw: Split virtio-scsi code from
virtio_blk_setup_device()
pc-bios/s390-ccw/virtio-blkdev: Request the right feature bits pc-bios/s390-ccw/virtio: Remove "extern" keyword from prototypes pc-bios/s390-ccw/netboot.mak: Ignore Clang's warnings about GNU
extensions

 pc-bios/s390-ccw/netboot.mak     |  7 ++-
 pc-bios/s390-ccw/s390-ccw.h      |  1 +
 pc-bios/s390-ccw/virtio-scsi.h   |  2 +-
 pc-bios/s390-ccw/virtio.h        | 16 +++---
 pc-bios/s390-ccw/bootmap.c       | 27 ++++++++--
 pc-bios/s390-ccw/main.c          | 27 ++++++----
 pc-bios/s390-ccw/virtio-blkdev.c | 91 +++++---------------------------
 pc-bios/s390-ccw/virtio-scsi.c   | 19 ++++++-
 pc-bios/s390-ccw/virtio.c        | 28 ++++++----
 9 files changed, 105 insertions(+), 113 deletions(-)
Signature · 1 line
2.31.1