[Bug 289930] Booting FreeBSD 16-CURRENT on riscv64 with QEMU hangs indefinitely
Date: Fri, 07 Nov 2025 23:12:49 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289930
--- Comment #4 from commit-hook@FreeBSD.org ---
A commit in branch releng/15.0 references this bug:
URL:
https://cgit.FreeBSD.org/src/commit/?id=69c726c150772c36854d38e51b6fd921a04caea5
commit 69c726c150772c36854d38e51b6fd921a04caea5
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-11-04 14:27:33 +0000
Commit: Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2025-11-07 23:12:02 +0000
virtio: Fix polling in virtqueue_dequeue()
The access of vq->vq_ring.used->idx needs to be volatile-qualified,
otherwise the compiler may optimize virtqueue_poll() into an infinite
loop if there is no data available upon the first poll.
Prior to commit ad17789a8569 this wasn't a problem since an external
function call after each poll inhibited the optimization.
Approved by: re (cperciva)
PR: 289930
MFC after: 3 days
Sponsored by: Klara, Inc.
Fixes: ad17789a8569 ("virtio: Remove the unused poll method")
(cherry picked from commit f999ffdce3813eb946f10999ccffb8275c324469)
(cherry picked from commit 72c76047541ab6cc0e989a74e8de4d6e6a1a94b6)
sys/dev/virtio/virtqueue.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--
You are receiving this mail because:
You are on the CC list for the bug.