2020-06-23 13:42:59 +00:00
|
|
|
From 87606cf3013d6722b78e6ddd779dd1e92eb8ceca Mon Sep 17 00:00:00 2001
|
|
|
|
Message-Id: <87606cf3013d6722b78e6ddd779dd1e92eb8ceca.1592846147.git.zanussi@kernel.org>
|
|
|
|
In-Reply-To: <07cd0dbc80b976663c80755496a03f288decfe5a.1592846146.git.zanussi@kernel.org>
|
|
|
|
References: <07cd0dbc80b976663c80755496a03f288decfe5a.1592846146.git.zanussi@kernel.org>
|
2018-08-27 14:32:32 +00:00
|
|
|
From: Bogdan Purcareata <bogdan.purcareata@freescale.com>
|
|
|
|
Date: Fri, 24 Apr 2015 15:53:13 +0000
|
2020-06-23 13:42:59 +00:00
|
|
|
Subject: [PATCH 049/330] powerpc/kvm: Disable in-kernel MPIC emulation for
|
2019-04-08 23:49:20 +00:00
|
|
|
PREEMPT_RT_FULL
|
2020-06-23 13:42:59 +00:00
|
|
|
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.127-rt55.tar.xz
|
2018-08-27 14:32:32 +00:00
|
|
|
|
|
|
|
While converting the openpic emulation code to use a raw_spinlock_t enables
|
|
|
|
guests to run on RT, there's still a performance issue. For interrupts sent in
|
|
|
|
directed delivery mode with a multiple CPU mask, the emulated openpic will loop
|
|
|
|
through all of the VCPUs, and for each VCPUs, it call IRQ_check, which will loop
|
|
|
|
through all the pending interrupts for that VCPU. This is done while holding the
|
|
|
|
raw_lock, meaning that in all this time the interrupts and preemption are
|
|
|
|
disabled on the host Linux. A malicious user app can max both these number and
|
|
|
|
cause a DoS.
|
|
|
|
|
|
|
|
This temporary fix is sent for two reasons. First is so that users who want to
|
|
|
|
use the in-kernel MPIC emulation are aware of the potential latencies, thus
|
|
|
|
making sure that the hardware MPIC and their usage scenario does not involve
|
|
|
|
interrupts sent in directed delivery mode, and the number of possible pending
|
|
|
|
interrupts is kept small. Secondly, this should incentivize the development of a
|
|
|
|
proper openpic emulation that would be better suited for RT.
|
|
|
|
|
|
|
|
Acked-by: Scott Wood <scottwood@freescale.com>
|
|
|
|
Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com>
|
|
|
|
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
|
|
---
|
2019-04-08 23:49:20 +00:00
|
|
|
arch/powerpc/kvm/Kconfig | 1 +
|
2018-08-27 14:32:32 +00:00
|
|
|
1 file changed, 1 insertion(+)
|
|
|
|
|
2019-04-08 23:49:20 +00:00
|
|
|
diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig
|
|
|
|
index 68a0e9d5b440..6f4d5d7615af 100644
|
2018-08-27 14:32:32 +00:00
|
|
|
--- a/arch/powerpc/kvm/Kconfig
|
|
|
|
+++ b/arch/powerpc/kvm/Kconfig
|
|
|
|
@@ -178,6 +178,7 @@ config KVM_E500MC
|
|
|
|
config KVM_MPIC
|
|
|
|
bool "KVM in-kernel MPIC emulation"
|
|
|
|
depends on KVM && E500
|
|
|
|
+ depends on !PREEMPT_RT_FULL
|
|
|
|
select HAVE_KVM_IRQCHIP
|
|
|
|
select HAVE_KVM_IRQFD
|
|
|
|
select HAVE_KVM_IRQ_ROUTING
|
2020-01-03 23:36:11 +00:00
|
|
|
--
|
2020-06-22 13:14:16 +00:00
|
|
|
2.17.1
|
2020-01-03 23:36:11 +00:00
|
|
|
|