[PATCH v3 4/6] arm64/kvm: Avoid invalid physical addresses to signal owner updates
Quentin Perret
qperret at google.com
Thu Dec 12 03:33:17 PST 2024
On Thursday 12 Dec 2024 at 09:18:46 (+0100), Ard Biesheuvel wrote:
> @@ -908,6 +892,9 @@ static bool stage2_leaf_mapping_allowed(const struct kvm_pgtable_visit_ctx *ctx,
> if (data->force_pte && ctx->level < KVM_PGTABLE_LAST_LEVEL)
> return false;
>
> + if (data->annotation && ctx->level == KVM_PGTABLE_LAST_LEVEL)
> + return true;
> +
I don't think it's a problem, but what's the rationale for checking
ctx->level here? The data->force_pte logic should already do this for us
and be somewhat orthogonal to data->annotation, no?
Either way, the patch looks good to me
Reviewed-by: Quentin Perret <qperret at google.com>
Cheers,
Quentin
> return kvm_block_mapping_supported(ctx, phys);
> }
More information about the linux-arm-kernel
mailing list