From: sashiko-bot@kernel.org
To: "Haishuang Yan" <yanhaishuang@cmss.chinamobile.com>
Cc: virtualization@lists.linux.dev,
"Michael S. Tsirkin" <mst@redhat.com>,
"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH net v2 1/3] virtio_net: Don't DMA map the kernel image for the AF_XDP TX header
Date: Mon, 09 Nov 2026 11:39:32 +0000 [thread overview]
Message-ID: <sashiko-outbox-204883@kernel.org> (raw)
In-Reply-To: <20261108193845.73621-2-yanhaishuang@cmss.chinamobile.com>
> virtnet_xsk_pool_enable() DMA maps the static xsk_hdr, which lives in
> the kernel image. On arm64 the kernel image is mapped in the vmalloc
> area, so when the device uses the DMA API the mapping is rejected:
>
> virtio_net virtio0: rejecting DMA map of vmalloc memory
> WARNING: drivers/virtio/virtio_ring.c:3882 ...
>
> and binding an AF_XDP zero-copy socket fails with -ENOMEM.
>
> Allocate the all-zero header per send queue when the pool is enabled
> and free it when it is disabled.
>
> This was found while testing AF_XDP in QEMU on arm64, not in
> production. Tested in QEMU (TCG, arm64 virt, virtio-net-pci with
> iommu_platform=on) with a KASAN kernel: binding an XDP_ZEROCOPY socket
> fails without this patch and succeeds with it.
>
> Fixes: 21a4e3ce6dc7 ("virtio_net: xsk: bind/unbind xsk for tx")
> Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261108193845.73621-1-yanhaishuang@cmss.chinamobile.com?part=1
next prev parent reply other threads:[~2026-11-09 11:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-08 19:38 [PATCH net v2 0/3] virtio_net: AF_XDP zero-copy fixes for arm64 and suspend Haishuang Yan
2026-11-08 19:38 ` [PATCH net v2 1/3] virtio_net: Don't DMA map the kernel image for the AF_XDP TX header Haishuang Yan
2026-11-09 11:39 ` sashiko-bot [this message]
2026-11-08 19:38 ` [PATCH net v2 2/3] virtio_net: Disable AF_XDP pools on queues above curr_queue_pairs Haishuang Yan
2026-11-09 11:39 ` sashiko-bot
2026-11-09 12:34 ` netdev-bot+sashiko
2026-11-10 11:20 ` Haishuang Yan
2026-11-08 19:38 ` [PATCH net v2 3/3] virtio_net: Keep AF_XDP zero-copy pools bound across suspend Haishuang Yan
2026-11-09 11:39 ` sashiko-bot
2026-11-09 12:34 ` netdev-bot+sashiko
2026-11-10 11:21 ` Haishuang Yan
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=sashiko-outbox-204883@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=eperezma@redhat.com \
--cc=mst@redhat.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=virtualization@lists.linux.dev \
--cc=yanhaishuang@cmss.chinamobile.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