When PASID is not used, the buffer user address is set to
AMDXDNA_INVALID_ADDR. As a result, heap buffer user address validation
fails even though the original userspace address is available.
Preserve the userspace address regardless of PASID usage so heap buffer
address validation works correctly.
Fixes: dbc8fd7a03cb ("accel/amdxdna: Add expandable device heap support")
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://patch.msgid.link/20260602040624.2206774-1-lizhi.hou@amd.com
u32 nr_pages;
int ret;
- if (!amdxdna_pasid_on(abo->client))
+ if (!amdxdna_pasid_on(abo->client)) {
+ /* Need to set uva for heap uva validation */
+ abo->mem.uva = addr;
return 0;
+ }
mapp = kzalloc_obj(*mapp);
if (!mapp)