Re: [PATCH v3 12/27] KVM: nSVM: Drop svm->nested.initialized

From: Jim Mattson

Date: Thu Oct 15 2026 - 17:49:12 EST


On Mon, Oct 12, 2026 at 4:36 PM Yosry Ahmed <yosry@xxxxxxxxxx> wrote:
>
> Do NULL checks on svm->nested.vmcb02.ptr instead of using a dedicated
> proxy 'initialized' field. Make sure svm->nested.vmcb02.ptr is
> correctly set to NULL on initialization failures, as it is currently
> left as a dangling pointer.
>
> This makes it possible to directly do a NULL check on
> svm->nested.vmcb02.ptr before using it, instead of checking a different
> field, which is less error-prone.
>
> Signed-off-by: Yosry Ahmed <yosry@xxxxxxxxxx>
Reviewed-by: Jim Mattson <jmattson@xxxxxxxxxx>