Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtio-blk not work in freebsd guest with qemu>=7.0.0 #3327

Open
faicker opened this issue Apr 3, 2024 · 4 comments
Open

virtio-blk not work in freebsd guest with qemu>=7.0.0 #3327

faicker opened this issue Apr 3, 2024 · 4 comments
Assignees
Labels

Comments

@faicker
Copy link

faicker commented Apr 3, 2024

Sighting report

virtio-blk device with vhost-user/spdk as BE can't be used in freebsd 14.0 guest.

Expected Behavior

can be used.

Current Behavior

In qemu 8.2.0, when a virtio-blk device with vhost-user/spdk as bE is attached to freebsd 14.0 guest,
the guest show errors,
host requires unsupported maximum segment size feature. attach returned 45

the error is from,
https://github.com/freebsd/freebsd-src/blob/release/14.0.0/sys/dev/virtio/block/virtio_blk.c#L348

qemu add the feature VIRTIO_BLK_F_SIZE_MAX from the commit qemu/qemu@0a963af

from spdk,
https://github.com/spdk/spdk/blob/master/lib/vhost/vhost_blk.c#L1524

the max is,
#define SPDK_BDEV_LARGE_BUF_MAX_SIZE (64 * 1024)

But the freebsd 14.0 maxphys default is 1M.
freebsd/freebsd-src@cd85379

@changpe1
Copy link
Contributor

@faicker I don't think this is a SPDK bug, but I'm OK to workaround it in SPDK, e.g: we may introduce a flag not to enable VIRTIO_BLK_F_SIZE_MAX feature bit for FreeBSD VM.

@faicker
Copy link
Author

faicker commented Apr 17, 2024

Maybe qemu should export a cmdline flag to disable the VIRTIO_BLK_F_SIZE_MAX.
I'll post to the qemu issues.

@xjjx xjjx self-assigned this May 20, 2024
@xjjx
Copy link
Contributor

xjjx commented May 22, 2024

@faicker are there any news? Did you have a chance to post issue to QEMU?

@faicker
Copy link
Author

faicker commented May 23, 2024

Sorry for late post.
The issue on qemu is here,
https://gitlab.com/qemu-project/qemu/-/issues/2289

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants