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)
Tue, Dec 3, 10:29 PM
Unknown Object (File)
Tue, Nov 26, 3:06 AM
Unknown Object (File)
Nov 17 2024, 1:31 AM
Unknown Object (File)
Oct 27 2024, 2:26 AM
Unknown Object (File)
Oct 6 2024, 7:33 PM
Unknown Object (File)
Sep 27 2024, 2:28 PM
Unknown Object (File)
Sep 20 2024, 2:26 PM
Unknown Object (File)
Sep 20 2024, 2:26 PM

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