Page MenuHomeFreeBSD

bhyve: emulate reads of MSI-X capabilities for passthru devices
ClosedPublic

Authored by corvink on Oct 27 2021, 7:34 AM.
Tags
Referenced Files
F106163544: D32686.diff
Thu, Dec 26, 10:44 AM
Unknown Object (File)
Thu, Dec 12, 6:31 PM
Unknown Object (File)
Nov 14 2024, 12:26 PM
Unknown Object (File)
Nov 14 2024, 12:10 PM
Unknown Object (File)
Oct 24 2024, 4:37 PM
Unknown Object (File)
Sep 28 2024, 5:20 AM
Unknown Object (File)
Sep 26 2024, 10:00 AM
Unknown Object (File)
Sep 13 2024, 3:09 AM

Details

Summary

Reads of the MSI-X capabilites aren't emulated by passthru devices
yet. The guest will read the host MSI-X capabilites which could
cause issues.

Note: You may wanna have a look at https://github.com/Beckhoff/freebsd-src/commits/phab/corvink/msix-read

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

LGMT.
Will commit next monday unless someone have more comments until then.

This revision is now accepted and ready to land.Nov 18 2021, 3:29 PM
markj added a subscriber: markj.

For my own edification, what problem arises when we go straight to the device? Since writes to the msi-x cap are emulated, I guess a guest might observe that a previous write didn't update some field in the capability, but I'm curious about the details.

usr.sbin/bhyve/pci_passthru.c
747–748

Long line.

For my own edification, what problem arises when we go straight to the device? Since writes to the msi-x cap are emulated, I guess a guest might observe that a previous write didn't update some field in the capability, but I'm curious about the details.

In the worst case, the guest notices that something goes wrong and stops using the device. I've noticed this mistake while investigating some PCI passthrough issues. It wasn't the root cause of my issues. So, I'm unsure whether there are some real faults caused by the missing emulation of MSI-X reads or not. However, we should correct this mistake.

corvink edited the summary of this revision. (Show Details)

Shorten long line

This revision now requires review to proceed.Nov 22 2021, 10:43 AM
This revision is now accepted and ready to land.Nov 22 2021, 1:56 PM