diff options
author | Thomas Huth <thuth@redhat.com> | 2022-07-04 13:18:54 +0200 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2022-07-06 18:33:53 +0200 |
commit | 422865f6672ee1482b98d18321b55c1ecfb06c82 (patch) | |
tree | 37b47df64109f64c32878fc2d7f1573adb20064a /.patchew.yml | |
parent | 1f2c2ee48e87ea743f8e23cc7569dd26c4cf9623 (diff) | |
download | qemu-422865f6672ee1482b98d18321b55c1ecfb06c82.zip qemu-422865f6672ee1482b98d18321b55c1ecfb06c82.tar.gz qemu-422865f6672ee1482b98d18321b55c1ecfb06c82.tar.bz2 |
pc-bios/s390-ccw/bootmap: Improve the guessing logic in zipl_load_vblk()
The logic of trying an final ISO or ECKD boot on virtio-block devices is
very weird: Since the geometry hardly ever matches in virtio_disk_is_scsi(),
virtio_blk_setup_device() always sets a "guessed" disk geometry via
virtio_assume_scsi() (which is certainly also wrong in a lot of cases).
zipl_load_vblk() then sees that there's been a "virtio_guessed_disk_nature"
and tries to fix up the geometry again via virtio_assume_iso9660() before
always trying to do ipl_iso_el_torito(). That's a very brain-twisting
way of attempting to boot from ISO images, which won't work anymore after
the following patches that will clean up the virtio_assume_scsi() mess
(and thus get rid of the "virtio_guessed_disk_nature" here).
Let's try a better approach instead: ISO files always have a magic
string "CD001" at offset 0x8001 (see e.g. the ECMA-119 specification)
which we can use to decide whether we should try to boot in ISO 9660
mode (which we should also try if we see a sector size of 2048).
And if we were not able to boot in ISO mode here, the final boot attempt
before panicking is to boot in ECKD mode. Since this is our last boot
attempt anyway, simply always assume the ECKD geometry here (if the sector
size was not 4096 yet), so that we also do not depend on the guessed disk
geometry from virtio_blk_setup_device() here anymore.
Message-Id: <20220704111903.62400-4-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to '.patchew.yml')
0 files changed, 0 insertions, 0 deletions