OS-6738: bhyve ppt should not use /dev/mem

Details

Issue Type:Bug
Priority:4 - Normal
Status:Resolved
Created at:2018-03-05T19:10:42.040Z
Updated at:2018-04-25T18:44:01.203Z

People

Created by:Patrick Mooney [X]
Reported by:Patrick Mooney [X]

Resolution

Fixed: A fix for this issue is checked into the tree and tested.
(Resolution Date: 2018-04-25T18:44:01.190Z)

Fix Versions

2018-04-26 Queen's Room (Release Date: 2018-04-26)

Related Links

Labels

bhyve

Description

The userspace driver for bhyve ppt will occasionally use /dev/mem in order to facilitate PBAR access for devices which have a very specific quirk in how they have laid out their DMA regions. Since this cannot work in a zone, it should either throw an explicit error, or be handed in a secure way by the ppt kernelspace driver.

Comments

Comment by Hans Rosenfeld [X]
Created at 2018-04-20T12:01:53.974Z

Testing:

Getting this tested was a bit tricky, as I have no devices where the PBA and the MSI-X table share a page. For testing purposes I therefore modified pci_passthru.c to always map the PBA using this interface, even if it wasn't strictly necessary normal operation. Using this change I've still been able to use NVMe devices in passthru without noticing any errors. Testing with the GPU didn't make sense as it doesn't support MSI-X.


Comment by Jira Bot
Created at 2018-04-24T12:16:41.859Z

illumos-joyent commit 7f4cce258636ed577f781c39e1dac133a2d745b2 (branch master, by Hans Rosenfeld)

OS-6738 bhyve ppt should not use /dev/mem
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Approved by: Jerry Jelinek <jerry.jelinek@joyent.com>