From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751988AbbBRJdB (ORCPT ); Wed, 18 Feb 2015 04:33:01 -0500 Received: from mail-bn1bn0105.outbound.protection.outlook.com ([157.56.110.105]:18592 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751055AbbBRJc6 (ORCPT ); Wed, 18 Feb 2015 04:32:58 -0500 From: Bogdan Purcareata To: , , , , CC: , , , Bogdan Purcareata Subject: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux Date: Wed, 18 Feb 2015 09:32:33 +0000 Message-ID: <1424251955-308-1-git-send-email-bogdan.purcareata@freescale.com> X-Mailer: git-send-email 2.1.4 X-EOPAttributedMessage: 0 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=bogdan.purcareata@freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; X-Forefront-Antispam-Report: CIP:192.88.168.50;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(339900001)(105606002)(33646002)(6806004)(2201001)(104016003)(229853001)(50226001)(77156002)(62966003)(106466001)(36756003)(49486002)(87936001)(48376002)(50466002)(92566002)(50986999)(46102003)(85426001)(77096005)(47776003)(2101003);DIR:OUT;SFP:1102;SCL:1;SRVR:BLUPR03MB501;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:sfv;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB501; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005003);SRVR:BLUPR03MB501; X-Forefront-PRVS: 04916EA04C X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB501; X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Feb 2015 09:32:56.0398 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.168.50] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB501 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset enables running KVM SMP guests with external interrupts on an underlying RT-enabled Linux. Previous to this patch, a guest with in-kernel MPIC emulation could easily panic the kernel due to preemption when delivering IPIs and external interrupts, because of the openpic spinlock becoming a sleeping mutex on PREEMPT_RT_FULL Linux. 0001: converts the openpic spinlock to a raw spinlock, in order to circumvent this behavior. While this change is targeted for a RT enabled Linux, it has no effect on upstream kvm-ppc, so send it upstream for better future maintenance. 0002: introduces a limit on the maximum VCPUs a guest can have, in order to prevent potential DoS attack due to large system latencies. This patch is targeted to RT (due to CONFIG_PREEMPT_RT_FULL), but it can also be applied on upstream Linux, with no effect. Not sure if it's best to send it upstream and have a hanging CONFIG_PREEMPT_RT_FULL check there, with no effect, or send it against linux-stable-rt. Please apply as you consider appropriate. - applied & compiled against upstream 3.19 - applied & compiled against stable-rt 3.14-rt (0002 with minor fuzz) Bogdan Purcareata (2): powerpc/kvm: Convert openpic lock to raw_spinlock powerpc/kvm: Limit MAX_VCPUS for guests running on RT Linux arch/powerpc/include/asm/kvm_host.h | 6 +++++ arch/powerpc/kvm/mpic.c | 44 ++++++++++++++++++------------------- 2 files changed, 28 insertions(+), 22 deletions(-) -- 2.1.4