When running as an unprivileged user, we can't open /dev/pci for writing.
This isn't critical for bhyve operation, but there are many places where we
try to open it, so to avoid logging some scary-looking warnings, just silence
it in this case.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 69983 Build 66866: arc lint + arc unit
Event Timeline
Comment Actions
I did an initial smoke test for this phab stack and it worked for me..got a couple questions though
| usr.sbin/bhyve/pci_passthru.c | ||
|---|---|---|
| 198–201 | hmm..wonder if this will break the gpu passthru bits? host_read_config() proxies through ioctl(PCIOCREAD)..and PCIOCREAD requires a writable descriptor... it appears the the existing gpu passthru bits rely on pci_host_read_config() curious if the gpu bits should leverage passthru_read_config() using the global pcifd descriptor instead? for what its worth i haven't experimented with gpu passthru yet | |
| usr.sbin/bhyve/pci_passthru.c | ||
|---|---|---|
| 198–201 | Thanks for testing... you're right, for some reason I had convinced myself that PCIOCREAD was in the list of ioctls that pci_ioctl() explicitly lists as not requiring FWRITE. I'll retest and update the revision. | |