Fixes for QEMU 7.1
[PULL 1/4] pc-bios/s390-ccw: Fix booting with logical block size < physical block size
In reply to Thomas HuthFor accessing single blocks during boot, it's the logical block size that matters. (Physical block sizes are rather interesting e.g. for creating file systems with the correct alignment for speed reasons etc.). So the s390-ccw bios has to use the logical block size for calculating sector numbers during the boot phase, the "physical_block_exp" shift value must not be taken into account. This change fixes the boot process when the guest hast been installed on a disk where the logical block size differs from the physical one, e.g. if the guest has been installed like this:
qemu-system-s390x -nographic -accel kvm -m 2G \
-drive if=none,id=d1,file=fedora.iso,format=raw,media=cdrom \
-device virtio-scsi -device scsi-cd,drive=d1 \
-drive if=none,id=d2,file=test.qcow2,format=qcow2
-device virtio-blk,drive=d2,physical_block_size=4096,logical_block_size=512
Linux correctly uses the logical block size of 512 for the installation, but the s390-ccw bios tries to boot from a disk with 4096 block size so far, as long as this patch has not been applied yet (well, it used to work by accident in the past due to the virtio_assume_scsi() hack that used to enforce 512 byte sectors on all virtio-block disks, but that hack has been well removed in commit 5447de2619050a0a4d to fix other scenarios).
Message-Id: <[email protected]>
--- pc-bios/s390-ccw/virtio-blkdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
pc-bios/s390-ccw/virtio-blkdev.c +1 -1
@@ -173,7 +173,7 @@ int virtio_get_block_size(void)switch (vdev->senseid.cu_model) {case VIRTIO_ID_BLOCK : -return vdev->config.blk.blk_size << vdev->config.blk.physical_block_exp; +return vdev->config.blk.blk_size;case VIRTIO_ID_SCSI :return vdev->scsi_block_size; }
Signature · 1 line
2.31.1
Hi!
The following changes since commit c669f22f1a47897e8d1d595d6b8a59a572f9158c:
Merge tag 'pull-la-20220805' of https://gitlab.com/rth7680/qemu into staging (2022-08-05 12:55:53 -0700)
are available in the Git repository at:
https://gitlab.com/thuth/qemu.git tags/pull-request-2022-08-08
for you to fetch changes up to 407634970dc5dba9330c360cfdc4e69e7aea3b37:
tests/qemu-iotests/264: Allow up to 5s for the BLOCK_JOB_CANCEL event to arrive (2022-08-07 18:51:35 +0200)
----------------------------------------------------------------
* Fix booting in the s390-ccw bios when physical and logical block sizes differ
* Fix the replay-linux avocado test
* Relax a time constraint in iotest 264
----------------------------------------------------------------
Pavel Dovgalyuk (1):
tests/avocado: fix replay-linux test
Thomas Huth (3):
pc-bios/s390-ccw: Fix booting with logical block size < physical block size pc-bios/s390-ccw: Update the s390-ccw.img with the block size fix tests/qemu-iotests/264: Allow up to 5s for the BLOCK_JOB_CANCEL event to arrive
pc-bios/s390-ccw/virtio-blkdev.c | 2 +- pc-bios/s390-ccw.img | Bin 42608 -> 42608 bytes tests/avocado/replay_linux.py | 1 + tests/qemu-iotests/264 | 2 +- 4 files changed, 3 insertions(+), 2 deletions(-)
[PULL 3/4] tests/avocado: fix replay-linux test
From: Pavel Dovgalyuk <[email protected]>
Last line of the test is missing by accident.
This patch fixes the script.
Message-Id: <165943656662.362178.2086588841425038338.stgit@pasha-ThinkPad-X280>
--- tests/avocado/replay_linux.py | 1 + 1 file changed, 1 insertion(+)
tests/avocado/replay_linux.py +1 -0
@@ -189,3 +189,4 @@ def test_virt_gicv3(self): self.run_rr(shift=3, args=(*self.get_common_args(), + "-machine", "virt,gic-version=3"))
Signature · 1 line
2.31.1
[PULL 2/4] pc-bios/s390-ccw: Update the s390-ccw.img with the block size fix
In reply to Thomas HuthThe new binary now gets the block size of virtio-blk devices right.
--- pc-bios/s390-ccw.img | Bin 42608 -> 42608 bytes 1 file changed, 0 insertions(+), 0 deletions(-)
pc-bios/s390-ccw.img binary +0 -0
Signature · 1 line
2.31.1
[PULL 4/4] tests/qemu-iotests/264: Allow up to 5s for the BLOCK_JOB_CANCEL event to arrive
In reply to Thomas HuthIt is possible to hit the assertTrue(delta_t < 2.0) on very loaded systems. Increase the value to 5.0 to ease the situation a little bit.
Message-Id: <[email protected]>
--- tests/qemu-iotests/264 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/qemu-iotests/264 +1 -1
@@ -101,7 +101,7 @@ class TestNbdReconnect(iotests.QMPTestCase): start_t = time.time() self.vm.event_wait('BLOCK_JOB_CANCELLED') delta_t = time.time() - start_t - self.assertTrue(delta_t < 2.0) + self.assertTrue(delta_t < 5.0) def test_mirror_cancel(self): # Mirror speed limit doesn't work well enough, it seems that mirror
Signature · 1 line
2.31.1
Richard Henderson
AppliedQuoted 10 lines · Thomas Huth
Hi!
The following changes since commit
c669f22f1a47897e8d1d595d6b8a59a572f9158c:Merge tag 'pull-la-20220805' of https://gitlab.com/rth7680/qemu into staging (2022-08-05 12:55:53 -0700)are available in the Git repository at:
https://gitlab.com/thuth/qemu.git tags/pull-request-2022-08-08
Quoted 8 lines
for you to fetch changes up to
407634970dc5dba9330c360cfdc4e69e7aea3b37:tests/qemu-iotests/264: Allow up to 5s for the BLOCK_JOB_CANCEL event to arrive (2022-08-07 18:51:35 +0200)----------------------------------------------------------------
* Fix booting in the s390-ccw bios when physical and logical block sizes differ
* Fix the replay-linux avocado test
* Relax a time constraint in iotest 264
Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/7.1 as appropriate.
r~
Quoted 16 lines
----------------------------------------------------------------
Pavel Dovgalyuk (1):
tests/avocado: fix replay-linux testThomas Huth (3):
pc-bios/s390-ccw: Fix booting with logical block size < physical block size pc-bios/s390-ccw: Update the s390-ccw.img with the block size fix tests/qemu-iotests/264: Allow up to 5s for theBLOCK_JOB_CANCELevent to arrivepc-bios/s390-ccw/virtio-blkdev.c | 2 +- pc-bios/s390-ccw.img | Bin 42608 -> 42608 bytes tests/avocado/replay_linux.py | 1 + tests/qemu-iotests/264 | 2 +- 4 files changed, 3 insertions(+), 2 deletions(-)