[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ecde3264696efe9145ce0785e7c3c2c7d0182ea4.camel@linux.ibm.com>
Date: Wed, 05 Jun 2024 18:02:38 +0200
From: Ilya Leoshkevich <iii@...ux.ibm.com>
To: Alexander Potapenko <glider@...gle.com>
Cc: Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
virtualization@...ts.linux-foundation.org,
"Michael S. Tsirkin"
<mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
"David S. Miller"
<davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
<kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Alexei Starovoitov
<ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Jesper Dangaard
Brouer <hawk@...nel.org>,
John Fastabend <john.fastabend@...il.com>, netdev@...r.kernel.org,
bpf@...r.kernel.org, Christoph Hellwig
<hch@...radead.org>
Subject: Re: [PATCH vhost v13 04/12] virtio_ring: support add premapped buf
On Tue, 2024-06-04 at 18:17 +0200, Alexander Potapenko wrote:
> On Tue, Jun 4, 2024 at 6:07 PM Ilya Leoshkevich <iii@...ux.ibm.com>
> wrote:
> >
> > On Thu, 2023-08-10 at 20:30 +0800, Xuan Zhuo wrote:
> > > If the vq is the premapped mode, use the sg_dma_address()
> > > directly.
> > >
> > > Signed-off-by: Xuan Zhuo <xuanzhuo@...ux.alibaba.com>
> > > ---
> > > drivers/virtio/virtio_ring.c | 19 +++++++++++++++++--
> > > 1 file changed, 17 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/virtio/virtio_ring.c
> > > b/drivers/virtio/virtio_ring.c
> > > index 8e81b01e0735..f9f772e85a38 100644
> > > --- a/drivers/virtio/virtio_ring.c
> > > +++ b/drivers/virtio/virtio_ring.c
> > > @@ -361,6 +361,11 @@ static struct device *vring_dma_dev(const
> > > struct
> > > vring_virtqueue *vq)
> > > static int vring_map_one_sg(const struct vring_virtqueue *vq,
> > > struct
> > > scatterlist *sg,
> > > enum dma_data_direction direction,
> > > dma_addr_t *addr)
> > > {
> > > + if (vq->premapped) {
> > > + *addr = sg_dma_address(sg);
> > > + return 0;
> > > + }
> > > +
> >
> > I wonder if something needs to be done for KMSAN here, like it's
> > done
> > by the next block in this function? I'm looking into what seems to
> > be a
> > KMSAN false positive on s390x:
> >
> > BUG: KMSAN: uninit-value in receive_buf+0x45ca/0x6990
> > receive_buf+0x45ca/0x6990
> > virtnet_poll+0x17e0/0x3130
> > net_rx_action+0x832/0x26e0
> > handle_softirqs+0x330/0x10f0
> > [...]
>
> I think there's a similar problem on x86 as well:
> https://syzkaller.appspot.com/bug?extid=c5336dcd1b741349d27a
>
> I was going to look closer this week.
Thanks! I bisected it in the meantime and the first failing commit is:
commit f9dac92ba9081062a6477ee015bd3b8c5914efc4
Author: Xuan Zhuo <xuanzhuo@...ux.alibaba.com>
Date: Sat May 11 11:14:01 2024 +0800
virtio_ring: enable premapped mode whatever use_dma_api
so it's definitely related.
Powered by blists - more mailing lists