|Priority:||4 - Normal|
|Created by:||Patrick Mooney [X]|
|Reported by:||Patrick Mooney [X]|
|Assigned to:||Patrick Mooney [X]|
Fixed: A fix for this issue is checked into the tree and tested.
(Resolution Date: 2018-10-04T19:46:48.833Z)
2018-10-11 Criss Chros (Release Date: 2018-10-11)
While investigating OS-7237, I became interested in why FreeBSD was seemingly unable or unwilling to configure MSI-X interrupts for its virtio (both block and net) device. The device detection logic itself noted the MSI-X (and MSI) capabilities presented by those devices, but they remained unconfigured when the device was brought online. Reading the FreeBSD source code wasn't leading me anywhere particularly fruitful, so I looked into how our configuration might differ from examples on a FreeBSD hypervisor. One notable departure in our setup was the lack of hostbridge device added to the system. As an experiment, I started my FreeBSD guest with the generic hostbridge added via
bhyve_extra_opts. When it came online, it detected and configured the MSI-X capabilities of both virtio-net and virtio-block devices.
To test, I booted up a bhyve instance with varying values (including total absence) of the hostbridge attribute. Without one defined, the guest came up with the Natoma (i440fx) hostbridge. The values of
i440fx were used for the
hostbridge attr and the instance was booted, verifying the respective
device ID pairs were presented. Additionally a value of
none was used, confirming that it disabled the addition of a hostbridge device. Finally a test "fake" value of
vendor=0x1234,device=0x4321 was used to confirm that custom IDs were functioning, and they were.
sjorge tested the patch with an OpenBSD instance he created and the default i440fx hostbridge seemed adequate
illumos-joyent commit 4c14c4cff5adaaa79d7099e153c3ace3a0d65148 (branch master, by Patrick Mooney)
OS-7238 bhyve zones should add hostbridge device
Reviewed by: Mike Gerdts <firstname.lastname@example.org>
Reviewed by: Jorge Schrauwen <email@example.com>
Reviewed by: Hans Rosenfeld <firstname.lastname@example.org>
Approved by: Hans Rosenfeld <email@example.com>