Page MenuHomeFreeBSD

Update the cached MSI state when any MSI capability register is written.
ClosedPublic

Authored by jhb on Apr 27 2020, 5:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 24, 11:00 AM
Unknown Object (File)
Wed, Apr 24, 7:49 AM
Unknown Object (File)
Sat, Apr 20, 5:25 PM
Unknown Object (File)
Apr 8 2024, 12:41 PM
Unknown Object (File)
Apr 2 2024, 4:21 PM
Unknown Object (File)
Feb 17 2024, 2:31 AM
Unknown Object (File)
Feb 7 2024, 6:44 AM
Unknown Object (File)
Dec 23 2023, 9:42 AM

Details

Summary

bhyve uses cached copies of the MSI capability registers to generate
MSI interrupts for device models. Previously, these cached fields
were only set when the MSI capability control register was updated.
The Linux kernel recently adopted a change to deal with races in MSI
interrupt delivery that writes to the MSI capability address and data
registers to alter the destination of MSI interrupts without writing
to the MSI capability control register. bhyve was not updating its
cached registers for these writes and continued to send interrupts
with the old data value to the old address. Fix this by recomputing
the cached values for every write to any MSI capability register.

Reported by: Jason Tubnor, Ryan Moeller
Reported by: Marc Dionne (bisected the Linux kernel commit)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Apr 27 2020, 5:18 PM

This resolves the issue for my test VM, using:

vmrun -m 4G -c 2 -E -d /dev/zvol/system/vms/ubuntu/disk0 -I ubuntu-20.04-desktop-amd64.iso -L 192.168.1.190 -T -A ubuntu
This revision is now accepted and ready to land.Apr 27 2020, 9:28 PM