[PATCH 04/12] vhost-vdpa: improve ASID not found error message and return code
Weimin Xiong <[email protected]>
| Newsgroups | dev.linux.lists.virtualization |
|---|---|
| Message-ID | <[email protected]> |
From: xiongweimin <[email protected]> Improve the error message when IOTLB is not found for an ASID to clarify that the ASID may not be allocated. Also change the return code from -EINVAL to -ENOENT to better indicate a missing resource. Signed-off-by: Weimin Xiong <[email protected]> Co-authored-by: Cursor <[email protected]> --- drivers/vhost/vdpa.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index ac55275fa..a18ed439e 100644 --- a/drivers/vhost/vdpa.c +++ b/drivers/vhost/vdpa.c @@ -1275,8 +1275,10 @@ static int vhost_vdpa_process_iotlb_msg(struct vhost_dev *dev, u32 asid, v->batch_asid, asid); } if (!iotlb) - dev_err(&v->dev, "no iotlb for asid %d\n", asid); - r = -EINVAL; + dev_err(&v->dev, + "IOTLB not found for ASID %d: ASID may not be allocated\n", + asid); + r = -ENOENT; goto unlock; } -- 2.43.0