On Tue, Jun 06, 2023 at 03:29:52PM +0200, Lukas Stockner via SeaBIOS wrote:
When the maximum IO size supported by the virtio-blk backend is large enough (>= 32MiB for 512B sectors), the computed blk_num_max will overflow. In particular, if it's a multiple of 32MiB, blk_num_max will end up as zero, causing IO requests to fail.
This is triggered by e.g. the SPDK virtio-blk vhost-user backend.
To fix it, just limit blk_num_max to 65535 before converting to u16.
Thanks. I committed this change.
-Kevin