From: "Alex Bennée" <alex.bennee@linaro.org>
To: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Cc: qemu-devel@nongnu.org,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH v2 0/3] virtio-gpu: fix blob unmapping sequence
Date: Tue, 15 Apr 2025 19:46:14 +0100 [thread overview]
Message-ID: <87v7r5clft.fsf@draig.linaro.org> (raw)
In-Reply-To: <20250410122643.1747913-1-manos.pitsidianakis@linaro.org> (Manos Pitsidianakis's message of "Thu, 10 Apr 2025 15:26:35 +0300")
Manos Pitsidianakis <manos.pitsidianakis@linaro.org> writes:
> A hang was observed when running a small kernel that exercised VIRTIO
> GPU under TCG. This is an edge-case and won't happen under typical
> conditions.
Should I (or MST?) pull these into a tree for 10.0 or should they be
grabbed for when the tree opens with a Cc qemu-stable?
>
> When unmapping a blob object, its MemoryRegion's freeing is deferred to
> the RCU thread. The hang's cause was determined to be a busy main loop
> not allowing for the RCU thread to run because the kernel did not setup
> any timers or had any interrupts on the way. While fixing the RCU thread
> to run even if the guest CPU spins is a solution, it's easier to fix the
> reason why the MemoryRegion isn't freed from the main loop instead.
>
> While at it, also restructure the 3 stage cleanup to immediately respond
> to the guest if the MR happened to have had no other reference.
>
> PS: The hang can be reproduced by running this unikernel with TCG
>
> https://git.codelinaro.org/manos.pitsidianakis/virtio-tests/-/tree/8c0ebe9395827e24aa5711186d499bf5de87cf63/virtio-test-suite
>
> v1 to v2:
> - Add patch by Alex to prevent double-free when FlatView is destroyed
> from RCU thread.
>
> Alex Bennée (1):
> hw/display: re-arrange memory region tracking
>
> Manos Pitsidianakis (2):
> virtio-gpu: fix hang under TCG when unmapping blob
> virtio-gpu: refactor async blob unmapping
>
> include/exec/memory.h | 1 +
> hw/display/virtio-gpu-virgl.c | 60 ++++++++++++++++++++---------------
> 2 files changed, 35 insertions(+), 26 deletions(-)
>
>
> base-commit: 56c6e249b6988c1b6edc2dd34ebb0f1e570a1365
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2025-04-15 18:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-10 12:26 [PATCH v2 0/3] virtio-gpu: fix blob unmapping sequence Manos Pitsidianakis
2025-04-10 12:26 ` [PATCH v2 1/3] hw/display: re-arrange memory region tracking Manos Pitsidianakis
2025-04-15 10:35 ` Philippe Mathieu-Daudé
2025-04-15 11:21 ` Alex Bennée
2025-04-10 12:26 ` [PATCH v2 2/3] virtio-gpu: fix hang under TCG when unmapping blob Manos Pitsidianakis
2025-04-10 14:59 ` Alex Bennée
2025-04-10 12:26 ` [PATCH v2 3/3] virtio-gpu: refactor async blob unmapping Manos Pitsidianakis
2025-04-15 10:40 ` Philippe Mathieu-Daudé
2025-04-15 18:46 ` Alex Bennée [this message]
2025-04-16 18:57 ` [PATCH v2 0/3] virtio-gpu: fix blob unmapping sequence Michael S. Tsirkin
2025-04-17 8:00 ` Alex Bennée
2025-04-17 11:37 ` Michael S. Tsirkin
2025-04-16 19:26 ` Stefan Hajnoczi
2025-04-17 8:08 ` Alex Bennée
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=87v7r5clft.fsf@draig.linaro.org \
--to=alex.bennee@linaro.org \
--cc=manos.pitsidianakis@linaro.org \
--cc=mst@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=stefanha@redhat.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.