When using spdk aio bdev driver, the qemu command line like this: qemu-system-x86_64 \ -chardev socket,id=char0,path=/tmp/vhost.0 \ -device vhost-user-blk-pci,id=blk0,chardev=char0 \ ...
Boot failure message as below:
e820 map has 7 items: 0: 0000000000000000 - 000000000009fc00 = 1 RAM 1: 000000000009fc00 - 00000000000a0000 = 2 RESERVED 2: 00000000000f0000 - 0000000000100000 = 2 RESERVED 3: 0000000000100000 - 000000007ffdd000 = 1 RAM 4: 000000007ffdd000 - 0000000080000000 = 2 RESERVED 5: 00000000feffc000 - 00000000ff000000 = 2 RESERVED 6: 00000000fffc0000 - 0000000100000000 = 2 RESERVED enter handle_19: NULL Booting from Hard Disk... Boot failed: could not read the boot disk
Signed-off-by: Xiaofei hbuxiaofei@gmail.com --- src/hw/virtio-blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/hw/virtio-blk.c b/src/hw/virtio-blk.c index 9b4a05a..ce3265e 100644 --- a/src/hw/virtio-blk.c +++ b/src/hw/virtio-blk.c @@ -92,7 +92,7 @@ virtio_blk_op(struct disk_op_s *op, int write) u16 blk_num_max;
if (vdrive->drive.blksize != 0 && max_io_size != 0) - blk_num_max = (u16)max_io_size / vdrive->drive.blksize; + blk_num_max = (u16)(max_io_size / vdrive->drive.blksize); else /* default blk_num_max if hardware doesnot advise a proper value */ blk_num_max = 64; -- 2.27.0
On Thu, Nov 10, 2022 at 04:42:10PM +0800, Xiaofei wrote:
When using spdk aio bdev driver, the qemu command line like this: qemu-system-x86_64 \ -chardev socket,id=char0,path=/tmp/vhost.0 \ -device vhost-user-blk-pci,id=blk0,chardev=char0 \ ...
Boot failure message as below:
e820 map has 7 items: 0: 0000000000000000 - 000000000009fc00 = 1 RAM 1: 000000000009fc00 - 00000000000a0000 = 2 RESERVED 2: 00000000000f0000 - 0000000000100000 = 2 RESERVED 3: 0000000000100000 - 000000007ffdd000 = 1 RAM 4: 000000007ffdd000 - 0000000080000000 = 2 RESERVED 5: 00000000feffc000 - 00000000ff000000 = 2 RESERVED 6: 00000000fffc0000 - 0000000100000000 = 2 RESERVED enter handle_19: NULL Booting from Hard Disk... Boot failed: could not read the boot disk
Signed-off-by: Xiaofei hbuxiaofei@gmail.com
Reviewed-by: Gerd Hoffmann kraxel@redhat.com
Fixes: a05af290bac5 ("virtio-blk: split large IO according to size_max")
When using spdk aio bdev driver, the qemu command line like this: qemu-system-x86_64 \ -chardev socket,id=char0,path=/tmp/vhost.0 \ -device vhost-user-blk-pci,id=blk0,chardev=char0 \ ...
Boot failure message as below:
e820 map has 7 items: 0: 0000000000000000 - 000000000009fc00 = 1 RAM 1: 000000000009fc00 - 00000000000a0000 = 2 RESERVED 2: 00000000000f0000 - 0000000000100000 = 2 RESERVED 3: 0000000000100000 - 000000007ffdd000 = 1 RAM 4: 000000007ffdd000 - 0000000080000000 = 2 RESERVED 5: 00000000feffc000 - 00000000ff000000 = 2 RESERVED 6: 00000000fffc0000 - 0000000100000000 = 2 RESERVED enter handle_19: NULL Booting from Hard Disk... Boot failed: could not read the boot disk
Signed-off-by: Xiaofei hbuxiaofei@gmail.com --- src/hw/virtio-blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/hw/virtio-blk.c b/src/hw/virtio-blk.c index 9b4a05a..ce3265e 100644 --- a/src/hw/virtio-blk.c +++ b/src/hw/virtio-blk.c @@ -92,7 +92,7 @@ virtio_blk_op(struct disk_op_s *op, int write) u16 blk_num_max;
if (vdrive->drive.blksize != 0 && max_io_size != 0) - blk_num_max = (u16)max_io_size / vdrive->drive.blksize; + blk_num_max = (u16)(max_io_size / vdrive->drive.blksize); else /* default blk_num_max if hardware doesnot advise a proper value */ blk_num_max = 64;