From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org,
linux-rt-users <linux-rt-users@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Carsten Emde <C.Emde@osadl.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
John Kacur <jkacur@redhat.com>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
<stable-rt@vger.kernel.org>, Scott Wood <scottwood@freescale.com>,
Bogdan Purcareata <bogdan.purcareata@freescale.com>
Subject: [PATCH RT 5/6] powerpc/kvm: Disable in-kernel MPIC emulation for PREEMPT_RT_FULL
Date: Fri, 07 Aug 2015 14:07:14 -0400 [thread overview]
Message-ID: <20150807180724.190416285@goodmis.org> (raw)
In-Reply-To: 20150807180709.744130098@goodmis.org
[-- Attachment #1: 0005-powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch --]
[-- Type: text/plain, Size: 1920 bytes --]
3.10.84-rt92-rc1 stable review patch.
If anyone has any objections, please let me know.
------------------
From: Bogdan Purcareata <bogdan.purcareata@freescale.com>
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.
Cc: stable-rt@vger.kernel.org
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>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
arch/powerpc/kvm/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig
index eb643f862579..2c3c4dff49b5 100644
--- a/arch/powerpc/kvm/Kconfig
+++ b/arch/powerpc/kvm/Kconfig
@@ -154,6 +154,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_IRQ_ROUTING
select HAVE_KVM_MSI
--
2.4.6
next prev parent reply other threads:[~2015-08-07 18:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-07 18:07 [PATCH RT 0/6] Linux 3.10.84-rt92-rc1 Steven Rostedt
2015-08-07 18:07 ` [PATCH RT 1/6] Revert "slub: delay ctor until the object is requested" Steven Rostedt
2015-08-07 18:07 ` [PATCH RT 2/6] mm/slub: move slab initialization into irq enabled region Steven Rostedt
2015-08-07 18:07 ` [PATCH RT 3/6] x86-Tell-irq-work-about-self-IPI-support-3.14 Steven Rostedt
2015-08-07 18:07 ` [PATCH RT 4/6] xfs: Disable percpu SB on PREEMPT_RT_FULL Steven Rostedt
2015-08-07 18:07 ` Steven Rostedt [this message]
2015-08-07 18:07 ` [PATCH RT 6/6] Linux 3.10.84-rt92-rc1 Steven Rostedt
-- strict thread matches above, loose matches on Subject: below --
2015-08-07 14:01 [PATCH RT 0/6] Linux 3.12.44-rt62-rc1 Steven Rostedt
2015-08-07 14:01 ` [PATCH RT 5/6] powerpc/kvm: Disable in-kernel MPIC emulation for PREEMPT_RT_FULL Steven Rostedt
2015-08-06 22:17 [PATCH RT 0/6] Linux 3.14.48-rt49-rc1 Steven Rostedt
2015-08-06 22:17 ` [PATCH RT 5/6] powerpc/kvm: Disable in-kernel MPIC emulation for PREEMPT_RT_FULL Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150807180724.190416285@goodmis.org \
--to=rostedt@goodmis.org \
--cc=C.Emde@osadl.org \
--cc=bigeasy@linutronix.de \
--cc=bogdan.purcareata@freescale.com \
--cc=jkacur@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=scottwood@freescale.com \
--cc=stable-rt@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).