nova: avoid hangs on AMD with IOMMUs

With the new usb driver #4399 and usage of the updated dde_linux lx_eml/lx_kit
approach a much higher rate of IRQ session construction/destruction and signal
handler assignment (irq->sigh) are caused. This trickles down to the kernel,
which causes an hang of the AMD IOMMUs due to not setting reserved bits
adequately. The commit fixes the root cause in the kernel and add a guard
into core's to limit such driver behaviour.

Fixes #4482
This commit is contained in:
Alexander Boettcher 2022-04-23 22:42:58 +02:00
parent 260d7aa701
commit 0d163915d0
3 changed files with 7 additions and 2 deletions

View File

@ -1 +1 @@
f5e2aa3d82dd6737422987241ebc8e17ecbf640c
7208e091c7694c61247427715d0abef7ba8d78e3

View File

@ -4,7 +4,7 @@ DOWNLOADS := nova.git
# r10 branch
URL(nova) := https://github.com/alex-ab/NOVA.git
REV(nova) := de90690dbf395a786d10c22123f37feb143a109f
REV(nova) := 1c6acf0af8256036cdea023576e2cb0e30e7d69c
DIR(nova) := src/kernel/nova
PATCHES := $(sort $(wildcard $(REP_DIR)/patches/*.patch))

View File

@ -107,6 +107,11 @@ void Irq_object::sigh(Signal_context_capability cap)
if (!_sigh_cap.valid() && !cap.valid())
return;
if (_sigh_cap.valid() && _sigh_cap == cap) {
/* avoid useless overhead, e.g. with IOMMUs enabled */
return;
}
if ((_sigh_cap.valid() && !cap.valid())) {
deassociate(irq_sel());
_sigh_cap = Signal_context_capability();