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=-6.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable 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 42A86C54E8B for ; Tue, 12 May 2020 10:40: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 AC802206DD for ; Tue, 12 May 2020 10:40:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="DH7HX+hu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AC802206DD 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 39CFE4B132; Tue, 12 May 2020 06:40:06 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@kernel.org 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 pEMIS-vU8bVy; Tue, 12 May 2020 06:40:05 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 0D6B94B133; Tue, 12 May 2020 06:40:05 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 8975E4B120 for ; Tue, 12 May 2020 06:40:03 -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 zTQEDZOlsle8 for ; Tue, 12 May 2020 06:40:00 -0400 (EDT) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id A19B34B0B8 for ; Tue, 12 May 2020 06:40:00 -0400 (EDT) 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 704F5206DD; Tue, 12 May 2020 10:39:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589279999; bh=4u2DdZnbBOfH5sHqCv28xYPkeReFp8gr/JDYY65Yi48=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DH7HX+hu1vbOs62ildJh2vK9t5KtpaxktDPdEB2tlwDGMYkOHWB0chJU3wK/ybod+ 00KZ8Y8NlXgVSt7iCdPyn4FUppYC6i8BgaHGniYIk9O+v++8uFsAvJdnscAAUkxFIs wFKe1QtNCeHngIo2hJJCTyHLv3lcBRKywcaxXsFY= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jYSKL-00BcWZ-MH; Tue, 12 May 2020 11:39:57 +0100 MIME-Version: 1.0 Date: Tue, 12 May 2020 11:39:57 +0100 From: Marc Zyngier To: Anshuman Khandual Subject: Re: [PATCH] arm64/cpufeature: Add ID_AA64MMFR0_PARANGE_MASK In-Reply-To: <1589249606-27177-1-git-send-email-anshuman.khandual@arm.com> References: <1589249606-27177-1-git-send-email-anshuman.khandual@arm.com> User-Agent: Roundcube Webmail/1.4.4 Message-ID: X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: anshuman.khandual@arm.com, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, james.morse@arm.com, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Cc: Catalin Marinas , linux-kernel@vger.kernel.org, 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 Anshuman, On 2020-05-12 03:13, Anshuman Khandual wrote: > This replaces multiple open encoding (0x7) with > ID_AA64MMFR0_PARANGE_MASK > thus cleaning the clutter. It modifies an existing ID_AA64MMFR0 helper > and > introduces a new one i.e id_aa64mmfr0_iparange() and > id_aa64mmfr0_parange() > respectively. > > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Marc Zyngier > Cc: James Morse > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > Cc: kvmarm@lists.cs.columbia.edu > > Signed-off-by: Anshuman Khandual > --- > This applies after (https://patchwork.kernel.org/patch/11541893/). > > arch/arm64/include/asm/cpufeature.h | 11 ++++++++++- > arch/arm64/kernel/cpufeature.c | 5 ++--- > arch/arm64/kvm/reset.c | 9 +++++---- > 3 files changed, 17 insertions(+), 8 deletions(-) > > diff --git a/arch/arm64/include/asm/cpufeature.h > b/arch/arm64/include/asm/cpufeature.h > index 1291ad5a9ccb..320cfc5b6025 100644 > --- a/arch/arm64/include/asm/cpufeature.h > +++ b/arch/arm64/include/asm/cpufeature.h > @@ -706,8 +706,17 @@ void arm64_set_ssbd_mitigation(bool state); > > extern int do_emulate_mrs(struct pt_regs *regs, u32 sys_reg, u32 rt); > > -static inline u32 id_aa64mmfr0_parange_to_phys_shift(int parange) > +#define ID_AA64MMFR0_PARANGE_MASK 0x7 I still disagree with this 7. Per the letter of the architecture, it is wrong and should be 0xf, just like any other property described in an ID register. > + > +static inline u32 id_aa64mmfr0_parange(u64 mmfr0) > { > + return mmfr0 & ID_AA64MMFR0_PARANGE_MASK; > +} > + > +static inline u32 id_aa64mmfr0_iparange(u64 mmfr0) There is also no such thing as an IPA range in the architecture. Everything is PA. The only thing that actually describe an IPA range is what KVM makes of it. Overall, this patch confuses me more than anything else. I'd rather you fix ID_AA64MMFR0_PARANGE_MASK to have the right value and be done with it. 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=-7.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 BBAF7C54E4A for ; Tue, 12 May 2020 10:40:09 +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 88AE6206DD for ; Tue, 12 May 2020 10:40:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="f+Rld756"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="DH7HX+hu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 88AE6206DD 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+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: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=O76RJ+CiGKxgVAXU5eZh0D3WOxjWyRwj3YA1uVf/iEs=; b=f+Rld756miZctjk7Njhy5ghMb LNPmE4ABfGQ8v8EnRIE4jdLliXpf3tF5zRnlK6A/BP+Fz09CDPdS2htQZYmdzW7y3xMNtvovjl4/V n8MoHFNzzJnnDzg764TkJSEo9E9x67d8Kc9SxwATIdOPKdki/DTgnNYIpeEDEeep3+dX72OakV8Nl QjMHimMpFMgoxOPKQDNnmhPYmBzq9OSa4jCx1vKkRMglciEH74kTntPXbGW0CySMLxYgmWrgjWeeB AnxGgyhfpBQL+Sm9zB1iger1b5mhTcIfjUJhiXTnzsYciFjonhqA36SViJA+Oo3Xkv5HUwWHLxWhl TEHHafkkA==; 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 1jYSKW-00009u-Rn; Tue, 12 May 2020 10:40:08 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jYSKS-00005t-JY for linux-arm-kernel@lists.infradead.org; Tue, 12 May 2020 10:40:06 +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 704F5206DD; Tue, 12 May 2020 10:39:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589279999; bh=4u2DdZnbBOfH5sHqCv28xYPkeReFp8gr/JDYY65Yi48=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DH7HX+hu1vbOs62ildJh2vK9t5KtpaxktDPdEB2tlwDGMYkOHWB0chJU3wK/ybod+ 00KZ8Y8NlXgVSt7iCdPyn4FUppYC6i8BgaHGniYIk9O+v++8uFsAvJdnscAAUkxFIs wFKe1QtNCeHngIo2hJJCTyHLv3lcBRKywcaxXsFY= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jYSKL-00BcWZ-MH; Tue, 12 May 2020 11:39:57 +0100 MIME-Version: 1.0 Date: Tue, 12 May 2020 11:39:57 +0100 From: Marc Zyngier To: Anshuman Khandual Subject: Re: [PATCH] arm64/cpufeature: Add ID_AA64MMFR0_PARANGE_MASK In-Reply-To: <1589249606-27177-1-git-send-email-anshuman.khandual@arm.com> References: <1589249606-27177-1-git-send-email-anshuman.khandual@arm.com> User-Agent: Roundcube Webmail/1.4.4 Message-ID: X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: anshuman.khandual@arm.com, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, james.morse@arm.com, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu 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-20200512_034004_682671_6B791D16 X-CRM114-Status: GOOD ( 15.17 ) 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: Catalin Marinas , linux-kernel@vger.kernel.org, James Morse , 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+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Anshuman, On 2020-05-12 03:13, Anshuman Khandual wrote: > This replaces multiple open encoding (0x7) with > ID_AA64MMFR0_PARANGE_MASK > thus cleaning the clutter. It modifies an existing ID_AA64MMFR0 helper > and > introduces a new one i.e id_aa64mmfr0_iparange() and > id_aa64mmfr0_parange() > respectively. > > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Marc Zyngier > Cc: James Morse > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > Cc: kvmarm@lists.cs.columbia.edu > > Signed-off-by: Anshuman Khandual > --- > This applies after (https://patchwork.kernel.org/patch/11541893/). > > arch/arm64/include/asm/cpufeature.h | 11 ++++++++++- > arch/arm64/kernel/cpufeature.c | 5 ++--- > arch/arm64/kvm/reset.c | 9 +++++---- > 3 files changed, 17 insertions(+), 8 deletions(-) > > diff --git a/arch/arm64/include/asm/cpufeature.h > b/arch/arm64/include/asm/cpufeature.h > index 1291ad5a9ccb..320cfc5b6025 100644 > --- a/arch/arm64/include/asm/cpufeature.h > +++ b/arch/arm64/include/asm/cpufeature.h > @@ -706,8 +706,17 @@ void arm64_set_ssbd_mitigation(bool state); > > extern int do_emulate_mrs(struct pt_regs *regs, u32 sys_reg, u32 rt); > > -static inline u32 id_aa64mmfr0_parange_to_phys_shift(int parange) > +#define ID_AA64MMFR0_PARANGE_MASK 0x7 I still disagree with this 7. Per the letter of the architecture, it is wrong and should be 0xf, just like any other property described in an ID register. > + > +static inline u32 id_aa64mmfr0_parange(u64 mmfr0) > { > + return mmfr0 & ID_AA64MMFR0_PARANGE_MASK; > +} > + > +static inline u32 id_aa64mmfr0_iparange(u64 mmfr0) There is also no such thing as an IPA range in the architecture. Everything is PA. The only thing that actually describe an IPA range is what KVM makes of it. Overall, this patch confuses me more than anything else. I'd rather you fix ID_AA64MMFR0_PARANGE_MASK to have the right value and be done with it. 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 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=-7.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, 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 A1122C54E4A for ; Tue, 12 May 2020 10:40:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6A8FE20722 for ; Tue, 12 May 2020 10:40:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589280001; bh=4u2DdZnbBOfH5sHqCv28xYPkeReFp8gr/JDYY65Yi48=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=Rjw+M8KbOaBXaauaE0+PLzi3U7WwRIGDFuKKs4GW8Nbr20rVJAA8dqe2NF/eGL3sK hwl62Dtwz11+UeDkdIYgia3DdCp6KtywiX+uHMS+pN6aJCgf1fN7NiA54lDm3DTgrn 1Kphhn5dp9kVvgoqlxR4IofaYjzZdPOagAGkLsDM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729429AbgELKkA (ORCPT ); Tue, 12 May 2020 06:40:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:47788 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725889AbgELKkA (ORCPT ); Tue, 12 May 2020 06:40:00 -0400 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 704F5206DD; Tue, 12 May 2020 10:39:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589279999; bh=4u2DdZnbBOfH5sHqCv28xYPkeReFp8gr/JDYY65Yi48=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DH7HX+hu1vbOs62ildJh2vK9t5KtpaxktDPdEB2tlwDGMYkOHWB0chJU3wK/ybod+ 00KZ8Y8NlXgVSt7iCdPyn4FUppYC6i8BgaHGniYIk9O+v++8uFsAvJdnscAAUkxFIs wFKe1QtNCeHngIo2hJJCTyHLv3lcBRKywcaxXsFY= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jYSKL-00BcWZ-MH; Tue, 12 May 2020 11:39:57 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 12 May 2020 11:39:57 +0100 From: Marc Zyngier To: Anshuman Khandual Cc: linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , James Morse , linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu Subject: Re: [PATCH] arm64/cpufeature: Add ID_AA64MMFR0_PARANGE_MASK In-Reply-To: <1589249606-27177-1-git-send-email-anshuman.khandual@arm.com> References: <1589249606-27177-1-git-send-email-anshuman.khandual@arm.com> User-Agent: Roundcube Webmail/1.4.4 Message-ID: X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: anshuman.khandual@arm.com, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, james.morse@arm.com, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Anshuman, On 2020-05-12 03:13, Anshuman Khandual wrote: > This replaces multiple open encoding (0x7) with > ID_AA64MMFR0_PARANGE_MASK > thus cleaning the clutter. It modifies an existing ID_AA64MMFR0 helper > and > introduces a new one i.e id_aa64mmfr0_iparange() and > id_aa64mmfr0_parange() > respectively. > > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Marc Zyngier > Cc: James Morse > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > Cc: kvmarm@lists.cs.columbia.edu > > Signed-off-by: Anshuman Khandual > --- > This applies after (https://patchwork.kernel.org/patch/11541893/). > > arch/arm64/include/asm/cpufeature.h | 11 ++++++++++- > arch/arm64/kernel/cpufeature.c | 5 ++--- > arch/arm64/kvm/reset.c | 9 +++++---- > 3 files changed, 17 insertions(+), 8 deletions(-) > > diff --git a/arch/arm64/include/asm/cpufeature.h > b/arch/arm64/include/asm/cpufeature.h > index 1291ad5a9ccb..320cfc5b6025 100644 > --- a/arch/arm64/include/asm/cpufeature.h > +++ b/arch/arm64/include/asm/cpufeature.h > @@ -706,8 +706,17 @@ void arm64_set_ssbd_mitigation(bool state); > > extern int do_emulate_mrs(struct pt_regs *regs, u32 sys_reg, u32 rt); > > -static inline u32 id_aa64mmfr0_parange_to_phys_shift(int parange) > +#define ID_AA64MMFR0_PARANGE_MASK 0x7 I still disagree with this 7. Per the letter of the architecture, it is wrong and should be 0xf, just like any other property described in an ID register. > + > +static inline u32 id_aa64mmfr0_parange(u64 mmfr0) > { > + return mmfr0 & ID_AA64MMFR0_PARANGE_MASK; > +} > + > +static inline u32 id_aa64mmfr0_iparange(u64 mmfr0) There is also no such thing as an IPA range in the architecture. Everything is PA. The only thing that actually describe an IPA range is what KVM makes of it. Overall, this patch confuses me more than anything else. I'd rather you fix ID_AA64MMFR0_PARANGE_MASK to have the right value and be done with it. M. -- Jazz is not dead. It just smells funny...