Page MenuHomeFreeBSD

bhyve: Keep passthrough PCI power state virtual
ClosedPublic

Authored by kbowling on Mon, Aug 17, 5:42 PM.
Tags
None
Referenced Files
F169435329: D58892.id184206.diff
Tue, Sep 1, 1:11 PM
F169414934: D58892.diff
Tue, Sep 1, 11:55 AM
Unknown Object (File)
Tue, Sep 1, 5:07 AM
Unknown Object (File)
Tue, Sep 1, 12:27 AM
Unknown Object (File)
Mon, Aug 31, 8:57 PM
Unknown Object (File)
Mon, Aug 31, 6:57 AM
Unknown Object (File)
Sun, Aug 30, 6:51 PM
Unknown Object (File)
Sun, Aug 30, 12:36 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

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

usr.sbin/bhyve/pci_passthru.c
1326–1327

Is this an unrelated cleanup?

1351

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
1326–1327

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