vmd(8): fix block size calculation for vioscsi devices.
authordv <dv@openbsd.org>
Fri, 3 Nov 2023 11:16:43 +0000 (11:16 +0000)
committerdv <dv@openbsd.org>
Fri, 3 Nov 2023 11:16:43 +0000 (11:16 +0000)
commit2495c0ae52eccb532e49f4762b358545f4a6531c
treed8773c8799f333b8e4b246b6886e25843ce8652c
parent2fb2b219688b2fdf6b8d6da44686f926b105cd58
vmd(8): fix block size calculation for vioscsi devices.

During the multi-process rework, I changed the way disk sizes are
calculated, switching to storing bytes and not 512-byte blocks. The
size calculation from reading an iso did not receive the change in
scaling, resulting in the virtio scsi emulation to think iso's are
larger than reality.

This fixes booting the latest Ubuntu amd64 iso's as apparently
there's some program that tries to arbitrarily read the tail end
of the iso into memory.

ok mlarkin@
usr.sbin/vmd/virtio.c