qemu-s390x
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/2] pc-bios/s390-ccw/virtio-blkdev: Simplify/fix virtio_ipl_


From: Thomas Huth
Subject: Re: [PATCH 1/2] pc-bios/s390-ccw/virtio-blkdev: Simplify/fix virtio_ipl_disk_is_valid()
Date: Mon, 27 Jun 2022 11:44:24 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0

On 24/06/2022 10.50, Thomas Huth wrote:
The s390-ccw bios fails to boot if the boot disk is a virtio-blk
disk with a sector size of 4096. For example:

  dasdfmt -b 4096 -d cdl -y -p -M quick /dev/dasdX
  fdasd -a /dev/dasdX
  install a guest onto /dev/dasdX1 using virtio-blk
  qemu-system-s390x -nographic -hda /dev/dasdX1

The bios then bails out with:

  ! Cannot read block 0 !

Looking at virtio_ipl_disk_is_valid() and especially the function
virtio_disk_is_scsi(), it does not really make sense that we expect
only such a limited disk geometry (like a block size of 512) for
out boot disks. Let's relax the check and allow everything that
remotely looks like a sane disk.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
  pc-bios/s390-ccw/virtio.h        |  2 --
  pc-bios/s390-ccw/virtio-blkdev.c | 41 ++++++--------------------------
  2 files changed, 7 insertions(+), 36 deletions(-)

I just noticed that this breaks booting ISO images via the "-cdrom" option ... looks like this needs some additional fixes on top.

 Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]