Page MenuHomeFreeBSD

bhyve: Keep passthrough PCI power state virtual
Needs ReviewPublic

Authored by kbowling on Mon, Aug 17, 5:42 PM.
Tags
None
Referenced Files
F167044663: D58892.diff
Tue, Aug 18, 6:44 PM
F167044656: D58892.diff
Tue, Aug 18, 6:44 PM
F167029285: D58892.diff
Tue, Aug 18, 4:13 PM
F166959357: D58892.diff
Tue, Aug 18, 4:03 AM
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.