]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
KVM: arm64: Populate PAR_EL1 with 52bit addresses
authorMarc Zyngier <maz@kernel.org>
Sun, 27 Jul 2025 18:47:00 +0000 (19:47 +0100)
committerMarc Zyngier <maz@kernel.org>
Sat, 20 Sep 2025 10:05:13 +0000 (11:05 +0100)
Expand the output address populated in PAR_EL1 to 52bit addresses.

Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/at.c

index 410d12b5b0ac3b3bd5e671b1e9c449f6dd28e69e..d06cf816f848a8c034a254905f3901e76ebba3c3 100644 (file)
@@ -844,7 +844,7 @@ static u64 compute_par_s1(struct kvm_vcpu *vcpu, struct s1_walk_info *wi,
        } else if (wr->level == S1_MMU_DISABLED) {
                /* MMU off or HCR_EL2.DC == 1 */
                par  = SYS_PAR_EL1_NSE;
-               par |= wr->pa & GENMASK_ULL(47, 12);
+               par |= wr->pa & SYS_PAR_EL1_PA;
 
                if (wi->regime == TR_EL10 &&
                    (__vcpu_sys_reg(vcpu, HCR_EL2) & HCR_DC)) {
@@ -877,7 +877,7 @@ static u64 compute_par_s1(struct kvm_vcpu *vcpu, struct s1_walk_info *wi,
                        mair = MEMATTR(NC, NC);
 
                par |= FIELD_PREP(SYS_PAR_EL1_ATTR, mair);
-               par |= wr->pa & GENMASK_ULL(47, 12);
+               par |= wr->pa & SYS_PAR_EL1_PA;
 
                sh = compute_s1_sh(wi, wr, mair);
                par |= FIELD_PREP(SYS_PAR_EL1_SH, sh);