Re: [PATCH v3] KVM: Don't treat reserved xarray entries as having memory attributes
From: Sean Christopherson
Date: Thu Sep 24 2026 - 17:56:39 EST
On Mon, 21 Sep 2026 18:24:42 +0800, Zeng Chi wrote:
> kvm_vm_set_mem_attributes() reserves an xarray entry for every gfn in
> the range before storing the new attributes, so that the store loop
> can't fail partway through. If one of the reservations fails, e.g. with
> -ENOMEM, the entries that were already reserved are left in the array.
> That is harmless as far as xa_reserve() is concerned, as the reserved
> entries read back as NULL via xa_load(), but it confuses the "does this
> range have no attributes at all" check:
>
> [...]
Applied to kvm-x86 fixes, thanks!
[1/1] KVM: Don't treat reserved xarray entries as having memory attributes
https://github.com/kvm-x86/linux/commit/277d3623d99a
--
https://github.com/kvm-x86/linux/tree/next