]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC 360399:
authorJohn Baldwin <jhb@FreeBSD.org>
Thu, 14 May 2020 18:49:43 +0000 (18:49 +0000)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 14 May 2020 18:49:43 +0000 (18:49 +0000)
commit00ac46c58501b4956bc58e1cbd0fc75690f6a975
treebe1a3f1722e60d1b85b369341a069e146b73cc01
parent6782b73a5138e3c1da8714a7f2c830f7538ccd01
MFC 360399:
Update the cached MSI state when any MSI capability register is written.

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.
usr.sbin/bhyve/pci_emul.c