Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1093565rdb; Mon, 19 Feb 2024 04:14:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWUchFNtFLzpcgG6g4FCaaetS70UFpnFxyTdYUJCgDyBIwl5XVoj85cqhFlJ3zbd87mnKn6gWNSh98fRgBbprCopGu6huMacUta3AJCxA== X-Google-Smtp-Source: AGHT+IGgrtdudF6NpJ11mqVdQpkiL+bM/av9NJ3lGq76AEDyUgIH7V4+Dqq2XTzXEP26WOrKpwb8 X-Received: by 2002:aa7:c75a:0:b0:564:1de6:c8c0 with SMTP id c26-20020aa7c75a000000b005641de6c8c0mr3926750eds.31.1708344871783; Mon, 19 Feb 2024 04:14:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708344871; cv=pass; d=google.com; s=arc-20160816; b=R8jR164t3/9/LWea6vGLgaCKfxY4EQ31tGGrd+qGN1nrYwSvoN8nXUN31LN6orOMKb mKZl1AK7whjRz2Ex6HbTeF++lO4ajgn0ilS7uBrFx169N4cgYC0u8m7ucb1GFKYSmxK8 tr7m+gQ2qbdk/mDOjcpiitIuxtXIQxRYmT3duDj5MR0J/xoAxX61sHkInT0CiIaSnDsK wfj+baWz1PK2iibLXWYkQ9B9HmXPuf0gWvJ68obuAKNqnP1k8XvezCbbfScWuBjCDP2e dwNOA8miIrsQQcwex3p/N8dQylz+UUNogDB4psRfULEoh0bfkZKhqMzALHsWaL6YGwXj e7mg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=1TWuQcB8WmfRBjkzH69a5GnRAxRhXWApluPwmj1I5gY=; fh=1HfdgsW0h+WdSE0GSVnZE69UtNda7jLiMNluzTQMzOo=; b=iojd1ngcsuYW7jhP9HYNKVRRnk90RqF25o509YoPmPfme8QniX8L3sDU32vaalnT7j SPTYXDfQUC/H7KKwwCNXeAk/Sg82X4lIqYNJQVDmdndP9TY5xfzs2/vWfFlRrfAsMAYr gdlfHBFpiFIMEXssGpQBst1HBNGsrI3k4et5s2m374F3CnGKSZlQ/+3bnLDr27Mo7w96 gREUi5BeyshLehVlluRD6+KoZIg1lKLXjiGO7viSg/NAuA+7vzV5QP4HDDn4Olll0gXT tT3gzle+GAHon2/K/vT0V8H1ZOFyYjvtZAcf8B8xOpa1fIBFXRCgsTeNwlnKGSLXKa6p NhuA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-71288-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71288-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id de8-20020a056402308800b005643fc438besi1572707edb.189.2024.02.19.04.14.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 04:14:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71288-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-71288-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71288-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 85F1B1F23E71 for ; Mon, 19 Feb 2024 12:14:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DE6DB2D60C; Mon, 19 Feb 2024 12:14:23 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6376C2C848; Mon, 19 Feb 2024 12:14:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708344863; cv=none; b=quh4DtMIIabGk3z4kZXVGMr90afkWjOR6Vzlxgc6RarId85/1Y8hpCo0tEspNYKP7p3nKB1d1+WBkShHJjiKexjruVAfIcUYtLIFSWFbzQlTFyzmE4Tc/FDJXklW0/hU/gUzs46sbtR1WKFSIJU7uVmD8anmOv5HuHMAKEC06Ug= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708344863; c=relaxed/simple; bh=NZ4jnqU/EuB2SUEt+cn3RuhNToVBs6BNR7tAp3xZ3mY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=h/V0+m5b9KHTEgUV5cgNWryAFSX2+OC0/pNNQJBLdwSD8ScnmbvTunZjz/D52RPHC+1n/xOhAHzHqgDlYFpK8mTI+G0oDsnocjJ4C1IRz8jnIgnYsWmDJfq35AdWJ1AHe04XCnL66ZiUkp50FaxeP15cR8thF+pA98m76NvF35c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 852C7C433C7; Mon, 19 Feb 2024 12:14:21 +0000 (UTC) Date: Mon, 19 Feb 2024 12:14:18 +0000 From: Catalin Marinas To: Stephen Rothwell Cc: Christoffer Dall , Marc Zyngier , Will Deacon , Ard Biesheuvel , Linux Kernel Mailing List , Linux Next Mailing List , Oliver Upton Subject: Re: linux-next: manual merge of the kvm-arm tree with the arm64 tree Message-ID: References: <20240219135805.1c4138a3@canb.auug.org.au> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240219135805.1c4138a3@canb.auug.org.au> On Mon, Feb 19, 2024 at 01:58:05PM +1100, Stephen Rothwell wrote: > diff --cc arch/arm64/kernel/cpufeature.c > index 0be9296e9253,f309fd542c20..000000000000 > --- a/arch/arm64/kernel/cpufeature.c > +++ b/arch/arm64/kernel/cpufeature.c > @@@ -721,13 -754,12 +756,14 @@@ static const struct __ftr_reg_entry > &id_aa64isar2_override), > > /* Op1 = 0, CRn = 0, CRm = 7 */ > - ARM64_FTR_REG(SYS_ID_AA64MMFR0_EL1, ftr_id_aa64mmfr0), > + ARM64_FTR_REG_OVERRIDE(SYS_ID_AA64MMFR0_EL1, ftr_id_aa64mmfr0, > + &id_aa64mmfr0_override), > ARM64_FTR_REG_OVERRIDE(SYS_ID_AA64MMFR1_EL1, ftr_id_aa64mmfr1, > &id_aa64mmfr1_override), > - ARM64_FTR_REG(SYS_ID_AA64MMFR2_EL1, ftr_id_aa64mmfr2), > + ARM64_FTR_REG_OVERRIDE(SYS_ID_AA64MMFR2_EL1, ftr_id_aa64mmfr2, > + &id_aa64mmfr2_override), > ARM64_FTR_REG(SYS_ID_AA64MMFR3_EL1, ftr_id_aa64mmfr3), > + ARM64_FTR_REG(SYS_ID_AA64MMFR4_EL1, ftr_id_aa64mmfr4), > > /* Op1 = 1, CRn = 0, CRm = 0 */ > ARM64_FTR_REG(SYS_GMID_EL1, ftr_gmid), > @@@ -2701,33 -2817,13 +2779,40 @@@ static const struct arm64_cpu_capabilit > .type = ARM64_CPUCAP_SYSTEM_FEATURE, > .matches = has_lpa2, > }, > +#ifdef CONFIG_ARM64_VA_BITS_52 > + { > + .capability = ARM64_HAS_VA52, > + .type = ARM64_CPUCAP_BOOT_CPU_FEATURE, > + .matches = has_cpuid_feature, > + .field_width = 4, > +#ifdef CONFIG_ARM64_64K_PAGES > + .desc = "52-bit Virtual Addressing (LVA)", > + .sign = FTR_SIGNED, > + .sys_reg = SYS_ID_AA64MMFR2_EL1, > + .field_pos = ID_AA64MMFR2_EL1_VARange_SHIFT, > + .min_field_value = ID_AA64MMFR2_EL1_VARange_52, > +#else > + .desc = "52-bit Virtual Addressing (LPA2)", > + .sys_reg = SYS_ID_AA64MMFR0_EL1, > +#ifdef CONFIG_ARM64_4K_PAGES > + .sign = FTR_SIGNED, > + .field_pos = ID_AA64MMFR0_EL1_TGRAN4_SHIFT, > + .min_field_value = ID_AA64MMFR0_EL1_TGRAN4_52_BIT, > +#else > + .sign = FTR_UNSIGNED, > + .field_pos = ID_AA64MMFR0_EL1_TGRAN16_SHIFT, > + .min_field_value = ID_AA64MMFR0_EL1_TGRAN16_52_BIT, > +#endif > +#endif > + }, > +#endif > + { > + .desc = "NV1", > + .capability = ARM64_HAS_HCR_NV1, > + .type = ARM64_CPUCAP_SYSTEM_FEATURE, > + .matches = has_nv1, > + ARM64_CPUID_FIELDS_NEG(ID_AA64MMFR4_EL1, E2H0, NI_NV1) > + }, > {}, > }; Thanks Stephen. It looks fine. -- Catalin