From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: xieyongji@bytedance.com, linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org, eperezma@redhat.com,
hch@lst.de
Subject: Re: [PATCH] vdpa_sim: get rid of DMA ops
Date: Fri, 27 Jan 2023 05:29:47 -0500 [thread overview]
Message-ID: <20230127052843-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CACGkMEsjEJyrZvKus8rWNw4zgi-8FeWGBU+LYm6p41K7-j5gpQ@mail.gmail.com>
On Mon, Dec 26, 2022 at 12:12:42PM +0800, Jason Wang wrote:
> > >@@ -682,6 +553,11 @@ static int vdpasim_dma_unmap(struct vdpa_device *vdpa, unsigned int asid,
> > > if (asid >= vdpasim->dev_attr.nas)
> > > return -EINVAL;
> > >
> > >+ if (vdpasim->iommu_pt[asid]) {
> >
> > We are in the vdpasim_dma_unmap, so if vdpasim->iommu_pt[asid] is true,
> > should be better to return an error, since this case should not happen?
>
> So it's a question of how to behave when unmap is called without a
> map. I think we can leave the code as is or if we wish, it needs a
> separate patch.
>
> (We didn't error this previously anyhow).
>
> Thanks
OK I picked as is. Do we want WARN_ON maybe?
--
MST
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: Stefano Garzarella <sgarzare@redhat.com>,
eperezma@redhat.com, virtualization@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, xieyongji@bytedance.com,
hch@lst.de
Subject: Re: [PATCH] vdpa_sim: get rid of DMA ops
Date: Fri, 27 Jan 2023 05:29:47 -0500 [thread overview]
Message-ID: <20230127052843-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CACGkMEsjEJyrZvKus8rWNw4zgi-8FeWGBU+LYm6p41K7-j5gpQ@mail.gmail.com>
On Mon, Dec 26, 2022 at 12:12:42PM +0800, Jason Wang wrote:
> > >@@ -682,6 +553,11 @@ static int vdpasim_dma_unmap(struct vdpa_device *vdpa, unsigned int asid,
> > > if (asid >= vdpasim->dev_attr.nas)
> > > return -EINVAL;
> > >
> > >+ if (vdpasim->iommu_pt[asid]) {
> >
> > We are in the vdpasim_dma_unmap, so if vdpasim->iommu_pt[asid] is true,
> > should be better to return an error, since this case should not happen?
>
> So it's a question of how to behave when unmap is called without a
> map. I think we can leave the code as is or if we wish, it needs a
> separate patch.
>
> (We didn't error this previously anyhow).
>
> Thanks
OK I picked as is. Do we want WARN_ON maybe?
--
MST
next prev parent reply other threads:[~2023-01-27 10:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-23 6:00 [PATCH] vdpa_sim: get rid of DMA ops Jason Wang
2022-12-23 6:00 ` Jason Wang
2022-12-23 6:15 ` Christoph Hellwig
2022-12-23 6:15 ` Christoph Hellwig
2022-12-23 9:26 ` Stefano Garzarella
2022-12-23 9:26 ` Stefano Garzarella
2022-12-26 4:12 ` Jason Wang
2022-12-26 4:12 ` Jason Wang
2023-01-27 10:29 ` Michael S. Tsirkin [this message]
2023-01-27 10:29 ` Michael S. Tsirkin
2023-01-29 5:47 ` Jason Wang
2023-01-29 5:47 ` Jason Wang
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=20230127052843-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=eperezma@redhat.com \
--cc=hch@lst.de \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
--cc=xieyongji@bytedance.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.