Project

General

Profile

Feature #12680

want PCI pass-thru in bhyve

Added by Patrick Mooney 2 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Category:
kernel
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
bhyve
Gerrit CR:

Description

As part of the bhyve porting effort, support for PCI pass-thru was wired up in the illumos version.
This represents the upstreaming effort for the consolidated commits to implement the change

The PPT-related SmartOS issues it's comprised of:
- OS-6674 port bhyve pci-passthru to illumos
- OS-6685 bhyve ppt should facilitate PCI access
- OS-6771 ppt device nodes sometimes disappear after module unloading
- OS-6855 bhyve ppt should verify BAR mappings
- OS-6738 bhyve ppt should not use /dev/mem
- OS-6894 set passthru flag when ppt devices are assigned to a VM
- OS-6760 bhyve passthru devices should use physical path
- OS-7528 update bhyve pkg manifest from OmniOS
- OS-7572 bhyve: stop shipping libvmm.so and libvmmapi.so
- OS-6937 support large page mapping for bhyve IOMMU domains
- OS-6740 bhyve vtd leaks mapping resources
- OS-7031 panic in ppt_bar_crawl()
- OS-7074 deadlock with vmm_detach() and iommu_cleanup()

It also includes pieces from bhyve-general SmartOS updates which covered bhyve, viona, and PPT.


Related issues

Related to illumos gate - Bug #12781: /etc/ppt_aliases needs to be in the boot archiveClosed

Actions
Related to illumos gate - Bug #12813: pptadm and libppt are x86 onlyClosed

Actions

History

#1

Updated by Patrick Mooney about 2 months ago

  • Description updated (diff)
#2

Updated by Patrick Mooney about 2 months ago

I've compared the downstream (SmartOS) sources with this proposed patch, and we match for all of the PPT and bhyve related bits. PPT never rose to the same level of importance in the product as general bhyve usage did, so the amount of testing done around it is not as rigorous. There were devices such as NICs which engineers and folks in the community were able to successfully paint into bhyve instances. Considering the small blast radius of PPT (bhyve can operate just fine with it in place, but inactive) it's probably safe to iterate in-gate.

#3

Updated by Patrick Mooney about 2 months ago

Hans built this patchset to test on OI. With it loaded, he was able to pass-thru a wireless device into a Linux guest. The guest successfully loaded its driver and attached to the device (loading firmware into it as part of the process). This all lines up with the expectations set by operation in SmartOS and OmniOSce.

#4

Updated by Andy Fiddaman about 2 months ago

  • Related to Bug #12781: /etc/ppt_aliases needs to be in the boot archive added
#5

Updated by Electric Monk about 2 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit eb9a1df2aeb866bf1de4494433b6d7e5fa07b3ae

commit  eb9a1df2aeb866bf1de4494433b6d7e5fa07b3ae
Author: Hans Rosenfeld <hans.rosenfeld@joyent.com>
Date:   2020-05-22T14:27:14.000Z

    12680 want PCI pass-thru in bhyve
    Portions contributed by: Patrick Mooney <patrick.mooney@joyent.com>
    Portions contributed by: John Levon <john.levon@joyent.com>
    Portions contributed by: Andy Fiddaman <omnios@citrus-it.co.uk>
    Reviewed by: Patrick Mooney <pmooney@oxide.computer>
    Approved by: Dan McDonald <danmcd@joyent.com>

#6

Updated by Joshua M. Clulow about 1 month ago

  • Related to Bug #12813: pptadm and libppt are x86 only added

Also available in: Atom PDF