From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Zyngier Subject: Re: [PATCH v4 23/23] arm64: Panic when VHE and non VHE CPUs coexist Date: Mon, 15 Feb 2016 18:14:25 +0000 Message-ID: <56C21581.5030003@arm.com> References: <1455216004-19499-1-git-send-email-marc.zyngier@arm.com> <1455216004-19499-24-git-send-email-marc.zyngier@arm.com> <20160215172653.GM6298@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id F418749731 for ; Mon, 15 Feb 2016 13:08:18 -0500 (EST) Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ORR8B+uPuwmI for ; Mon, 15 Feb 2016 13:08:17 -0500 (EST) Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 86E8E49695 for ; Mon, 15 Feb 2016 13:08:17 -0500 (EST) In-Reply-To: <20160215172653.GM6298@arm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu To: Will Deacon Cc: kvm@vger.kernel.org, Catalin Marinas , linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org List-Id: kvmarm@lists.cs.columbia.edu On 15/02/16 17:26, Will Deacon wrote: > On Thu, Feb 11, 2016 at 06:40:04PM +0000, Marc Zyngier wrote: >> Having both VHE and non-VHE capable CPUs in the same system >> is likely to be a recipe for disaster. >> >> If the boot CPU has VHE, but a secondary is not, we won't be >> able to downgrade and run the kernel at EL1. Add CPU hotplug >> to the mix, and this produces a terrifying mess. >> >> Let's solve the problem once and for all. If you mix VHE and >> non-VHE CPUs in the same system, you deserve to loose, and this >> patch makes sure you don't get a chance. >> >> This is implemented by storing the kernel execution level in >> a global variable. Secondaries will park themselves in a >> WFI loop if they observe a mismatch. Also, the primary CPU >> will detect that the secondary CPU has died on a mismatched >> execution level. Panic will follow. > > This should really be based on Suzuki's series for handling generic > mismatches: > > http://lists.infradead.org/pipermail/linux-arm-kernel/2016-January/401727.html > > To avoid growing a dependency on something that's unlikely to make it > for 4.6, I'd be inclined to drop your homegrown checks altogether amd > help Suzuki with his series as a separate activity (i.e. it needn't be > a blocker imo). That's fine, I'll drop that one - we can revisit it and fold it into Suzuki's series. Thanks, M. -- Jazz is not dead. It just smells funny... From mboxrd@z Thu Jan 1 00:00:00 1970 From: marc.zyngier@arm.com (Marc Zyngier) Date: Mon, 15 Feb 2016 18:14:25 +0000 Subject: [PATCH v4 23/23] arm64: Panic when VHE and non VHE CPUs coexist In-Reply-To: <20160215172653.GM6298@arm.com> References: <1455216004-19499-1-git-send-email-marc.zyngier@arm.com> <1455216004-19499-24-git-send-email-marc.zyngier@arm.com> <20160215172653.GM6298@arm.com> Message-ID: <56C21581.5030003@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 15/02/16 17:26, Will Deacon wrote: > On Thu, Feb 11, 2016 at 06:40:04PM +0000, Marc Zyngier wrote: >> Having both VHE and non-VHE capable CPUs in the same system >> is likely to be a recipe for disaster. >> >> If the boot CPU has VHE, but a secondary is not, we won't be >> able to downgrade and run the kernel at EL1. Add CPU hotplug >> to the mix, and this produces a terrifying mess. >> >> Let's solve the problem once and for all. If you mix VHE and >> non-VHE CPUs in the same system, you deserve to loose, and this >> patch makes sure you don't get a chance. >> >> This is implemented by storing the kernel execution level in >> a global variable. Secondaries will park themselves in a >> WFI loop if they observe a mismatch. Also, the primary CPU >> will detect that the secondary CPU has died on a mismatched >> execution level. Panic will follow. > > This should really be based on Suzuki's series for handling generic > mismatches: > > http://lists.infradead.org/pipermail/linux-arm-kernel/2016-January/401727.html > > To avoid growing a dependency on something that's unlikely to make it > for 4.6, I'd be inclined to drop your homegrown checks altogether amd > help Suzuki with his series as a separate activity (i.e. it needn't be > a blocker imo). That's fine, I'll drop that one - we can revisit it and fold it into Suzuki's series. Thanks, M. -- Jazz is not dead. It just smells funny... From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752763AbcBOSOa (ORCPT ); Mon, 15 Feb 2016 13:14:30 -0500 Received: from foss.arm.com ([217.140.101.70]:47041 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751910AbcBOSO2 (ORCPT ); Mon, 15 Feb 2016 13:14:28 -0500 Subject: Re: [PATCH v4 23/23] arm64: Panic when VHE and non VHE CPUs coexist To: Will Deacon References: <1455216004-19499-1-git-send-email-marc.zyngier@arm.com> <1455216004-19499-24-git-send-email-marc.zyngier@arm.com> <20160215172653.GM6298@arm.com> Cc: Catalin Marinas , Mark Rutland , Christoffer Dall , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu From: Marc Zyngier Organization: ARM Ltd Message-ID: <56C21581.5030003@arm.com> Date: Mon, 15 Feb 2016 18:14:25 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 MIME-Version: 1.0 In-Reply-To: <20160215172653.GM6298@arm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15/02/16 17:26, Will Deacon wrote: > On Thu, Feb 11, 2016 at 06:40:04PM +0000, Marc Zyngier wrote: >> Having both VHE and non-VHE capable CPUs in the same system >> is likely to be a recipe for disaster. >> >> If the boot CPU has VHE, but a secondary is not, we won't be >> able to downgrade and run the kernel at EL1. Add CPU hotplug >> to the mix, and this produces a terrifying mess. >> >> Let's solve the problem once and for all. If you mix VHE and >> non-VHE CPUs in the same system, you deserve to loose, and this >> patch makes sure you don't get a chance. >> >> This is implemented by storing the kernel execution level in >> a global variable. Secondaries will park themselves in a >> WFI loop if they observe a mismatch. Also, the primary CPU >> will detect that the secondary CPU has died on a mismatched >> execution level. Panic will follow. > > This should really be based on Suzuki's series for handling generic > mismatches: > > http://lists.infradead.org/pipermail/linux-arm-kernel/2016-January/401727.html > > To avoid growing a dependency on something that's unlikely to make it > for 4.6, I'd be inclined to drop your homegrown checks altogether amd > help Suzuki with his series as a separate activity (i.e. it needn't be > a blocker imo). That's fine, I'll drop that one - we can revisit it and fold it into Suzuki's series. Thanks, M. -- Jazz is not dead. It just smells funny...