SIGN IN SIGN UP

KVM: Don't pre-reserve xarray entries when storing empty/NULL attributes

Skip the xarray reservation loop when clearing all memory attributes, as
storing NULL only erases the entry and never needs to allocate, so no
reservation (and no cleanup of a failed one) is required in that case.

Suggested-by: Sean Christopherson <seanjc@google.com>
Cc: David Ballesteros <davimaba.v@proton.me>
Signed-off-by: Zeng Chi <zengchi@kylinos.cn>
Link: https://patch.msgid.link/20260921102442.1232375-1-zeng_chi911@163.com
[sean: split to separate patch]
Signed-off-by: Sean Christopherson <seanjc@google.com>
Z
Zeng Chi committed
119e9db233ad0f4cbd4cfb9f9385a7bca378b37d
Parent: 382e5d5
Committed by Sean Christopherson <seanjc@google.com> on 9/22/2026, 3:36:16 PM