From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90C92C3815B for ; Fri, 17 Apr 2020 09:39:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 79947208E4 for ; Fri, 17 Apr 2020 09:39:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730438AbgDQJja (ORCPT ); Fri, 17 Apr 2020 05:39:30 -0400 Received: from foss.arm.com ([217.140.110.172]:48898 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730318AbgDQJj2 (ORCPT ); Fri, 17 Apr 2020 05:39:28 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 60F2F30E; Fri, 17 Apr 2020 02:39:28 -0700 (PDT) Received: from [10.37.12.128] (unknown [10.37.12.128]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7D2C23F73D; Fri, 17 Apr 2020 02:39:26 -0700 (PDT) Subject: Re: [PATCH 3/8] arm64: cpufeature: Add CPU capability for AArch32 EL1 support To: maz@kernel.org Cc: will@kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, mark.rutland@arm.com, anshuman.khandual@arm.com, catalin.marinas@arm.com, saiprakash.ranjan@codeaurora.org, dianders@chromium.org, kernel-team@android.com References: <20200414213114.2378-1-will@kernel.org> <20200414213114.2378-4-will@kernel.org> <20200415101444.GC12621@willie-the-truck> <7978a5a9-463e-5e96-7ea9-d8472b7b051c@arm.com> <20200415142237.651114f7@why> From: Suzuki K Poulose Message-ID: <1ffdf91a-e418-61ec-1056-756e1a81f4a6@arm.com> Date: Fri, 17 Apr 2020 10:44:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20200415142237.651114f7@why> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/15/2020 02:22 PM, Marc Zyngier wrote: > On Wed, 15 Apr 2020 14:15:51 +0100 > Suzuki K Poulose wrote: > >> On 04/15/2020 11:14 AM, Will Deacon wrote: >>> On Wed, Apr 15, 2020 at 11:13:54AM +0100, Suzuki K Poulose wrote: >>>> On 04/14/2020 10:31 PM, Will Deacon wrote: >>>>> Although we emit a "SANITY CHECK" warning and taint the kernel if we >>>>> detect a CPU mismatch for AArch32 support at EL1, we still online the >>>>> CPU with disastrous consequences for any running 32-bit VMs. >>>>> >>>>> Introduce a capability for AArch32 support at EL1 so that late onlining >>>>> of incompatible CPUs is forbidden. >>>>> >>>>> Signed-off-by: Will Deacon >>>> >>>> One of the other important missing sanity check for KVM is the VMID width >>>> check. I will code something up. >>> >>> Cheers! Do we handle things like the IPA size already? >> >> Good point. No, we don't. I will include this too. > > There is also the question of the ARMv8.5-GTG extension. I have a patch > that treats it as non-strict, but that approach would fail with KVM if > we online a late CPU without support for the right page size at S2. Good point. Again this can be added to the list of checks performed on the hot-plugged CPUs along with IPA, VMID width. Cheers Suzuki From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBEE6C352BE for ; Fri, 17 Apr 2020 09:39:33 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 6C5B3208E4 for ; Fri, 17 Apr 2020 09:39:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6C5B3208E4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id E8D4D4B24B; Fri, 17 Apr 2020 05:39:31 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu 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 7zWDwBe2Vwgr; Fri, 17 Apr 2020 05:39:30 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id CF3164B257; Fri, 17 Apr 2020 05:39:30 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id F20794B24B for ; Fri, 17 Apr 2020 05:39:29 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu 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 CMXupwY1afGZ for ; Fri, 17 Apr 2020 05:39:28 -0400 (EDT) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mm01.cs.columbia.edu (Postfix) with ESMTP id CDFC54B14A for ; Fri, 17 Apr 2020 05:39:28 -0400 (EDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 60F2F30E; Fri, 17 Apr 2020 02:39:28 -0700 (PDT) Received: from [10.37.12.128] (unknown [10.37.12.128]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7D2C23F73D; Fri, 17 Apr 2020 02:39:26 -0700 (PDT) Subject: Re: [PATCH 3/8] arm64: cpufeature: Add CPU capability for AArch32 EL1 support To: maz@kernel.org References: <20200414213114.2378-1-will@kernel.org> <20200414213114.2378-4-will@kernel.org> <20200415101444.GC12621@willie-the-truck> <7978a5a9-463e-5e96-7ea9-d8472b7b051c@arm.com> <20200415142237.651114f7@why> From: Suzuki K Poulose Message-ID: <1ffdf91a-e418-61ec-1056-756e1a81f4a6@arm.com> Date: Fri, 17 Apr 2020 10:44:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20200415142237.651114f7@why> Content-Language: en-US Cc: saiprakash.ranjan@codeaurora.org, kernel-team@android.com, anshuman.khandual@arm.com, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, dianders@chromium.org, will@kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On 04/15/2020 02:22 PM, Marc Zyngier wrote: > On Wed, 15 Apr 2020 14:15:51 +0100 > Suzuki K Poulose wrote: > >> On 04/15/2020 11:14 AM, Will Deacon wrote: >>> On Wed, Apr 15, 2020 at 11:13:54AM +0100, Suzuki K Poulose wrote: >>>> On 04/14/2020 10:31 PM, Will Deacon wrote: >>>>> Although we emit a "SANITY CHECK" warning and taint the kernel if we >>>>> detect a CPU mismatch for AArch32 support at EL1, we still online the >>>>> CPU with disastrous consequences for any running 32-bit VMs. >>>>> >>>>> Introduce a capability for AArch32 support at EL1 so that late onlining >>>>> of incompatible CPUs is forbidden. >>>>> >>>>> Signed-off-by: Will Deacon >>>> >>>> One of the other important missing sanity check for KVM is the VMID width >>>> check. I will code something up. >>> >>> Cheers! Do we handle things like the IPA size already? >> >> Good point. No, we don't. I will include this too. > > There is also the question of the ARMv8.5-GTG extension. I have a patch > that treats it as non-strict, but that approach would fail with KVM if > we online a late CPU without support for the right page size at S2. Good point. Again this can be added to the list of checks performed on the hot-plugged CPUs along with IPA, VMID width. Cheers Suzuki _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D817C38A29 for ; Fri, 17 Apr 2020 09:40:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0790E221EB for ; Fri, 17 Apr 2020 09:40:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="e6hnlBjk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0790E221EB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=porjFZXBv+6EXzCkt3lgYPGECAIDbOkwqZerM7pSn5E=; b=e6hnlBjkPUJIq9EL71Dy2C7do GXmAq/YCUdOw+zin9g7sCYUvgyCLhkQOLQZ1aYcjwWGVUam+s2bE+ekCqHNuWD2BSaSoFzPfx3kpz s+ifKeo/HNEkzetgLBIxTLp0p20PYIF7hRYoMZgx6kyKWGxs4WoLNsn55SYQ4eMEmJTh+PoIXJhX2 jjbnnggp1U8Q3oflaaimvvoPIAJNNbOnTH8lOqhaBgYvaTfB4lz+ExDbziLlxWd4TQDkU/W2z+1bH vuNvW0aBsQAAyhuVhoToTLOPxaJ6ZNXHM4K/QUXWlo+OTlP8xf6YpDoJOGbfE9V8chSQkGNpRZttB C1wZDgohA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jPNTc-0005HZ-Uy; Fri, 17 Apr 2020 09:40:00 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jPNT7-0004so-Vt for linux-arm-kernel@lists.infradead.org; Fri, 17 Apr 2020 09:39:31 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 60F2F30E; Fri, 17 Apr 2020 02:39:28 -0700 (PDT) Received: from [10.37.12.128] (unknown [10.37.12.128]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7D2C23F73D; Fri, 17 Apr 2020 02:39:26 -0700 (PDT) Subject: Re: [PATCH 3/8] arm64: cpufeature: Add CPU capability for AArch32 EL1 support To: maz@kernel.org References: <20200414213114.2378-1-will@kernel.org> <20200414213114.2378-4-will@kernel.org> <20200415101444.GC12621@willie-the-truck> <7978a5a9-463e-5e96-7ea9-d8472b7b051c@arm.com> <20200415142237.651114f7@why> From: Suzuki K Poulose Message-ID: <1ffdf91a-e418-61ec-1056-756e1a81f4a6@arm.com> Date: Fri, 17 Apr 2020 10:44:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20200415142237.651114f7@why> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200417_023930_112135_ECC98A6B X-CRM114-Status: GOOD ( 16.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, saiprakash.ranjan@codeaurora.org, kernel-team@android.com, anshuman.khandual@arm.com, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, dianders@chromium.org, will@kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 04/15/2020 02:22 PM, Marc Zyngier wrote: > On Wed, 15 Apr 2020 14:15:51 +0100 > Suzuki K Poulose wrote: > >> On 04/15/2020 11:14 AM, Will Deacon wrote: >>> On Wed, Apr 15, 2020 at 11:13:54AM +0100, Suzuki K Poulose wrote: >>>> On 04/14/2020 10:31 PM, Will Deacon wrote: >>>>> Although we emit a "SANITY CHECK" warning and taint the kernel if we >>>>> detect a CPU mismatch for AArch32 support at EL1, we still online the >>>>> CPU with disastrous consequences for any running 32-bit VMs. >>>>> >>>>> Introduce a capability for AArch32 support at EL1 so that late onlining >>>>> of incompatible CPUs is forbidden. >>>>> >>>>> Signed-off-by: Will Deacon >>>> >>>> One of the other important missing sanity check for KVM is the VMID width >>>> check. I will code something up. >>> >>> Cheers! Do we handle things like the IPA size already? >> >> Good point. No, we don't. I will include this too. > > There is also the question of the ARMv8.5-GTG extension. I have a patch > that treats it as non-strict, but that approach would fail with KVM if > we online a late CPU without support for the right page size at S2. Good point. Again this can be added to the list of checks performed on the hot-plugged CPUs along with IPA, VMID width. Cheers Suzuki _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel