mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-12 05:48:39 +08:00
f3b0946d62
Bharat Kumar Gogada reported issues with the generic MSI code, where the
end-point ended up with garbage in its MSI configuration (both for the vector
and the message).
It turns out that the two MSI paths in the kernel are doing slightly different
things:
generic MSI: disable MSI -> allocate MSI -> enable MSI -> setup EP
PCI MSI: disable MSI -> allocate MSI -> setup EP -> enable MSI
And it turns out that end-points are allowed to latch the content of the MSI
configuration registers as soon as MSIs are enabled. In Bharat's case, the
end-point ends up using whatever was there already, which is not what you
want.
In order to make things converge, we introduce a new MSI domain flag
(MSI_FLAG_ACTIVATE_EARLY) that is unconditionally set for PCI/MSI. When set,
this flag forces the programming of the end-point as soon as the MSIs are
allocated.
A consequence of this is that we have an extra activate in irq_startup, but
that should be without much consequence.
tglx:
- Several people reported a VMWare regression with PCI/MSI-X passthrough. It
turns out that the patch also cures that issue.
- We need to have a look at the MSI disable interrupt path, where we write
the msg to all zeros without disabling MSI in the PCI device. Is that
correct?
Fixes:
|
||
---|---|---|
.. | ||
affinity.c | ||
autoprobe.c | ||
chip.c | ||
cpuhotplug.c | ||
debug.h | ||
devres.c | ||
dummychip.c | ||
generic-chip.c | ||
handle.c | ||
internals.h | ||
ipi.c | ||
irqdesc.c | ||
irqdomain.c | ||
Kconfig | ||
Makefile | ||
manage.c | ||
migration.c | ||
msi.c | ||
pm.c | ||
proc.c | ||
resend.c | ||
settings.h | ||
spurious.c |