Page MenuHomeFreeBSD

bhyve: Keep passthrough PCI power state virtual
ClosedPublic

Authored by kbowling on Mon, Aug 17, 5:42 PM.
Tags
None
Referenced Files
F167743689: D58892.id184434.diff
Mon, Aug 24, 5:24 AM
F167719725: D58892.id184434.diff
Mon, Aug 24, 12:04 AM
F167670099: D58892.id184434.diff
Sun, Aug 23, 4:39 PM
F167667067: D58892.diff
Sun, Aug 23, 4:22 PM
Unknown Object (File)
Sat, Aug 22, 6:40 AM
Unknown Object (File)
Sat, Aug 22, 4:41 AM
Unknown Object (File)
Fri, Aug 21, 2:19 PM
Unknown Object (File)
Fri, Aug 21, 1:59 PM
Subscribers

Details

Reviewers
markj
jhb
Group Reviewers
bhyve
Summary
The passthrough Command register is emulated, but PMCSR writes were
sent directly to the physical function.  A guest D3hot-to-D0 transition
can perform an internal reset and clear physical Command while its
emulated copy remains enabled.

Cache the Power Management capability and keep the physical D-state
host-owned.  Emulate the guest D-state and advertise No_Soft_Reset so
the guest is not promised a function reset by a virtual power cycle.
Restore the assignment-time virtual state after a managed FLR.

MFC after:      2 weeks

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

usr.sbin/bhyve/pci_passthru.c
1319

Is this an unrelated cleanup?

1333

It'd be good to introduce a helper function which factors out this expression, with a comment explaining it, as it appears quite a few times and isn't easy to read.

usr.sbin/bhyve/pci_passthru.c
1319

it's related to the immediate predecessor, this 0xffff check was for device removal.

This revision is now accepted and ready to land.Thu, Aug 20, 1:41 PM