Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752178AbbBRJgy (ORCPT ); Wed, 18 Feb 2015 04:36:54 -0500 Received: from www.linutronix.de ([62.245.132.108]:46916 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751002AbbBRJgx (ORCPT ); Wed, 18 Feb 2015 04:36:53 -0500 Message-ID: <54E45D31.3020302@linutronix.de> Date: Wed, 18 Feb 2015 10:36:49 +0100 From: Sebastian Andrzej Siewior User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.4.0 MIME-Version: 1.0 To: Bogdan Purcareata , linuxppc-dev@lists.ozlabs.org, linux-rt-users@vger.kernel.org, agraf@suse.de, pbonzini@redhat.com CC: linux-kernel@vger.kernel.org, scottwood@freescale.com, mihai.caraman@freescale.com Subject: Re: [PATCH 2/2] powerpc/kvm: Limit MAX_VCPUS for guests running on RT Linux References: <1424251955-308-1-git-send-email-bogdan.purcareata@freescale.com> <1424251955-308-3-git-send-email-bogdan.purcareata@freescale.com> In-Reply-To: <1424251955-308-3-git-send-email-bogdan.purcareata@freescale.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1069 Lines: 22 On 02/18/2015 10:32 AM, Bogdan Purcareata wrote: > Due to the introduction of the raw_spinlock for the KVM openpic, guests with a > high number of VCPUs may induce great latencies on the underlying RT Linux > system (e.g. cyclictest reports latencies of ~15ms for guests with 24 VCPUs). > This can be further aggravated by sending a lot of external interrupts to the > guest. > > A malicious app can abuse this scenario, causing a DoS of the host Linux. > Until the KVM openpic code is refactored to use finer lock granularity, impose > a limitation on the number of VCPUs a guest can have when running on a > PREEMPT_RT_FULL system with KVM_MPIC emulation. How is this possible? You take the raw lock, write a register, release the raw lock. How can the guest lockup the host? Is this write blocking in guest? Sebastian -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/