]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/blob - rt-patches/0188-powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch
WAR:media:i2c:ov5693: add flip and mirror setting
[hercules2020/nv-tegra/linux-4.4.git] / rt-patches / 0188-powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch
1 From f74bfed8f10e42abb38290c7e33d79161202c2b7 Mon Sep 17 00:00:00 2001
2 From: Bogdan Purcareata <bogdan.purcareata@freescale.com>
3 Date: Fri, 24 Apr 2015 15:53:13 +0000
4 Subject: [PATCH 188/365] powerpc/kvm: Disable in-kernel MPIC emulation for
5  PREEMPT_RT_FULL
6
7 While converting the openpic emulation code to use a raw_spinlock_t enables
8 guests to run on RT, there's still a performance issue. For interrupts sent in
9 directed delivery mode with a multiple CPU mask, the emulated openpic will loop
10 through all of the VCPUs, and for each VCPUs, it call IRQ_check, which will loop
11 through all the pending interrupts for that VCPU. This is done while holding the
12 raw_lock, meaning that in all this time the interrupts and preemption are
13 disabled on the host Linux. A malicious user app can max both these number and
14 cause a DoS.
15
16 This temporary fix is sent for two reasons. First is so that users who want to
17 use the in-kernel MPIC emulation are aware of the potential latencies, thus
18 making sure that the hardware MPIC and their usage scenario does not involve
19 interrupts sent in directed delivery mode, and the number of possible pending
20 interrupts is kept small. Secondly, this should incentivize the development of a
21 proper openpic emulation that would be better suited for RT.
22
23 Acked-by: Scott Wood <scottwood@freescale.com>
24 Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com>
25 Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
26 ---
27  arch/powerpc/kvm/Kconfig | 1 +
28  1 file changed, 1 insertion(+)
29
30 diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig
31 index c2024ac..2303788 100644
32 --- a/arch/powerpc/kvm/Kconfig
33 +++ b/arch/powerpc/kvm/Kconfig
34 @@ -172,6 +172,7 @@ config KVM_E500MC
35  config KVM_MPIC
36         bool "KVM in-kernel MPIC emulation"
37         depends on KVM && E500
38 +       depends on !PREEMPT_RT_FULL
39         select HAVE_KVM_IRQCHIP
40         select HAVE_KVM_IRQFD
41         select HAVE_KVM_IRQ_ROUTING
42 -- 
43 2.7.4
44