Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 420F3606A32C for ; Fri, 4 Dec 2026 15:00:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=JlAs0Rv9; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=google header.b=GWDAB0SI Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xZUlu-00020z-IA; Fri, 04 Dec 2026 10:00:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xZUlp-0001yK-8y for qemu-devel@nongnu.org; Fri, 04 Dec 2026 10:00:22 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xZUln-0008L5-4G for qemu-devel@nongnu.org; Fri, 04 Dec 2026 10:00:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1796396417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=5TY8qSwBCVSUv1s9XMPLqU8EnvJGS7BSlOuhwz1mpzU=; b=JlAs0Rv9HahbK4LhyuAnVnY7GuN5KaL/HBevu7fIhgPse5pQKv7ppvj08cDNRnrkx3H/Qb G4u//22hzD/uGBKhp8wzxCCv3QGr978nLxuZGXPAaqCW17WoQEWha1fnSDm5lOR8ZK/5Ux uzsf1RF9Ox+/HVEjLzQiNloDONI47GE= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-618-asccpPl5PAOFeKywzpS0PA-1; Fri, 4 Dec 2026 15:00:15 +0000 X-MC-Unique: asccpPl5PAOFeKywzpS0PA-1 X-Mimecast-MFC-AGG-ID: asccpPl5PAOFeKywzpS0PA_1796396413 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4ad3d35e899so7091545e9.1 for ; Fri, 04 Dec 2026 07:00:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1796396413; x=1797001213; darn=nongnu.org; h=content-transfer-encoding:content-type:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=5TY8qSwBCVSUv1s9XMPLqU8EnvJGS7BSlOuhwz1mpzU=; b=GWDAB0SI12+CFV/zNT4SN0vphqLrPWwpw1Q1JseL8C5Uja904gYo4yrhSm+eHi/sUw Ct+VGh/TSHM8ZDQWAc9WpQ3PF6knfjGlWF/Q4uUj29TVS1ja3NbM5nIEyAz2DhHQBUBb 4s8UKW2v+hJfTCZve0sbCsG/iWrT1vnYb4JT0yT0IzUEcwGwB4HC51rA2Qov5aJfzaxr 4CWnvR0ba0e7i95IiYx/YbY6ilwSMXlOhLZjmRCc+8ZAYKjFIpZxFE6/T/jxXb8nAHzz Rb9PMfD3Xu6l5toYz9YyuV2vG5FIlf1pzFTepYlmCDG7M6n3LMJoW4AJEr6M55WP4mmF bu4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796396413; x=1797001213; h=content-transfer-encoding:content-type:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=5TY8qSwBCVSUv1s9XMPLqU8EnvJGS7BSlOuhwz1mpzU=; b=WzCdLwmbxVxCT718ssF9eH/8ibHX964FYXUKeC7vgK6E8uaW0dYZuWzAGwjdJw1H1+ wHoEbX/JL0lvmsMdtrf0WNT9/iyW7Sd6hL+VAUTMClmoBdqelSip2q7rdbTgcvQKubkY 5soMgwq7olnStQWt9x1WG5TH11KN6kYMrB70NmENk9Ou6n/dm8mBs/T5WxGJzI0xLqKN hXcz84BkRuKXu61DDJe51TC8huqNXbu8YycwgSmclMc4Sa1EmuHo7/vsyCiXmnTWzm/Z IhyXDKHcJ/H7MAh8lqzhyOVPUE70nMk4Bgv5/Jpd5DWLuaj6qmh4nTQhdIBNdqsH8RqY uklw== X-Forwarded-Encrypted: i=1; AL+hErHABXoHkRbz4CN9rVKldVoMhQtkIdjAPD8Nh3+X8qWF8aWcY12kug+39Fx9s6Jz+m2IoXXdJXDG01Sc@nongnu.org X-Gm-Message-State: APuU4Z8B4ilZIOYvGLExCI6SKZUH+nc9rw/5+P9yYxJ7U2fqEuZhZ9I6 xWVvfrMo2DXpbQSRNMuT3WKi1IBcQSP6wxhBPjoMRkma6FYUIyPKn7TCJJXUWjSLzw5B+qcf1+q Ld5XUmiI9pJJrnboVoM7THIAxeUVHukVv7Jj5LB8BKHdMSMJXfA6sNPzf X-Gm-Gg: AZFdTZdYttQoUJUKp0tWXCSypDQJCShpu6/WHSvQaB5B0gxsnowoG7/q0B397g2zWP7 RtPsLeiuU0x4inwidLV6i6AJHIlksuPipzpEiVeIowZkfFZAf5CY2BbIAAc5CIxYdPmYpSSKqBH 9oPkNVxyBI2Z14maE1VtStE68+Znsn4jbRFL7DV3XoYzKFBTmre6k5n6FqODHwYHw7ixVFHTunQ DAwa8OwxkfPErnXDsmeNBMdLNzmNLEdI4kEdrB10wSBvNafUNSx0bh1pEskDk3kaXEGM7kkf/YA +doa4mFYZbBkjIhG8KyVjcR+fpTwPWxNvlQcxognFAgmObIz39dkV2Xk9W0i8jLM7aGvOXqLlZH Px+Rnnsr5KJHwpaWKl/PCxJooqPW/eAP3WCTTwkDT6hI= X-Received: by 2002:a05:600c:4ed3:b0:4bb:a60a:fc8 with SMTP id 5b1f17b1804b1-4bbeb90c4e5mr47427045e9.35.1796396412715; Fri, 04 Dec 2026 07:00:12 -0800 (PST) X-Received: by 2002:a05:600c:4ed3:b0:4bb:a60a:fc8 with SMTP id 5b1f17b1804b1-4bbeb90c4e5mr47424025e9.35.1796396410693; Fri, 04 Dec 2026 07:00:10 -0800 (PST) Received: from [192.168.0.9] ([47.64.113.95]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbe0030c6fsm176667225e9.2.2026.12.04.07.00.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Dec 2026 07:00:10 -0800 (PST) Message-ID: <41a54b6c-495d-4778-8490-751809f19bf4@redhat.com> Date: Fri, 4 Dec 2026 16:00:08 +0100 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/6] util/qemu-timer: Add optional reentrancy guard to the timer API To: Peter Maydell , qemu-devel@nongnu.org Cc: Jason Wang , Stefan Hajnoczi , Fam Zheng , Manos Pitsidianakis , =?UTF-8?Q?Marc-Andr=C3=A9_Lureau?= , Samuel Thibault , Paolo Bonzini , qemu-rust@nongnu.org References: <20261204131946.2175006-1-peter.maydell@linaro.org> <20261204131946.2175006-3-peter.maydell@linaro.org> Content-Language: en-US From: Thomas Huth Autocrypt: addr=thuth@redhat.com; keydata= xsFNBFH7eUwBEACzyOXKU+5Pcs6wNpKzrlJwzRl3VGZt95VCdb+FgoU9g11m7FWcOafrVRwU yYkTm9+7zBUc0sW5AuPGR/dp3pSLX/yFWsA/UB4nJsHqgDvDU7BImSeiTrnpMOTXb7Arw2a2 4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tS9mbaSWj6XBDfA1AEdQkBOn ZH1Qt7HJesk+qNSnLv6+jP4VwqK5AFMrKJ6IjE7jqgzGxtcZnvSjeDGPF1h2CKZQPpTw890k fy18AvgFHkVk2Oylyexw3aOBsXg6ukN44vIFqPoc+YSU0+0QIdYJp/XFsgWxnFIMYwDpxSHS 5fdDxUjsk3UBHZx+IhFjs2siVZi5wnHIqM7eK9abr2cK2weInTBwXwqVWjsXZ4tq5+jQrwDK cvxIcwXdUTLGxc4/Z/VRH1PZSvfQxdxMGmNTGaXVNfdFZjm4fz0mz+OUi6AHC4CZpwnsliGV ODqwX8Y1zic9viSTbKS01ZNp175POyWViUk9qisPZB7ypfSIVSEULrL347qY/hm9ahhqmn17 Ng255syASv3ehvX7iwWDfzXbA0/TVaqwa1YIkec+/8miicV0zMP9siRcYQkyTqSzaTFBBmqD oiT+z+/E59qj/EKfyce3sbC9XLjXv3mHMrq1tKX4G7IJGnS989E/fg6crv6NHae9Ckm7+lSs IQu4bBP2GxiRQ+NV3iV/KU3ebMRzqIC//DCOxzQNFNJAKldPe/bKZMCxEqtVoRkuJtNdp/5a yXFZ6TfE1hGKrDBYAm4vrnZ4CXFSBDllL59cFFOJCkn4Xboj/aVxxJxF30bn In-Reply-To: <20261204131946.2175006-3-peter.maydell@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.142, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org X-Spam-Status: No, score=-17.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Am 04.12.26 um 14:19 schrieb Peter Maydell: > It's common for devices that use QEMU timers to do things in their > timer callbacks that may either directly be a DMA operation, or to > call out to other device models (e.g. by setting an interrupt) that > might indirectly trigger a DMA operation. If the guest can arrange > for that DMA operation to be to an address which is in the device's > own memory-mapped registers, the device code will be re-entered in a > way it doesn't expect. > > Our mechanism for avoiding that is the MemReentrancyGuard. We > automatically set that when calling into a device's memory operation > read and write functions, and if the device directly uses the QEMUBH > API they can ask for the BH callbacks to be guarded (via e.g. > aio_bh_new_guarded() or qemu_bh_new_guarded()), but for a timer > callback the device has to manually enable its guard. We did that > for the USB XHCI device in commit f91b0544fe1f ("hw/usb/hcd-xhci: Set > reentrancy guard in timer functions"). > > To make it less awkward for devices to enable a reentrancy guard for > their timer callbacks, add support for the guard to the QEMU timer > API, in the same way that we did for the BH API in commit 9c86c97f12 > ("async: Add an optional reentrancy guard to the BH API"). > > In this commit, we add the MemReentrancyGuard pointer to the QEMU > timer struct, and if it is set we engage it across the callback. > This will do nothing yet because we don't expose any API changes to > allow it to be set up when the timer is initialized. > > Note that it is OK to write to reentrancy_guard->engaged_in_io even > after the callback has returned and potentially might have e.g. > deleted a timer, because we are going to require that the guard > structure itself remains valid. The expected guard is the one in the > DeviceState struct, and devices shouldn't be deleting themselves in > timer callbacks, so this should be OK. (It's also an implicit > requirement for other uses of the reentrancy guard mechanism.) > > Cc: qemu-stable@nongnu.org > Signed-off-by: Peter Maydell > --- > include/qemu/timer.h | 2 ++ > util/qemu-timer.c | 31 +++++++++++++++++++++++++++++-- > util/trace-events | 3 +++ > 3 files changed, 34 insertions(+), 2 deletions(-) > > diff --git a/include/qemu/timer.h b/include/qemu/timer.h > index 8e7c217306b..11bcc3f0d36 100644 > --- a/include/qemu/timer.h > +++ b/include/qemu/timer.h > @@ -4,6 +4,7 @@ > #include "qemu/bitops.h" > #include "qemu/notify.h" > #include "qemu/host-utils.h" > +#include "qemu/mem-reentrancy.h" > > #define NANOSECONDS_PER_SECOND 1000000000LL > #define MICROSECONDS_PER_SECOND 1000000LL > @@ -88,6 +89,7 @@ struct QEMUTimer { > QEMUTimerCB *cb; > void *opaque; > QEMUTimer *next; > + MemReentrancyGuard *reentrancy_guard; > int attributes; > int scale; > }; > diff --git a/util/qemu-timer.c b/util/qemu-timer.c > index f7920130854..6658e5e623d 100644 > --- a/util/qemu-timer.c > +++ b/util/qemu-timer.c > @@ -31,6 +31,7 @@ > #include "system/replay.h" > #include "system/cpus.h" > #include "hw/core/cpu.h" > +#include "trace.h" > > #ifdef CONFIG_POSIX > #include > @@ -362,6 +363,7 @@ void timer_init_full(QEMUTimer *ts, > ts->scale = scale; > ts->attributes = attributes; > ts->expire_time = -1; > + ts->reentrancy_guard = NULL; > } > > void timer_deinit(QEMUTimer *ts) > @@ -388,11 +390,33 @@ static void timer_del_locked(QEMUTimerList *timer_list, QEMUTimer *ts) > } > } > > +static void timer_run_callback(QEMUTimerCB *cb, void *opaque, > + MemReentrancyGuard *reentrancy_guard) Would it make sense to pass one single "QEMUTimer *" as parameter to this function instead of the three parameters? I think all callers should have the "QEMUTimer *", so IMHO this would be nicer. Anyway, either way: Reviewed-by: Thomas Huth > +{ > + /* Run the timer cb, optionally with a reentrancy guard engaged. */ > + bool last_engaged_in_io = false; > + > + if (reentrancy_guard) { > + last_engaged_in_io = reentrancy_guard->engaged_in_io; > + if (last_engaged_in_io) { > + trace_reentrant_timer(cb, opaque); > + } > + > + reentrancy_guard->engaged_in_io = true; > + } > + > + cb(opaque); > + > + if (reentrancy_guard) { > + reentrancy_guard->engaged_in_io = last_engaged_in_io; > + } > +} > + > static void timer_fire(CPUState *cpu, run_on_cpu_data data) > { > QEMUTimer *t = data.host_ptr; > > - t->cb(t->opaque); > + timer_run_callback(t->cb, t->opaque, t->reentrancy_guard); > } > > static bool timer_mod_ns_locked(QEMUTimerList *timer_list, > @@ -571,6 +595,8 @@ static bool timerlist_run_timers(QEMUTimerList *timer_list) > current_time = qemu_clock_get_ns(timer_list->clock->type); > qemu_mutex_lock(&timer_list->active_timers_lock); > while ((ts = timer_list->active_timers)) { > + MemReentrancyGuard *reentrancy_guard; > + > if (!timer_expired_ns(ts, current_time)) { > /* No expired timers left. The checkpoint can be skipped > * if no timers fired or they were all external. > @@ -595,10 +621,11 @@ static bool timerlist_run_timers(QEMUTimerList *timer_list) > ts->expire_time = -1; > cb = ts->cb; > opaque = ts->opaque; > + reentrancy_guard = ts->reentrancy_guard; > > /* run the callback (the timer list can be modified) */ > qemu_mutex_unlock(&timer_list->active_timers_lock); > - cb(opaque); > + timer_run_callback(cb, opaque, reentrancy_guard); > qemu_mutex_lock(&timer_list->active_timers_lock); > > progress = true; > diff --git a/util/trace-events b/util/trace-events > index df549646d12..45763bca80f 100644 > --- a/util/trace-events > +++ b/util/trace-events > @@ -85,6 +85,9 @@ qemu_mutex_lock(void *mutex, const char *file, const int line) "waiting on mutex > qemu_mutex_locked(void *mutex, const char *file, const int line) "taken mutex %p (%s:%d)" > qemu_mutex_unlock(void *mutex, const char *file, const int line) "released mutex %p (%s:%d)" > > +# qemu-timer.c > +reentrant_timer(void *cb, void *opaque) "timer callback %p opaque %p" > + > # vfio-helpers.c > qemu_vfio_dma_reset_temporary(void *s) "s %p" > qemu_vfio_ram_block_added(void *s, void *p, size_t size) "s %p host %p size 0x%zx"