From: Shivang Upadhyay <shivangu@linux.ibm.com>
To: qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
sourabhjain@linux.ibm.com, rathc@linux.ibm.com,
npiggin@gmail.com, milesg@linux.ibm.com, harshpb@linux.ibm.com,
adityag@linux.ibm.com, richard.henderson@linaro.org,
mkchauras@gmail.com, sshegde@linux.ibm.com, srikar@linux.ibm.com
Subject: Re: [PATCH] target/ppc: Stop vCPU thread before calling parent_unrealize
Date: Fri, 25 Sep 2026 13:30:13 +0530 [thread overview]
Message-ID: <3dd5c06a456a49d07ff51be38fdbba651536dddf.camel@linux.ibm.com> (raw)
In-Reply-To: <20260924200552.2eab89e8-e2-amachhiw@linux.ibm.com>
On Thu, 2026-09-24 at 20:12 +0530, Amit Machhiwal wrote:
> The fix is correct and the commit message is well written. The ASan
> trace makes
> the race unambiguous: tlb_destroy() frees fast->table and desc-
> >fulltlb while
> the MTTCG thread is still running tlb_mmu_resize_locked() on the same
> structures
> via the queued tcg_commit_cpu work.
>
> Reviewed-by: Amit Machhiwal <amachhiw@linux.ibm.com>
>
Thanks for review.
> Minor: I think a short comment above cpu_remove_sync() would make the
> ordering
> constraint self-documenting, e.g.:
>
> /*
> * Stop and join the vCPU thread before tearing down accelerator
> * state (TLB tables etc.) to prevent the running thread from
> * accessing freed resources.
> */
> cpu_remove_sync(CPU(cpu));
Seems this is already pulled via misc tree.
I plan to work on Philippe's suggestion to pull all cpu_remove_sync()
calls into cpu_common_unrealize(), that should take care of all such
caveats.
~Shivang.
prev parent reply other threads:[~2026-09-25 8:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 12:14 [PATCH] target/ppc: Stop vCPU thread before calling parent_unrealize Shivang Upadhyay
2026-09-23 13:39 ` Philippe Mathieu-Daudé
2026-09-24 13:46 ` Shivang Upadhyay
2026-09-24 9:12 ` Mukesh Kumar Chaurasiya
2026-09-24 13:18 ` Shivang Upadhyay
2026-09-24 14:42 ` Amit Machhiwal
2026-09-25 8:00 ` Shivang Upadhyay [this message]
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=3dd5c06a456a49d07ff51be38fdbba651536dddf.camel@linux.ibm.com \
--to=shivangu@linux.ibm.com \
--cc=adityag@linux.ibm.com \
--cc=harshpb@linux.ibm.com \
--cc=milesg@linux.ibm.com \
--cc=mkchauras@gmail.com \
--cc=npiggin@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rathc@linux.ibm.com \
--cc=richard.henderson@linaro.org \
--cc=sourabhjain@linux.ibm.com \
--cc=srikar@linux.ibm.com \
--cc=sshegde@linux.ibm.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.