OS-7238: bhyve zones should add hostbridge device


Issue Type:Bug
Priority:4 - Normal
Created at:2018-09-10T21:44:20.699Z
Updated at:2018-10-04T19:47:04.254Z


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)

Fix Versions

2018-10-11 Criss Chros (Release Date: 2018-10-11)

Related Links




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.


Comment by Patrick Mooney [X]
Created at 2018-09-27T20:55:04.974Z

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 amd, q35, netapp, and i440fx were used for the hostbridge attr and the instance was booted, verifying the respective vendor/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.

Comment by Patrick Mooney [X]
Created at 2018-10-01T20:45:50.153Z

sjorge tested the patch with an OpenBSD instance he created and the default i440fx hostbridge seemed adequate

Comment by Jira Bot
Created at 2018-10-04T19:47:04.254Z

illumos-joyent commit 4c14c4cff5adaaa79d7099e153c3ace3a0d65148 (branch master, by Patrick Mooney)

OS-7238 bhyve zones should add hostbridge device
Reviewed by: Mike Gerdts <mike.gerdts@joyent.com>
Reviewed by: Jorge Schrauwen <jorge@blackdot.be>
Reviewed by: Hans Rosenfeld <hans.rosenfeld@joyent.com>
Approved by: Hans Rosenfeld <hans.rosenfeld@joyent.com>