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=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 21BEEC433E0 for ; Mon, 25 Jan 2021 14:03:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E407E22C9E for ; Mon, 25 Jan 2021 14:03:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729234AbhAYODH (ORCPT ); Mon, 25 Jan 2021 09:03:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:50020 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729041AbhAYN47 (ORCPT ); Mon, 25 Jan 2021 08:56:59 -0500 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0DE1522C9C; Mon, 25 Jan 2021 13:56:01 +0000 (UTC) Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1l42LW-009t5S-S6; Mon, 25 Jan 2021 13:55:59 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 25 Jan 2021 13:55:58 +0000 From: Marc Zyngier To: Suzuki K Poulose Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, Catalin Marinas , Will Deacon , Mark Rutland , David Brazdil , Alexandru Elisei , Ard Biesheuvel , Jing Zhang , Ajay Patil , Prasad Sodagudi , Srinivas Ramana , James Morse , Julien Thierry , kernel-team@android.com Subject: Re: [PATCH v5 13/21] arm64: Allow ID_AA64MMFR1_EL1.VH to be overridden from the command line In-Reply-To: References: <20210125105019.2946057-1-maz@kernel.org> <20210125105019.2946057-14-maz@kernel.org> User-Agent: Roundcube Webmail/1.4.10 Message-ID: <9923965b870d71eee0fa828059185f33@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: suzuki.poulose@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, dbrazdil@google.com, alexandru.elisei@arm.com, ardb@kernel.org, jingzhangos@google.com, pajay@qti.qualcomm.com, psodagud@codeaurora.org, sramana@codeaurora.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-01-25 13:15, Suzuki K Poulose wrote: > On 1/25/21 10:50 AM, Marc Zyngier wrote: >> As we want to be able to disable VHE at runtime, let's match >> "id_aa64mmfr1.vh=" from the command line as an override. >> This doesn't have much effect yet as our boot code doesn't look >> at the cpufeature, but only at the HW registers. >> >> Signed-off-by: Marc Zyngier >> Acked-by: David Brazdil >> --- >> arch/arm64/include/asm/cpufeature.h | 2 ++ >> arch/arm64/kernel/cpufeature.c | 5 ++++- >> arch/arm64/kernel/idreg-override.c | 11 +++++++++++ >> 3 files changed, 17 insertions(+), 1 deletion(-) >> >> diff --git a/arch/arm64/include/asm/cpufeature.h >> b/arch/arm64/include/asm/cpufeature.h >> index 4179cfc8ed57..b0ed37da4067 100644 >> --- a/arch/arm64/include/asm/cpufeature.h >> +++ b/arch/arm64/include/asm/cpufeature.h >> @@ -818,6 +818,8 @@ static inline unsigned int get_vmid_bits(u64 >> mmfr1) >> return 8; >> } >> +extern struct arm64_ftr_override id_aa64mmfr1_override; >> + >> u32 get_kvm_ipa_limit(void); >> void dump_cpu_features(void); >> diff --git a/arch/arm64/kernel/cpufeature.c >> b/arch/arm64/kernel/cpufeature.c >> index 4b84a1e1dc51..c1d6712c4249 100644 >> --- a/arch/arm64/kernel/cpufeature.c >> +++ b/arch/arm64/kernel/cpufeature.c >> @@ -557,6 +557,8 @@ static const struct arm64_ftr_bits ftr_raz[] = { >> #define ARM64_FTR_REG(id, table) ARM64_FTR_REG_OVERRIDE(id, table, >> &no_override) >> +struct arm64_ftr_override id_aa64mmfr1_override; > > Does this need to be ro_after_init ? Could do, together with the other two override targeting system registers. > Otherwise, looks good to me: > > Acked-by: Suzuki K Poulose Thanks, M. -- Jazz is not dead. It just smells funny... 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=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 2886FC433DB for ; Mon, 25 Jan 2021 13:56:07 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 6371C22C9E for ; Mon, 25 Jan 2021 13:56:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6371C22C9E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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 E4B234B5F8; Mon, 25 Jan 2021 08:56:05 -0500 (EST) 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 SVx-LdeBwfyv; Mon, 25 Jan 2021 08:56:04 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id C72654B4F2; Mon, 25 Jan 2021 08:56:04 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 40C1A4B4D9 for ; Mon, 25 Jan 2021 08:56:03 -0500 (EST) 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 YJ2UeqWwsQOT for ; Mon, 25 Jan 2021 08:56:02 -0500 (EST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 2E8544B3A9 for ; Mon, 25 Jan 2021 08:56:02 -0500 (EST) Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0DE1522C9C; Mon, 25 Jan 2021 13:56:01 +0000 (UTC) Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1l42LW-009t5S-S6; Mon, 25 Jan 2021 13:55:59 +0000 MIME-Version: 1.0 Date: Mon, 25 Jan 2021 13:55:58 +0000 From: Marc Zyngier To: Suzuki K Poulose Subject: Re: [PATCH v5 13/21] arm64: Allow ID_AA64MMFR1_EL1.VH to be overridden from the command line In-Reply-To: References: <20210125105019.2946057-1-maz@kernel.org> <20210125105019.2946057-14-maz@kernel.org> User-Agent: Roundcube Webmail/1.4.10 Message-ID: <9923965b870d71eee0fa828059185f33@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: suzuki.poulose@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, dbrazdil@google.com, alexandru.elisei@arm.com, ardb@kernel.org, jingzhangos@google.com, pajay@qti.qualcomm.com, psodagud@codeaurora.org, sramana@codeaurora.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Cc: Prasad Sodagudi , Srinivas Ramana , kernel-team@android.com, Catalin Marinas , linux-kernel@vger.kernel.org, Ard Biesheuvel , Ajay Patil , Will Deacon , 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 2021-01-25 13:15, Suzuki K Poulose wrote: > On 1/25/21 10:50 AM, Marc Zyngier wrote: >> As we want to be able to disable VHE at runtime, let's match >> "id_aa64mmfr1.vh=" from the command line as an override. >> This doesn't have much effect yet as our boot code doesn't look >> at the cpufeature, but only at the HW registers. >> >> Signed-off-by: Marc Zyngier >> Acked-by: David Brazdil >> --- >> arch/arm64/include/asm/cpufeature.h | 2 ++ >> arch/arm64/kernel/cpufeature.c | 5 ++++- >> arch/arm64/kernel/idreg-override.c | 11 +++++++++++ >> 3 files changed, 17 insertions(+), 1 deletion(-) >> >> diff --git a/arch/arm64/include/asm/cpufeature.h >> b/arch/arm64/include/asm/cpufeature.h >> index 4179cfc8ed57..b0ed37da4067 100644 >> --- a/arch/arm64/include/asm/cpufeature.h >> +++ b/arch/arm64/include/asm/cpufeature.h >> @@ -818,6 +818,8 @@ static inline unsigned int get_vmid_bits(u64 >> mmfr1) >> return 8; >> } >> +extern struct arm64_ftr_override id_aa64mmfr1_override; >> + >> u32 get_kvm_ipa_limit(void); >> void dump_cpu_features(void); >> diff --git a/arch/arm64/kernel/cpufeature.c >> b/arch/arm64/kernel/cpufeature.c >> index 4b84a1e1dc51..c1d6712c4249 100644 >> --- a/arch/arm64/kernel/cpufeature.c >> +++ b/arch/arm64/kernel/cpufeature.c >> @@ -557,6 +557,8 @@ static const struct arm64_ftr_bits ftr_raz[] = { >> #define ARM64_FTR_REG(id, table) ARM64_FTR_REG_OVERRIDE(id, table, >> &no_override) >> +struct arm64_ftr_override id_aa64mmfr1_override; > > Does this need to be ro_after_init ? Could do, together with the other two override targeting system registers. > Otherwise, looks good to me: > > Acked-by: Suzuki K Poulose Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ 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=-14.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 D7749C433E0 for ; Mon, 25 Jan 2021 13:58:08 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 845BC22AEC for ; Mon, 25 Jan 2021 13:58:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 845BC22AEC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=FoFTpYP1mdXCTCztWW313XhR1fUnXEBvlxFvv4ukRKg=; b=bwyjx79Mduhg342ivH6wdesGt gc0Gv7AFHQtDRMQ4obthw+YcOu8W2FN5XSQHuRZId7M19SdsIU7i7Qzt1ZqdztghxH0T/m7AHWhqi hfxLEIseAXUP68sWRvsqNQl5tB4h4h2sIx4mrAU3Z9fxDT3ys+BXwtRpCYO3gj8l6Fez8iyRGU765 m9DnQmLEOWlpxFeDbEk/zoy0G88pKUZfjAQSEcU8u5f5kuak180N01mOowxYnYLfruva8g4nI+jTf +9S51zLTtoBpCUoirwT1r2NkNoMms3NhHzgYu+GXieJ2FOcg+gim5NhjeO5WI4pyGc7iE/ztqEUBB unEpnAJWg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l42Ld-0001N6-Oj; Mon, 25 Jan 2021 13:56:05 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l42La-0001M4-Gw for linux-arm-kernel@lists.infradead.org; Mon, 25 Jan 2021 13:56:03 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0DE1522C9C; Mon, 25 Jan 2021 13:56:01 +0000 (UTC) Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1l42LW-009t5S-S6; Mon, 25 Jan 2021 13:55:59 +0000 MIME-Version: 1.0 Date: Mon, 25 Jan 2021 13:55:58 +0000 From: Marc Zyngier To: Suzuki K Poulose Subject: Re: [PATCH v5 13/21] arm64: Allow ID_AA64MMFR1_EL1.VH to be overridden from the command line In-Reply-To: References: <20210125105019.2946057-1-maz@kernel.org> <20210125105019.2946057-14-maz@kernel.org> User-Agent: Roundcube Webmail/1.4.10 Message-ID: <9923965b870d71eee0fa828059185f33@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: suzuki.poulose@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, dbrazdil@google.com, alexandru.elisei@arm.com, ardb@kernel.org, jingzhangos@google.com, pajay@qti.qualcomm.com, psodagud@codeaurora.org, sramana@codeaurora.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210125_085602_678389_798A8E48 X-CRM114-Status: GOOD ( 17.56 ) 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 , Jing Zhang , Prasad Sodagudi , Srinivas Ramana , kernel-team@android.com, Catalin Marinas , Alexandru Elisei , linux-kernel@vger.kernel.org, Ard Biesheuvel , James Morse , Julien Thierry , Ajay Patil , David Brazdil , Will Deacon , 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+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2021-01-25 13:15, Suzuki K Poulose wrote: > On 1/25/21 10:50 AM, Marc Zyngier wrote: >> As we want to be able to disable VHE at runtime, let's match >> "id_aa64mmfr1.vh=" from the command line as an override. >> This doesn't have much effect yet as our boot code doesn't look >> at the cpufeature, but only at the HW registers. >> >> Signed-off-by: Marc Zyngier >> Acked-by: David Brazdil >> --- >> arch/arm64/include/asm/cpufeature.h | 2 ++ >> arch/arm64/kernel/cpufeature.c | 5 ++++- >> arch/arm64/kernel/idreg-override.c | 11 +++++++++++ >> 3 files changed, 17 insertions(+), 1 deletion(-) >> >> diff --git a/arch/arm64/include/asm/cpufeature.h >> b/arch/arm64/include/asm/cpufeature.h >> index 4179cfc8ed57..b0ed37da4067 100644 >> --- a/arch/arm64/include/asm/cpufeature.h >> +++ b/arch/arm64/include/asm/cpufeature.h >> @@ -818,6 +818,8 @@ static inline unsigned int get_vmid_bits(u64 >> mmfr1) >> return 8; >> } >> +extern struct arm64_ftr_override id_aa64mmfr1_override; >> + >> u32 get_kvm_ipa_limit(void); >> void dump_cpu_features(void); >> diff --git a/arch/arm64/kernel/cpufeature.c >> b/arch/arm64/kernel/cpufeature.c >> index 4b84a1e1dc51..c1d6712c4249 100644 >> --- a/arch/arm64/kernel/cpufeature.c >> +++ b/arch/arm64/kernel/cpufeature.c >> @@ -557,6 +557,8 @@ static const struct arm64_ftr_bits ftr_raz[] = { >> #define ARM64_FTR_REG(id, table) ARM64_FTR_REG_OVERRIDE(id, table, >> &no_override) >> +struct arm64_ftr_override id_aa64mmfr1_override; > > Does this need to be ro_after_init ? Could do, together with the other two override targeting system registers. > Otherwise, looks good to me: > > Acked-by: Suzuki K Poulose Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel