Message ID | 96c4125e-1d40-4e79-838d-852517b9d5f4@suse.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [for-4.20] x86/HVM: use XVFREE() in hvmemul_cache_destroy() | expand |
On 13/02/2025 11:10 am, Jan Beulich wrote: > My adjustments to move from xmalloc() et al to respective xvmalloc() > flavors was flawed - a freeing instance wasn't converted. > > Fixes: 23d60dbb0493 ("x86/HVM: allocate emulation cache entries dynamically") > Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
On 2/13/25 12:10 PM, Jan Beulich wrote: > My adjustments to move from xmalloc() et al to respective xvmalloc() > flavors was flawed - a freeing instance wasn't converted. > > Fixes: 23d60dbb0493 ("x86/HVM: allocate emulation cache entries dynamically") > Signed-off-by: Jan Beulich<jbeulich@suse.com> > --- > Noticed while backporting, where the conversion needs undoing. Release-Acked-By: Oleksii Kurochko<oleksii.kurochko@gmail.com> ~ Oleksii > > --- a/xen/arch/x86/include/asm/hvm/emulate.h > +++ b/xen/arch/x86/include/asm/hvm/emulate.h > @@ -123,7 +123,7 @@ static inline void hvmemul_cache_destroy(struct vcpu *v) > unsigned int i; > > for ( i = 0; i < ARRAY_SIZE(v->arch.hvm.hvm_io.mmio_cache); ++i ) > - XFREE(v->arch.hvm.hvm_io.mmio_cache[i]); > + XVFREE(v->arch.hvm.hvm_io.mmio_cache[i]); > XVFREE(v->arch.hvm.hvm_io.cache); > } > bool hvmemul_read_cache(const struct vcpu *v, paddr_t gpa,
--- a/xen/arch/x86/include/asm/hvm/emulate.h +++ b/xen/arch/x86/include/asm/hvm/emulate.h @@ -123,7 +123,7 @@ static inline void hvmemul_cache_destroy(struct vcpu *v) unsigned int i; for ( i = 0; i < ARRAY_SIZE(v->arch.hvm.hvm_io.mmio_cache); ++i ) - XFREE(v->arch.hvm.hvm_io.mmio_cache[i]); + XVFREE(v->arch.hvm.hvm_io.mmio_cache[i]); XVFREE(v->arch.hvm.hvm_io.cache); } bool hvmemul_read_cache(const struct vcpu *v, paddr_t gpa,
My adjustments to move from xmalloc() et al to respective xvmalloc() flavors was flawed - a freeing instance wasn't converted. Fixes: 23d60dbb0493 ("x86/HVM: allocate emulation cache entries dynamically") Signed-off-by: Jan Beulich <jbeulich@suse.com> --- Noticed while backporting, where the conversion needs undoing.