Re: [PATCH v2 1/2] KVM: arm64: nv: Fix life cycle of the nested_mmus array
Karl Mehltretter <[email protected]>
| Newsgroups | gmane.linux.kernel.stable,gmane.linux.ports.arm.kernel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Aug 14, 2026 at 11:32:29AM +0100, Marc Zyngier wrote:
> +int kvm_init_nested(struct kvm *kvm)
> {
> - kvm->arch.nested_mmus = NULL;
> + kvm->arch.nested_mmus = kvmalloc_array(KVM_MAX_VCPUS * S2_MMU_PER_VCPU,
> + sizeof(struct s2_mmu *),
> + GFP_KERNEL_ACCOUNT);
better: sizeof(struct kvm_s2_mmu *) or sizeof(*kvm->arch.nested_mmus)
> + return ret;
> + }
> +
> + guard(write_lock)(&kvm->mmu_lock);
tabs in the empty line.
Thanks,
Karl