From nobody Sun Dec 14 05:56:40 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1764787960; cv=none; d=zohomail.com; s=zohoarc; b=kqThEm/dhm/220s6U+b+usaln0Z0mX1BHqVi3cOsVeBRxpzIolQ8IlQrX/vvYDAR7PqcC0+FZzVXdK8f6ncnv3quoM7B9UZKG8rlQzs4fYp4gQlayWfGMmQYeE0iARJzgbG2pmq4v8zNuqUz2krC25Q6aMwWeZR2IVEttdJwcjI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1764787960; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=cXebI6NrLoDz4RV0wSCSw2yTB6kyWf9EWw7Kp6QRaIY=; b=Nytnty1/+EZL97a4/dGSbslKoBJ1Wxm8UDUhUOQL/Pr1YH51q2qoYeorLtTT0ct0U/ZdZkEnxSiwCdJvITD3JLcH2l7kppATM34us/1n9sIcYAhTHZjYswZOBrbTOT/dvXMno3EegoaOV7aPwvJ8wKVaaeJr9GAXTY5oQ3KB/a0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1764787960422575.1474901991213; Wed, 3 Dec 2025 10:52:40 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vQrx2-0007Xo-St; Wed, 03 Dec 2025 13:51:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vQrx1-0007XR-Sp for qemu-devel@nongnu.org; Wed, 03 Dec 2025 13:51:43 -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 1vQrx0-00011s-Dg for qemu-devel@nongnu.org; Wed, 03 Dec 2025 13:51:43 -0500 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-140-Zyk0TPxwM_ybnCxj9CCmEA-1; Wed, 03 Dec 2025 13:51:40 -0500 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4775d110fabso558925e9.1 for ; Wed, 03 Dec 2025 10:51:40 -0800 (PST) Received: from [192.168.10.48] ([176.206.119.13]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42e1c5c3016sm40403411f8f.1.2025.12.03.10.51.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Dec 2025 10:51:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1764787901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cXebI6NrLoDz4RV0wSCSw2yTB6kyWf9EWw7Kp6QRaIY=; b=bcoA+net0SX+E7o+2eNPDT9tOiqS8FYvbWlTyyzuOQj6bWyez/sQQT8ZPa8sgT0wzTpc/k 3xuGkDZVRL/wHpQ+ZBA6zkf3nvn8IzqKPedH5xKqDhR2w+NrCCILRo+8nFrDYP3xVMljxW LV6JOLYv7fOuBupx7YV477/DLxVcrnY= X-MC-Unique: Zyk0TPxwM_ybnCxj9CCmEA-1 X-Mimecast-MFC-AGG-ID: Zyk0TPxwM_ybnCxj9CCmEA_1764787899 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1764787898; x=1765392698; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cXebI6NrLoDz4RV0wSCSw2yTB6kyWf9EWw7Kp6QRaIY=; b=TDkQPvx0HMoTRxgr3W8PqxTCS2Q5qDrpKfCLaTIB24oLaWBoVljHY7w69kNF+Lzrk8 eRLvzrqQFXSf0UBwez3dabjnMT3I3GWUad/mTscAJVIzpGXP5HLzDtNiXjQNSRlJNvmn 2DAVlM+nvUBLC0QpNJQrPwfcnk0czaS9SZY4//kN+WLT5OJVbsgMZHBStdzeIrBsdQGY Nj0WttyLcAVy8hIISpnyjuv7yEc0ZmjgMnnqCCJXlT58iHXWtDPOT90XOkgR6MMRRumD P6jocHemyVNaE+Z/LiicdPhYfDgS46d6DOHvjLatxuCROz1kRL3rekHKfctWnVfFh+82 aGkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764787898; x=1765392698; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=cXebI6NrLoDz4RV0wSCSw2yTB6kyWf9EWw7Kp6QRaIY=; b=nnqYPX+bMZSoxRur8ft9+82M7yRPMd1oYJff9ZssWcIGHRpSuPoq55aJVCuH471dsq CJsrvJ/TeD/i3bbA7kD0i21vBUZBqRzc0zZ44GttB4MnQT0M0iOg2Ucc7FgxOb1g1LOa 2Gsev6eBOw9KHCqdO7IEw1Nbc0SnBXIRw83ZyxRLFYq7UH5LUi1yR+GbfrkJrFwAq4S+ yOfjT9Rpyod7C9g2qwB8fWIBkKmLkive3cvmNu10afOyYH8sAdTcUzurmWCik5K9/wVj 7qNTJFO7JBDF0uZNDm8xJAat91E/mMV6Ycl5NeRG+YEliO2UKxpMP/ggzhKSZ/JK+f8O jpEg== X-Gm-Message-State: AOJu0YwERUkE9cp6D3+7fPztJYhvdI2riYhqEHFVtu4TfyhM0/RUchiI fyrRTc0XrmqzqXpJPFHGbb+kVJkrkcOLCa78qA+vGN/HEHD84xzym0dqUVlR6RPiysV8B9eK1IJ 5g1z81QvL4IXEvzPKbOcEPCZmOzc3ZBUfD0SxoGcpHhxM+RGP+JNifg6iQHuGca2q4nDaOVMVcJ SP53hl/Y1ZJwPAj7VK2LVXWB2A6YJv47yMoHymB0+R X-Gm-Gg: ASbGncss6XDqsaw7qJGSCik1u0jTlyuGe7nZZPb7ny0OQBDwX0L3F56ehsdnEPLutpy ihVo9fsVcym8Iq51Ql3NqrhmSb6OcSUu4pYK0PPByqeZSXPnF1WD3zk44OhFV53PDiVwCY2GMVV VRskbtbZac0CzGrKuerCcjrflR2DSvm9My0q0xQ9joWxSKepexH9ATFh3nQDiFMxZknJVUi+BOn LhZQ48v6Jv2iWbhfdDcS9fDsVMljvL57U92JyMAN3V4jGpWWyI6p8c4uYuIZ4fqzzRdzUXLKIhp Oc/yLuyNirhcYmECsLMmW5bXnF1yEdZp1TcH3VFSF9msXdYqaI94aOY9kOip06PnuM5jbNnvvKr t1FtltlwcPGkFatdX3mEYFjA4SVB1NQAC7ljyGLVRs3LvSzUlwH8yA0p6x0PC99kSW09/vkwawH CGlQSYlG/YWhPeX9A= X-Received: by 2002:a05:600c:1f8e:b0:477:8985:4036 with SMTP id 5b1f17b1804b1-4792f23c727mr1729045e9.1.1764787898449; Wed, 03 Dec 2025 10:51:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IFe54FHEkEyp3HQgbdF1ffHa/PvsyBnrdOiVzgbhK/wjfNO0B5rJ1dCrcQMg2XyF/IpvpudCg== X-Received: by 2002:a05:600c:1f8e:b0:477:8985:4036 with SMTP id 5b1f17b1804b1-4792f23c727mr1728725e9.1.1764787898018; Wed, 03 Dec 2025 10:51:38 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, kwolf@redhat.omc Subject: [PATCH 1/5] hw: add missing includes hidden by block/aio.h Date: Wed, 3 Dec 2025 19:51:29 +0100 Message-ID: <20251203185133.2458207-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251203185133.2458207-1-pbonzini@redhat.com> References: <20251203185133.2458207-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1764787962055019200 Content-Type: text/plain; charset="utf-8" hw/qdev/core.h being included by core headers means that it was quite easy to forget including it, or anything that hw/qdev/core.h included. Add the missing inclusions. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/char/serial.h | 1 + hw/virtio/iothread-vq-mapping.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/hw/char/serial.h b/include/hw/char/serial.h index b804e225886..ea82ffac476 100644 --- a/include/hw/char/serial.h +++ b/include/hw/char/serial.h @@ -26,6 +26,7 @@ #ifndef HW_SERIAL_H #define HW_SERIAL_H =20 +#include "hw/core/qdev.h" #include "chardev/char-fe.h" #include "system/memory.h" #include "qemu/fifo8.h" diff --git a/hw/virtio/iothread-vq-mapping.c b/hw/virtio/iothread-vq-mappin= g.c index 15909eb9332..55ce62986c7 100644 --- a/hw/virtio/iothread-vq-mapping.c +++ b/hw/virtio/iothread-vq-mapping.c @@ -8,6 +8,7 @@ =20 #include "qemu/osdep.h" #include "system/iothread.h" +#include "qemu/bitmap.h" #include "hw/virtio/iothread-vq-mapping.h" =20 static bool --=20 2.52.0 From nobody Sun Dec 14 05:56:40 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1764788009; cv=none; d=zohomail.com; s=zohoarc; b=mBl/zH90tAi3yOqzKGhZSZ8xOWatiNnmMNo0wD6Ynf0xrOY1tPK2v+j/74jft+5sDMCit6zL/xvWsmhG3OCALKLoJUIDOQGm+rvJqrrUMxcfZyArWTmBqI90eI14hUMf/g8ANaG7JxwHx9dkmZbUdtA4rhMEXSYSxii2s8FU6TY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1764788009; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=aHNzjllbBUzUbH3e9EozX0+yCDvl12oO5bAZL6BQpCU=; b=R1jQRS4Uh/WCt7Dgai3XLYHNaNq4SXRDdbsLVjYcX1syzlLsJotDiPQcxw/uAB3ekf0QrxFnVgMz8MQLjd/wqtji1oP1qUiDAo7CVL916i7oRVoJ9HJciOMyqsC7FUAkxjOg+PlEJj6U954V5yeT2Ab2sTago2zTB16kdq7D5HM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1764788009900952.4106138614059; Wed, 3 Dec 2025 10:53:29 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vQrx7-0007Zc-HI; Wed, 03 Dec 2025 13:51:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vQrx5-0007Yp-OC for qemu-devel@nongnu.org; Wed, 03 Dec 2025 13:51:47 -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 1vQrx3-00012E-Rb for qemu-devel@nongnu.org; Wed, 03 Dec 2025 13:51:47 -0500 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-596-y4q31VbYPdSl7f2IdOM6og-1; Wed, 03 Dec 2025 13:51:43 -0500 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-47775585257so556295e9.1 for ; Wed, 03 Dec 2025 10:51:42 -0800 (PST) Received: from [192.168.10.48] ([176.206.119.13]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4792a8ccdfbsm66579645e9.14.2025.12.03.10.51.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Dec 2025 10:51:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1764787904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aHNzjllbBUzUbH3e9EozX0+yCDvl12oO5bAZL6BQpCU=; b=fw0FZbZrg1fNRBpw4FCC6IPAhy13uE1ShJfqk3ql5v3RkMSIaXwt9053Xm86c2RtNhT2hl yqTdQJGFYNy5jDiIBsOyDZoV5DtcmGfeMuqkplyeADxaSScex7yat8vcW60zwta86pgdaf GKBZeGgBJMzfNJoyRZIl8IyBFz0xwPw= X-MC-Unique: y4q31VbYPdSl7f2IdOM6og-1 X-Mimecast-MFC-AGG-ID: y4q31VbYPdSl7f2IdOM6og_1764787902 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1764787901; x=1765392701; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aHNzjllbBUzUbH3e9EozX0+yCDvl12oO5bAZL6BQpCU=; b=N7M4X5Jbje467wLhupRB6RxlShrt5OM4yVtBbpRPsJbrrH6L+DppF9igqc7aOSzy2D G7ATWU3Jb+reog1tDFOUKqUD3sM0ZTdQBjoUPfyGDAZDC10gXHQ1OW29CKxzq9Q/i88x YkYea91hjFmdnZ/JfYAOJ0fGwEDKHsYxCs5NDZToC0nHgtALgAC8gplKvbbOIA+9TWC+ LREGLs5DfA6KqnKDbgveUgwPOOezuppqWHrbjP2m/pYTk26Ytfl6Af2JkxMJ813iamuv YTzJNWyZn6u9qCBgSaTpWF7WXlLBI2onC5Fs2aLcqI3+nxyG9afDFdKCLrB3V6TpYnj9 vI7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764787901; x=1765392701; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=aHNzjllbBUzUbH3e9EozX0+yCDvl12oO5bAZL6BQpCU=; b=iWzT55PQ3TBnh1vPTK4yxuKYEsV21FbfNQ/D2PkLWADFy7MXB4dglX3ir4lI03IFMB FToyLH8oDAb1aghS+xrMc1mg5lZqp7/AW4pH/aEesDXHV+SNJlc+0zz9K8IYOp0JuZ+7 rH8k22l/rlZzkSd0uTryjosDNgW42l4poQKApiZzI/yUgpcNoJup8+xPOevsSyFXPjiY SAz9ybjINrcueYdaWQ78Spgtdyx+QSjBS2nYX4YenmigCXvzPZ1N7ySgl/WgeAxu3jga s+y7IKnbS1RK18qn/BK7Edx3gIVvmprlBh2EKEn/A/A8HXpzRVaOgfdsxUfly1CYJtH5 8L2g== X-Gm-Message-State: AOJu0Yx7IVJq0HL4kiXYFpHFOxa5Qi7Fv8ZaEbhvY3oBck+ucxXnAnpz MTpJUPWknb4faH/awFs64kH0evP3aZe5MQmWBI5D3Wr+OvUOGKU2fy4hsNKqlzUZy6EKhE/R2w7 etukFwcR/xX7pTVrOQ5CMGZ4QvalC8Zi6rMLfWFvU9MKRQ0PuWoriu9MUEqXlzfUmGvd3WLuDzR v62A5IQLlkr4WQPb2ryENYruORqyBrCJzOBI8HLTMJ X-Gm-Gg: ASbGncuB7UWxFKMmazAkSmlfQq/Ohr18g2k0Kb9DGao3SsTTf3Ro4haE3DRWvuq5Cle 1XO6OTPwY0Zso0qYw030+JNJJ2V8gQGi1ckS8xmP493PAU+7OKNPJ/uaX92ufYLnvHX8B7EMJ0G 5W4havQLM/g2X04eVvLzdH1DCny78lY3ez5h5ouoMM9RPiccO/RHy0N9T4B8j/jRlBkgeTAPotG W2m71KgOMMLKfdmcHQ5TxwQtkzsXsjCVwVy0UzT5yfGKfxuzjBS0hYFSiHZWl4c5w7DtJSeUY4h DPN18mqDQNoVDhtQRS2WFeXA5oglNkf/x+N+Jtj16CmAtrmSzN4saXSQL44TqH6VYEQgcCfJWg8 HkGZnqAsWxyyd/rNa7SGfCzWbakN8PFg+GuDVBqyKxS/XWQlyJxntq+vMssLME06tw/Db0OOAsq KM3K7o+ORj8Vg9b5I= X-Received: by 2002:a05:600c:35d5:b0:477:8b2e:aa7d with SMTP id 5b1f17b1804b1-4792af40437mr42485165e9.30.1764787900895; Wed, 03 Dec 2025 10:51:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IE3zHtej+xWRSEmXryrtZtgCWqTXzbqEAAuWs4blNcR4U6gtRgei+xBVybRbCTS4pupY31tEw== X-Received: by 2002:a05:600c:35d5:b0:477:8b2e:aa7d with SMTP id 5b1f17b1804b1-4792af40437mr42484855e9.30.1764787900404; Wed, 03 Dec 2025 10:51:40 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, kwolf@redhat.omc Subject: [PATCH 2/5] block: extract include/qemu/aiocb.h out of include/block/aio.h Date: Wed, 3 Dec 2025 19:51:30 +0100 Message-ID: <20251203185133.2458207-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251203185133.2458207-1-pbonzini@redhat.com> References: <20251203185133.2458207-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1764788010640019200 Content-Type: text/plain; charset="utf-8" Create a new header corresponding to functions defined in util/aiocb.c, and include it whenever AIOCBs are used but AioContext is not. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- fsdev/qemu-fsdev-throttle.h | 1 - include/block/aio.h | 21 ----------------- include/block/block-global-state.h | 1 + include/block/block-io.h | 1 + include/block/block_int-common.h | 2 +- include/block/raw-aio.h | 1 + include/block/thread-pool.h | 1 + include/hw/ide/ide-dma.h | 2 +- include/hw/scsi/scsi.h | 1 + include/qemu/aiocb.h | 38 ++++++++++++++++++++++++++++++ include/qemu/job.h | 1 + include/qemu/throttle.h | 1 + block/win32-aio.c | 1 + hw/core/ptimer.c | 1 - hw/misc/i2c-echo.c | 1 - hw/virtio/virtio-pmem.c | 1 - scsi/qemu-pr-helper.c | 1 - tests/unit/test-thread-pool.c | 1 + ui/input-linux.c | 1 - ui/vnc-jobs.c | 1 - util/aiocb.c | 2 +- 21 files changed, 50 insertions(+), 31 deletions(-) create mode 100644 include/qemu/aiocb.h diff --git a/fsdev/qemu-fsdev-throttle.h b/fsdev/qemu-fsdev-throttle.h index daa8ca2494d..a1dc0307903 100644 --- a/fsdev/qemu-fsdev-throttle.h +++ b/fsdev/qemu-fsdev-throttle.h @@ -15,7 +15,6 @@ #ifndef QEMU_FSDEV_THROTTLE_H #define QEMU_FSDEV_THROTTLE_H =20 -#include "block/aio.h" #include "qemu/coroutine.h" #include "qemu/throttle.h" =20 diff --git a/include/block/aio.h b/include/block/aio.h index cc3d5f25a24..59c56d695ee 100644 --- a/include/block/aio.h +++ b/include/block/aio.h @@ -27,27 +27,6 @@ #include "hw/core/qdev.h" =20 =20 -typedef struct BlockAIOCB BlockAIOCB; -typedef void BlockCompletionFunc(void *opaque, int ret); - -typedef struct AIOCBInfo { - void (*cancel_async)(BlockAIOCB *acb); - size_t aiocb_size; -} AIOCBInfo; - -struct BlockAIOCB { - const AIOCBInfo *aiocb_info; - BlockDriverState *bs; - BlockCompletionFunc *cb; - void *opaque; - int refcnt; -}; - -void *qemu_aio_get(const AIOCBInfo *aiocb_info, BlockDriverState *bs, - BlockCompletionFunc *cb, void *opaque); -void qemu_aio_unref(void *p); -void qemu_aio_ref(void *p); - typedef struct AioHandler AioHandler; typedef QLIST_HEAD(, AioHandler) AioHandlerList; typedef void QEMUBHFunc(void *opaque); diff --git a/include/block/block-global-state.h b/include/block/block-globa= l-state.h index 479ca2858e1..c2127f17249 100644 --- a/include/block/block-global-state.h +++ b/include/block/block-global-state.h @@ -24,6 +24,7 @@ #ifndef BLOCK_GLOBAL_STATE_H #define BLOCK_GLOBAL_STATE_H =20 +#include "qemu/aiocb.h" #include "block/block-common.h" #include "qemu/coroutine.h" #include "qemu/transactions.h" diff --git a/include/block/block-io.h b/include/block/block-io.h index 4cf83fb3674..e5efe0efb2f 100644 --- a/include/block/block-io.h +++ b/include/block/block-io.h @@ -24,6 +24,7 @@ #ifndef BLOCK_IO_H #define BLOCK_IO_H =20 +#include "qemu/aiocb.h" #include "block/aio-wait.h" #include "block/block-common.h" #include "qemu/coroutine.h" diff --git a/include/block/block_int-common.h b/include/block/block_int-com= mon.h index cb0143ea77b..6d0898e53d1 100644 --- a/include/block/block_int-common.h +++ b/include/block/block_int-common.h @@ -24,10 +24,10 @@ #ifndef BLOCK_INT_COMMON_H #define BLOCK_INT_COMMON_H =20 -#include "block/aio.h" #include "block/block-common.h" #include "block/block-global-state.h" #include "block/snapshot.h" +#include "qemu/aiocb.h" #include "qemu/iov.h" #include "qemu/rcu.h" #include "qemu/stats64.h" diff --git a/include/block/raw-aio.h b/include/block/raw-aio.h index 30e5fc9a9fd..d568b887f1c 100644 --- a/include/block/raw-aio.h +++ b/include/block/raw-aio.h @@ -16,6 +16,7 @@ #ifndef QEMU_RAW_AIO_H #define QEMU_RAW_AIO_H =20 +#include "qemu/aiocb.h" #include "block/aio.h" #include "block/block-common.h" #include "qemu/iov.h" diff --git a/include/block/thread-pool.h b/include/block/thread-pool.h index dd48cf07e85..65cabfc1388 100644 --- a/include/block/thread-pool.h +++ b/include/block/thread-pool.h @@ -18,6 +18,7 @@ #ifndef QEMU_THREAD_POOL_H #define QEMU_THREAD_POOL_H =20 +#include "qemu/aiocb.h" #include "block/aio.h" =20 #define THREAD_POOL_MAX_THREADS_DEFAULT 64 diff --git a/include/hw/ide/ide-dma.h b/include/hw/ide/ide-dma.h index d0b19ac9c57..296010a4e0d 100644 --- a/include/hw/ide/ide-dma.h +++ b/include/hw/ide/ide-dma.h @@ -1,7 +1,7 @@ #ifndef HW_IDE_DMA_H #define HW_IDE_DMA_H =20 -#include "block/aio.h" +#include "qemu/aiocb.h" #include "qemu/iov.h" =20 typedef struct IDEState IDEState; diff --git a/include/hw/scsi/scsi.h b/include/hw/scsi/scsi.h index 83782339d4b..75b4d781a5c 100644 --- a/include/hw/scsi/scsi.h +++ b/include/hw/scsi/scsi.h @@ -1,6 +1,7 @@ #ifndef QEMU_HW_SCSI_H #define QEMU_HW_SCSI_H =20 +#include "qemu/aiocb.h" #include "block/aio.h" #include "hw/block/block.h" #include "hw/core/qdev.h" diff --git a/include/qemu/aiocb.h b/include/qemu/aiocb.h new file mode 100644 index 00000000000..0622646f31d --- /dev/null +++ b/include/qemu/aiocb.h @@ -0,0 +1,38 @@ +/* + * Data structures representing asynchronous I/O operations + * + * Copyright IBM, Corp. 2008 + * + * Authors: + * Anthony Liguori + * + * This work is licensed under the terms of the GNU GPL, version 2. See + * the COPYING file in the top-level directory. + * + */ + +#ifndef QEMU_AIOCB_H +#define QEMU_AIOCB_H + +typedef struct BlockAIOCB BlockAIOCB; +typedef void BlockCompletionFunc(void *opaque, int ret); + +typedef struct AIOCBInfo { + void (*cancel_async)(BlockAIOCB *acb); + size_t aiocb_size; +} AIOCBInfo; + +struct BlockAIOCB { + const AIOCBInfo *aiocb_info; + BlockDriverState *bs; + BlockCompletionFunc *cb; + void *opaque; + int refcnt; +}; + +void *qemu_aio_get(const AIOCBInfo *aiocb_info, BlockDriverState *bs, + BlockCompletionFunc *cb, void *opaque); +void qemu_aio_unref(void *p); +void qemu_aio_ref(void *p); + +#endif diff --git a/include/qemu/job.h b/include/qemu/job.h index ead31578d3d..af29b8c6531 100644 --- a/include/qemu/job.h +++ b/include/qemu/job.h @@ -27,6 +27,7 @@ #define JOB_H =20 #include "qapi/qapi-types-job.h" +#include "qemu/aiocb.h" #include "qemu/queue.h" #include "qemu/progress_meter.h" #include "qemu/coroutine.h" diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h index 181245d29bc..8fa2b29452a 100644 --- a/include/qemu/throttle.h +++ b/include/qemu/throttle.h @@ -25,6 +25,7 @@ #ifndef THROTTLE_H #define THROTTLE_H =20 +#include "block/aio.h" #include "qapi/qapi-types-block-core.h" #include "qemu/timer.h" =20 diff --git a/block/win32-aio.c b/block/win32-aio.c index f0689f3ee95..539f1c81c65 100644 --- a/block/win32-aio.c +++ b/block/win32-aio.c @@ -28,6 +28,7 @@ #include "block/block_int.h" #include "block/aio.h" #include "block/raw-aio.h" +#include "qemu/aiocb.h" #include "qemu/event_notifier.h" #include "qemu/iov.h" #include "qemu/memalign.h" diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c index e42e06fa4de..0cbe1ed5787 100644 --- a/hw/core/ptimer.c +++ b/hw/core/ptimer.c @@ -13,7 +13,6 @@ #include "exec/replay-core.h" #include "exec/icount.h" #include "system/qtest.h" -#include "block/aio.h" #include "hw/core/clock.h" =20 #define DELTA_ADJUST 1 diff --git a/hw/misc/i2c-echo.c b/hw/misc/i2c-echo.c index 2bb99ec0dbf..54d07db6fae 100644 --- a/hw/misc/i2c-echo.c +++ b/hw/misc/i2c-echo.c @@ -11,7 +11,6 @@ #include "qemu/osdep.h" #include "qemu/timer.h" #include "qemu/main-loop.h" -#include "block/aio.h" #include "hw/i2c/i2c.h" #include "trace.h" =20 diff --git a/hw/virtio/virtio-pmem.c b/hw/virtio/virtio-pmem.c index 854d08abf6e..5381d592824 100644 --- a/hw/virtio/virtio-pmem.c +++ b/hw/virtio/virtio-pmem.c @@ -22,7 +22,6 @@ #include "standard-headers/linux/virtio_ids.h" #include "standard-headers/linux/virtio_pmem.h" #include "system/hostmem.h" -#include "block/aio.h" #include "block/thread-pool.h" #include "trace.h" =20 diff --git a/scsi/qemu-pr-helper.c b/scsi/qemu-pr-helper.c index 074b4db4720..9dcd3ec7111 100644 --- a/scsi/qemu-pr-helper.c +++ b/scsi/qemu-pr-helper.c @@ -52,7 +52,6 @@ #include "trace/control.h" #include "qemu-version.h" =20 -#include "block/aio.h" #include "block/thread-pool.h" =20 #include "scsi/constants.h" diff --git a/tests/unit/test-thread-pool.c b/tests/unit/test-thread-pool.c index 33407b595d3..ea5234f9f48 100644 --- a/tests/unit/test-thread-pool.c +++ b/tests/unit/test-thread-pool.c @@ -3,6 +3,7 @@ #include "block/thread-pool.h" #include "block/block.h" #include "qapi/error.h" +#include "qemu/aiocb.h" #include "qemu/timer.h" #include "qemu/error-report.h" #include "qemu/main-loop.h" diff --git a/ui/input-linux.c b/ui/input-linux.c index 44d0c15a9b7..c16726a3b79 100644 --- a/ui/input-linux.c +++ b/ui/input-linux.c @@ -13,7 +13,6 @@ #include "ui/input.h" #include "qom/object_interfaces.h" #include "system/iothread.h" -#include "block/aio.h" =20 #include #include "standard-headers/linux/input.h" diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c index bed33950a87..b296d19e089 100644 --- a/ui/vnc-jobs.c +++ b/ui/vnc-jobs.c @@ -31,7 +31,6 @@ #include "vnc-jobs.h" #include "qemu/sockets.h" #include "qemu/main-loop.h" -#include "block/aio.h" #include "trace.h" =20 /* diff --git a/util/aiocb.c b/util/aiocb.c index 5aef3a069c8..d1a581080d3 100644 --- a/util/aiocb.c +++ b/util/aiocb.c @@ -23,7 +23,7 @@ */ =20 #include "qemu/osdep.h" -#include "block/aio.h" +#include "qemu/aiocb.h" =20 void *qemu_aio_get(const AIOCBInfo *aiocb_info, BlockDriverState *bs, BlockCompletionFunc *cb, void *opaque) --=20 2.52.0 From nobody Sun Dec 14 05:56:40 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1764787976; cv=none; d=zohomail.com; s=zohoarc; b=jxugBK/+/GT4BBQKaYDkoqoyR6aUZHMP0a9lSpl5pQMUDPVn0/S3X0sBpQF8BoVR/AZUEg6RlZdSa3GtPPKoSi70gcBChfCpM4K3R+de/ghdl7l4U6dbLtsc2aviWaCOTKTCzfvkkaiq12oMJp9j9waaWTlydQSflBrPkuBBCT4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1764787976; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=lYzrc17+VBNLzV0q5mb2F00YL2Y2UiMTeTfct14Gr/A=; b=R2dH0ODpzaRFYt54Pt8vNueRw3l/LNEICaRBIyoa3GPV7ZlDnRUWU3x4sC1rsVQCnFPCAhT5Jyo5lSxwWeXeHyCtLGBn5BhQSL+pBxUGLfzGA+0bIaVZ7x0/lPHlYKFawY+QVNiMonWl4G9X+ajt7pnaAhxo3E0Z8jNxbs+IvLM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 176478797641594.62978684637983; Wed, 3 Dec 2025 10:52:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vQrx8-0007aK-HZ; Wed, 03 Dec 2025 13:51:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vQrx7-0007ZO-12 for qemu-devel@nongnu.org; Wed, 03 Dec 2025 13:51:49 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vQrx5-00012n-DM for qemu-devel@nongnu.org; Wed, 03 Dec 2025 13:51:48 -0500 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-695-t4WpS3b2O56UkpfVIZhG3w-1; Wed, 03 Dec 2025 13:51:45 -0500 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4779d8fd4ecso408745e9.1 for ; Wed, 03 Dec 2025 10:51:44 -0800 (PST) Received: from [192.168.10.48] ([176.206.119.13]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4792b02e7fbsm21794075e9.2.2025.12.03.10.51.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Dec 2025 10:51:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1764787906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lYzrc17+VBNLzV0q5mb2F00YL2Y2UiMTeTfct14Gr/A=; b=U2uO6Fd1fs1OHkg4CwZHOD2HsgaixvixpKY99LD0/uYpBSQUlaahQCb11j1iHiLROQ9Esr AyfViUrKBptLtMwBjL8U2LoPLUz3oJhzePJmE+2snlaZrpkIuhj9OPcxUYwlb46rvJrPFd GarkciqVoAx33BXNP+JLDAqVbmHc6JE= X-MC-Unique: t4WpS3b2O56UkpfVIZhG3w-1 X-Mimecast-MFC-AGG-ID: t4WpS3b2O56UkpfVIZhG3w_1764787904 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1764787903; x=1765392703; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lYzrc17+VBNLzV0q5mb2F00YL2Y2UiMTeTfct14Gr/A=; b=rCzdfGHBntCrBcnarXK/pMdhg7f9Y42vyDGz1uRXwHcOCEqPvlmYgDwIenTt4aN1QR 59Lu3GCsM+BgBeXTKtad7pooMgZdL5KYzrJC3EPYpq7nIszW1+rTKFYUrOW2YUg9uTbM VXqYa9rvYiaXvTASxDdJaVAuVCinnHKGmlSEYxjOcIIBnY2g5z8ekdBFXXc4rmE/asoe r+UNSaeWdNpmmr/hMHh/U2zIHKSv6bntK9sBBg4j9C+VMb0ObtJrYKvl70vExW17iuLs VyKR1AsUobSRX5cyeezmubfKo/eI1yl6TaCqWOx0FN22L/RkCaGSbWW2OPmrJBZch/zx oX+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764787903; x=1765392703; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=lYzrc17+VBNLzV0q5mb2F00YL2Y2UiMTeTfct14Gr/A=; b=XyXU76kDRBuz0wI6BVJ+2L+KXkahYNJaaqBHMWG6gH+aeym0Lo8Z4R/hIraFDwYFM0 fPJDV1KT6/tukbvREkgB9rjhQO0eqMVCt6EaAqb7Z97JNnG628SJAbLiA7sk+WNA61uE w3rOYmOmFW2ulutpow6VaLCeFrMOZFnrkNUk1NSw6YzuWYHlyelXEbCpS2uLcYfDZGBJ ayFRpKtI6iLPklqlzPZjJNthKl2XS8akm0g9Ua0pbKo0jVrEqvkCqCNcSy53OezrNH5v BssyMZPv3a11c2wMn3G9gN8+Z+3KfJuQakqLZeY1KLlIReC5YYD11+au1kqbE9PVGBWS O6sQ== X-Gm-Message-State: AOJu0Yw8e80RKIB4ZT7WUhHm9smFvaBEfeGX7hxqmqGd9wz/Iucn+p8p 3oJLJdsUEbRn/9S4DXWsn57x/Q6KZt8WWkSUOxGjKUNExtvJ3s/Lgs6IjzkLr05td4jNYj3a2CQ YIuuMTGMsuPI/3cwp9OLHmTegln21kGw4CaCmSZfzntcWT6C5hghVbfhdoC3UEZQ5FT6ZNtk6ir R9KCJnOm/InXIVzOLDZAlrBcTeas/5OKMZ/wSVxYhH X-Gm-Gg: ASbGnctteineU1ROvt5ZVvCcThzv0OR5YYkVHswdpn2RI+STcQQad0mFLnr2Xk8pK3e tThytrrkMQILafTfgCue3DcuKh8JHh/u1VM/ABD21i6RCti/EFddZaTCShIzyOs7UTf/IzhmNAz oIryOPJuRuBVI73sSVIezCNYG633Tn0xW4mqg8fQ0jdq23yakA8ry72/2nPoahymfYf6xCfJcJR BERpRml7W1wUarC9KTDURcAbQxLeS8C4fG31wEN10mmFHZqAVUJAjpe5IbLFmqMV8464e1rlIVJ E4wfpCxDPcvT+5CGp6JBTio9pYebKNbma1uu9dAtnqb6KcdJ3Xs5mXZcbBApXBTMeKqSFkrLE1W ARDj4ArprrXZi1t90ojFXKRsaAER4PMC4h484FhbPSgwiRsKV5jbGGXK8dbd7iJNjzLIDKaijHq XLMiaqocitf6Eo75c= X-Received: by 2002:a05:600c:3151:b0:479:255f:8805 with SMTP id 5b1f17b1804b1-4792eb10e97mr5419545e9.4.1764787903107; Wed, 03 Dec 2025 10:51:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IHEUW3YyNCYO1y+vU8FGieudGnHLDk3S+naLY15jST1X+p4ScQlx0j3qj8vrpuk+71/KgvmLg== X-Received: by 2002:a05:600c:3151:b0:479:255f:8805 with SMTP id 5b1f17b1804b1-4792eb10e97mr5419265e9.4.1764787902688; Wed, 03 Dec 2025 10:51:42 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, kwolf@redhat.omc Subject: [PATCH 3/5] block: reduce files included by block/aio.h Date: Wed, 3 Dec 2025 19:51:31 +0100 Message-ID: <20251203185133.2458207-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251203185133.2458207-1-pbonzini@redhat.com> References: <20251203185133.2458207-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1764787978259019200 Content-Type: text/plain; charset="utf-8" Avoid including all of qdev everywhere (the hw/core/qdev.h header in fact brings in a lot more headers too), instead declare a couple structs for which only a pointer type is needed. Signed-off-by: Paolo Bonzini --- include/block/aio.h | 7 +++---- include/block/block-copy.h | 1 + include/block/block-global-state.h | 1 + include/block/block-io.h | 1 + include/block/dirty-bitmap.h | 1 + include/hw/core/qdev.h | 6 +----- include/qemu/job.h | 1 + include/qemu/main-loop.h | 2 +- include/qemu/mem-reentrancy.h | 10 ++++++++++ net/net.c | 1 + util/async.c | 1 + 11 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 include/qemu/mem-reentrancy.h diff --git a/include/block/aio.h b/include/block/aio.h index 59c56d695ee..8cca2360d1a 100644 --- a/include/block/aio.h +++ b/include/block/aio.h @@ -23,9 +23,8 @@ #include "qemu/lockcnt.h" #include "qemu/thread.h" #include "qemu/timer.h" -#include "block/graph-lock.h" -#include "hw/core/qdev.h" =20 +struct MemReentrancyGuard; =20 typedef struct AioHandler AioHandler; typedef QLIST_HEAD(, AioHandler) AioHandlerList; @@ -211,7 +210,7 @@ struct AioContext { * of nodes and edges from block graph while some * other thread is traversing it. */ - BdrvGraphRWlock *bdrv_graph; + struct BdrvGraphRWlock *bdrv_graph; =20 /* The list of registered AIO handlers. Protected by ctx->list_lock. = */ AioHandlerList aio_handlers; @@ -393,7 +392,7 @@ void aio_bh_schedule_oneshot_full(AioContext *ctx, QEMU= BHFunc *cb, void *opaque, * device-reentrancy issues */ QEMUBH *aio_bh_new_full(AioContext *ctx, QEMUBHFunc *cb, void *opaque, - const char *name, MemReentrancyGuard *reentrancy_g= uard); + const char *name, struct MemReentrancyGuard *reent= rancy_guard); =20 /** * aio_bh_new: Allocate a new bottom half structure diff --git a/include/block/block-copy.h b/include/block/block-copy.h index dd5cc82f3b2..0df2771181b 100644 --- a/include/block/block-copy.h +++ b/include/block/block-copy.h @@ -16,6 +16,7 @@ #define BLOCK_COPY_H =20 #include "block/block-common.h" +#include "block/graph-lock.h" #include "qemu/progress_meter.h" =20 /* All APIs are thread-safe */ diff --git a/include/block/block-global-state.h b/include/block/block-globa= l-state.h index c2127f17249..ed89999f0fb 100644 --- a/include/block/block-global-state.h +++ b/include/block/block-global-state.h @@ -25,6 +25,7 @@ #define BLOCK_GLOBAL_STATE_H =20 #include "qemu/aiocb.h" +#include "block/graph-lock.h" #include "block/block-common.h" #include "qemu/coroutine.h" #include "qemu/transactions.h" diff --git a/include/block/block-io.h b/include/block/block-io.h index e5efe0efb2f..7925e2241e6 100644 --- a/include/block/block-io.h +++ b/include/block/block-io.h @@ -27,6 +27,7 @@ #include "qemu/aiocb.h" #include "block/aio-wait.h" #include "block/block-common.h" +#include "block/graph-lock.h" #include "qemu/coroutine.h" #include "qemu/iov.h" =20 diff --git a/include/block/dirty-bitmap.h b/include/block/dirty-bitmap.h index fa956debfb2..28029bbc2bc 100644 --- a/include/block/dirty-bitmap.h +++ b/include/block/dirty-bitmap.h @@ -2,6 +2,7 @@ #define BLOCK_DIRTY_BITMAP_H =20 #include "block/block-common.h" +#include "block/graph-lock.h" #include "qapi/qapi-types-block-core.h" #include "qemu/hbitmap.h" =20 diff --git a/include/hw/core/qdev.h b/include/hw/core/qdev.h index e211d807e82..4b2730e9d8e 100644 --- a/include/hw/core/qdev.h +++ b/include/hw/core/qdev.h @@ -4,6 +4,7 @@ #include "qemu/atomic.h" #include "qemu/queue.h" #include "qemu/bitmap.h" +#include "qemu/mem-reentrancy.h" #include "qemu/rcu.h" #include "qemu/rcu_queue.h" #include "qom/object.h" @@ -208,11 +209,6 @@ struct NamedClockList { QLIST_ENTRY(NamedClockList) node; }; =20 -typedef struct MemReentrancyGuard { - bool engaged_in_io; -} MemReentrancyGuard; - - typedef QLIST_HEAD(, NamedGPIOList) NamedGPIOListHead; typedef QLIST_HEAD(, NamedClockList) NamedClockListHead; typedef QLIST_HEAD(, BusState) BusStateHead; diff --git a/include/qemu/job.h b/include/qemu/job.h index af29b8c6531..2b163602c56 100644 --- a/include/qemu/job.h +++ b/include/qemu/job.h @@ -32,6 +32,7 @@ #include "qemu/progress_meter.h" #include "qemu/coroutine.h" #include "block/aio.h" +#include "block/graph-lock.h" =20 typedef struct JobDriver JobDriver; typedef struct JobTxn JobTxn; diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h index 0d55c636b21..241dc87be50 100644 --- a/include/qemu/main-loop.h +++ b/include/qemu/main-loop.h @@ -431,7 +431,7 @@ void qemu_cond_timedwait_bql(QemuCond *cond, int ms); #define qemu_bh_new(cb, opaque) \ qemu_bh_new_full((cb), (opaque), (stringify(cb)), NULL) QEMUBH *qemu_bh_new_full(QEMUBHFunc *cb, void *opaque, const char *name, - MemReentrancyGuard *reentrancy_guard); + struct MemReentrancyGuard *reentrancy_guard); void qemu_bh_schedule_idle(QEMUBH *bh); =20 enum { diff --git a/include/qemu/mem-reentrancy.h b/include/qemu/mem-reentrancy.h new file mode 100644 index 00000000000..07cafd47179 --- /dev/null +++ b/include/qemu/mem-reentrancy.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#ifndef QEMU_MEM_REENTRANCY_H +#define QEMU_MEM_REENTRANCY_H 1 + +typedef struct MemReentrancyGuard { + bool engaged_in_io; +} MemReentrancyGuard; + +#endif diff --git a/net/net.c b/net/net.c index 4930b573ed3..a176936f9bc 100644 --- a/net/net.c +++ b/net/net.c @@ -39,6 +39,7 @@ #include "qobject/qdict.h" #include "qapi/qmp/qerror.h" #include "qemu/error-report.h" +#include "qemu/mem-reentrancy.h" #include "qemu/sockets.h" #include "qemu/cutils.h" #include "qemu/config-file.h" diff --git a/util/async.c b/util/async.c index 48f88286369..39f391fb71a 100644 --- a/util/async.c +++ b/util/async.c @@ -29,6 +29,7 @@ #include "block/thread-pool.h" #include "block/graph-lock.h" #include "qemu/main-loop.h" +#include "qemu/mem-reentrancy.h" #include "qemu/atomic.h" #include "qemu/lockcnt.h" #include "qemu/rcu_queue.h" --=20 2.52.0 From nobody Sun Dec 14 05:56:40 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1764787935; cv=none; d=zohomail.com; s=zohoarc; b=MCOQ5VtZkOEmH3HDPRlAbU4W2nUwatUjhQj1bgNeGx0DQPME4CsVrj0pNXJyZJ0ZAgwoy9MRGOuN2C36eqswqk+k4w9fPpWzgbbO1o52nrN1biuS21maXVEUZke+RmC/Sq0KcMtCjVu+pxFGEK7qU/dpeIQKno9+gQvibmIEhBA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1764787935; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Eh+hIRE5qTY4KuawUkjR2tueqk8z2nUSsFLpUAHf+1U=; b=E6a6X4HSs38ceUVBlrJVSJVl1NzZUoivj27wecN9fPAr3lJ240+4dy2UC4DMc8WnGEL9BtdoSxPoz9ghrpc4keo0vxOE+6aCyTpPL9JAsIJ027ZOkbyWVJbxNleHNqojDeiqpHnT2XQ9X9+fZQHxYsdT0ryaxITZX1+CSYf+Lzc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1764787935634750.5741209394528; Wed, 3 Dec 2025 10:52:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vQrxF-0007bg-22; Wed, 03 Dec 2025 13:51:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vQrxD-0007bG-4F for qemu-devel@nongnu.org; Wed, 03 Dec 2025 13:51:55 -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 1vQrx9-00013R-71 for qemu-devel@nongnu.org; Wed, 03 Dec 2025 13:51:53 -0500 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-636-7jvbg0clM1ySDJAP82_GFw-1; Wed, 03 Dec 2025 13:51:49 -0500 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-42b3339cab7so77309f8f.0 for ; Wed, 03 Dec 2025 10:51:48 -0800 (PST) Received: from [192.168.10.48] ([176.206.119.13]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42e1ca1a3e4sm41295804f8f.25.2025.12.03.10.51.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Dec 2025 10:51:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1764787910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Eh+hIRE5qTY4KuawUkjR2tueqk8z2nUSsFLpUAHf+1U=; b=DLEDU6ZHG9f/mS/3Gnm6OSourHb7hnwVnLNwUCXJaSghxa9r0ONsBobc63G4wH730RBc9S wpEr7bm7Lc6D/MeOHt+Zuxzvb00SgPA2GBIlRLuLhUZCu6uqm6moaaBIom/ylClLGBt7oD mQShUAiAMbfzyMym2umBXuDYa1PusyA= X-MC-Unique: 7jvbg0clM1ySDJAP82_GFw-1 X-Mimecast-MFC-AGG-ID: 7jvbg0clM1ySDJAP82_GFw_1764787908 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1764787906; x=1765392706; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Eh+hIRE5qTY4KuawUkjR2tueqk8z2nUSsFLpUAHf+1U=; b=V+FLUMAigGlub+4hrw/JHPSHpmZOagcIRx8NH19dnCXv8P7ly6/GGMzxWtImLVLFxU v9N0BHFkwyFmm4t8U6tgZjAP2vS/Jqg7UmgMlBDDyWCm7TPJ62DLoCux19PInYQ0TddH 5yQM5hAgGEZq9yX88b9gDwt0PZiMByrymSTpniao/2AkoFVNwqoFnCmGOH+eC1Z0tWGO rgSDUKfSQxzESMr5ZAQm3Der6D9cC/ifwkNIvR/vq5dAjrne5MOR8MGW5I6Xbgeqvm3b NemZbZxuNIpAPooXGrnEZ5zdjjE5IsNq+ndF9taS9iGufQiVkRvKIB9AEqYA4DCEFYZt UaDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764787906; x=1765392706; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Eh+hIRE5qTY4KuawUkjR2tueqk8z2nUSsFLpUAHf+1U=; b=KfdFH/SPPMgWgwHguxTQLoImTiJb605Eq46yHgCO/0MLvpqNnf+5Hz4XQJ2/toL4+9 ShUO3tqhfF8ViOmYb+W1aC/iJPw6iSYTp7UGZ9eiaZWaSRCO0xjuKomtSqssbG12wUeg R1KMbzxY9bDzi/RrbgpXzg15/bQ+0syb4cDUnB5wPyEtElRcqmQGUwSryy7W3m9K+o9b owYmN+SJBUP7EarCNwrcj+30y16f153Zhysy2gznU3UxxKtii7G2QOk9hdR7oXguRGOX ZAQTiDhO9Tg3stZE/9BSs4mpJDQjf/Zv9ME5afq2yNgOWTMVsKPXVT0rvAFNQmJhjx9i bFIA== X-Gm-Message-State: AOJu0Yx7MGyJ92lZtH+Z6gx40F1F+ds9FGyQVMV0r4JMzJF9PSmdDIvJ y8uyuRC1jc3JR6cmI0dm+w4h5QFCAPqiCsyAOnW/8dXvGTGyHaqeWZk9V31skdju/ULfBEWTW6S /gLKAdM92iJJBk2Nmon+RpiqwCyHT24fW1lsvZH7rSmXHIEO9/dNbX10nEibVb1yQ0XWSgpyxyl KIXh+G1QRkDQ7AyK/JT80gg0YhLu8/UzorbPTYQXg0 X-Gm-Gg: ASbGncvlx3mj5yIqyzCKuRCo8R/F1QHV9DxZ4ExTG/LPRXT9dCNNXhiqWFycZTQmqZd P8Tnzo2Sx0Fkg96pYm3HlNvukhZIXNuwwM8GoyK32VjL/Bmn5Hp9lYfuS6tt/rcHczyPPMsdTzL 5AfsCZRP0X/IUWCaO4Oxm+YajDf9Ov1Eoylcm7zbmouK7WrYD8ApmXY888HxY8cLdm1+cKkRyUx o8kAf2aGiqst6JDUcawpCstJMAD15fi4yrXfw5bUQ8zQ5KeIvbntcHgtgBmpxnnkOmyOvN3Ghbv xzlkbquH9al+itdCccKyXZbAlnbeZXa1ElKuFGKFpLeBljtifEjeB/3vTz8p5wzwZnhX97d5Pey f9zmOWfh0ZWprqDTHkf0pBQRiqvynh9NO/LaNBhOOEciIbo5v00oGLtIwOdB08dzGO1saYaBYWU q90lFYeOBVHjT9A48= X-Received: by 2002:a05:6000:2012:b0:42b:3978:1587 with SMTP id ffacd0b85a97d-42f79841263mr12142f8f.36.1764787905870; Wed, 03 Dec 2025 10:51:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IF+V1KqRbfZ0yNQu+w86hlQFh2MFR2nLuhlGsWyDSY1eg7Lf6+EhXlOiQLv7gGt8746zPArbA== X-Received: by 2002:a05:6000:2012:b0:42b:3978:1587 with SMTP id ffacd0b85a97d-42f79841263mr12102f8f.36.1764787905262; Wed, 03 Dec 2025 10:51:45 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, kwolf@redhat.omc Subject: [PATCH 4/5] block: rename block/aio.h to qemu/aio.h Date: Wed, 3 Dec 2025 19:51:32 +0100 Message-ID: <20251203185133.2458207-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251203185133.2458207-1-pbonzini@redhat.com> References: <20251203185133.2458207-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1764787936147019200 Content-Type: text/plain; charset="utf-8" AioContexts are used as a generic event loop even outside the block layer; move the header file out of block/ just like the implementation is in util/. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- MAINTAINERS | 2 +- docs/devel/multiple-iothreads.rst | 4 ++-- include/block/aio-wait.h | 2 +- include/block/raw-aio.h | 2 +- include/block/thread-pool.h | 2 +- include/hw/scsi/scsi.h | 2 +- include/hw/virtio/virtio.h | 2 +- include/io/channel.h | 2 +- include/{block =3D> qemu}/aio.h | 0 include/qemu/job.h | 2 +- include/qemu/main-loop.h | 2 +- include/qemu/throttle.h | 2 +- include/scsi/pr-manager.h | 2 +- include/system/event-loop-base.h | 2 +- include/system/iothread.h | 2 +- include/system/replay.h | 2 +- tests/unit/iothread.h | 2 +- util/aio-posix.h | 2 +- block/aio_task.c | 2 +- block/export/fuse.c | 2 +- block/io_uring.c | 2 +- block/linux-aio.c | 2 +- block/win32-aio.c | 2 +- iothread.c | 2 +- qapi/qmp-dispatch.c | 2 +- replay/replay-events.c | 2 +- scsi/pr-manager.c | 2 +- stubs/linux-aio.c | 2 +- stubs/replay-tools.c | 2 +- tests/unit/iothread.c | 2 +- tests/unit/test-aio-multithread.c | 2 +- tests/unit/test-aio.c | 2 +- tests/unit/test-nested-aio-poll.c | 2 +- tests/unit/test-thread-pool.c | 2 +- tests/unit/test-throttle.c | 2 +- util/async.c | 2 +- util/main-loop.c | 2 +- util/qemu-co-timeout.c | 2 +- util/qemu-coroutine-lock.c | 2 +- util/qemu-coroutine-sleep.c | 2 +- util/qemu-coroutine.c | 2 +- util/throttle.c | 2 +- scripts/analyze-inclusions | 2 +- 43 files changed, 43 insertions(+), 43 deletions(-) rename include/{block =3D> qemu}/aio.h (100%) diff --git a/MAINTAINERS b/MAINTAINERS index dab02da37a7..24cf2946e77 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3071,7 +3071,7 @@ F: util/aio-*.h F: util/defer-call.c F: util/fdmon-*.c F: block/io.c -F: include/block/aio.h +F: include/qemu/aio.h F: include/block/aio-wait.h F: include/qemu/defer-call.h F: scripts/qemugdb/aio.py diff --git a/docs/devel/multiple-iothreads.rst b/docs/devel/multiple-iothre= ads.rst index d1f3fc4510a..a6eb0462673 100644 --- a/docs/devel/multiple-iothreads.rst +++ b/docs/devel/multiple-iothreads.rst @@ -52,7 +52,7 @@ How to program for ``IOThread``\ s ---------------------------------- The main difference between legacy code and new code that can run in an ``IOThread`` is dealing explicitly with the event loop object, ``AioContex= t`` -(see ``include/block/aio.h``). Code that only works in the main loop +(see ``include/qemu/aio.h``). Code that only works in the main loop implicitly uses the main loop's ``AioContext``. Code that supports running in ``IOThread``\ s must be aware of its ``AioContext``. =20 @@ -74,7 +74,7 @@ Since they implicitly work on the main loop they cannot b= e used in code that runs in an ``IOThread``. They might cause a crash or deadlock if called f= rom an ``IOThread`` since the BQL is not held. =20 -Instead, use the ``AioContext`` functions directly (see ``include/block/ai= o.h``): +Instead, use the ``AioContext`` functions directly (see ``include/qemu/aio= .h``): * ``aio_set_fd_handler()`` - monitor a file descriptor * ``aio_set_event_notifier()`` - monitor an event notifier * ``aio_timer_new()`` - create a timer diff --git a/include/block/aio-wait.h b/include/block/aio-wait.h index cf5e8bde1ca..57ebe21b31f 100644 --- a/include/block/aio-wait.h +++ b/include/block/aio-wait.h @@ -25,7 +25,7 @@ #ifndef QEMU_AIO_WAIT_H #define QEMU_AIO_WAIT_H =20 -#include "block/aio.h" +#include "qemu/aio.h" #include "qemu/main-loop.h" =20 /** diff --git a/include/block/raw-aio.h b/include/block/raw-aio.h index d568b887f1c..256d0468a88 100644 --- a/include/block/raw-aio.h +++ b/include/block/raw-aio.h @@ -17,7 +17,7 @@ #define QEMU_RAW_AIO_H =20 #include "qemu/aiocb.h" -#include "block/aio.h" +#include "qemu/aio.h" #include "block/block-common.h" #include "qemu/iov.h" =20 diff --git a/include/block/thread-pool.h b/include/block/thread-pool.h index 65cabfc1388..e9ddb2b6d3c 100644 --- a/include/block/thread-pool.h +++ b/include/block/thread-pool.h @@ -19,7 +19,7 @@ #define QEMU_THREAD_POOL_H =20 #include "qemu/aiocb.h" -#include "block/aio.h" +#include "qemu/aio.h" =20 #define THREAD_POOL_MAX_THREADS_DEFAULT 64 =20 diff --git a/include/hw/scsi/scsi.h b/include/hw/scsi/scsi.h index 75b4d781a5c..d26f1127bb5 100644 --- a/include/hw/scsi/scsi.h +++ b/include/hw/scsi/scsi.h @@ -2,7 +2,7 @@ #define QEMU_HW_SCSI_H =20 #include "qemu/aiocb.h" -#include "block/aio.h" +#include "qemu/aio.h" #include "hw/block/block.h" #include "hw/core/qdev.h" #include "scsi/utils.h" diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 91ff2fa21a5..27cd98d2fe1 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -23,7 +23,7 @@ #include "standard-headers/linux/virtio_config.h" #include "standard-headers/linux/virtio_ring.h" #include "qom/object.h" -#include "block/aio.h" +#include "qemu/aio.h" =20 /* * A guest should never accept this. It implies negotiation is broken diff --git a/include/io/channel.h b/include/io/channel.h index f42be760f9f..1b02350437d 100644 --- a/include/io/channel.h +++ b/include/io/channel.h @@ -23,7 +23,7 @@ =20 #include "qom/object.h" #include "qemu/coroutine-core.h" -#include "block/aio.h" +#include "qemu/aio.h" =20 #define TYPE_QIO_CHANNEL "qio-channel" OBJECT_DECLARE_TYPE(QIOChannel, QIOChannelClass, diff --git a/include/block/aio.h b/include/qemu/aio.h similarity index 100% rename from include/block/aio.h rename to include/qemu/aio.h diff --git a/include/qemu/job.h b/include/qemu/job.h index 2b163602c56..0e40e8b4570 100644 --- a/include/qemu/job.h +++ b/include/qemu/job.h @@ -31,7 +31,7 @@ #include "qemu/queue.h" #include "qemu/progress_meter.h" #include "qemu/coroutine.h" -#include "block/aio.h" +#include "qemu/aio.h" #include "block/graph-lock.h" =20 typedef struct JobDriver JobDriver; diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h index 241dc87be50..8c1241a2c11 100644 --- a/include/qemu/main-loop.h +++ b/include/qemu/main-loop.h @@ -25,7 +25,7 @@ #ifndef QEMU_MAIN_LOOP_H #define QEMU_MAIN_LOOP_H =20 -#include "block/aio.h" +#include "qemu/aio.h" #include "qom/object.h" #include "system/event-loop-base.h" =20 diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h index 8fa2b29452a..06b6589c946 100644 --- a/include/qemu/throttle.h +++ b/include/qemu/throttle.h @@ -25,7 +25,7 @@ #ifndef THROTTLE_H #define THROTTLE_H =20 -#include "block/aio.h" +#include "qemu/aio.h" #include "qapi/qapi-types-block-core.h" #include "qemu/timer.h" =20 diff --git a/include/scsi/pr-manager.h b/include/scsi/pr-manager.h index 45de28d3542..5045d115c44 100644 --- a/include/scsi/pr-manager.h +++ b/include/scsi/pr-manager.h @@ -4,7 +4,7 @@ #include "qom/object.h" #include "qapi/visitor.h" #include "qom/object_interfaces.h" -#include "block/aio.h" +#include "qemu/aio.h" =20 #define TYPE_PR_MANAGER "pr-manager" =20 diff --git a/include/system/event-loop-base.h b/include/system/event-loop-b= ase.h index a6c24f13513..130629e7f31 100644 --- a/include/system/event-loop-base.h +++ b/include/system/event-loop-base.h @@ -13,7 +13,7 @@ #define QEMU_EVENT_LOOP_BASE_H =20 #include "qom/object.h" -#include "block/aio.h" +#include "qemu/aio.h" =20 #define TYPE_EVENT_LOOP_BASE "event-loop-base" OBJECT_DECLARE_TYPE(EventLoopBase, EventLoopBaseClass, diff --git a/include/system/iothread.h b/include/system/iothread.h index d95c17a6456..e26d13c6c71 100644 --- a/include/system/iothread.h +++ b/include/system/iothread.h @@ -14,7 +14,7 @@ #ifndef IOTHREAD_H #define IOTHREAD_H =20 -#include "block/aio.h" +#include "qemu/aio.h" #include "qemu/thread.h" #include "qom/object.h" #include "system/event-loop-base.h" diff --git a/include/system/replay.h b/include/system/replay.h index 68f91bdfbf2..f8715ca9feb 100644 --- a/include/system/replay.h +++ b/include/system/replay.h @@ -15,7 +15,7 @@ #include "qapi/qapi-types-misc.h" #include "qapi/qapi-types-run-state.h" #include "qapi/qapi-types-ui.h" -#include "block/aio.h" +#include "qemu/aio.h" #include "qemu/audio.h" =20 /* replay clock kinds */ diff --git a/tests/unit/iothread.h b/tests/unit/iothread.h index 4877cea6a31..eb4d0c77f86 100644 --- a/tests/unit/iothread.h +++ b/tests/unit/iothread.h @@ -13,7 +13,7 @@ #ifndef TEST_IOTHREAD_H #define TEST_IOTHREAD_H =20 -#include "block/aio.h" +#include "qemu/aio.h" #include "qemu/thread.h" =20 typedef struct IOThread IOThread; diff --git a/util/aio-posix.h b/util/aio-posix.h index babbfa83141..0cedb8d1891 100644 --- a/util/aio-posix.h +++ b/util/aio-posix.h @@ -17,7 +17,7 @@ #ifndef AIO_POSIX_H #define AIO_POSIX_H =20 -#include "block/aio.h" +#include "qemu/aio.h" #include "qapi/error.h" =20 struct AioHandler { diff --git a/block/aio_task.c b/block/aio_task.c index bb5c05f455d..21b68a9fc02 100644 --- a/block/aio_task.c +++ b/block/aio_task.c @@ -23,7 +23,7 @@ */ =20 #include "qemu/osdep.h" -#include "block/aio.h" +#include "qemu/aio.h" #include "block/aio_task.h" =20 struct AioTaskPool { diff --git a/block/export/fuse.c b/block/export/fuse.c index 465cc9891d6..8cf4572f78d 100644 --- a/block/export/fuse.c +++ b/block/export/fuse.c @@ -20,7 +20,7 @@ =20 #include "qemu/osdep.h" #include "qemu/memalign.h" -#include "block/aio.h" +#include "qemu/aio.h" #include "block/block_int-common.h" #include "block/export.h" #include "block/fuse.h" diff --git a/block/io_uring.c b/block/io_uring.c index f1514cf024a..cb131d3b8b5 100644 --- a/block/io_uring.c +++ b/block/io_uring.c @@ -10,7 +10,7 @@ */ #include "qemu/osdep.h" #include -#include "block/aio.h" +#include "qemu/aio.h" #include "block/block.h" #include "block/raw-aio.h" #include "qemu/coroutine.h" diff --git a/block/linux-aio.c b/block/linux-aio.c index c200e7ad20f..53c3e9af8ae 100644 --- a/block/linux-aio.c +++ b/block/linux-aio.c @@ -8,7 +8,7 @@ * See the COPYING file in the top-level directory. */ #include "qemu/osdep.h" -#include "block/aio.h" +#include "qemu/aio.h" #include "qemu/queue.h" #include "block/block.h" #include "block/raw-aio.h" diff --git a/block/win32-aio.c b/block/win32-aio.c index 539f1c81c65..6e1b34fb95f 100644 --- a/block/win32-aio.c +++ b/block/win32-aio.c @@ -26,7 +26,7 @@ #include "qemu/timer.h" #include "block/block-io.h" #include "block/block_int.h" -#include "block/aio.h" +#include "qemu/aio.h" #include "block/raw-aio.h" #include "qemu/aiocb.h" #include "qemu/event_notifier.h" diff --git a/iothread.c b/iothread.c index 8810376dcea..caf68e07645 100644 --- a/iothread.c +++ b/iothread.c @@ -15,7 +15,7 @@ #include "qom/object.h" #include "qom/object_interfaces.h" #include "qemu/module.h" -#include "block/aio.h" +#include "qemu/aio.h" #include "block/block.h" #include "system/event-loop-base.h" #include "system/iothread.h" diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index e569224eaea..9bb1e6a9f4a 100644 --- a/qapi/qmp-dispatch.c +++ b/qapi/qmp-dispatch.c @@ -13,7 +13,7 @@ =20 #include "qemu/osdep.h" =20 -#include "block/aio.h" +#include "qemu/aio.h" #include "qapi/compat-policy.h" #include "qapi/error.h" #include "qapi/qmp-registry.h" diff --git a/replay/replay-events.c b/replay/replay-events.c index a96e47e7740..9e5af5e8495 100644 --- a/replay/replay-events.c +++ b/replay/replay-events.c @@ -13,7 +13,7 @@ #include "qemu/error-report.h" #include "system/replay.h" #include "replay-internal.h" -#include "block/aio.h" +#include "qemu/aio.h" #include "ui/input.h" #include "hw/core/cpu.h" =20 diff --git a/scsi/pr-manager.c b/scsi/pr-manager.c index 40e1210eb21..fec0d68c4cc 100644 --- a/scsi/pr-manager.c +++ b/scsi/pr-manager.c @@ -13,7 +13,7 @@ #include =20 #include "qapi/error.h" -#include "block/aio.h" +#include "qemu/aio.h" #include "block/thread-pool.h" #include "scsi/pr-manager.h" #include "trace.h" diff --git a/stubs/linux-aio.c b/stubs/linux-aio.c index 84d1f784aed..b1a27e926e3 100644 --- a/stubs/linux-aio.c +++ b/stubs/linux-aio.c @@ -8,7 +8,7 @@ * See the COPYING file in the top-level directory. */ #include "qemu/osdep.h" -#include "block/aio.h" +#include "qemu/aio.h" #include "block/raw-aio.h" =20 void laio_detach_aio_context(LinuxAioState *s, AioContext *old_context) diff --git a/stubs/replay-tools.c b/stubs/replay-tools.c index c537485f401..17dc3babd9b 100644 --- a/stubs/replay-tools.c +++ b/stubs/replay-tools.c @@ -1,6 +1,6 @@ #include "qemu/osdep.h" #include "system/replay.h" -#include "block/aio.h" +#include "qemu/aio.h" =20 bool replay_events_enabled(void) { diff --git a/tests/unit/iothread.c b/tests/unit/iothread.c index f9b0791084e..a363bf8f709 100644 --- a/tests/unit/iothread.c +++ b/tests/unit/iothread.c @@ -14,7 +14,7 @@ =20 #include "qemu/osdep.h" #include "qapi/error.h" -#include "block/aio.h" +#include "qemu/aio.h" #include "qemu/main-loop.h" #include "qemu/rcu.h" #include "iothread.h" diff --git a/tests/unit/test-aio-multithread.c b/tests/unit/test-aio-multit= hread.c index c24200a7121..9179cdc6a32 100644 --- a/tests/unit/test-aio-multithread.c +++ b/tests/unit/test-aio-multithread.c @@ -11,7 +11,7 @@ */ =20 #include "qemu/osdep.h" -#include "block/aio.h" +#include "qemu/aio.h" #include "qemu/coroutine.h" #include "qemu/thread.h" #include "qemu/error-report.h" diff --git a/tests/unit/test-aio.c b/tests/unit/test-aio.c index 010d65b79a5..b3ca4d8a596 100644 --- a/tests/unit/test-aio.c +++ b/tests/unit/test-aio.c @@ -11,7 +11,7 @@ */ =20 #include "qemu/osdep.h" -#include "block/aio.h" +#include "qemu/aio.h" #include "qapi/error.h" #include "qemu/timer.h" #include "qemu/sockets.h" diff --git a/tests/unit/test-nested-aio-poll.c b/tests/unit/test-nested-aio= -poll.c index d13ecccd8c0..9ab1ad08a79 100644 --- a/tests/unit/test-nested-aio-poll.c +++ b/tests/unit/test-nested-aio-poll.c @@ -13,7 +13,7 @@ * aio_poll() calls. This test case checks that this is indeed what happen= s. */ #include "qemu/osdep.h" -#include "block/aio.h" +#include "qemu/aio.h" #include "qapi/error.h" #include "util/aio-posix.h" =20 diff --git a/tests/unit/test-thread-pool.c b/tests/unit/test-thread-pool.c index ea5234f9f48..1e2f05f8416 100644 --- a/tests/unit/test-thread-pool.c +++ b/tests/unit/test-thread-pool.c @@ -1,5 +1,5 @@ #include "qemu/osdep.h" -#include "block/aio.h" +#include "qemu/aio.h" #include "block/thread-pool.h" #include "block/block.h" #include "qapi/error.h" diff --git a/tests/unit/test-throttle.c b/tests/unit/test-throttle.c index dfa61c75ea4..52eb8966b3f 100644 --- a/tests/unit/test-throttle.c +++ b/tests/unit/test-throttle.c @@ -14,7 +14,7 @@ =20 #include "qemu/osdep.h" #include -#include "block/aio.h" +#include "qemu/aio.h" #include "qapi/error.h" #include "qemu/throttle.h" #include "qemu/error-report.h" diff --git a/util/async.c b/util/async.c index 39f391fb71a..80d6b01a8aa 100644 --- a/util/async.c +++ b/util/async.c @@ -25,7 +25,7 @@ =20 #include "qemu/osdep.h" #include "qapi/error.h" -#include "block/aio.h" +#include "qemu/aio.h" #include "block/thread-pool.h" #include "block/graph-lock.h" #include "qemu/main-loop.h" diff --git a/util/main-loop.c b/util/main-loop.c index b462598f76e..ad8645c30a4 100644 --- a/util/main-loop.c +++ b/util/main-loop.c @@ -30,7 +30,7 @@ #include "exec/icount.h" #include "system/replay.h" #include "qemu/main-loop.h" -#include "block/aio.h" +#include "qemu/aio.h" #include "block/thread-pool.h" #include "qemu/error-report.h" #include "qemu/queue.h" diff --git a/util/qemu-co-timeout.c b/util/qemu-co-timeout.c index 00cd335649f..6774440b287 100644 --- a/util/qemu-co-timeout.c +++ b/util/qemu-co-timeout.c @@ -25,7 +25,7 @@ =20 #include "qemu/osdep.h" #include "qemu/coroutine.h" -#include "block/aio.h" +#include "qemu/aio.h" =20 typedef struct QemuCoTimeoutState { CoroutineEntry *entry; diff --git a/util/qemu-coroutine-lock.c b/util/qemu-coroutine-lock.c index 2534435388f..fac91582b5f 100644 --- a/util/qemu-coroutine-lock.c +++ b/util/qemu-coroutine-lock.c @@ -30,7 +30,7 @@ #include "qemu/coroutine_int.h" #include "qemu/processor.h" #include "qemu/queue.h" -#include "block/aio.h" +#include "qemu/aio.h" #include "trace.h" =20 void qemu_co_queue_init(CoQueue *queue) diff --git a/util/qemu-coroutine-sleep.c b/util/qemu-coroutine-sleep.c index af59f9af984..edef1172844 100644 --- a/util/qemu-coroutine-sleep.c +++ b/util/qemu-coroutine-sleep.c @@ -14,7 +14,7 @@ #include "qemu/osdep.h" #include "qemu/coroutine_int.h" #include "qemu/timer.h" -#include "block/aio.h" +#include "qemu/aio.h" =20 static const char *qemu_co_sleep_ns__scheduled =3D "qemu_co_sleep_ns"; =20 diff --git a/util/qemu-coroutine.c b/util/qemu-coroutine.c index 64d6264fc74..d17135f585a 100644 --- a/util/qemu-coroutine.c +++ b/util/qemu-coroutine.c @@ -19,7 +19,7 @@ #include "qemu/coroutine_int.h" #include "qemu/coroutine-tls.h" #include "qemu/cutils.h" -#include "block/aio.h" +#include "qemu/aio.h" =20 enum { COROUTINE_POOL_BATCH_MAX_SIZE =3D 128, diff --git a/util/throttle.c b/util/throttle.c index 9582899da3e..8044f04ffc9 100644 --- a/util/throttle.c +++ b/util/throttle.c @@ -26,7 +26,7 @@ #include "qapi/error.h" #include "qemu/throttle.h" #include "qemu/timer.h" -#include "block/aio.h" +#include "qemu/aio.h" =20 /* This function make a bucket leak * diff --git a/scripts/analyze-inclusions b/scripts/analyze-inclusions index 50a7d95d9e7..c30e44f02ec 100644 --- a/scripts/analyze-inclusions +++ b/scripts/analyze-inclusions @@ -52,7 +52,7 @@ echo $(grep_include -F 'qapi-types.h') files include qapi= -types.h echo $(grep_include -F 'trace/generated-tracers.h') files include generate= d-tracers.h echo $(grep_include -F 'qapi/error.h') files include qapi/error.h echo $(grep_include -F 'qom/object.h') files include qom/object.h -echo $(grep_include -F 'block/aio.h') files include block/aio.h +echo $(grep_include -F 'qemu/aio.h') files include block/aio.h echo $(grep_include -F 'system/memory.h') files include system/memory.h echo $(grep_include -F 'fpu/softfloat.h') files include fpu/softfloat.h echo $(grep_include -F 'qemu/bswap.h') files include qemu/bswap.h --=20 2.52.0 From nobody Sun Dec 14 05:56:40 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1764787960; cv=none; d=zohomail.com; s=zohoarc; b=jmVih1ugIf7iD4C7xv/Mqz45eh5TUXrVzij6i29agsZfCdvjv5YY0GMx2tY82yfjh/EsIaeQMLrOMVR9FEqwYsqO2jHZ/XIjgmV6P9MPDvXbsHqPKC4VJAN1FyZP5cJtbt5OwyJPkX/jZjdGZH/tOW3prxJ5M0AGRAYORe/GfiI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1764787960; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=rOHEKYT4pyWLpkUTHzbPky15P6Jkd4KrLjQiaUa4++c=; b=cBKBrR4na/Og2PwyO5BMie6IwVErCexNOPMKAiLVME0UVZ79Sf/p/z0xo1kQcikdy1P1cCb/RSTtmJyFxA+NVTWzrLPDFd8IXUm5JMX8mTojavdoUqVoaLNpWgsswZtdgTHjHN3/lOfHYOud00jA5yh/qxmUtz2Z0rVRNg9jomU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1764787960921647.5915698046487; Wed, 3 Dec 2025 10:52:40 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vQrxK-0007jF-Fn; Wed, 03 Dec 2025 13:52:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vQrxD-0007bH-4E for qemu-devel@nongnu.org; Wed, 03 Dec 2025 13:51:55 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vQrxB-00013e-2G for qemu-devel@nongnu.org; Wed, 03 Dec 2025 13:51:54 -0500 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-625-92zQ_BsePkuXFVc5gWAlOQ-1; Wed, 03 Dec 2025 13:51:50 -0500 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-42e2e50cfaeso68933f8f.3 for ; Wed, 03 Dec 2025 10:51:50 -0800 (PST) Received: from [192.168.10.48] ([176.206.119.13]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4792a8ccbfesm63249675e9.13.2025.12.03.10.51.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Dec 2025 10:51:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1764787911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rOHEKYT4pyWLpkUTHzbPky15P6Jkd4KrLjQiaUa4++c=; b=IMwybbPx17hbPP+ujeXJEl0l6wgmTfhMDhJK3Klrv5XbRD3epJLMNwgGcyd+Mupvm5/6zL VPHLar2+0N5PRZQg9mPr+gI6DfWOx1vgvLd5e7rJboh0k4P5pKTaJIZmv9PbCTaCcQERmO SYFNvf3DIEhQWTGUkZ90mcHWMNRe04c= X-MC-Unique: 92zQ_BsePkuXFVc5gWAlOQ-1 X-Mimecast-MFC-AGG-ID: 92zQ_BsePkuXFVc5gWAlOQ_1764787909 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1764787907; x=1765392707; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rOHEKYT4pyWLpkUTHzbPky15P6Jkd4KrLjQiaUa4++c=; b=JsllujVPoslRJK6cudTJAfHkPsd6iZe4/YWT0d7NRYKPyn7iwoKg+mm5/xYravaWYB UKvwSAhz1aF8GXExAhuCpVpdjHhbcu3mz8tJwL8xYSXGRUfGcQP/cq8jIy+578Rnqkj0 Zrg6x//SO+EuJq6cAfZllCTHiv/MZLXwElXPLybshILdF3XgFJb7DfHRbmfzBUtN94YN z2beT4wnCTnwvbFp7NVx78sW+7GDDh4xMFhtrjF2XPue4sqMRXuqX0WIS3yn9V6qMz5P kYd4DCyamlyN3McmP/5zqSq9fs/L5p85jL/t53Q4fCKDFBqPaSv1QcmhkVTiJYgLW/VX TwxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764787907; x=1765392707; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=rOHEKYT4pyWLpkUTHzbPky15P6Jkd4KrLjQiaUa4++c=; b=hPtuaVvx5Ti7Jm0zrtHV98uOOoadHkpRijatLZiQZHxKIBP0hnAD3+f7pOlpJfC828 W+NgKY4fXpCkBKgVikgqm3jcgPAM0J7avc/yVu/Cz+DpqInYcw+EGadYcMj97qI7g+gc +HNjAcNzDAcYS7jJBOVI6hPQhVVY+Ai20WTDLAkb9nGHUpL/vU1J1/YRYOhf/6U+p/2D VIOOoeeylz4xrwH7T3q9znmow9Jr9WzPD2ytCXtONFCKRREDL4i0jeHz28fJBJbu4+3Y 92vhx58jYKHosABlZ0+Vi3XOIpTdy9RpHlvEWGgcbSDztiCGhnA3BmbBg3WFlJi7egjv l/OA== X-Gm-Message-State: AOJu0YxLavOsQ/Z7uAKCr29u+jFSv7RWKwYelN6I0+6qRsa2r1+Y6R1H 2uM+NXPigQqbNRG61gZAelhiZgEd/r6XsD02BLATESe6RoyVajSKIZXUtXW40qf94MvyIDI0MG4 ObuQu4eoMDVhU/dO2Tzh832BgbCsrmdsji7EQtHNU7QOhTghm5gtjVlMfveYWuAriuSwh6tZzYH gtkIR2L2TdcPygYLKRB5sEoZYbNBylS6gbiAwj+OET X-Gm-Gg: ASbGncv35y3T4lPdTjek8WD8M5IrXOvaKHn2RHglEYPicryPt9PWQ+vn665QG6dIYPE ysXfEAlMpUyw/lNesnKh5u+txds3DVjJjifTv04UFh5+pPss7ScFLDk0z/lWT0CRVuuVH/aZdPW 7ptBkZ/bsDhexAlpUAFQICspG6l6UCwySVYQzoyzM/Td6HelWxk8IYmBRX95VC6yEwpOED0sEuA nvErYgWNf1+zxXeSdjXaKEoipvkAeIveUFAUCiNFAnPQNqs3I5Swpfu1ccRMmanJhrPUEWwvLBn fOIi4CLsXwvUDqPyKsGve2EbooOyn+o1+ipR8CpJUdmEBeRKRPLfOgJnSiXNzA2rSDWYze57Bho m/YBFRMTIk32tboM9P7e5GA5xPrD/GgcV0K2k+13GBUEFQHmTc9Bk+fFWta3gQZMYDRTOZFf+0D EgU5RB/ZZCVVrLTr8= X-Received: by 2002:a05:600c:4f54:b0:479:1348:c614 with SMTP id 5b1f17b1804b1-4792f3954f4mr1223185e9.26.1764787907160; Wed, 03 Dec 2025 10:51:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IHL9g7PkzdZcODNM84vuAtPVz/gXvLoexhpoolPnNGezQDDuivly5miPVsLBT6jzPSwgEwnAA== X-Received: by 2002:a05:600c:4f54:b0:479:1348:c614 with SMTP id 5b1f17b1804b1-4792f3954f4mr1222805e9.26.1764787906619; Wed, 03 Dec 2025 10:51:46 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, kwolf@redhat.omc Subject: [PATCH 5/5] block: rename block/aio-wait.h to qemu/aio-wait.h Date: Wed, 3 Dec 2025 19:51:33 +0100 Message-ID: <20251203185133.2458207-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251203185133.2458207-1-pbonzini@redhat.com> References: <20251203185133.2458207-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1764787962158019200 Content-Type: text/plain; charset="utf-8" AIO_WAIT_WHILE is used even outside the block layer; move the header file out of block/ just like the implementation is in util/. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- MAINTAINERS | 2 +- include/block/block-io.h | 2 +- include/{block =3D> qemu}/aio-wait.h | 0 block/io.c | 2 +- blockjob.c | 2 +- io/channel.c | 2 +- job.c | 2 +- net/colo-compare.c | 2 +- net/filter-mirror.c | 2 +- util/aio-wait.c | 2 +- util/vhost-user-server.c | 2 +- hw/display/apple-gfx-mmio.m | 2 +- hw/display/apple-gfx.m | 2 +- 13 files changed, 12 insertions(+), 12 deletions(-) rename include/{block =3D> qemu}/aio-wait.h (100%) diff --git a/MAINTAINERS b/MAINTAINERS index 24cf2946e77..4582c5f72a9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3072,7 +3072,7 @@ F: util/defer-call.c F: util/fdmon-*.c F: block/io.c F: include/qemu/aio.h -F: include/block/aio-wait.h +F: include/qemu/aio-wait.h F: include/qemu/defer-call.h F: scripts/qemugdb/aio.py F: tests/unit/test-fdmon-epoll.c diff --git a/include/block/block-io.h b/include/block/block-io.h index 7925e2241e6..d34d846bb2a 100644 --- a/include/block/block-io.h +++ b/include/block/block-io.h @@ -25,7 +25,7 @@ #define BLOCK_IO_H =20 #include "qemu/aiocb.h" -#include "block/aio-wait.h" +#include "qemu/aio-wait.h" #include "block/block-common.h" #include "block/graph-lock.h" #include "qemu/coroutine.h" diff --git a/include/block/aio-wait.h b/include/qemu/aio-wait.h similarity index 100% rename from include/block/aio-wait.h rename to include/qemu/aio-wait.h diff --git a/block/io.c b/block/io.c index c4a43013210..cace297f226 100644 --- a/block/io.c +++ b/block/io.c @@ -25,7 +25,7 @@ #include "qemu/osdep.h" #include "trace.h" #include "system/block-backend.h" -#include "block/aio-wait.h" +#include "qemu/aio-wait.h" #include "block/blockjob.h" #include "block/blockjob_int.h" #include "block/block_int.h" diff --git a/blockjob.c b/blockjob.c index db7c3a69a0c..f3b11cc7a19 100644 --- a/blockjob.c +++ b/blockjob.c @@ -24,7 +24,7 @@ */ =20 #include "qemu/osdep.h" -#include "block/aio-wait.h" +#include "qemu/aio-wait.h" #include "block/block.h" #include "block/blockjob_int.h" #include "block/block_int.h" diff --git a/io/channel.c b/io/channel.c index b7966abc4f0..cc02d997a4d 100644 --- a/io/channel.c +++ b/io/channel.c @@ -19,7 +19,7 @@ */ =20 #include "qemu/osdep.h" -#include "block/aio-wait.h" +#include "qemu/aio-wait.h" #include "io/channel.h" #include "qapi/error.h" #include "qemu/main-loop.h" diff --git a/job.c b/job.c index 0653bc2ba69..e7479084726 100644 --- a/job.c +++ b/job.c @@ -28,7 +28,7 @@ #include "qemu/job.h" #include "qemu/id.h" #include "qemu/main-loop.h" -#include "block/aio-wait.h" +#include "qemu/aio-wait.h" #include "trace/trace-root.h" #include "qapi/qapi-events-job.h" =20 diff --git a/net/colo-compare.c b/net/colo-compare.c index 95018b47049..c356419d6a8 100644 --- a/net/colo-compare.c +++ b/net/colo-compare.c @@ -30,7 +30,7 @@ #include "migration/colo.h" #include "util.h" =20 -#include "block/aio-wait.h" +#include "qemu/aio-wait.h" #include "qemu/coroutine.h" =20 #define TYPE_COLO_COMPARE "colo-compare" diff --git a/net/filter-mirror.c b/net/filter-mirror.c index 8e01e98f405..d2bfde42e85 100644 --- a/net/filter-mirror.c +++ b/net/filter-mirror.c @@ -20,7 +20,7 @@ #include "chardev/char-fe.h" #include "qemu/iov.h" #include "qemu/sockets.h" -#include "block/aio-wait.h" +#include "qemu/aio-wait.h" =20 #define TYPE_FILTER_MIRROR "filter-mirror" typedef struct MirrorState MirrorState; diff --git a/util/aio-wait.c b/util/aio-wait.c index b5336cf5fd2..53913c4bd1b 100644 --- a/util/aio-wait.c +++ b/util/aio-wait.c @@ -24,7 +24,7 @@ =20 #include "qemu/osdep.h" #include "qemu/main-loop.h" -#include "block/aio-wait.h" +#include "qemu/aio-wait.h" =20 AioWait global_aio_wait; =20 diff --git a/util/vhost-user-server.c b/util/vhost-user-server.c index 1dbe409f829..1536d97baf8 100644 --- a/util/vhost-user-server.c +++ b/util/vhost-user-server.c @@ -11,7 +11,7 @@ #include "qemu/error-report.h" #include "qemu/main-loop.h" #include "qemu/vhost-user-server.h" -#include "block/aio-wait.h" +#include "qemu/aio-wait.h" =20 /* * Theory of operation: diff --git a/hw/display/apple-gfx-mmio.m b/hw/display/apple-gfx-mmio.m index 983fc1724a0..58beaadd1f1 100644 --- a/hw/display/apple-gfx-mmio.m +++ b/hw/display/apple-gfx-mmio.m @@ -14,7 +14,7 @@ =20 #include "qemu/osdep.h" #include "qemu/log.h" -#include "block/aio-wait.h" +#include "qemu/aio-wait.h" #include "hw/core/sysbus.h" #include "hw/core/irq.h" #include "apple-gfx.h" diff --git a/hw/display/apple-gfx.m b/hw/display/apple-gfx.m index 174d56ae05b..e0a765fcb1f 100644 --- a/hw/display/apple-gfx.m +++ b/hw/display/apple-gfx.m @@ -17,7 +17,7 @@ #include "qemu/log.h" #include "qapi/visitor.h" #include "qapi/error.h" -#include "block/aio-wait.h" +#include "qemu/aio-wait.h" #include "system/address-spaces.h" #include "system/dma.h" #include "migration/blocker.h" --=20 2.52.0