[PATCH 07/43] KVM: arm64: gic-v5: Create & manage VM and VPE tables
Vladimir Murzin
vladimir.murzin at arm.com
Tue Apr 28 07:54:12 PDT 2026
Hi Sascha,
On 4/27/26 17:08, Sascha Bischoff wrote:
> +
> + if (virt_to_phys(l2_table) & ~GICV5_VMTEL1E_L2_ADDR) {
> + kfree(l2_table);
> + return -EINVAL;
> + }
> +
> + vmt_info->l2.l2ptrs[l1_index] = l2_table;
> +
> + /* Alignment issue! */
> + if (virt_to_phys(l2_table) & ~GICV5_VMTEL1E_L2_ADDR) {
> + kfree(l2_table);
> + return -EFAULT;
> + }
> +
> + tmp = virt_to_phys(l2_table) & GICV5_VMTEL1E_L2_ADDR;
> + WRITE_ONCE(vmt_info->l2.vmt_base[l1_index], cpu_to_le64(tmp));
It seems the same l2_table alignment calculated (and checked) multiple times...
Cheers
Vladimir
More information about the linux-arm-kernel
mailing list