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
Unknown Object (File)
Feb 18 2024, 8:25 AM
Unknown Object (File)
Jan 12 2024, 10:40 AM
Unknown Object (File)
Dec 12 2023, 2:07 AM
Unknown Object (File)
Dec 10 2023, 9:55 AM
Unknown Object (File)
Dec 4 2023, 12:44 PM
Unknown Object (File)
Dec 4 2023, 6:44 AM
Unknown Object (File)
Nov 9 2023, 11:17 AM
Unknown Object (File)
Nov 1 2023, 11:38 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 Skipped
Unit
Tests Skipped

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