From nobody Wed Nov 19 20:17:15 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1702395599; cv=none; d=zohomail.com; s=zohoarc; b=h2elUer0fKCPz7AU2wfQDtu23Eu3CgVgO0kvuw4L92V+knYD47E9r1lMb59W4OJNeKyTs0R8ZPeIVbJuC99hSY31BW/Nwi5Ag+4qlXaKYbjcflAIYDmcvUUG2G6D8R6Kvwajpij9gepcJtPLij+PZ4zzrHK2zRKzFOKlyfSpTlQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1702395599; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=YZijt9too/Os6Kph/L4KCjWYRbE74f+5vQOKqgCYPU8=; b=JqE9psPqwI4HSZcwDzQMK4o04yv6HX7F9RaPlqg254MckHvDb0s29HcR1pInnE0y81PG6qj0UnNg+2uH62pt0F24Dl0De7MeGL1AqoXrVEkt7PGQcvZoajiitodzHLdKArD2Rboa9RXej9iMnTqd5lTksMSZ/j5GkSfz5aMSiPk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1702395599177496.87588525552724; Tue, 12 Dec 2023 07:39:59 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.653212.1019635 (Exim 4.92) (envelope-from ) id 1rD4rA-0004Vn-B4; Tue, 12 Dec 2023 15:39:36 +0000 Received: by outflank-mailman (output) from mailman id 653212.1019635; Tue, 12 Dec 2023 15:39:36 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rD4rA-0004VW-6X; Tue, 12 Dec 2023 15:39:36 +0000 Received: by outflank-mailman (input) for mailman id 653212; Tue, 12 Dec 2023 15:39:34 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rD4r8-0004S0-B6 for xen-devel@lists.xenproject.org; Tue, 12 Dec 2023 15:39:34 +0000 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id a4b19ae2-9904-11ee-98e8-6d05b1d4d9a1; Tue, 12 Dec 2023 16:39:32 +0100 (CET) Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-25-IhktvNooNpqmxnIbCz8xBA-1; Tue, 12 Dec 2023 10:39:25 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4B0911C0BA4F; Tue, 12 Dec 2023 15:39:23 +0000 (UTC) Received: from localhost (unknown [10.39.193.220]) by smtp.corp.redhat.com (Postfix) with ESMTP id D15FC1121306; Tue, 12 Dec 2023 15:39:21 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: a4b19ae2-9904-11ee-98e8-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702395571; 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; bh=YZijt9too/Os6Kph/L4KCjWYRbE74f+5vQOKqgCYPU8=; b=cAa8KMvJD1gf8kjPDs9iqMd0CdH+z94P3e+IQ+QMziL4A8mAXk//VB0rbXX7urZFgPoHdE 0PDeBhc4xaw78AejNc/IA/02xy7Zks6zxfcGSNXWhWute4jBz/fTinVwN66z1GE81EO0QN zJ5DiJOGDNus8ZuLIp6FpsifdIp+xtQ= X-MC-Unique: IhktvNooNpqmxnIbCz8xBA-1 From: Stefan Hajnoczi To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Marcel Apfelbaum , Akihiko Odaki , Artyom Tarasenko , Paul Durrant , Daniel Henrique Barboza , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , BALATON Zoltan , Jagannathan Raman , Anthony Perard , Nicholas Piggin , David Gibson , Stefan Hajnoczi , Aleksandar Rikalo , Alexander Graf , Hailiang Zhang , Marcelo Tosatti , Jiaxun Yang , Huacai Chen , Harsh Prateek Bora , Ilya Leoshkevich , Peter Xu , Hyman Huang , Fam Zheng , Song Gao , Alistair Francis , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Stefano Stabellini , David Woodhouse , Christian Borntraeger , Palmer Dabbelt , Aurelien Jarno , Leonardo Bras , Jiri Slaby , Eric Farman , Thomas Huth , Richard Henderson , David Hildenbrand , Michael Roth , Elena Ufimtseva , Gerd Hoffmann , Cameron Esfahani , qemu-ppc@nongnu.org, John Snow , Mark Cave-Ayland , Weiwei Li , Hanna Reitz , qemu-s390x@nongnu.org, qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , kvm@vger.kernel.org, "Michael S. Tsirkin" , Pavel Dovgalyuk , Vladimir Sementsov-Ogievskiy , Andrey Smirnov , Reinoud Zandijk , Kevin Wolf , Bin Meng , Sunil Muthuswamy , Peter Maydell , qemu-riscv@nongnu.org, Liu Zhiwei , Stafford Horne , Fabiano Rosas , Juan Quintela , Markus Armbruster , qemu-arm@nongnu.org, Jason Wang , Eduardo Habkost , Max Filippov , Jean-Christophe Dubois , Eric Blake , Roman Bolshakov , Halil Pasic , xen-devel@lists.xenproject.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 4/5] Replace "iothread lock" with "BQL" in comments Date: Tue, 12 Dec 2023 10:39:03 -0500 Message-ID: <20231212153905.631119-5-stefanha@redhat.com> In-Reply-To: <20231212153905.631119-1-stefanha@redhat.com> References: <20231212153905.631119-1-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1702395599645100003 The term "iothread lock" is obsolete. The APIs use Big QEMU Lock (BQL) in their names. Update the code comments to use "BQL" instead of "iothread lock". Signed-off-by: Stefan Hajnoczi Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- docs/devel/reset.rst | 2 +- hw/display/qxl.h | 2 +- include/exec/cpu-common.h | 2 +- include/exec/memory.h | 4 ++-- include/exec/ramblock.h | 2 +- include/migration/register.h | 8 ++++---- target/arm/internals.h | 4 ++-- accel/tcg/cputlb.c | 4 ++-- accel/tcg/tcg-accel-ops-icount.c | 2 +- hw/remote/mpqemu-link.c | 2 +- migration/block-dirty-bitmap.c | 10 +++++----- migration/block.c | 24 ++++++++++++------------ migration/colo.c | 2 +- migration/migration.c | 2 +- migration/ram.c | 4 ++-- system/physmem.c | 6 +++--- target/arm/helper.c | 2 +- ui/spice-core.c | 2 +- util/rcu.c | 2 +- audio/coreaudio.m | 4 ++-- ui/cocoa.m | 6 +++--- 21 files changed, 48 insertions(+), 48 deletions(-) diff --git a/docs/devel/reset.rst b/docs/devel/reset.rst index 38ed1790f7..d4e79718ba 100644 --- a/docs/devel/reset.rst +++ b/docs/devel/reset.rst @@ -19,7 +19,7 @@ Triggering reset =20 This section documents the APIs which "users" of a resettable object shoul= d use to control it. All resettable control functions must be called while holdi= ng -the iothread lock. +the BQL. =20 You can apply a reset to an object using ``resettable_assert_reset()``. Yo= u need to call ``resettable_release_reset()`` to release the object from reset. To diff --git a/hw/display/qxl.h b/hw/display/qxl.h index fdac14edad..e0a85a5ca4 100644 --- a/hw/display/qxl.h +++ b/hw/display/qxl.h @@ -159,7 +159,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(PCIQXLDevice, PCI_QXL) * * Use with care; by the time this function returns, the returned pointer = is * not protected by RCU anymore. If the caller is not within an RCU criti= cal - * section and does not hold the iothread lock, it must have other means of + * section and does not hold the BQL, it must have other means of * protecting the pointer, such as a reference to the region that includes * the incoming ram_addr_t. * diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 41115d8919..fef3138d29 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -92,7 +92,7 @@ RAMBlock *qemu_ram_block_by_name(const char *name); * * By the time this function returns, the returned pointer is not protected * by RCU anymore. If the caller is not within an RCU critical section and - * does not hold the iothread lock, it must have other means of protecting= the + * does not hold the BQL, it must have other means of protecting the * pointer, such as a reference to the memory region that owns the RAMBloc= k. */ RAMBlock *qemu_ram_block_from_host(void *ptr, bool round_offset, diff --git a/include/exec/memory.h b/include/exec/memory.h index 831f7c996d..ad6466b07e 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -1962,7 +1962,7 @@ int memory_region_get_fd(MemoryRegion *mr); * * Use with care; by the time this function returns, the returned pointer = is * not protected by RCU anymore. If the caller is not within an RCU criti= cal - * section and does not hold the iothread lock, it must have other means of + * section and does not hold the BQL, it must have other means of * protecting the pointer, such as a reference to the region that includes * the incoming ram_addr_t. * @@ -1979,7 +1979,7 @@ MemoryRegion *memory_region_from_host(void *ptr, ram_= addr_t *offset); * * Use with care; by the time this function returns, the returned pointer = is * not protected by RCU anymore. If the caller is not within an RCU criti= cal - * section and does not hold the iothread lock, it must have other means of + * section and does not hold the BQL, it must have other means of * protecting the pointer, such as a reference to the region that includes * the incoming ram_addr_t. * diff --git a/include/exec/ramblock.h b/include/exec/ramblock.h index 69c6a53902..3eb79723c6 100644 --- a/include/exec/ramblock.h +++ b/include/exec/ramblock.h @@ -34,7 +34,7 @@ struct RAMBlock { ram_addr_t max_length; void (*resized)(const char*, uint64_t length, void *host); uint32_t flags; - /* Protected by iothread lock. */ + /* Protected by the BQL. */ char idstr[256]; /* RCU-enabled, writes protected by the ramlist lock */ QLIST_ENTRY(RAMBlock) next; diff --git a/include/migration/register.h b/include/migration/register.h index fed1d04a3c..9ab1f79512 100644 --- a/include/migration/register.h +++ b/include/migration/register.h @@ -17,7 +17,7 @@ #include "hw/vmstate-if.h" =20 typedef struct SaveVMHandlers { - /* This runs inside the iothread lock. */ + /* This runs inside the BQL. */ SaveStateHandler *save_state; =20 /* @@ -30,7 +30,7 @@ typedef struct SaveVMHandlers { int (*save_live_complete_postcopy)(QEMUFile *f, void *opaque); int (*save_live_complete_precopy)(QEMUFile *f, void *opaque); =20 - /* This runs both outside and inside the iothread lock. */ + /* This runs both outside and inside the BQL. */ bool (*is_active)(void *opaque); bool (*has_postcopy)(void *opaque); =20 @@ -43,14 +43,14 @@ typedef struct SaveVMHandlers { */ bool (*is_active_iterate)(void *opaque); =20 - /* This runs outside the iothread lock in the migration case, and + /* This runs outside the BQL in the migration case, and * within the lock in the savevm case. The callback had better only * use data that is local to the migration thread or protected * by other locks. */ int (*save_live_iterate)(QEMUFile *f, void *opaque); =20 - /* This runs outside the iothread lock! */ + /* This runs outside the BQL! */ /* Note for save_live_pending: * must_precopy: * - must be migrated in precopy or in stopped state diff --git a/target/arm/internals.h b/target/arm/internals.h index 143d57c0fe..71d6c70bf3 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -940,7 +940,7 @@ static inline const char *aarch32_mode_name(uint32_t ps= r) * * Update the CPU_INTERRUPT_VIRQ bit in cs->interrupt_request, following * a change to either the input VIRQ line from the GIC or the HCR_EL2.VI b= it. - * Must be called with the iothread lock held. + * Must be called with the BQL held. */ void arm_cpu_update_virq(ARMCPU *cpu); =20 @@ -949,7 +949,7 @@ void arm_cpu_update_virq(ARMCPU *cpu); * * Update the CPU_INTERRUPT_VFIQ bit in cs->interrupt_request, following * a change to either the input VFIQ line from the GIC or the HCR_EL2.VF b= it. - * Must be called with the iothread lock held. + * Must be called with the BQL held. */ void arm_cpu_update_vfiq(ARMCPU *cpu); =20 diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 5698a9fd8e..3facfcbb24 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -1975,7 +1975,7 @@ static void *atomic_mmu_lookup(CPUState *cpu, vaddr a= ddr, MemOpIdx oi, * @size: number of bytes * @mmu_idx: virtual address context * @ra: return address into tcg generated code, or 0 - * Context: iothread lock held + * Context: BQL held * * Load @size bytes from @addr, which is memory-mapped i/o. * The bytes are concatenated in big-endian order with @ret_be. @@ -2521,7 +2521,7 @@ static Int128 do_ld16_mmu(CPUState *cpu, vaddr addr, * @size: number of bytes * @mmu_idx: virtual address context * @ra: return address into tcg generated code, or 0 - * Context: iothread lock held + * Context: BQL held * * Store @size bytes at @addr, which is memory-mapped i/o. * The bytes to store are extracted in little-endian order from @val_le; diff --git a/accel/tcg/tcg-accel-ops-icount.c b/accel/tcg/tcg-accel-ops-ico= unt.c index 5824d92580..9e1ae66f65 100644 --- a/accel/tcg/tcg-accel-ops-icount.c +++ b/accel/tcg/tcg-accel-ops-icount.c @@ -123,7 +123,7 @@ void icount_prepare_for_run(CPUState *cpu, int64_t cpu_= budget) =20 if (cpu->icount_budget =3D=3D 0) { /* - * We're called without the iothread lock, so must take it while + * We're called without the BQL, so must take it while * we're calling timer handlers. */ bql_lock(); diff --git a/hw/remote/mpqemu-link.c b/hw/remote/mpqemu-link.c index d04ac93621..4394dc4d82 100644 --- a/hw/remote/mpqemu-link.c +++ b/hw/remote/mpqemu-link.c @@ -58,7 +58,7 @@ bool mpqemu_msg_send(MPQemuMsg *msg, QIOChannel *ioc, Err= or **errp) assert(qemu_in_coroutine() || !iothread); =20 /* - * Skip unlocking/locking iothread lock when the IOThread is running + * Skip unlocking/locking BQL when the IOThread is running * in co-routine context. Co-routine context is asserted above * for IOThread case. * Also skip lock handling while in a co-routine in the main context. diff --git a/migration/block-dirty-bitmap.c b/migration/block-dirty-bitmap.c index 92e031b6fa..2708abf3d7 100644 --- a/migration/block-dirty-bitmap.c +++ b/migration/block-dirty-bitmap.c @@ -464,7 +464,7 @@ static void send_bitmap_bits(QEMUFile *f, DBMSaveState = *s, g_free(buf); } =20 -/* Called with iothread lock taken. */ +/* Called with the BQL taken. */ static void dirty_bitmap_do_save_cleanup(DBMSaveState *s) { SaveBitmapState *dbms; @@ -479,7 +479,7 @@ static void dirty_bitmap_do_save_cleanup(DBMSaveState *= s) } } =20 -/* Called with iothread lock taken. */ +/* Called with the BQL taken. */ static int add_bitmaps_to_list(DBMSaveState *s, BlockDriverState *bs, const char *bs_name, GHashTable *alias_map) { @@ -598,7 +598,7 @@ static int add_bitmaps_to_list(DBMSaveState *s, BlockDr= iverState *bs, return 0; } =20 -/* Called with iothread lock taken. */ +/* Called with the BQL taken. */ static int init_dirty_bitmap_migration(DBMSaveState *s) { BlockDriverState *bs; @@ -607,7 +607,7 @@ static int init_dirty_bitmap_migration(DBMSaveState *s) BlockBackend *blk; GHashTable *alias_map =3D NULL; =20 - /* Runs in the migration thread, but holds the iothread lock */ + /* Runs in the migration thread, but holds the BQL */ GLOBAL_STATE_CODE(); GRAPH_RDLOCK_GUARD_MAINLOOP(); =20 @@ -742,7 +742,7 @@ static int dirty_bitmap_save_iterate(QEMUFile *f, void = *opaque) return s->bulk_completed; } =20 -/* Called with iothread lock taken. */ +/* Called with the BQL taken. */ =20 static int dirty_bitmap_save_complete(QEMUFile *f, void *opaque) { diff --git a/migration/block.c b/migration/block.c index 4a675b92bc..61d4daf022 100644 --- a/migration/block.c +++ b/migration/block.c @@ -66,7 +66,7 @@ typedef struct BlkMigDevState { /* Protected by block migration lock. */ int64_t completed_sectors; =20 - /* During migration this is protected by iothread lock / AioContext. + /* During migration this is protected by BQL / AioContext. * Allocation and free happen during setup and cleanup respectively. */ BdrvDirtyBitmap *dirty_bitmap; @@ -101,7 +101,7 @@ typedef struct BlkMigState { int prev_progress; int bulk_completed; =20 - /* Lock must be taken _inside_ the iothread lock and any AioContexts. = */ + /* Lock must be taken _inside_ the BQL and any AioContexts. */ QemuMutex lock; } BlkMigState; =20 @@ -117,7 +117,7 @@ static void blk_mig_unlock(void) qemu_mutex_unlock(&block_mig_state.lock); } =20 -/* Must run outside of the iothread lock during the bulk phase, +/* Must run outside of the BQL during the bulk phase, * or the VM will stall. */ =20 @@ -334,7 +334,7 @@ static int mig_save_device_bulk(QEMUFile *f, BlkMigDevS= tate *bmds) return (bmds->cur_sector >=3D total_sectors); } =20 -/* Called with iothread lock taken. */ +/* Called with the BQL taken. */ =20 static int set_dirty_tracking(void) { @@ -361,7 +361,7 @@ fail: return ret; } =20 -/* Called with iothread lock taken. */ +/* Called with the BQL taken. */ =20 static void unset_dirty_tracking(void) { @@ -512,7 +512,7 @@ static void blk_mig_reset_dirty_cursor(void) } } =20 -/* Called with iothread lock and AioContext taken. */ +/* Called with the BQL and AioContext taken. */ =20 static int mig_save_device_dirty(QEMUFile *f, BlkMigDevState *bmds, int is_async) @@ -594,7 +594,7 @@ error: return ret; } =20 -/* Called with iothread lock taken. +/* Called with the BQL taken. * * return value: * 0: too much data for max_downtime @@ -658,7 +658,7 @@ static int flush_blks(QEMUFile *f) return ret; } =20 -/* Called with iothread lock taken. */ +/* Called with the BQL taken. */ =20 static int64_t get_remaining_dirty(void) { @@ -676,7 +676,7 @@ static int64_t get_remaining_dirty(void) =20 =20 =20 -/* Called with iothread lock taken. */ +/* Called with the BQL taken. */ static void block_migration_cleanup_bmds(void) { BlkMigDevState *bmds; @@ -706,7 +706,7 @@ static void block_migration_cleanup_bmds(void) } } =20 -/* Called with iothread lock taken. */ +/* Called with the BQL taken. */ static void block_migration_cleanup(void *opaque) { BlkMigBlock *blk; @@ -783,7 +783,7 @@ static int block_save_iterate(QEMUFile *f, void *opaque) } ret =3D 0; } else { - /* Always called with iothread lock taken for + /* Always called with the BQL taken for * simplicity, block_save_complete also calls it. */ bql_lock(); @@ -811,7 +811,7 @@ static int block_save_iterate(QEMUFile *f, void *opaque) return (delta_bytes > 0); } =20 -/* Called with iothread lock taken. */ +/* Called with the BQL taken. */ =20 static int block_save_complete(QEMUFile *f, void *opaque) { diff --git a/migration/colo.c b/migration/colo.c index 2a74efdd77..315e31fe32 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -945,7 +945,7 @@ int coroutine_fn colo_incoming_co(void) qemu_thread_join(&th); bql_lock(); =20 - /* We hold the global iothread lock, so it is safe here */ + /* We hold the global BQL, so it is safe here */ colo_release_ram_cache(); =20 return 0; diff --git a/migration/migration.c b/migration/migration.c index be74c714d6..fb0a1a766f 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -2567,7 +2567,7 @@ fail: =20 /** * migration_maybe_pause: Pause if required to by - * migrate_pause_before_switchover called with the iothread locked + * migrate_pause_before_switchover called with the BQL locked * Returns: 0 on success */ static int migration_maybe_pause(MigrationState *s, diff --git a/migration/ram.c b/migration/ram.c index 08dc7e2909..890f31cf66 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -2395,7 +2395,7 @@ static void ram_save_cleanup(void *opaque) =20 /* We don't use dirty log with background snapshots */ if (!migrate_background_snapshot()) { - /* caller have hold iothread lock or is in a bh, so there is + /* caller have hold BQL or is in a bh, so there is * no writing race against the migration bitmap */ if (global_dirty_tracking & GLOBAL_DIRTY_MIGRATION) { @@ -3131,7 +3131,7 @@ out: * * Returns zero to indicate success or negative on error * - * Called with iothread lock + * Called with the BQL * * @f: QEMUFile where to send the data * @opaque: RAMState pointer diff --git a/system/physmem.c b/system/physmem.c index 4937e67bad..cc68a79763 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -799,7 +799,7 @@ static RAMBlock *qemu_get_ram_block(ram_addr_t addr) abort(); =20 found: - /* It is safe to write mru_block outside the iothread lock. This + /* It is safe to write mru_block outside the BQL. This * is what happens: * * mru_block =3D xxx @@ -1597,7 +1597,7 @@ int qemu_ram_get_fd(RAMBlock *rb) return rb->fd; } =20 -/* Called with iothread lock held. */ +/* Called with the BQL held. */ void qemu_ram_set_idstr(RAMBlock *new_block, const char *name, DeviceState= *dev) { RAMBlock *block; @@ -1625,7 +1625,7 @@ void qemu_ram_set_idstr(RAMBlock *new_block, const ch= ar *name, DeviceState *dev) } } =20 -/* Called with iothread lock held. */ +/* Called with the BQL held. */ void qemu_ram_unset_idstr(RAMBlock *block) { /* FIXME: arch_init.c assumes that this is not called throughout diff --git a/target/arm/helper.c b/target/arm/helper.c index 4a978d1102..16ec643337 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -5824,7 +5824,7 @@ static void do_hcr_write(CPUARMState *env, uint64_t v= alue, uint64_t valid_mask) * Updates to VI and VF require us to update the status of * virtual interrupts, which are the logical OR of these bits * and the state of the input lines from the GIC. (This requires - * that we have the iothread lock, which is done by marking the + * that we have the BQL, which is done by marking the * reginfo structs as ARM_CP_IO.) * Note that if a write to HCR pends a VIRQ or VFIQ it is never * possible for it to be taken immediately, because VIRQ and diff --git a/ui/spice-core.c b/ui/spice-core.c index b6ee495a8f..37b277fd09 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -217,7 +217,7 @@ static void channel_event(int event, SpiceChannelEventI= nfo *info) * not do that. It isn't that easy to fix it in spice and even * when it is fixed we still should cover the already released * spice versions. So detect that we've been called from another - * thread and grab the iothread lock if so before calling qemu + * thread and grab the BQL if so before calling qemu * functions. */ bool need_lock =3D !qemu_thread_is_self(&me); diff --git a/util/rcu.c b/util/rcu.c index bb7f633b5c..fa32c942e4 100644 --- a/util/rcu.c +++ b/util/rcu.c @@ -409,7 +409,7 @@ static void rcu_init_complete(void) =20 qemu_event_init(&rcu_call_ready_event, false); =20 - /* The caller is assumed to have iothread lock, so the call_rcu thread + /* The caller is assumed to have BQL, so the call_rcu thread * must have been quiescent even after forking, just recreate it. */ qemu_thread_create(&thread, "call_rcu", call_rcu_thread, diff --git a/audio/coreaudio.m b/audio/coreaudio.m index 9d2db9883c..ab632b9bbb 100644 --- a/audio/coreaudio.m +++ b/audio/coreaudio.m @@ -299,7 +299,7 @@ static ret_type glue(coreaudio_, name)args_decl = \ #undef COREAUDIO_WRAPPER_FUNC =20 /* - * callback to feed audiooutput buffer. called without iothread lock. + * callback to feed audiooutput buffer. called without BQL. * allowed to lock "buf_mutex", but disallowed to have any other locks. */ static OSStatus audioDeviceIOProc( @@ -538,7 +538,7 @@ static void update_device_playback_state(coreaudioVoice= Out *core) } } =20 -/* called without iothread lock. */ +/* called without BQL. */ static OSStatus handle_voice_change( AudioObjectID in_object_id, UInt32 in_number_addresses, diff --git a/ui/cocoa.m b/ui/cocoa.m index 5ebb535070..eb99064bee 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -113,7 +113,7 @@ static void cocoa_switch(DisplayChangeListener *dcl, static QemuClipboardInfo *cbinfo; static QemuEvent cbevent; =20 -// Utility functions to run specified code block with iothread lock held +// Utility functions to run specified code block with the BQL held typedef void (^CodeBlock)(void); typedef bool (^BoolCodeBlock)(void); =20 @@ -548,7 +548,7 @@ - (void) setContentDimensions =20 - (void) updateUIInfoLocked { - /* Must be called with the iothread lock, i.e. via updateUIInfo */ + /* Must be called with the BQL, i.e. via updateUIInfo */ NSSize frameSize; QemuUIInfo info; =20 @@ -2075,7 +2075,7 @@ static void cocoa_display_init(DisplayState *ds, Disp= layOptions *opts) * Create the menu entries which depend on QEMU state (for consoles * and removable devices). These make calls back into QEMU functions, * which is OK because at this point we know that the second thread - * holds the iothread lock and is synchronously waiting for us to + * holds the BQL and is synchronously waiting for us to * finish. */ add_console_menu_entries(); --=20 2.43.0