From: "Creeley, Brett" <bcreeley@amd.com>
To: Xiong Weimin <xiongweimin@kylinos.cn>,
Brett Creeley <brett.creeley@amd.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Jason Wang <jasowangio@gmail.com>
Cc: "Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
"Eugenio Pérez" <eperezma@redhat.com>,
virtualization@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vdpa/pds: check virtqueue notify mapping
Date: Wed, 5 Aug 2026 13:40:39 -0700 [thread overview]
Message-ID: <08a8f40b-6c01-4296-8e49-432c9dbc3a9f@amd.com> (raw)
In-Reply-To: <20260804085341.1333303-1-xiongweimin@kylinos.cn>
On 8/4/2026 1:53 AM, Xiong Weimin wrote:
> [You don't often get email from xiongweimin@kylinos.cn. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
>
>
> vp_modern_map_vq_notify() can fail and return NULL. Check the notify
> mapping while adding a pds vDPA device and use the existing teardown path
> instead of storing a NULL doorbell pointer in the virtqueue state.
>
> Signed-off-by: Xiong Weimin <xiongweimin@kylinos.cn>
> ---
> drivers/vdpa/pds/vdpa_dev.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/vdpa/pds/vdpa_dev.c b/drivers/vdpa/pds/vdpa_dev.c
> index 43426bd97..df53cfce9 100644
> --- a/drivers/vdpa/pds/vdpa_dev.c
> +++ b/drivers/vdpa/pds/vdpa_dev.c
> @@ -731,6 +731,12 @@ static int pds_vdpa_dev_add(struct vdpa_mgmt_dev *mdev, const char *name,
>
> notify = vp_modern_map_vq_notify(&pdsv->vdpa_aux->vd_mdev,
> i, &pdsv->vqs[i].notify_pa);
> + if (!notify) {
> + err = -EINVAL;
> + dev_warn(dev, "Fail to map vq notify %d\n", i);
Nit, but why dev_warn() instead of dev_err()? It looks like this was
copied, but I wonder if the other spot should be a dev_err() instead of
dev_warn too?
Other than that, LGTM.
Reviewed-by: Brett Creeley <brett.creeley@amd.com>
> + goto err_unmap;
> + }
> +
> pds_vdpa_init_vqs_entry(pdsv, i, notify);
> }
>
> --
> 2.43.0
>
next prev parent reply other threads:[~2026-08-05 20:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 8:53 [PATCH] vdpa/pds: check virtqueue notify mapping Xiong Weimin
2026-08-05 20:40 ` Creeley, Brett [this message]
2026-08-06 0:58 ` Xiong Weimin
2026-08-06 16:21 ` Creeley, Brett
2026-08-07 1:58 ` Xiong Weimin
2026-08-07 1:58 ` [PATCH] vdpa/virtio_pci: use dev_err for vq notify map failure Xiong Weimin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=08a8f40b-6c01-4296-8e49-432c9dbc3a9f@amd.com \
--to=bcreeley@amd.com \
--cc=brett.creeley@amd.com \
--cc=eperezma@redhat.com \
--cc=jasowangio@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=virtualization@lists.linux.dev \
--cc=xiongweimin@kylinos.cn \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox