Page MenuHomeFreeBSD

bhyve: use handlers for cfg reads/writes of passthru devices
Needs ReviewPublic

Authored by c.koehne_beckhoff.com on Nov 16 2021, 12:23 PM.

Details

Reviewers
None
Group Reviewers
bhyve
Summary

Some PCI register of passthru devices require a special handling. E. g. MSI registers are emulated by bhyve. Instead of using many if's for each special case, use different handlers. Each passthru device has an own set of handlers.

This patch uses handlers to emulate some PCI header register. It can be expanded to use a special handler for cmd/msi/... register accesses in the future.

Note: It might add more complexity for now. However, it'll simplify the emulation of some special registers like those used by GVT-d (see D26209).

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Lint Skipped
Unit
Unit Tests Skipped