HomeFreeBSD

virtio_p9fs: fix panic on qemu/kvm

Description

virtio_p9fs: fix panic on qemu/kvm

When the module is loaded on a system running on qemu/kvm the "modern"
virtio infrastructure is used and virtio_read_device_config() will end
up calling vtpci_modern_read_dev_config(). This function cannot read
values of arbitrary sizes and will panic if the p9fs mount tag size is
not supported by it.

Use virtio_read_device_config_array() instead. It was tested on both
bhyve and qemu/kvm.

PR: 280098
Co-authored-by: Mark Peek <mp@FreeBSD.org>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1320

Details

Provenance
daniloAuthored on Jul 6 2024, 4:51 PM
impCommitted on Jul 7 2024, 11:39 AM
Parents
rGfb32ba6aa44d: amd64/arm64: Eliminate unnecessary demotions in pmap_protect()
Branches
Unknown
Tags
Unknown