From patchwork Thu Jan 16 16:02:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857889 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp275124wrb; Thu, 16 Jan 2025 08:03:50 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVLJmUqAtB5F060MOBtYORy1tZZCDF6fGuVUJTnpMgxrEBYUburPHIvK9zMbTYA1lYn0eK7rw==@linaro.org X-Google-Smtp-Source: AGHT+IEHlcC3eKMD5hhhcH30rtcnUTeRkwFHec5fk+TLJohJv2t90tfK29HYvn83v7iMBeP5RNtf X-Received: by 2002:a05:622a:40b:b0:46c:7737:c4ef with SMTP id d75a77b69052e-46c7737ca9dmr469776061cf.22.1737043429820; Thu, 16 Jan 2025 08:03:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737043429; cv=none; d=google.com; s=arc-20240605; b=Y2smdTR2g1xXb9TWyHUu5laWZnBefTDMpGqBdMSJhyVXDhfd1Ljkmp+13U0Lo8kzfJ Ky5RajRryngaGRyX3AGbxY7vXfuX+PaEJJ3RI+fi8pfaK89voaduz8f9xL04xeCZztV6 sJqiInCmARo/+Nf+vw4q+rAowE8mDkJhYonZcwYADJp7KG9tEUgOLDEe39UVCS/yjD5W 44ESBgR1pRQr6sUbUVxX6oaOX2+PcfAg640yZrnLwgdtu9JQZrrLJlbA2czg/TW9OCUi UzxhQVPaWVMf6j95LaH8QWExDmj9DJo03aKYYlCOy5Gfsc1U1qwQF7wpWDAP2f0VeMij ZEBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3DqQTTK9Sh5XJ9myCGTy9pkOibsLIRbJz9Tu9rOcYZ4=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=OXSotIbiVkMPxYwdVq4gaesxe6mS7SepJ8bwvGZHOgueg6hizqvSyg376ekjuOsIsd 5411SSc1P9VPZ+BeUSZpK4fquiaWjOtRWKj21k7XrgR9XHVqvezqivILw+60ziXoNG79 6AdUUgbD4SjRambAPOO023K6viz0ivyVhm+8sC9aIBtupWi3doXkEZpJbcTwocM41KOi PyYWn8CN/c8i1HK6HLKVdLmykp/85H6L8M08NZnvSdQ0l/FJi1Zq6gblmmxoEzS7w/CT 7q8N8hO/WWKk37sA/VqQH2DTSJeFU/UahtvY6nwTwDLXGH+mvwqscN7VpLksAw8wO3BX xMMA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ScnNga2I; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46e1048faa1si1598501cf.560.2025.01.16.08.03.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:03:49 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ScnNga2I; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSLH-0003hA-VX; Thu, 16 Jan 2025 11:03:36 -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 1tYSKx-0003TR-Fm for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:15 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSKu-0001D9-0z for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:15 -0500 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-385e1fcb0e1so611815f8f.2 for ; Thu, 16 Jan 2025 08:03:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043388; x=1737648188; 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=3DqQTTK9Sh5XJ9myCGTy9pkOibsLIRbJz9Tu9rOcYZ4=; b=ScnNga2Iutp8Sefh0kNKsZQ1ZLaEsQIkxcDKSqtzoeMlGZrcVFk2ssdhPAq3bjDfeZ zPHnuu+qZhVxUUfVvtFAySdOkkhTjOifaHFk1qUcKgqobDbkmretN3w7yCymDkN9RYac KFBS8BRhWeBB7+rX9OQtFP5HI9qG3OMq1dWjS48d3BlEA02s+pzKyG8C1UTAlOG2QkGk W1CmT8Rj/bDdpDxtMLkFmnJS2uarUSXaEaLI34t+buAkILe5C/pFjqh9fH5XSaGpWZd8 NVZLTFhJ5i5eYO1/4uAhF/8URg4j8mgGpzVm819tOVUfUBZo9MTv+BTMw9JFec+Q0e1T KhLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043388; x=1737648188; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3DqQTTK9Sh5XJ9myCGTy9pkOibsLIRbJz9Tu9rOcYZ4=; b=bcX79DxijG2KCBlc75QNuM3ifSrJo8YUFAXpRpKkicSI5jQL2KDEO79WSsWqSvwO1I 5KOjtNvVUwCOPdSOf/U2dD2lTa1eF7hFzukqLUwJL6oBLzK+WN05jXUpwb735WfcDbhe 8BuHw1nDbKfcZ/W9hRYX3iwZrVuXWWTcAHX095vJkl/g6lODv+uCpjM1yk25JgA6DRrz RFqGid37MgiXaVAn/Z31Sd+r4bdNVqrdfGwaAOCD4alsi6/GUIMl+9lpuhxjT5dcDYgv bZkmUpARMS+KtaTkUHO2WICfiHWr0K3nyRUovvADEjpa3NruHOX/svHEjqej1M+sj9LP a/Gg== X-Gm-Message-State: AOJu0YwegVrsk1JDijNJ6DqkIde9e/khe2LMh8CPAdTahC79uVx0Y3sk NEX8wat42Y8R7YbUGZEUzme6fXE3V3ACULiZm7QluUuvfGaZpIR7chK6tJARRiQ= X-Gm-Gg: ASbGnct6mSrWcING+Hty3xYslcQF39gDa/KEkmnfFmyvfA6sH24UTkGE2O8mXJCAUiZ hp02/ejGnE1gVG5dSHHBIv6WfpmLRGuNvBL/0l0Jb2uU2W1DcLI6Dd+PXzqQ+nLrKFTUZI/5B2T 7/2fNCUK5zfhppQ/jpwskJ9xYviK0+xT1c0oWgtuRBnDbgZwiRlDPdwNM4EgPTxTbEh9M3H8q6g /rhFyYtyhxeccpQnBHX9/msePpoIn/7y86jbt19T6qkex50V0ilk90= X-Received: by 2002:a05:6000:709:b0:386:3803:bbd5 with SMTP id ffacd0b85a97d-38a8733a1f9mr31718915f8f.45.1737043387970; Thu, 16 Jan 2025 08:03:07 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf322b337sm220758f8f.59.2025.01.16.08.03.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:03:07 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 7ED716082D; Thu, 16 Jan 2025 16:03:06 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 01/37] semihosting: add guest_error logging for failed opens Date: Thu, 16 Jan 2025 16:02:30 +0000 Message-Id: <20250116160306.1709518-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This usually indicates the semihosting call was expecting to find something but didn't. Message-Id: <20250109170619.2271193-2-alex.bennee@linaro.org> Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée --- semihosting/syscalls.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/semihosting/syscalls.c b/semihosting/syscalls.c index c40348f996..f6451d9bb0 100644 --- a/semihosting/syscalls.c +++ b/semihosting/syscalls.c @@ -7,6 +7,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "gdbstub/syscalls.h" #include "semihosting/guestfd.h" @@ -287,6 +288,7 @@ static void host_open(CPUState *cs, gdb_syscall_complete_cb complete, ret = open(p, host_flags, mode); if (ret < 0) { + qemu_log_mask(LOG_GUEST_ERROR, "%s: failed to open %s\n", __func__, p); complete(cs, -1, errno); } else { int guestfd = alloc_guestfd(); From patchwork Thu Jan 16 16:02:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857890 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp275385wrb; Thu, 16 Jan 2025 08:04:11 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWji+i642NDQh0nwJvScpsOoO0Fvh64ZvK5JcNmuGo8dkUk5Q8jxQPC6Wn5SjiOz96CquyFOA==@linaro.org X-Google-Smtp-Source: AGHT+IFPdx1b0E+ZB//7T2aMZMdKPiYi7OJhiOh+iCoEcvKuRWYFJ4Vd92ev1vFJCXFJPQLX9wNR X-Received: by 2002:a05:6214:4282:b0:6d8:7ccf:b692 with SMTP id 6a1803df08f44-6df9b1dfc20mr454795146d6.11.1737043450856; Thu, 16 Jan 2025 08:04:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737043450; cv=none; d=google.com; s=arc-20240605; b=YWyoNF9h73Ssj/4RX3J8H5CJaRGZffxMYl/ZIDbnK4zYolmKBrKX8YyWsU/jU5CN9L SU1Jbz+D8M8NCSmtZ6yRSpjttag75sNjAnqP8P1PVxKTPc6Bd0yc9jOqdamZQl5qTdl6 EV7n+s4a3G2ZBjy4f6JrmTdYV1vp/fzRe+VLqqNFeWArn1ctiMc8EMXr2ptjjR8kjsAw T0YrHFQse9AKLnvGVylw0qH+jG+kp8QPu20nwsdz9HYC1rn4h4HYTAfbTRiMvyq6d7jk 3p84vQmStFfQGYLWwzowIh/uBzHh+yO5Rxlj5sadc+9JyRPaVgNWwgAUwxZAE+M5jxc5 W+iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DjEsdOpQ49q8jWvklUeiIlGfQQiMPZKhuPb/zwxQMo4=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=KX8hTkg1GwD4sRgU7oqjizQ/9+wcb4DJTQMWC7QoKNyNy54L9z2KpuwWfVJJfD9iyg AJtSGiIoo0FaU4X1VZirTpSELHQfuzNq3vD/oimg7GuDx/bsVW6RFVTDpiAeWbYAM/C1 4oGSmzijDgi6iiYHJuPIkcIj0aNTeeWAdwyBdsgpXYXIMhSCU1dEQBOiRNBMntNW0M1n vECaPbbJc4fKO8xKxsKysz7N79id7/SAtTJWfSh6ZJNCrowbODOhUPF4CyOTr6jEdUPs WevxlstGhOzGRxxY8PmUN5czPFyKFK3lCZbvtJ/HU0W99W7tvlmA/+7r4+n8YnTP62NN hfTg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="s/X2538t"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7be614f59d7si30351385a.635.2025.01.16.08.04.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:04:10 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="s/X2538t"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSLa-0003vH-Ki; Thu, 16 Jan 2025 11:03:54 -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 1tYSL2-0003WD-9o for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:20 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSKv-0001Ee-Iu for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:19 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4368a293339so11632465e9.3 for ; Thu, 16 Jan 2025 08:03:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043392; x=1737648192; 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=DjEsdOpQ49q8jWvklUeiIlGfQQiMPZKhuPb/zwxQMo4=; b=s/X2538taag0l1vyunYzxObcXr7d1ZMmD0SlOYJvw8df925aUV1aEvEc8zoOveoqKc s9uHm+eDDI3NuJlqVuU9iFxVjDYf4hxu36DZ3FlMEAArIpNm4vqSGW8wKVoXft+TvWF1 Bqg0oKydoK4j0UMoBDEICcU1GO7NLPLpIDMN0yPkR3IjiICVy1pG52NZshhGB44TgjKv 6Kq90CTjASm15/NPrKMs7wsNr5PkfSoYQIHdL0Xv8TMQDtz3/ZiaXOKg6z7AysfwvfrP /X+5+HAzjSVBx+BlQ55uG2ZN5W7rH2dtFoS3us3jwMUByx5oTVzTjOfl4toaCxXqLFCy Ep/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043392; x=1737648192; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DjEsdOpQ49q8jWvklUeiIlGfQQiMPZKhuPb/zwxQMo4=; b=VDTIa0/3aiNAD3dErrMrh3vPZZwmwo50EU5ZbpJrYkj3fn7KLDfFgBK8reQRuDADBL Ji6xkq5/wYojB8jIFd4IqadcuKjDaGmtEVXQAW+7v3WLDFbfcLi664OTfpfxvxUu+yq9 bWmKbjFUmD8m2iufNF6E1TpdgZG+sNlgZAzn4u/BdnOqBXW3PPiZaFqgNn9EglkSRE+j pDmeKUVre5kDbTukKwRrxMDmn0P5ZiVJawxq5dPgnYJnGsxGm85a5BQpPJVWzN0fBZx4 vHQlVl9bcvD7bDeLWylKzGtor7wyOAxY/BNQUPEdhBXkmb6lHJXqkm/5aRIPOiGxQ9ph 5ykA== X-Gm-Message-State: AOJu0YxjmPkLCzeS5vKvaQ6lHNenzuiOxE69Fpd//OolaI6C0uz8kPW2 26uG3foDjHQ8V6jfjF3qprfpAlQYf0sPi9q+VqtHRoskz2S31L+V30F1LWfrg+M= X-Gm-Gg: ASbGncsvgBWffeveyaswYPeg3NUtszSWhUVeaEpkMy/vCbRupz6rdhm4CbkAQLm0I1q rBDHK3KQhUst3TcLIWeJl1TtPMrXrreqEHoG+h8qAbT4RHar1nydx8NZ4vLK+n818ELBX7UJHvM xlaBJpfKzOlrweGjBYtgaAjl/4WOk0guboIMgWrV0XTtE9YuffSQGNaXpi69TcbC5xEAn5aHcGq lPg5PjrdxsnacD2rn+Yx6P95xp4SeRFWAuSQxLkIkdfr0jocGlJ4HU= X-Received: by 2002:a05:600c:354e:b0:434:f9c4:a850 with SMTP id 5b1f17b1804b1-436e269c42dmr352667015e9.10.1737043390405; Thu, 16 Jan 2025 08:03:10 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf3275562sm205033f8f.66.2025.01.16.08.03.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:03:08 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 966B56083E; Thu, 16 Jan 2025 16:03:06 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 02/37] semihosting/uaccess: Briefly document returned values Date: Thu, 16 Jan 2025 16:02:31 +0000 Message-Id: <20250116160306.1709518-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x331.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Since it is not obvious the get/put_user*() methods can return an error, add brief docstrings about it. Also remind to use *unlock_user() when appropriate. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20241212115413.42109-1-philmd@linaro.org> Signed-off-by: Alex Bennée --- include/semihosting/uaccess.h | 55 +++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/include/semihosting/uaccess.h b/include/semihosting/uaccess.h index c2fa5a655d..6bc90b12d6 100644 --- a/include/semihosting/uaccess.h +++ b/include/semihosting/uaccess.h @@ -19,41 +19,96 @@ #include "exec/tswap.h" #include "exec/page-protection.h" +/** + * get_user_u64: + * + * Returns: 0 on success, -1 on error. + */ #define get_user_u64(val, addr) \ ({ uint64_t val_ = 0; \ int ret_ = cpu_memory_rw_debug(env_cpu(env), (addr), \ &val_, sizeof(val_), 0); \ (val) = tswap64(val_); ret_; }) +/** + * get_user_u32: + * + * Returns: 0 on success, -1 on error. + */ #define get_user_u32(val, addr) \ ({ uint32_t val_ = 0; \ int ret_ = cpu_memory_rw_debug(env_cpu(env), (addr), \ &val_, sizeof(val_), 0); \ (val) = tswap32(val_); ret_; }) +/** + * get_user_u8: + * + * Returns: 0 on success, -1 on error. + */ #define get_user_u8(val, addr) \ ({ uint8_t val_ = 0; \ int ret_ = cpu_memory_rw_debug(env_cpu(env), (addr), \ &val_, sizeof(val_), 0); \ (val) = val_; ret_; }) +/** + * get_user_ual: + * + * Returns: 0 on success, -1 on error. + */ #define get_user_ual(arg, p) get_user_u32(arg, p) +/** + * put_user_u64: + * + * Returns: 0 on success, -1 on error. + */ #define put_user_u64(val, addr) \ ({ uint64_t val_ = tswap64(val); \ cpu_memory_rw_debug(env_cpu(env), (addr), &val_, sizeof(val_), 1); }) +/** + * put_user_u32: + * + * Returns: 0 on success, -1 on error. + */ #define put_user_u32(val, addr) \ ({ uint32_t val_ = tswap32(val); \ cpu_memory_rw_debug(env_cpu(env), (addr), &val_, sizeof(val_), 1); }) +/** + * put_user_ual: + * + * Returns: 0 on success, -1 on error. + */ #define put_user_ual(arg, p) put_user_u32(arg, p) +/** + * uaccess_lock_user: + * + * The returned pointer should be freed using uaccess_unlock_user(). + */ void *uaccess_lock_user(CPUArchState *env, target_ulong addr, target_ulong len, bool copy); +/** + * lock_user: + * + * The returned pointer should be freed using unlock_user(). + */ #define lock_user(type, p, len, copy) uaccess_lock_user(env, p, len, copy) +/** + * uaccess_lock_user_string: + * + * The returned string should be freed using uaccess_unlock_user(). + */ char *uaccess_lock_user_string(CPUArchState *env, target_ulong addr); +/** + * uaccess_lock_user_string: + * + * The returned string should be freed using unlock_user(). + */ #define lock_user_string(p) uaccess_lock_user_string(env, p) void uaccess_unlock_user(CPUArchState *env, void *p, From patchwork Thu Jan 16 16:02:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857895 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp276160wrb; Thu, 16 Jan 2025 08:05:13 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUfg35Put4D9xqc61x1QoX2g3nwrSk6aXgWbY1aAw2ATvqC27DSEld108/bHIpqU+4gJvhUgw==@linaro.org X-Google-Smtp-Source: AGHT+IGYLgmovkbjqNLkbdRPNDFjEVTg8cgEwkWcx9FsaJgkr29BEIXoeSEdWcrlziTeAYIWjPLe X-Received: by 2002:a05:6214:c46:b0:6d4:18ce:117f with SMTP id 6a1803df08f44-6df9b1f2416mr523184016d6.20.1737043512866; Thu, 16 Jan 2025 08:05:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737043512; cv=none; d=google.com; s=arc-20240605; b=Kgu0KlBJ0EuqEMuALeyAQjdgopgbqaWISWJycXuvyPaAAMqejNdb4AuoxP0bV0i7kL ZcL2ROWh/7wMw27USm8zPBQCUb+PliaKcIRl5u+h9rW3BHZw/7FihVXcoHvDtIQ2F3Et 2DdjyI1jdYFgH+BGyABhP/r/cwzl6y4qMlGZTL+67rb1ZRDjtA+p1Nh/5XhNZ4/pYVDG C7HfmGINRu+3D5OEgEdpLwCp9o4LXIcUJzDCVJh/JKnEQjWaEngARdErahMPpBBNmFl9 A1mfuipJvKqUKVe1imHy9TkdxFml6Rj8BkXxijtbt9PiF5kRlgpJP/icS9Bv7PapuYhd UhPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=swWbfqbBQuWTwxy/6Yz7+TAY9SVPbs3mxyJnC781jXo=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=H8fH8vw+1W/adPFr6/7jgVcuBOceTJLKIZG8ZS/WQiuD9z7PYbbeXio+8V9G3v73Q1 fCnVMqvEa5br7HV2YNAUc6YAC4qhBNeBTAjLb5G2U8lZ9hjDHiTwZHAinmJA4ymvjOoc Bz9EjRbEDH/oagctLkdvqjn/VUahfuFKgYkjGfHyv+Wf9i4hL2x7nIySxFLqCGyDFU2J 6+rwPFPGLAFqYEwk2AJlmdMM7RLxXIAyVyhvvDnnDM431OLUB/0okOZigLyrHyLdlKVb 8ZmdNsXHQC86R8hVWpqKjx+hmkF8rYOOW9wu+bODC1ZWvSFEgr5YlJEblp8K3+36lBzV mRAA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GLK8vyRy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46e1040a0e0si1837941cf.291.2025.01.16.08.05.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:05:12 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GLK8vyRy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSLQ-0003nR-OV; Thu, 16 Jan 2025 11:03:48 -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 1tYSKy-0003U9-FV for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:18 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSKu-0001DI-9X for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:16 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-435f8f29f8aso7224955e9.2 for ; Thu, 16 Jan 2025 08:03:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043389; x=1737648189; 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=swWbfqbBQuWTwxy/6Yz7+TAY9SVPbs3mxyJnC781jXo=; b=GLK8vyRyDD60NByImrO1vr9zCDqVSn5Q4iYpZTonThQ1VZ4F6/epwlQWvKXhNiRu9K ZvyXFjc0xa4Q6Gx+f71arOXCsv+keMSSDX7NnVo6VFgldQajT6TtHX2zXZLp1rCRQqbi tCH8twoG89MdxBs3+ljO7IhYhkp8VAqBJjZWq9dgIUWZ1cEGTH0bEacO9pPwe55G3n3a ommwJ3e5vCuYX8TknpdyjPq/rfqtFFXrhnzR5v+r3Z+kGHr7R8e9yT0xvPRnizw4gqz6 dltxUWoXzERTvZdaQRgOp2aMHE8VWaV9/yRDB8svILSertR5OlAHapha0KjNT2xrNj+/ sGxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043389; x=1737648189; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=swWbfqbBQuWTwxy/6Yz7+TAY9SVPbs3mxyJnC781jXo=; b=sGdD9PXOBJzEqJnBNU+S9L9lMnYdpTNskx5xPnD23Skes5HZNEcIxojCxxk/UgTYMs VEKmjREjemTlTE1826akaaioFMkA3U2+s6yG9/4K7JghcT9fZW9+isL6+QyPr6ObIM6/ EGc66ut5oCuyVx787FwqG3N3OvVf4iPpAf8IhPI3gXcAcfYMvRDvs8mF2rsmS+DB7PRB WqMNNik4OWygDF0HbVRc16zyBaY6VHU33eL0s9WFMfibZr6x1jP6yIXuyGkKtQvGsV8H HZDspsmutsIdeNyp+uJch702+sqUk/Xvb48yR4QwQruuD2cTTILPFEADXon0ec4t3giJ nF4g== X-Gm-Message-State: AOJu0Yy8HW/AY0Gx+B0S+1epzGZdxYwjn6kclB8EQsKWxEMnWqLFvphp yoz+Jcyhppg4/HPewGIBhUy18J+8L+yuEAr7q5kjHr93KPHWJZpKQWCmIWWBqFM= X-Gm-Gg: ASbGncs9AVI9i4pE+bcTsbOeQ+hIK5aK2aHRC/ZetdZ8j1FxuAYQi2UZ+twXTzWzwrE 1PldncUXXnEGkmmOwBa68oKIY1Bl/Usalaa/L/eVwn0cP9SaG2HEvIa0JInQiMCIE/xb8wVc60G 5uS92q4v+VMUxLvuWCY/dnM5pyGigD09A72XKEnkvQVsi8DpuiUUoJuef+5bnBrt6cRfGer3MHW 28mSzoaRniPPOWIrPo3dwROiJztvCfKmZ3ZS9ID/SZoll6HcxZG2AE= X-Received: by 2002:a05:600c:1987:b0:436:1aa6:b8ee with SMTP id 5b1f17b1804b1-436e2677378mr298564195e9.2.1737043388725; Thu, 16 Jan 2025 08:03:08 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf321537dsm232527f8f.13.2025.01.16.08.03.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:03:07 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id AF04C6084C; Thu, 16 Jan 2025 16:03:06 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 03/37] semihosting/syscalls: Include missing 'exec/cpu-defs.h' header Date: Thu, 16 Jan 2025 16:02:32 +0000 Message-Id: <20250116160306.1709518-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32e.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé target_ulong is defined in each target "cpu-param.h", itself included by "exec/cpu-defs.h". Include the latter in order to avoid when refactoring: include/semihosting/syscalls.h:26:24: error: unknown type name 'target_ulong' 26 | target_ulong fname, target_ulong fname_len, | ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20250103171037.11265-2-philmd@linaro.org> Signed-off-by: Alex Bennée --- include/semihosting/syscalls.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/semihosting/syscalls.h b/include/semihosting/syscalls.h index b5937c619a..6627c45fb2 100644 --- a/include/semihosting/syscalls.h +++ b/include/semihosting/syscalls.h @@ -9,6 +9,7 @@ #ifndef SEMIHOSTING_SYSCALLS_H #define SEMIHOSTING_SYSCALLS_H +#include "exec/cpu-defs.h" #include "gdbstub/syscalls.h" /* From patchwork Thu Jan 16 16:02:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857904 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp279019wrb; Thu, 16 Jan 2025 08:09:36 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUmrd4l/6u5I7ZidqMqxhS55gHIPpOiWsswKvoN+nRzx44U4D/0bZOh+rAA8GIa9cxYRx17Eg==@linaro.org X-Google-Smtp-Source: AGHT+IHB0jeT9g8GDrtHpbWhFlBqkdNugNEJDr6Wv3dO2KCoZw7ZQ4LPfF09GvJJRldSbV3gS82B X-Received: by 2002:a05:6214:5a08:b0:6d8:b594:c590 with SMTP id 6a1803df08f44-6df9b1d2277mr466482776d6.6.1737043775949; Thu, 16 Jan 2025 08:09:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737043775; cv=none; d=google.com; s=arc-20240605; b=dkBIapZj+4dRNrOnhG8Ar/AaN/5evLbek11PI6770TlvkKYBb612A2wtIdSWmoLod7 +iAOOGx1FxxbU07esP/MjpPJoUPM+BL/mxYbsdPV3I+/5jVv7kx1Q08J4GYubli5eDGP mRBiCpRVt1Z+fqLCTCgNsiVkJCP2+HIBNkRvqL2o3BQ6mGLsO58kSDe9wwyjk4UqQjRG lE1oZSBpUMz8PoMD/hkEhoc0BwfZ/7wr0gylY5Et67IWrr7XJiWdeW2F4q+JW+UBcbyb r+mH9hjvqOqot/9k+0ptcFeuCokZpG9K/nYqfhMuBnv5Yt7FDc/xfgjom+1I5ezM0DjI ftbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7fkCPXOa8A9Xl79fpL/YYXVm1xiiiaH5KvVpCQywK3U=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=R4OASZkq421+aq21GDyOUmru1dvO9YDFLsjmX0ZamHNTM52F9zk/Vf28zgFjhOyJsa 7bOER963Co3Y/iyY52FQf/WeTuTV5kHrirjElNTAJ7sNnB+UenTTxar41ie4CyLCoc0y cXsGWYoixYZT32wHV11LkCSH1c0LtGymgD6yXcnNYUKnYx/QqCz9oQu7m1Z02nsjIHS6 Bl1ditSEPS8mXxwfM6v/WpSFL2h/dmEXitWLJ7v5mcisRd5Vktsf9XXsXz6+Su09RrPW Leejklxu4w1WRQ0ohbTA0Ih1faVhQnnexG2ULdz0S7VkCSBjDL2DpCrA7UEpPmL3hdrr QeiA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l3KhOnra; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e1afc1bb0dsi2973556d6.142.2025.01.16.08.09.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:09:35 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l3KhOnra; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSLc-0003z4-3L; Thu, 16 Jan 2025 11:03:56 -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 1tYSKy-0003UA-IQ for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:18 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSKu-0001Dm-9t for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:16 -0500 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-385e0e224cbso607690f8f.2 for ; Thu, 16 Jan 2025 08:03:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043390; x=1737648190; 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=7fkCPXOa8A9Xl79fpL/YYXVm1xiiiaH5KvVpCQywK3U=; b=l3KhOnra/ebllztPf8lZiKoPSuFutKDaLy24gnm7FUd0Ri9urTMRSTwZJWVmSecI7F pX9fQsgO8PWVP3Z1L9E9gogqMSLupzfOHekSR137/vbdIYjFfCOwdtCY5nyOIRPpm3hM T1EBCeQnuaBPhSpZWMrM8jNMjKx6xVBbYYm09l4CR5VRewqgGplX4amR8fbFFi//7IHl hQOENcSumNPkRWDMGtBQFP1WiOBLrL7E90Je7+HD65knfvubaHo66fFIgiZwP1XBBQd9 jg37P1lPUN0X1ydt85ugtP2VHqUl+I2b1MRo7rrFaiUSp6gqUBe9CPElIVrUYUFyopiy v+zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043390; x=1737648190; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7fkCPXOa8A9Xl79fpL/YYXVm1xiiiaH5KvVpCQywK3U=; b=H9wubZ/SUHbUF76XhkMX+S5/OuqkjtU/JUTMJnsYItpfz9UOxqeh96p1JDGOhZll13 OKT3aW4iZrFuJJeKLW/CWVVTDzCju8Mdp/j06N7cwG+yUDZwRXeG4aipWNccVSoa3J4Z cg2PTrNuspuO8qAMKpOySG8c5qPUeZm53OY7nyAKZHorVPQf6ALX5C12IUwkWZD+BB61 7vPTQsvFwqp915kRWBuWADNaCcycE8oUy2xi4WoQFahsk9ctVmJqi6GadzJxfwVaag1L DJ1vwbnOc+Yy0N8P+xAKPC0pky/nJflDa1QcjV1zygE6XyOj52+iosCAJG/nLZZXxbRN BgaQ== X-Gm-Message-State: AOJu0Yw8s6lujWPgBHGZrGD0DnudnBJcWGJeayMRT3QRq85nRpAKQPZN XXrkrhX9UTAbdp/ZxXAB7uwSdZq8xCLEBrHnHva7boNsAlaxKAS4Am5bFSHK9gs= X-Gm-Gg: ASbGncs7/WjyvlbT/iqt8yX6CFo2dkip0jYSeINOFHV7vLsTery7VhbTaNMLZe48gNz XxgBlAa0eBVFXwd85HVa+Ko0KqKLmGExSzQ9ZFjlWyNdNniGr9oZyjzM4tlHpD5KZx5cSrXzEZn s16k4L45SNETgiDNHxHpf+NCGKxS37DJVomSiAi2JX+k8c0p0iS8wQlf7BFaOWTobMWgP/8qKjz PXYSLXe801RcF1UmMYrgMYuq0AL7YwjXYhw32KAS795JrGoeyydLwQ= X-Received: by 2002:a05:6000:184e:b0:385:f560:7911 with SMTP id ffacd0b85a97d-38a872c93e3mr31122860f8f.10.1737043388342; Thu, 16 Jan 2025 08:03:08 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf32754f5sm203303f8f.79.2025.01.16.08.03.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:03:07 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id C6CE760853; Thu, 16 Jan 2025 16:03:06 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 04/37] semihosting/uaccess: Include missing 'exec/cpu-all.h' header Date: Thu, 16 Jan 2025 16:02:33 +0000 Message-Id: <20250116160306.1709518-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x432.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé TLB_INVALID_MASK is defined in "exec/cpu-all.h". Include it in order to avoid when refactoring: ../semihosting/uaccess.c:41:21: error: use of undeclared identifier 'TLB_INVALID_MASK' 41 | if (flags & TLB_INVALID_MASK) { | ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20250103171037.11265-3-philmd@linaro.org> Signed-off-by: Alex Bennée --- semihosting/uaccess.c | 1 + 1 file changed, 1 insertion(+) diff --git a/semihosting/uaccess.c b/semihosting/uaccess.c index dc587d73bc..382a366ce3 100644 --- a/semihosting/uaccess.c +++ b/semihosting/uaccess.c @@ -8,6 +8,7 @@ */ #include "qemu/osdep.h" +#include "exec/cpu-all.h" #include "exec/exec-all.h" #include "semihosting/uaccess.h" From patchwork Thu Jan 16 16:02:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857897 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp276783wrb; Thu, 16 Jan 2025 08:06:08 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUzoW81C0nDV+n/qpQepepAw2rtiWxHjtXjjLl+p30a/6ddgnqlRL3qJ37WA2LGO3GvThz0hQ==@linaro.org X-Google-Smtp-Source: AGHT+IE7/8lHhQkS2bJrt3uqOOIqj+hw95/wlb1wvouj0xq7smHp/HI2RaGeNrZWL7HcrO6ukfHg X-Received: by 2002:a05:6214:54c3:b0:6d8:92c9:12a0 with SMTP id 6a1803df08f44-6df9b2ec705mr489098426d6.44.1737043567880; Thu, 16 Jan 2025 08:06:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737043567; cv=none; d=google.com; s=arc-20240605; b=lG8ubiWQ/4SaSzDW9n5pHYDq38h3lzsOhJDCDFyUcTSQzupU5lcWzYfjVQEDNuU0hO hejledsSVNM2B3NrnV877svt6DXGBrYjXp/qsauikL1Bdo/1SlBpmipgwJ81xQT21ewk 1u2l+Mr3Pls4Rf3/KMF7dwz+ZWPZG2FnqRG2JxQAjBphoBBfZI0ie3+0WCInFNXFp9ja 6/3eEB6cm2AQiFyOHvxPsouP9TvfdjTLFA8rhkg4n0acWDZJCp+MO1TFKM0CH0/UmtKQ 4g4UoAADz4riA4d/OrXPPgOjwARBKqbjmb/zFJVFGxH4pxXweOh6PqQnUJPlPdLmpmrt IsLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8J/ApKgPVXOVC7MF+COAj1wGpBADeRQ/mLFnBALjiW0=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=CwBdbDa4Y4yuInTIiTqM78M48JsjV/UFR32D2CwgYdVVUwKQ7WVr7pq2UqPUBEJ7sy ywJSG2F2ZFlyL4VuYtUjCxuvHWA6iY50lIYLQ8Fi5Uzcc0wiAggvnH8hP2ZbgKerXLQM RkfgYaU4VbviwNWhzb3KopmjBPjDZGLMVyNlpDeWBFkzxrQvXf+krXLhSrgO6lO1TKoP dcw3U9vu5CXQ/AReqG1VaxooVW2umwXcmQNlbL5siyXutWLysSfZGkYCg/4JYRocjk3i dEwFMhyqW531H0NH5VXsDRdaiW8mIf79nOs5fsOXJOSYs1gs9VcXuTuO4UlmWPq+pojq KSsA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Yb4wTeud; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e1afbfb024si2891636d6.27.2025.01.16.08.06.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:06:07 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Yb4wTeud; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSLb-0003yJ-Uj; Thu, 16 Jan 2025 11:03:55 -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 1tYSL0-0003VK-Pz for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:19 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSKv-0001EP-3F for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:18 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4361f65ca01so10587815e9.1 for ; Thu, 16 Jan 2025 08:03:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043392; x=1737648192; 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=8J/ApKgPVXOVC7MF+COAj1wGpBADeRQ/mLFnBALjiW0=; b=Yb4wTeudy8Yguz3WYswrxs4fWhuRLKfRBMjTr9OCWkCggf1qZrfYUhimEeM+8Md3p0 hMBdzk16DzCyZHRg1XbQv3ByebLYqaeRbQp8zCtACDx3sxHMq0QxtFQEjNouhdH9CEMK YVUeZKcNwrbX4Se64HXKXknC6J7SbWJRJYzvPJ56+1NWpNdcjFUVGPY3ZInybZAvJc+a apRvw9EliqFFJRIK0WczUKuZu/9+4URo0IhG/GfymX9CZZVvMp0EWWzIg6AaVE1i0KtE cQe6oxb8WLbUxeYwIvEcJ6UF1BgmMhgLm495FNdEqUaujY4BExIElmFvsU6jLHA02u98 5gFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043392; x=1737648192; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8J/ApKgPVXOVC7MF+COAj1wGpBADeRQ/mLFnBALjiW0=; b=nSV4SC7+TxAKMZshe7cxHze7wwn5HumFWZ73fBkIOmSY6q9fUWsOGWBI1hv8NbCh+l 1mzJhdTmjg9BDqpOHAJo1kVOaMKuLrcn9F/xuYAV/hM2nIJlOwwbhUgI8JsHV9veHITq FoVmgF21k0Lfb+7Incop/1KeuqX5QSqLHKoIkO0OApzM8EVf88RCphiuQYLJVrHMHfMm 4/oKou2t7viPwcoqnpbWriBBgTT/3pYFInMDhE11z2Kbo4/1+T/XIV2geBBl3vVtPBUe cYrzRJBOQpnqSCuEEavLa1rkGXt0J/I0ZGFoPJI6fphiZZno8Lo+hiADuWPvZ+OLyU3c HDfQ== X-Gm-Message-State: AOJu0YwhjY7BbGH280Gv4IcO/8vo3bTX09H9/5lwjrojGBG7gXFF5bF8 NcG7b/ZRqSQRGA0eTvV5PfhKAqbQowSJYAadP3Ur9zS4LLBvUh8MwJ5HfdXAsjI= X-Gm-Gg: ASbGncuKO0+MIGcKtdx1MPcKE/XhjOtWo54ZdXo0CSVrInkVMONt2f4CWiuodhPCnVk Zcc5QII9zOelQLWaMBsGpVkrV0pFEwtW4NKnrvv/7jJbbeb5lYWY+49yGOFl+EIkmxrIuwDvK3L meTdOje/revLtORMWUDjtp36arFI4csN/m6TTENDW03bICxABz5Vk2fx2orZOqdN6yu3cGygKZ7 74yZc61V0NNxCF5f3xQbvmF9nQtTwullB8UEilGuVB4TOd3djg8H5Q= X-Received: by 2002:a05:600c:4e8c:b0:434:f5c0:3288 with SMTP id 5b1f17b1804b1-436e271d355mr314178435e9.29.1737043391368; Thu, 16 Jan 2025 08:03:11 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf327dee3sm195087f8f.86.2025.01.16.08.03.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:03:09 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id DDCD960858; Thu, 16 Jan 2025 16:03:06 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 05/37] semihosting/arm-compat: Include missing 'cpu.h' header Date: Thu, 16 Jan 2025 16:02:34 +0000 Message-Id: <20250116160306.1709518-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé ARM semihosting implementations in "common-semi-target.h" must de-reference the target CPUArchState, which is declared in each target "cpu.h" header. Include it in order to avoid when refactoring: In file included from ../../semihosting/arm-compat-semi.c:169: ../target/riscv/common-semi-target.h:16:5: error: use of undeclared identifier 'RISCVCPU' 16 | RISCVCPU *cpu = RISCV_CPU(cs); | ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20250103171037.11265-4-philmd@linaro.org> Signed-off-by: Alex Bennée --- semihosting/arm-compat-semi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c index d78c6428b9..86e5260e50 100644 --- a/semihosting/arm-compat-semi.c +++ b/semihosting/arm-compat-semi.c @@ -166,6 +166,7 @@ static LayoutInfo common_semi_find_bases(CPUState *cs) #endif +#include "cpu.h" #include "common-semi-target.h" /* From patchwork Thu Jan 16 16:02:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857907 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp280320wrb; Thu, 16 Jan 2025 08:11:42 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUl0etMhFXvTl6mHx+tkfzb/ldUhxvJSO+MZauJS196aITcAVz7M/ChiDD0dUMQeB3NVC9VcQ==@linaro.org X-Google-Smtp-Source: AGHT+IGglKzNXHUHqSK2o08HFAdo+HpVEt2pPMCFJbxNO55Yk9rAyfdDs7WM5drladOBLo9qBG68 X-Received: by 2002:a05:620a:46a1:b0:7b7:2e7:7a88 with SMTP id af79cd13be357-7bcd9761f5emr5122937285a.44.1737043901896; Thu, 16 Jan 2025 08:11:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737043901; cv=none; d=google.com; s=arc-20240605; b=k4c7Gm30Ucfg951Pai1Q5aslJe6g92R2USp9ejYijP5N6L2bOflV+vqXD4+6c+zx1F pL0vdLmKLMER8q8l0swSyCrl9liIMm78p+twU1iHmqbnt6DMt4uSDZtAJ607EImLhHZE j1wU+Popf7D1//1jU0xfGw9+N0w3yPJH15mFNwMrvFuvA2Gzgc6FJ2JOsrDugsKY/LGN Ff7mFSWOBG3DAlMx5XgjKJcXcMOwUHPycpHVAgPCufoPo1W+wn/bZzJ72b71ZPYP1TwK k1v9HL/2ZYObY0IMM5PimXhqPlM+LeY/s4cFkXIb83iNB4snGplhylNeU7UiPNwDVar5 CLTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=q0SipZjZSJ8RGOzW6wWIIrmkUJqEseFLNGa6w4kFsPM=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=cCBr9ToXAJWeGeZk7qL5qa74E4g8zI3xXZtt+u3XQGHMI5fQenIGYFX0ZstOjaUxMU Zget8LcusrlzeFCy02PEX+Y5piGsaAvMvP0StjdppUxoib/oBEMVE5Ltusx7w7FKEVoy ofwQPUIaGzLCLNiqFCxg1qfPeCq3qmFzHGQ0kXc76urRu2W+CGRFUC6IM5abtFuaQA8s jwp19VXUg/3aV2EghH4jAoU1z+pyLsFrS+XBSsl2QYyRTrIc/hSwi9IIpft7yH4DwXkJ jZMabiWTEvYDGNuf7Vf5K71GIarSMhx3LPX5wab5TsLpGl0nw9Jx+ZiGmNpC7wt9XHp/ reyQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r8aAlNmk; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7be614bfe1bsi36457985a.265.2025.01.16.08.11.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:11:41 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r8aAlNmk; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSMp-0005Wj-DR; Thu, 16 Jan 2025 11:05:11 -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 1tYSL5-0003WX-3Y for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:29 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSKw-0001Fi-VC for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:21 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-43635796b48so7481515e9.0 for ; Thu, 16 Jan 2025 08:03:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043393; x=1737648193; 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=q0SipZjZSJ8RGOzW6wWIIrmkUJqEseFLNGa6w4kFsPM=; b=r8aAlNmk8qPIKDTMOTIThybdafb6ITsKuIwyeLPXys8Kk4O+lqgofUHQgMShyLTOOa HR+nfZw9fu4ZDGhuH6Gdf7OHVH+bZrPR4HhbhkYiztjVkaW/27YgpjWhRvn4ztP9jabr xRaXQ0EUSXW5ojbXrB9fVU1VF7+XAVQMj/RAt+lETSnIfstB5f3Cwye0o3ud2z2JfdSP PveMUg7A7Cnabe7EF8T/c30NyqUangT9mAGn1MrErPG0Hau5XScGEHkQHT8PpyAkuczE ZSnhfduN2C5ZrrJoNhj6adXnZeQvOIRCZadriHnwrWRggCaIwzPvj7znzmMcwrnb8675 sm2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043393; x=1737648193; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=q0SipZjZSJ8RGOzW6wWIIrmkUJqEseFLNGa6w4kFsPM=; b=HXZblrBk3yDQbKcFOHqRgwmt4UlpmFJFqh17OCtJAWcmQSffB5w01GbAwtpzQx0NKc qwrAjmV4+Mt8EA4ZMEG1EP2PVhVosbeOV6a3nRn4VbHX27oS1w8IY0NbMUVgIzG9douE XZndeebO9VSswICYcQJQGGfZ08dlOK2fOZm4Vf/2c+38eSfGU+csnVs7QUWkUqhQSscf qbm3ffqurHTfpgoOh5qYj0bkW1kdSjCkwEkyrH8i3scy0UX9cvH+z7yuwHWv1D/2zwqX AJIdZ7wIyxQ9STkV4XKSi5V5VFSzS8pTQDPLxh8/QGipVh+ZWhWO6QHLFivcDy/Xhij4 KLwA== X-Gm-Message-State: AOJu0YxfL3ydwD1VNonNT2sy+6HjAbdA+g5WCigx5qsPIXsYKT3muPIm 6Y30xQLCxv979qKl5wSKTXo4G3KFSlx4sbFE8dDlwmtfrvyhW5r5IcrTAvu2weE= X-Gm-Gg: ASbGncvy/Exvy8cYgMXi5OkBu4RergCZk93AyIJQsyjze7OMSG2No8EHpLuH2imQSUX cKKH+uDTmzNOTfY3L+YoBXrLWorSCHCbxzDeIX9CXpmeQZ8gRxRm19y5Xc7ApIRmGSi8CSRCOW5 jhJbVT9r/UIZl2+1XrUhHJsbUPTN4outXTSAudrrqw9UHtZNSk10LALlaIrCOdRitStOpWS/akS NKC57Xw/JLptMa0K6JRQyzDn6GMJbyAJoMn1Dur6TTBrnqIHcVvHaI= X-Received: by 2002:a05:600c:1e29:b0:434:e892:1033 with SMTP id 5b1f17b1804b1-437c6b7b184mr70429135e9.2.1737043391766; Thu, 16 Jan 2025 08:03:11 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4389046885esm3193275e9.36.2025.01.16.08.03.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:03:09 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 0191A60859; Thu, 16 Jan 2025 16:03:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 06/37] semihosting/console: Avoid including 'cpu.h' Date: Thu, 16 Jan 2025 16:02:35 +0000 Message-Id: <20250116160306.1709518-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé The CPUState structure is declared in "hw/core/cpu.h", the EXCP_HALTED definition in "exec/cpu-common.h". Both headers are indirectly include by "cpu.h". In order to remove "cpu.h" from "semihosting/console.h", explicitly include them in console.c, otherwise we'd get: ../semihosting/console.c:88:11: error: incomplete definition of type 'struct CPUState' 88 | cs->exception_index = EXCP_HALTED; | ~~^ ../semihosting/console.c:88:31: error: use of undeclared identifier 'EXCP_HALTED' 88 | cs->exception_index = EXCP_HALTED; | ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20250103171037.11265-5-philmd@linaro.org> Signed-off-by: Alex Bennée --- include/semihosting/console.h | 2 -- semihosting/console.c | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/semihosting/console.h b/include/semihosting/console.h index bd78e5f03f..1c12e178ee 100644 --- a/include/semihosting/console.h +++ b/include/semihosting/console.h @@ -9,8 +9,6 @@ #ifndef SEMIHOST_CONSOLE_H #define SEMIHOST_CONSOLE_H -#include "cpu.h" - /** * qemu_semihosting_console_read: * @cs: CPUState diff --git a/semihosting/console.c b/semihosting/console.c index 60102bbab6..c3683a1566 100644 --- a/semihosting/console.c +++ b/semihosting/console.c @@ -18,14 +18,15 @@ #include "qemu/osdep.h" #include "semihosting/semihost.h" #include "semihosting/console.h" +#include "exec/cpu-common.h" #include "exec/gdbstub.h" -#include "exec/exec-all.h" #include "qemu/log.h" #include "chardev/char.h" #include "chardev/char-fe.h" #include "qemu/main-loop.h" #include "qapi/error.h" #include "qemu/fifo8.h" +#include "hw/core/cpu.h" /* Access to this structure is protected by the BQL */ typedef struct SemihostingConsole { From patchwork Thu Jan 16 16:02:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857892 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp275442wrb; Thu, 16 Jan 2025 08:04:15 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVr1eepi1zzVCgGT1WiEKqA8Tx3reUGQyun0e9jwba96ITcsxCIhYndvgAVhmVuFqAm7omr0w==@linaro.org X-Google-Smtp-Source: AGHT+IHcYtsqJqcJT0q7R2iytW25M6vz/6E81lbO3Ekpr5Z6t992VI0SrakFB7jIltmVIgihleN0 X-Received: by 2002:a05:6000:471a:b0:385:db11:badf with SMTP id ffacd0b85a97d-38a872e1640mr30646504f8f.22.1737043454529; Thu, 16 Jan 2025 08:04:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737043454; cv=none; d=google.com; s=arc-20240605; b=lDTdfnY6gLHjw0EU4VwOS4EmAltW+ZCcKtSGCiSOD1J8yoymNaD9TtGxPG30p27ksP 1eGs8kyRWRqfTQ/5XIztMh2NlM0cLL3d/6zc+ngTTY/Zefply/UZR8iqbIUfiwxypuf6 HSkiwAmdu5QP4K5j3tG/+JLohLEScvIuD57nLJN/O1KOLj1BVJCN0yxOSDD9+aUCdmq8 t0PvRPQ12VpoDpM8PVHqeGZ5HHQsSrD0R6LRhd1i3R51Uw6PO0IG4IHBO2RFYVsToe6B 5KYgm7PobzDWqAmUVmsKVzRulr1B6KkdmlQxl4HHuZMvlRauYgI+LqPOAMpl3pHbP29f fyJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gi+ukBCOErHL45ERN6Ib1p4GgIF2LltQZlgS/5QMd38=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=W+gc4UNwHPBf6vcNHGeEH9XbmW1IJJLLkOXHO2R6TIncKcSa1J6L2TTDZv+llOHoBD 3MgHRY+Q2GW9S9Kadw6YDR8PwrPzP/gzMu5480FTdEL+M9UzeTNfPJ7wWJCwk0m45uQq ndHDHvIf0J67B9TwLf1ccg7tp0eUCdenD9Iomhue7W99ih9v4k1zEtaNMl/MZ5eYmHl3 EJD0GvIFTQSyrcdwhT1Z+k/zbLMBqN1XT3KmjeUnN0nmxdmi6geW42TTiuVtKDrgsnsg XultRTGrevinhfGV5A7FJJoi+tK5LjuCe83t+aOGqyRRi1+TasqjPNgQDvAKly7qNcrn Dh1Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UZiYT8pV; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ffacd0b85a97d-38bf32842bfsi138379f8f.577.2025.01.16.08.04.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:04:13 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UZiYT8pV; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSLl-0004Cj-B2; Thu, 16 Jan 2025 11:04:05 -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 1tYSL6-0003Wl-QX for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:29 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSKy-0001Gs-It for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:24 -0500 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3863494591bso622590f8f.1 for ; Thu, 16 Jan 2025 08:03:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043395; x=1737648195; 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=gi+ukBCOErHL45ERN6Ib1p4GgIF2LltQZlgS/5QMd38=; b=UZiYT8pV7CVqo3bfzEUg3KUPZQK+CrufQCr9/6MAfZqcgViw0xDhnAt2LWppA5Iu1Q sqBqXp3oCSk0fa41LDXWh7oUCRnr9fTK971zEpjn7QYCXeQqNJyGReCvFtwiUqjzhKVc fJxnZ/w97ykdEokrh6+oPeupF5lJiqJvY9OxIZ7vhcGLOGaqJICtr92oJhZ4ntKEfoux 83gqPLyT+n/UMiAe6AAwBCpYBpitogfEg0L01ly8cn5vj7xLWcWyR5jjMNyl2jau0WlN Oy2e2Vzr4C7H4ww43WwPltXXwuZhn6IDoxCwgPzMOUZcj/aIHQO8w/a/rIi1jIi3l31H bnkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043395; x=1737648195; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gi+ukBCOErHL45ERN6Ib1p4GgIF2LltQZlgS/5QMd38=; b=LHQN1S2Pwlp/EePA9dNXBW2/OtVW82hr0ESqbWdZ022OzEbqGgXOFlg1nNVYPlppV6 gJPH251P9rDhAXGMmg9vSm8wu70mcHVoe8tLqCbLp242Pd75MLFr+pncYUpPdteSTyq5 eMLz0UGuVkhvA6qYGQsYAojSz1e1Q0IuCQAk3iOpx+dzOV0XjvO43qTlt06FGOuEAHAd h0StSR3+YPlTYPRUAbjQzUlUGvNs681Infwb5qnuVkhvL6DCXuY5HAjMLPmzAQp0z0rx 2n8kfimk1WFBGPstyv8pgk/uvl0Ym4yGJyRTY778/Yx9VJYY1Ij+/vJ+gNFwnvior/z0 eFuA== X-Gm-Message-State: AOJu0Yx0exYA8/sM9LBSH2shcLN0xRLpovelfdHKzP2qTDElalK292cc kBIwANiirAQAql04a4CvMSgkWaWy1t9SdYlmQFB+aiPJmChtr1Tff9NTFAC1OO0= X-Gm-Gg: ASbGncvszxGnovG3eN91357WtXmXIklo7+QoVeiaplzXU81n/akXeu3youpRBPmjxol WT3tlw5dV3hneACCzL+N4tQz3BMKU3sxLTrG3nMcgwI95TS3qwMQtOuvfEa8UvzcJeSs+Ms0UmA tWfpKr2r+58gVPDeEu2bTh+E6J9ZUwxtQeMyfeLes40xsACGK0n0oCxZZAh1Kij8/PGsmWzn9LD hXi+/0clkiwnJCJA8CwclhlQgkIjqIF1km1TwN7SAt8kgvv5DN77L8= X-Received: by 2002:a5d:6d0e:0:b0:38a:a117:3da1 with SMTP id ffacd0b85a97d-38aa1173f70mr18502878f8f.5.1737043393558; Thu, 16 Jan 2025 08:03:13 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf322acdcsm221210f8f.55.2025.01.16.08.03.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:03:10 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 1702C60865; Thu, 16 Jan 2025 16:03:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 07/37] semihosting/meson: Build config.o and console.o once Date: Thu, 16 Jan 2025 16:02:36 +0000 Message-Id: <20250116160306.1709518-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé config.c and console.c don't use any target specific headers anymore, move them from specific_ss[] to system_ss[] so they are built once, but will also be linked once, removing global symbol clash in a single QEMU binary. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20250103171037.11265-6-philmd@linaro.org> Signed-off-by: Alex Bennée --- semihosting/meson.build | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/semihosting/meson.build b/semihosting/meson.build index 34933e5a19..86f5004bed 100644 --- a/semihosting/meson.build +++ b/semihosting/meson.build @@ -4,13 +4,16 @@ specific_ss.add(when: 'CONFIG_SEMIHOSTING', if_true: files( )) specific_ss.add(when: ['CONFIG_SEMIHOSTING', 'CONFIG_SYSTEM_ONLY'], if_true: files( - 'config.c', - 'console.c', 'uaccess.c', )) common_ss.add(when: ['CONFIG_SEMIHOSTING', 'CONFIG_SYSTEM_ONLY'], if_false: files('stubs-all.c')) -system_ss.add(when: ['CONFIG_SEMIHOSTING'], if_false: files('stubs-system.c')) +system_ss.add(when: ['CONFIG_SEMIHOSTING'], if_true: files( + 'config.c', + 'console.c', +), if_false: files( + 'stubs-system.c', +)) specific_ss.add(when: ['CONFIG_ARM_COMPATIBLE_SEMIHOSTING'], if_true: files('arm-compat-semi.c')) From patchwork Thu Jan 16 16:02:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857906 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp279975wrb; Thu, 16 Jan 2025 08:11:11 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVb6pxCtBkNf49NYog/WvHJXSzqfENB+akwABnQ97y6/2Rcfkmdm0pdj/Zjc5h69USF3T/iUA==@linaro.org X-Google-Smtp-Source: AGHT+IFU8AiNBDpCO1NaP7WqTUAMePpYrTvvHxCajpyUiIwTI4KwaIAXvajmbL2GgtkstjUP2XTj X-Received: by 2002:a5d:6d03:0:b0:385:df73:2f18 with SMTP id ffacd0b85a97d-38a8733bad0mr14708933f8f.51.1737043871735; Thu, 16 Jan 2025 08:11:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737043871; cv=none; d=google.com; s=arc-20240605; b=QPJVehm+KH+8GSwGvlwXhkYp7cOtmmgyHceH3zFSpsY20FEBkWcwBmSApcXEjJ1oN2 jOkDvV9R99rrEgqVReBUwOsPmMDrXt8jLUJYi4BycBuY3v5slRLi07i1N38lh4OutHre GEtIO9D9Np/vv7Ztyjumf7adZMleJpUnk3Kv1hzO19WRNfEsUKkZU1rdAYgzUjl4rQ2s TnQqZwXxdyaUp/GGFmTRK/Uey57jtUZBMv7WcyfgeQ+iyzQOkcUVNkZC1HpR58rQrzfE 0JZNVlrOaQtpWLHCiyOqeXRsHX5V53Gkm/PymhMCywscrJCNLOB1aYPoqSDAK5vf6oWv fqBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=W+FezEXpyW2Kwr3H0HaqemTH3nJWuwesjRNair6bvmQ=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=Z1K3cgrH1el8jrlPO70p1E0AMl/w/4srDyCL2wyxlRXF+TrU6+5R1bxsXUaq4ND6f8 41X8eGE54q33Gd8qXvoxGBC3i5GiwSNFKkmOiYbxQcOTNfMExJcx7ofjWXhBmLpc4DKz dPc7HbK/IcesHRzvDbQHK5oljNTyQyR4JUmPwcDiNKyn7GcZdx1IdqH/SmxCZ8QxVc5d 5egve0BkeUnWo6rkVGv/JXEhT5LrxvkIvXjH0RXoPT/0nKpWiKVhBeV+uL1Nx2Q7gc7P DH6n60sYLGt2n2tuiM6PeIVzFyKDrI2WxJLD2RxfSG6t+2G8R9HfBFbX06LIdb2V1gsk Dbew==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YmpAE9BO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ffacd0b85a97d-38bf3222f61si172183f8f.194.2025.01.16.08.11.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:11:10 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YmpAE9BO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSLn-0004FH-7u; Thu, 16 Jan 2025 11:04:07 -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 1tYSL6-0003Wh-MW for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:29 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSKy-0001GA-1x for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:23 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4364a37a1d7so10412425e9.3 for ; Thu, 16 Jan 2025 08:03:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043394; x=1737648194; 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=W+FezEXpyW2Kwr3H0HaqemTH3nJWuwesjRNair6bvmQ=; b=YmpAE9BOL6OTCQDHiE/y9aysA8+UCDMTqVxzXTdHZLdZ+oDOL4SPY/aJwYPbTMEf5S 2JalkiOHTs5U1Ku05SySnQ0C24Zu3z8m8bvUgLZwI44P9KT0Uh7l4l7RjAv0J5IY02JE 4iayOQPSBDN9/wELpe5FXuzZDdhb9jYQeiKSpnoVE947bIgClOjmeW3N8OhRDq9aQXcc S6+m6NdAF15W7zseq/0SyGPkZ5tCbjrWMbyCI71aisskStFF+K8pcBbVqZ9omIimcFEu mqQf+p8Nwe3RdzI+dXeUc5M84EWm3YpgDa1XV3I+vc0ih2Q/u6vVMfCldvTDlunINsNb 2eDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043394; x=1737648194; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W+FezEXpyW2Kwr3H0HaqemTH3nJWuwesjRNair6bvmQ=; b=bGZVzmwJ3X/a6b0MAJWSPJzG7L4FCWtWJiobLjInDq7iho2l92BziColsYRc1aTxkg 8E7rGfPAcRXHeU+QcJ707Xg+dwIC93KfI13ij7JIrmzhjjM2JBFeOwrC9axonITLu0iJ ggLkyohOP5CcUrpsJ/kYCrtiCG1Dat/C1FwH1ZVyUn22MAFIOTTrvNe2lk21iUS+ILFo 1qBAOAUQ4KQvjssdEg2PJoRbJOGFMlDF1Mib9hKAgarwry6QDlhqlAj+VkbpZOSD81G/ sH4LWyT7LtbYfgFWEJI2z/6E3nCh3v12lLvxHCJ1dwscESwmjq5jeb+FTUk5dJQoFzOL aQbA== X-Gm-Message-State: AOJu0YwbTFqzx9OPlJKgbEHRou/TTLb0HQkMZDa1ognzyM9l5yykJUZ5 q1NuqQuCCzVl/ci8BkqOdYMF10B40xBsnImkm90N1/XnkUUT0SLzry0btxN+qsE= X-Gm-Gg: ASbGncsQ6m36K39lR/f9uRWv2zXiCDk/qYfpP9Bsi/ucxYUVXqSwIs1AIiU3Q+T+QeN NOegzA5UbnkW6lw9ozwhHKQnINJOnwX60LFR9yUu9doX4MhtP7WbeYi6RXVkhpdbEqxHkY6Skh0 6bmmA+nf2jqTD0D/WqPeEakRmrDjkMfKtNp77tIiHCWk5XNc+7yIV/ZbaIf6+CvmWfxMGrw8aMo w8KySdyUKEQntsFXFXfw9rRI8x20F2MbZTkNq8yrIJ4AQ4AZfllx14= X-Received: by 2002:a05:6000:1a8a:b0:386:1cd3:8a07 with SMTP id ffacd0b85a97d-38a872fc363mr28367101f8f.7.1737043393988; Thu, 16 Jan 2025 08:03:13 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-437c752910esm65449005e9.28.2025.01.16.08.03.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:03:10 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2E62060866; Thu, 16 Jan 2025 16:03:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 08/37] system/vl: more error exit into config enumeration code Date: Thu, 16 Jan 2025 16:02:37 +0000 Message-Id: <20250116160306.1709518-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org All of the failures to configure devices will result in QEMU exiting with an error code. In preparation for passing Error * down the chain re-name the iterator to foreach_device_config_or_exit and exit using &error_fatal instead of returning a failure indication. Message-Id: <20250109170619.2271193-9-alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- v3 - split overly long line --- system/vl.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/system/vl.c b/system/vl.c index be029c52ef..22c1444da4 100644 --- a/system/vl.c +++ b/system/vl.c @@ -1307,7 +1307,15 @@ static void add_device_config(int type, const char *cmdline) QTAILQ_INSERT_TAIL(&device_configs, conf, next); } -static int foreach_device_config(int type, int (*func)(const char *cmdline)) +/** + * foreach_device_config_or_exit(): process per-device configs + * @type: device_config type + * @func: device specific config function, returning pass/fail + * + * Any failure is fatal and we exit with an error message. + */ +static void foreach_device_config_or_exit(int type, + int (*func)(const char *cmdline)) { struct device_config *conf; int rc; @@ -1319,10 +1327,10 @@ static int foreach_device_config(int type, int (*func)(const char *cmdline)) rc = func(conf->cmdline); loc_pop(&conf->loc); if (rc) { - return rc; + error_setg(&error_fatal, "failed to configure: %s", conf->cmdline); + exit(1); } } - return 0; } static void qemu_disable_default_devices(void) @@ -2044,12 +2052,9 @@ static void qemu_create_late_backends(void) qemu_opts_foreach(qemu_find_opts("mon"), mon_init_func, NULL, &error_fatal); - if (foreach_device_config(DEV_SERIAL, serial_parse) < 0) - exit(1); - if (foreach_device_config(DEV_PARALLEL, parallel_parse) < 0) - exit(1); - if (foreach_device_config(DEV_DEBUGCON, debugcon_parse) < 0) - exit(1); + foreach_device_config_or_exit(DEV_SERIAL, serial_parse); + foreach_device_config_or_exit(DEV_PARALLEL, parallel_parse); + foreach_device_config_or_exit(DEV_DEBUGCON, debugcon_parse); /* now chardevs have been created we may have semihosting to connect */ qemu_semihosting_chardev_init(); @@ -2667,8 +2672,7 @@ static void qemu_create_cli_devices(void) /* init USB devices */ if (machine_usb(current_machine)) { - if (foreach_device_config(DEV_USB, usb_parse) < 0) - exit(1); + foreach_device_config_or_exit(DEV_USB, usb_parse); } /* init generic devices */ @@ -2715,10 +2719,8 @@ static bool qemu_machine_creation_done(Error **errp) exit(1); } - if (foreach_device_config(DEV_GDB, gdbserver_start) < 0) { - error_setg(errp, "could not start gdbserver"); - return false; - } + foreach_device_config_or_exit(DEV_GDB, gdbserver_start); + if (!vga_interface_created && !default_vga && vga_interface_type != VGA_NONE) { warn_report("A -vga option was passed but this machine " From patchwork Thu Jan 16 16:02:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857893 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp275919wrb; Thu, 16 Jan 2025 08:04:51 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW0jS12DjiYpf/FmsOK9nhNf3uR7x10aTnYyalsz88pDJea0TV6z9HFggBiksObxSxel2Pqsw==@linaro.org X-Google-Smtp-Source: AGHT+IEtifrSBeQRxzr3WCpyV05wnEwvzlc1fgTF3LtQjPI3DVHhrVPkyMrLcWvTOM1LwPmttTyD X-Received: by 2002:a5d:5886:0:b0:385:f840:e613 with SMTP id ffacd0b85a97d-38a87356509mr33953118f8f.51.1737043490953; Thu, 16 Jan 2025 08:04:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737043490; cv=none; d=google.com; s=arc-20240605; b=cmrCCdMpcR31/U0roGl9Fnm3/sT8BNALWgF6AysMqbL5jrloxyCVG1QfYZtKpn4PPN za0FTGTXcuX0GpwKgIFwFTPOulohGccEPWXtY/kHSWFFJzPHOhkQUjW/5xCxRMP3PsCz /hm4RVzY8eHp5tUXRgI/yU4HRieCJ0uiWsgi1sw2qGRoYUAiMFKibSbl/Ww/LiVDO9QL FUJ8BIGfVs3nvEMoDpKjmQESxj5g5LQn6VuwB+8o/aq7jA05nwemB7gdoj2agNP4WQLB QSSpzp5ONMiWWc7e9LNsfOUmzQsMvHuX5C2Cpe5HsYdjjmWcGMFc8ZL9P7ICbqVGNYXF hTFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dhwKvA93ejBJ40tAMFljSMFt/CmKzPuSCWuyLymZVmI=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=UZPyOa18FvhszSVMYu/Bzhc/LvXcQ2S5AtgUak6EmZB7hE0jUVm2+wt8rQFRO9i6J3 9qB4GlcMldzwANGEPBvAV0GMGB4fXHooCEkypPuecyGakfWPnJsjrnf1OWxF9njTwpYJ ZjRN/Yk/rDO7a3/44TLdu4OHn6P5789AMX4Ph/yBVgDiPCmii5Hkx6R524aLKiAQpchH JUyoUBeKluCvleGYXmqhuja8WAwQK80XOb7Z6NCFTvNO/e51NetbWRft9kzAtah0x8ss iLnVCKNZqlaIxedtHJgtDCmNJL5jiGsg7ahnsdLmfhO6/nxQNwQOJNq5sL4X8DB6+t4l tz/A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uSkP9TjK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ffacd0b85a97d-38bf3283ef6si145383f8f.483.2025.01.16.08.04.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:04:49 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uSkP9TjK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSLg-00045M-C6; Thu, 16 Jan 2025 11:04:00 -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 1tYSL2-0003WE-CH for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:20 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSKw-0001Et-30 for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:20 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-3862b40a6e0so681030f8f.0 for ; Thu, 16 Jan 2025 08:03:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043392; x=1737648192; 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=dhwKvA93ejBJ40tAMFljSMFt/CmKzPuSCWuyLymZVmI=; b=uSkP9TjKXfJqoxKvzG6YsERo4txhPnOTPC+XAvRL5hfDDXzQQ6WBdMQPhoata5ioMy 3OKaT8u4+aC1YD5gUlDiAKwy9+btW/wUmvr3KedV2EO3y6KwqIjuLiNq9f+QQ0syREu6 8Z7HekoHs+WbdqmyGBvk1rTx19Hhw2q5Rl54MGxeDFVgfpPTWzuaNWUzqNIhIC7BwryL YiKemPnKL9dbbZSD7bvBn3r8NW+vbf9kwV6/9FIvrwXx6HzrHVcYRCLxtm4nuOyB/kZE cpIWv1C+nxJ6rn/aE++/AOw1G6fE75MxnY7iITeZ6sH/WY55onXCaXQ+jJCCN2DVyOrG kDyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043392; x=1737648192; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dhwKvA93ejBJ40tAMFljSMFt/CmKzPuSCWuyLymZVmI=; b=FWEbOi4H0arJ70BqeTwvtAOoVgQHxSyhbw/neFOpURQa/RUmvEyFZwp5nafe3p5IKr Fio11qkngLbK8eIjBD43f5AcM6qHKkOJ1IJsC2hz8Vf0ODKVTUoghcP0/a4bfxAKcdL7 xqCWDHssZZcNdXF0PSDmZM3OW1F+olDH4BH2BwqRuwS83xgKytGRIUhH5Bydly+sOVoL MaSp9sGZIMNCSnAANmgP/WhYoWk0yEzpR/1A1IQhtxqep299iaAZjpJLOVFjRjEpk8HB hs4lL/Dw0NbWyUp7qmicbyEdHNLIYeidZewKRDa/Uo58BmcGwW3JPsXIrdAjvBawKj94 TmBw== X-Gm-Message-State: AOJu0YwMXCHHWKAUb3Bh0u/dhqA28DyRTj7JWi4+J+kdSw7MB3XFl+iC tS4jPtIbvsHg9QnFrqMO4NwmDJKW1gVs6L2aF3Ye+arMI2NpGZQ5Qx27N/P4G9g= X-Gm-Gg: ASbGncuIjBBwwVlD3acJjXaQ8qv+arStI9NmY0+8aahU4NIPPAIbyHEjeA4G/+bJ/k+ ZVDVDt8N11+dB09vavL2wi7aUqZSBRdzcdJfQjUBY2ZWb8rseVy72y9heDFhrT+cUSl5jIZbrGE jqPnZ0mZdEhOTspZeAGRfR7+qW4QR0rgmqYJQQUSHkKdyFgtccfTGW7bXQ+IIH+jQBH70YgRRkv PN46zO1dyawmgGLBl2kuHXiGmciX50jDtxEcfm0d4/zTSRWneqmYnU= X-Received: by 2002:a05:6000:156a:b0:38b:e26d:ea0b with SMTP id ffacd0b85a97d-38be26dea6dmr11873885f8f.25.1737043392199; Thu, 16 Jan 2025 08:03:12 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf3278f06sm200649f8f.70.2025.01.16.08.03.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:03:10 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 461816086B; Thu, 16 Jan 2025 16:03:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 09/37] system: squash usb_parse into a single function Date: Thu, 16 Jan 2025 16:02:38 +0000 Message-Id: <20250116160306.1709518-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We don't need to wrap usb_device_add as usb_parse is already gated with an if (machine_usb(current_machine)) check. Instead just assert and directly fail if usbdevice_create returns NULL. Message-Id: <20250109170619.2271193-10-alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée --- system/vl.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/system/vl.c b/system/vl.c index 22c1444da4..02795c5135 100644 --- a/system/vl.c +++ b/system/vl.c @@ -811,31 +811,17 @@ static void configure_msg(QemuOpts *opts) /***********************************************************/ /* USB devices */ -static int usb_device_add(const char *devname) +static int usb_parse(const char *cmdline) { - USBDevice *dev = NULL; + g_assert(machine_usb(current_machine)); - if (!machine_usb(current_machine)) { + if (!usbdevice_create(cmdline)) { + error_report("could not add USB device '%s'", cmdline); return -1; } - - dev = usbdevice_create(devname); - if (!dev) - return -1; - return 0; } -static int usb_parse(const char *cmdline) -{ - int r; - r = usb_device_add(cmdline); - if (r < 0) { - error_report("could not add USB device '%s'", cmdline); - } - return r; -} - /***********************************************************/ /* machine registration */ From patchwork Thu Jan 16 16:02:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857896 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp276196wrb; Thu, 16 Jan 2025 08:05:16 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWhsdmPU7BbefR4GHbYydIN7OFs5xPtrwzmNGNpM6/s0P6LSdAGq6K+MOcEkAyUz/aFqVPy4w==@linaro.org X-Google-Smtp-Source: AGHT+IEYGzplkvsOp54MIA9AhrxIasf/KV7DKha0SLtjUo2fZ6Yz2dg2Cn3zjRtELXNGLxtg4Gvd X-Received: by 2002:a05:6102:b02:b0:4b2:cc94:187e with SMTP id ada2fe7eead31-4b3d0fb4cfemr29740404137.18.1737043516485; Thu, 16 Jan 2025 08:05:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737043516; cv=none; d=google.com; s=arc-20240605; b=PRGIDiiElmit5lh0dcine+z/CnbQKXq/mz0SRW0Gof1IoJE2MrGP7JxB55cF4BaAld ClheUpJzm29TAGXf4GP9Guo8EUpk/0+Uug7GIN2swdqzmnWsrgWGh61haBfK2iOHMfnZ Nnm6w7YLw6xGdwZSndZjlp9dpJnpX5fp82RmYp8B9XvQ4HtqoQwQhQlO6nlJXBbh/Ixv CYLVm9k2tLtOm9MIud4/aEJOjPU3yuMTxrE1FbpHEyn5qhCWX88kJ3KdhYEs6BXnTYqH +60xfVo0PGUgroUJvxSqDYbPXWA71G6LyL+oq9fO+wkyRLXXhDJ4GlY3XvF+zhtcxmG0 Sw/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CZxnmO97bGWKa6H/u8hoiR2Qo2ObxtLp6FZTaJ8l89w=; fh=t1d2m+E/3UHaBmVp+GWBXXZ16sf7+x3hQ6V1gYFxu3w=; b=Z8Exy40XzXXihYoERR7sPptOSfpU9RPev1VUtokXFCJkGeQXvhBeb4rdBnDYAWBI+l x08X7DMYFqiiopuG4WA1M9wOF7sxWJAWbcLWUEzbOPMr6fwN1e5XZ9lTODm3cj+GWzH2 /pGe3YzaUuL9MyVSjYMxhf2C0nu12CtHub68vV5/oSZovw0Rw28bIQFkPhcKnjDVcaQi rIBoGN8VV8YPtbLAasvs6RWJHkLNM9JwuXHUE3oMMF3uCJvGW9Z0nSF9VsTUkxAoUuF0 eXMgjamkEF8JJckWgewVdIOjvmKDHJBPEAYQ2VjNs0zCeZ09TKjO+54umL176/jt8EE5 lG4w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bYXB1lfi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-4b68a37cd35si225097137.640.2025.01.16.08.05.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:05:16 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bYXB1lfi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSLl-0004DL-UC; Thu, 16 Jan 2025 11:04:05 -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 1tYSLC-0003Yl-NM for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:33 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSL1-0001Iu-Rd for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:27 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-43618283dedso10504835e9.3 for ; Thu, 16 Jan 2025 08:03:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043398; x=1737648198; 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=CZxnmO97bGWKa6H/u8hoiR2Qo2ObxtLp6FZTaJ8l89w=; b=bYXB1lfiOa4kM4R1FGrjfi31eyAbIi0sZsFD703emptWp0HmKf2L6LKTS1DsV0UPZv 3dvcA9XiwIupbGIzAU74JAM433DXi2SCVojeZu6coTnAdG6Iu4edCvu7Kkbqc89XYwrH QEmQRGIzn7NgSTacSaHc/O6lpHDLAUfYTymAbmFqiQz30no3Divrg392zibyTF4j1OFq e39y6HFQKEEJgPzgHDDYYwDzlsuh9ruP4oSPhpD5pMdI4bahyxzrK5L7krqly1CmPe3T 5FbImYFmDZuZwlO37PThoAeGt0g+sdCBVaaxna598yi/5Wvi3QW6zij1TtUr3/Ka+LAJ PUrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043398; x=1737648198; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CZxnmO97bGWKa6H/u8hoiR2Qo2ObxtLp6FZTaJ8l89w=; b=w7bTE1QhnQ8px7eL1hLwr4cPIlSYywjrf6Oo1sXm+YyGQaBIMaCcX8Fe05xrW+vbJ1 THSgA4jHvNetCA7WKxQ7awZTbtryV8v/k2rCfezYF1BmsxuUtMeQseqZwoaSgerZErFI FkDxaZAyrZMZnHMZvkasD4KGZRDCsyE2VbjHAYYjknh56z6buLMO2joVSonqLJ1XUk0q ZouED10WhDHu9bx+onJb1v6WqD3pMUId4tgaEXjfNjI4gxKb7R+NuOD3ACLneQvsHsXo CZnw/CyULUL94R2lWvk1+bKRZnt/WvEMTzDhW7OF8oB414ZARfFLRPEdf6a794X+KJpB vFiA== X-Gm-Message-State: AOJu0YxGABVnWBX5+qCvVpO2dF8PJQEWhy9XJtVnHRqW7O59BM2oaBTB Abk5/JtW20vfZiyHKxXz0K0KTOOpl9reAcR+6im07PHwFma/0ufLDaCMGXptce0= X-Gm-Gg: ASbGncu/ywIZgeVAddcn5SFmZEaVJB5cBDtWSAqZzoohN3MTY2vmZDOiSGYu+QeuiiO XxmjrKbodWqMn/VVx9HxM/jEd+RdbzwtS3aoILeM5pr6WZgt0kcb8yQo+FeXuCfy/68Pw3lZdre iaACnSt9FXvgseMYe9bExwBnptPgvUCk5QMrBLNj4EFIBOZEA59c2D13vLAm9fXk4xK90Wmj4p2 wrBig2DBQ/SIoNfitCMt2myO+EMF7oKxMvq+X1zK4c6G2PIG8/U7YQ= X-Received: by 2002:a05:600c:3ca4:b0:436:9227:915 with SMTP id 5b1f17b1804b1-436e26c3b69mr304778075e9.9.1737043394595; Thu, 16 Jan 2025 08:03:14 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43890408a66sm3678005e9.5.2025.01.16.08.03.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:03:10 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 67C756086F; Thu, 16 Jan 2025 16:03:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= , Ilya Leoshkevich Subject: [PATCH v3 10/37] system: propagate Error to gdbserver_start (and other device setups) Date: Thu, 16 Jan 2025 16:02:39 +0000 Message-Id: <20250116160306.1709518-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This started as a clean-up to properly pass a Error handler to the gdbserver_start so we could do the right thing for command line and HMP invocations. Now that we have cleaned up foreach_device_config_or_exit() in earlier patches we can further simplify by it by passing &error_fatal instead of checking the return value. Having a return value is still useful for HMP though so tweak the return to use a simple bool instead. Message-Id: <20250109170619.2271193-11-alex.bennee@linaro.org> Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée Acked-by: Ilya Leoshkevich --- v2 - split some work into pre-cursor patches v3 - fix bsd build - don't return false from gdbserver_open_port - use error_setg_errno instead of perror - split long line --- include/exec/gdbstub.h | 8 +++++- bsd-user/main.c | 2 +- gdbstub/system.c | 22 +++++++++------- gdbstub/user.c | 22 +++++++++------- linux-user/main.c | 6 +---- monitor/hmp-cmds.c | 2 +- system/vl.c | 59 ++++++++++++++++++++---------------------- 7 files changed, 62 insertions(+), 59 deletions(-) diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index d73f424f56..0675b0b646 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -49,12 +49,18 @@ void gdb_unregister_coprocessor_all(CPUState *cpu); /** * gdbserver_start: start the gdb server * @port_or_device: connection spec for gdb + * @errp: error handle * * For CONFIG_USER this is either a tcp port or a path to a fifo. For * system emulation you can use a full chardev spec for your gdbserver * port. + * + * The error handle should be either &error_fatal (for start-up) or + * &error_warn (for QMP/HMP initiated sessions). + * + * Returns true when server successfully started. */ -int gdbserver_start(const char *port_or_device); +bool gdbserver_start(const char *port_or_device, Error **errp); /** * gdb_feature_builder_init() - Initialize GDBFeatureBuilder. diff --git a/bsd-user/main.c b/bsd-user/main.c index 0a5bc57836..b2f6a9be2f 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -628,7 +628,7 @@ int main(int argc, char **argv) target_cpu_init(env, regs); if (gdbstub) { - gdbserver_start(gdbstub); + gdbserver_start(gdbstub, &error_fatal); gdb_handlesig(cpu, 0, NULL, NULL, 0); } cpu_loop(env); diff --git a/gdbstub/system.c b/gdbstub/system.c index 2d9fdff2fe..8ce79fa88c 100644 --- a/gdbstub/system.c +++ b/gdbstub/system.c @@ -330,26 +330,27 @@ static void create_processes(GDBState *s) gdb_create_default_process(s); } -int gdbserver_start(const char *device) +bool gdbserver_start(const char *device, Error **errp) { Chardev *chr = NULL; Chardev *mon_chr; g_autoptr(GString) cs = g_string_new(device); if (!first_cpu) { - error_report("gdbstub: meaningless to attach gdb to a " - "machine without any CPU."); - return -1; + error_setg(errp, "gdbstub: meaningless to attach gdb to a " + "machine without any CPU."); + return false; } if (!gdb_supports_guest_debug()) { - error_report("gdbstub: current accelerator doesn't " - "support guest debugging"); - return -1; + error_setg(errp, "gdbstub: current accelerator doesn't " + "support guest debugging"); + return false; } if (cs->len == 0) { - return -1; + error_setg(errp, "gdbstub: missing connection string"); + return false; } trace_gdbstub_op_start(cs->str); @@ -374,7 +375,8 @@ int gdbserver_start(const char *device) */ chr = qemu_chr_new_noreplay("gdb", cs->str, true, NULL); if (!chr) { - return -1; + error_setg(errp, "gdbstub: couldn't create chardev"); + return false; } } @@ -406,7 +408,7 @@ int gdbserver_start(const char *device) gdbserver_system_state.mon_chr = mon_chr; gdb_syscall_reset(); - return 0; + return true; } static void register_types(void) diff --git a/gdbstub/user.c b/gdbstub/user.c index 0b4bfa9c48..c2bdfc3d49 100644 --- a/gdbstub/user.c +++ b/gdbstub/user.c @@ -13,6 +13,7 @@ #include "qemu/bitops.h" #include "qemu/cutils.h" #include "qemu/sockets.h" +#include "qapi/error.h" #include "exec/hwaddr.h" #include "exec/tb-flush.h" #include "exec/gdbstub.h" @@ -372,14 +373,14 @@ static bool gdb_accept_tcp(int gdb_fd) return true; } -static int gdbserver_open_port(int port) +static int gdbserver_open_port(int port, Error **errp) { struct sockaddr_in sockaddr; int fd, ret; fd = socket(PF_INET, SOCK_STREAM, 0); if (fd < 0) { - perror("socket"); + error_setg_errno(errp, errno, "Failed to create socket"); return -1; } qemu_set_cloexec(fd); @@ -391,13 +392,13 @@ static int gdbserver_open_port(int port) sockaddr.sin_addr.s_addr = 0; ret = bind(fd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)); if (ret < 0) { - perror("bind"); + error_setg_errno(errp, errno, "Failed to bind socket"); close(fd); return -1; } ret = listen(fd, 1); if (ret < 0) { - perror("listen"); + error_setg_errno(errp, errno, "Failed to listen to socket"); close(fd); return -1; } @@ -405,31 +406,32 @@ static int gdbserver_open_port(int port) return fd; } -int gdbserver_start(const char *port_or_path) +bool gdbserver_start(const char *port_or_path, Error **errp) { int port = g_ascii_strtoull(port_or_path, NULL, 10); int gdb_fd; if (port > 0) { - gdb_fd = gdbserver_open_port(port); + gdb_fd = gdbserver_open_port(port, errp); } else { gdb_fd = gdbserver_open_socket(port_or_path); } if (gdb_fd < 0) { - return -1; + return false; } if (port > 0 && gdb_accept_tcp(gdb_fd)) { - return 0; + return true; } else if (gdb_accept_socket(gdb_fd)) { gdbserver_user_state.socket_path = g_strdup(port_or_path); - return 0; + return true; } /* gone wrong */ close(gdb_fd); - return -1; + error_setg(errp, "gdbstub: failed to accept connection"); + return false; } void gdbserver_fork_start(void) diff --git a/linux-user/main.c b/linux-user/main.c index b97634a32d..7198fa0986 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -1023,11 +1023,7 @@ int main(int argc, char **argv, char **envp) target_cpu_copy_regs(env, regs); if (gdbstub) { - if (gdbserver_start(gdbstub) < 0) { - fprintf(stderr, "qemu: could not open gdbserver on %s\n", - gdbstub); - exit(EXIT_FAILURE); - } + gdbserver_start(gdbstub, &error_fatal); gdb_handlesig(cpu, 0, NULL, NULL, 0); } diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index 80b2e5ff9f..0aa22e1ae2 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -285,7 +285,7 @@ void hmp_gdbserver(Monitor *mon, const QDict *qdict) device = "tcp::" DEFAULT_GDBSTUB_PORT; } - if (gdbserver_start(device) < 0) { + if (!gdbserver_start(device, &error_warn)) { monitor_printf(mon, "Could not open gdbserver on device '%s'\n", device); } else if (strcmp(device, "none") == 0) { diff --git a/system/vl.c b/system/vl.c index 02795c5135..c567826718 100644 --- a/system/vl.c +++ b/system/vl.c @@ -811,15 +811,15 @@ static void configure_msg(QemuOpts *opts) /***********************************************************/ /* USB devices */ -static int usb_parse(const char *cmdline) +static bool usb_parse(const char *cmdline, Error **errp) { g_assert(machine_usb(current_machine)); if (!usbdevice_create(cmdline)) { - error_report("could not add USB device '%s'", cmdline); - return -1; + error_setg(errp, "could not add USB device '%s'", cmdline); + return false; } - return 0; + return true; } /***********************************************************/ @@ -1298,24 +1298,21 @@ static void add_device_config(int type, const char *cmdline) * @type: device_config type * @func: device specific config function, returning pass/fail * - * Any failure is fatal and we exit with an error message. + * @func is called with the &error_fatal handler so device specific + * error messages can be reported on failure. */ static void foreach_device_config_or_exit(int type, - int (*func)(const char *cmdline)) + bool (*func)(const char *cmdline, + Error **errp)) { struct device_config *conf; - int rc; QTAILQ_FOREACH(conf, &device_configs, next) { if (conf->type != type) continue; loc_push_restore(&conf->loc); - rc = func(conf->cmdline); + func(conf->cmdline, &error_fatal); loc_pop(&conf->loc); - if (rc) { - error_setg(&error_fatal, "failed to configure: %s", conf->cmdline); - exit(1); - } } } @@ -1446,7 +1443,7 @@ static void qemu_create_default_devices(void) } } -static int serial_parse(const char *devname) +static bool serial_parse(const char *devname, Error **errp) { int index = num_serial_hds; @@ -1461,13 +1458,13 @@ static int serial_parse(const char *devname) serial_hds[index] = qemu_chr_new_mux_mon(label, devname, NULL); if (!serial_hds[index]) { - error_report("could not connect serial device" - " to character backend '%s'", devname); - return -1; + error_setg(errp, "could not connect serial device" + " to character backend '%s'", devname); + return false; } } num_serial_hds++; - return 0; + return true; } Chardev *serial_hd(int i) @@ -1479,44 +1476,44 @@ Chardev *serial_hd(int i) return NULL; } -static int parallel_parse(const char *devname) +static bool parallel_parse(const char *devname, Error **errp) { static int index = 0; char label[32]; if (strcmp(devname, "none") == 0) - return 0; + return true; if (index == MAX_PARALLEL_PORTS) { - error_report("too many parallel ports"); - exit(1); + error_setg(errp, "too many parallel ports"); + return false; } snprintf(label, sizeof(label), "parallel%d", index); parallel_hds[index] = qemu_chr_new_mux_mon(label, devname, NULL); if (!parallel_hds[index]) { - error_report("could not connect parallel device" - " to character backend '%s'", devname); - return -1; + error_setg(errp, "could not connect parallel device" + " to character backend '%s'", devname); + return false; } index++; - return 0; + return true; } -static int debugcon_parse(const char *devname) +static bool debugcon_parse(const char *devname, Error **errp) { QemuOpts *opts; if (!qemu_chr_new_mux_mon("debugcon", devname, NULL)) { - error_report("invalid character backend '%s'", devname); - exit(1); + error_setg(errp, "invalid character backend '%s'", devname); + return false; } opts = qemu_opts_create(qemu_find_opts("device"), "debugcon", 1, NULL); if (!opts) { - error_report("already have a debugcon device"); - exit(1); + error_setg(errp, "already have a debugcon device"); + return false; } qemu_opt_set(opts, "driver", "isa-debugcon", &error_abort); qemu_opt_set(opts, "chardev", "debugcon", &error_abort); - return 0; + return true; } static gint machine_class_cmp(gconstpointer a, gconstpointer b) From patchwork Thu Jan 16 16:02:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857902 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp278255wrb; Thu, 16 Jan 2025 08:08:16 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXRMH1CsjQttswtk6V3PnOj6HELYeRNc4MgevxGtGj2xEKP2i0HIxSKbyGiSUDwm9XAeS12/Q==@linaro.org X-Google-Smtp-Source: AGHT+IE9I5ncdM7J8sONGDiFgVqTzW3JK6QaZHiV9l2YMYtD44jVZF+q/raTbvfzFPcEBW98ZA6E X-Received: by 2002:a5d:5f55:0:b0:38b:e22e:aee0 with SMTP id ffacd0b85a97d-38bec5075ddmr3474985f8f.23.1737043696586; Thu, 16 Jan 2025 08:08:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737043696; cv=none; d=google.com; s=arc-20240605; b=F1QXthCdIQEKMEDh/4Q14IQJ8rh1EAajlJm6RG7iucMooONKrm5DnyRPCE2acHxNFS GWt9TgIP8I+5iP/MT7jGD8fWwQdLbRv9L2ony0+FGeonMOsMoXb+fplwB4ve8erwgoS5 eNa4XUbB31bLgnLWYBsqySvR4x/6O9uX1gMQ1rbX6veKlPBzPHGwmINNArFB6eDL+mo9 x3SJSFozBOlnsVbFJGS0W18hIpjFEJjrl03wuGbJ0EcAScCiQitQ7NeC3PIa4jOAK1IT /JvplK9DrS3uBecZZH4yCEiD+4hyAiw2DTHXrGblKQwzDi2z7PSo0XPMkiD+qX581uhY NIlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YoVYHxIQ6FzVx9Ejwb1qRhaSC8vYXzudlK+d3/Xo6Gs=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=eeOhyYxSuGfeUbQcs08cTRvcIsecmXzuZk1bao6f7arZldVANp7LTGCN0B7kU4JKgZ fSqF6bG5/xVN3SOwxEinHUc4DaoE7pj3esi3V25tEVmAZ9nNIYhRUpgjDYVclAi73HrL 16UJ0GOvu9bF0oDMhJSwST9kGr2tDF8a/rYMPoMgTxg3c0pjPMEsfnZV1Wn6Jl3qn9RU z/oU2YrC1cOYBb8/6YDTCFD16TgepgyR9jRS6e40hraOK82JPIfKkZuL5zmnkNfXL2hT 3QGRbHyu/yctjsGAqY113b+fLmG5wW/iCLX9yq2fmj8x8sKIcWra9bt0sIN7CRJc07RG quZg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xm+GRH2d; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ffacd0b85a97d-38bf3290affsi152214f8f.699.2025.01.16.08.08.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:08:16 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xm+GRH2d; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSLo-0004HR-FZ; Thu, 16 Jan 2025 11:04:08 -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 1tYSL7-0003Wq-O2 for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:30 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSKz-0001HM-5Q for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:25 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-43635796b48so7482045e9.0 for ; Thu, 16 Jan 2025 08:03:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043395; x=1737648195; 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=YoVYHxIQ6FzVx9Ejwb1qRhaSC8vYXzudlK+d3/Xo6Gs=; b=xm+GRH2d4c7ftd/+htyUwJu8eN8M0Bbcfq9uYgkc/1DpklIXoHePGn93sPQGdij0Kc VxjTWX81TWBWtjKv2fNh+Y7LW2v0NbxqfjCMF1HqF+pgJVCBXIPf47/7aU6Bh7zjGM47 qb9LRwZlHvSyV6MEpnMLbhuHyFTEP/MQa2lWBt6gwe01J3UzWlDU8jVnHOUCUHPQUONf 3dakuig684NwpRU0EfbrqBCHONWrXVbJE3xl7O6YAE43LKcbIkUKKhW2gqxOfI6QnPZQ bWY/bOK3bkMS2eC1Kt6g9XNnfE+l9byhD8zpqtlIkWbcReQvJYpgRm86E65mJinouMgP 3Ndw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043395; x=1737648195; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YoVYHxIQ6FzVx9Ejwb1qRhaSC8vYXzudlK+d3/Xo6Gs=; b=dkxll3ku9W3YYKf4HiL/s3oMru22y8ypWXpllcJKvebus7FWNDLWsg9FQEG/7IBE/y 1R9eHx7jg86s2fuvWRszr7EcU8i+GyS7Cnb6f3WNqHtuxMEJVuh98WrvwEcqgWFexZUM vFgoEQHIBDg6YKWAqSYHCCBe1PCbBxTaP+Jb1GElqKzKxV8OjHpcaI9HWN6FHnqQ0qW3 LgLfHjqak/hyL7tFSLwkzLwv1Za2PGn0zt42lYx0oxy3zZg22TsB6ZKj9O0/pwJrAXz5 1Lvj0SINIE4QkgIOAwBy8eZ3KMIUtbfQPVzYcENw1uAJKt+kAwhnNMC1jvALWEFAwgbj jo7w== X-Gm-Message-State: AOJu0YyekzJv0Ktxyt10NOucAYaQnf8c5MkVjJcNSbDYA6EQa43DcAXQ PhQXPdnd/enyVXNybW2JqJOG5XU7zFhPn6wg2Gza+42BpiGEitQN0WtsXNiosgM= X-Gm-Gg: ASbGncuN6bXw3L5VkmEHHzLa9Ofi16bAZT+C+glKgTTtqztJpH5C7EFjtOjvzrF3XZ4 uBBlU8mxUSmPRaEtCriFVwKUQv0Aj3Ugk/fad850s+loXpBGVq41tVXuK48OV0EtvoJlJd2pKx0 idxwuvXsn+27QoSGHNnPWIjUk6BP0A2f6eE09WEhf4sW1HGJpBSgSQ3Xd+hUsAdPUDwvtlKTd7I 48CMftmKq3fqV54ZLf2SFiylBpa9bWa7fQkTWcLAX9yuiwga2VcCFc= X-Received: by 2002:a05:600c:3509:b0:434:f9ad:7222 with SMTP id 5b1f17b1804b1-437c6b02098mr70020395e9.7.1737043395356; Thu, 16 Jan 2025 08:03:15 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf322acdcsm221252f8f.55.2025.01.16.08.03.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:03:11 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 7FE1260872; Thu, 16 Jan 2025 16:03:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 11/37] tests/tcg/plugins/insn: remove unused callback parameter Date: Thu, 16 Jan 2025 16:02:40 +0000 Message-Id: <20250116160306.1709518-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32e.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20241217224306.2900490-2-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée --- tests/tcg/plugins/insn.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/tcg/plugins/insn.c b/tests/tcg/plugins/insn.c index baf2d07205..0c723cb9ed 100644 --- a/tests/tcg/plugins/insn.c +++ b/tests/tcg/plugins/insn.c @@ -150,10 +150,8 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu( insn, QEMU_PLUGIN_INLINE_ADD_U64, insn_count, 1); } else { - uint64_t vaddr = qemu_plugin_insn_vaddr(insn); qemu_plugin_register_vcpu_insn_exec_cb( - insn, vcpu_insn_exec_before, QEMU_PLUGIN_CB_NO_REGS, - GUINT_TO_POINTER(vaddr)); + insn, vcpu_insn_exec_before, QEMU_PLUGIN_CB_NO_REGS, NULL); } if (do_size) { From patchwork Thu Jan 16 16:02:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857903 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp278734wrb; Thu, 16 Jan 2025 08:09:08 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUl0VU54i7mAFOvaIXhbcnrjalFcI5wKI+HygGvlGmgPliQSeFOT32ntwHQcnkK7r2EqnQl0Q==@linaro.org X-Google-Smtp-Source: AGHT+IH+i7sgUa5J+5IDsP4B9s88DhzeirrpeAvZ9PcGKi4xlNt89h3kljxwbZV7Ev+h8UKgKoFx X-Received: by 2002:a05:620a:1913:b0:7b6:d710:228c with SMTP id af79cd13be357-7bcd9717d97mr5149699985a.31.1737043748551; Thu, 16 Jan 2025 08:09:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737043748; cv=none; d=google.com; s=arc-20240605; b=HVuzokhEwB7ouFgyGHhumS9QmRDSiyL/fIOXwbc8F+gB/wOTxkc65SzBuuQroWVqPt JW6g8ihSUgqh+Q8YHv+88UYENbNET5rSwIo9enQ89Du+2TuBtA80mbK7PadIce1hn7Cw gePFl3EXXBWXIkgRaIWs0ZpPDxmEaYhsOXPV92EJ7E4A5jwhlVIFi9yCyVyQqzrzCttE BqDjOKZCJPLj823BGXv2zdXk+lqXGw4fUwUfJRze8gQDXm2fm/GxOpKfmTgQh47xCSYN 3amhiZnZRIRDYAz22EVJAB5Q66+PtQIEj/84326AynXiGNvQIa3Y0OgHUTocpVsapwpX L/rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4WxsgJL7chOGbG+/17n3vpjWqUAThC5sUhtSd92NFE0=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=VX6cpNK+ND3ZSbfqQmHrHzVi6XU0mqreHnpAunMhAsZCCtnObxDUx0HFAVz4m/QHYL MAzFzJ2pAGRPhatmK0i40SwqhG0aUgsI2U4FbcfJpYCO/+2HXxL7LV0qNRb1/4SLpO8B IEir9Ph8SWOYYTFA+VFMJBRIfGP0ZuFOfEm+76HCC2hfYya5SgUuV5pXQCtZ7G0KUIqn /LQI1Cj6Zcpv/mFrkySMAL+T9GKHM0V+d9v46wZNTP1+1eqWWehoSRuprPDJiHk2te9E s7NAMYfblYP6+RidXa6loWSVMfNr1jOm3PUKqn0pANtd1xI1P3Tck6Ej3zUa9qF0QzDr 4C7Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r1kSBipU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e1afd1974esi2336016d6.464.2025.01.16.08.09.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:09:08 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r1kSBipU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSLh-00046r-R0; Thu, 16 Jan 2025 11:04:01 -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 1tYSL8-0003Wt-Eq for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:30 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSKz-0001Hj-Le for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:25 -0500 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-385eed29d17so664331f8f.0 for ; Thu, 16 Jan 2025 08:03:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043396; x=1737648196; 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=4WxsgJL7chOGbG+/17n3vpjWqUAThC5sUhtSd92NFE0=; b=r1kSBipU0ujRFmyH8y1nN+NWxqVQz2rdfFzY8sRtX42+0b6rSiwafsle7hPcMJ0B36 Qw6i7SIBYDZ9Pnetg5G3SrE8mOjkqao2h1Ibh7EZE4MDaZ2oe0xOm7RIIx2FEo9b/pqd 8pbiSptJnJr+YkHovJ06L+jkDSg+so21EzgosH7qPOJ0zjceyvHkxfJH5JrQInDGJTPd s16u+3LasDyNvQJlTjzC7MFEu/e+o6vLnn04V95jjOmFdd/s2Rh7lKg8+BnHzWJBM6aO 0IOtP6RHpTcz3EIRd62xGJuGIWY+8ypepYPC0Fc+CQ7diNzLMJY3VFA1RPn+vnGEyD87 FP1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043396; x=1737648196; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4WxsgJL7chOGbG+/17n3vpjWqUAThC5sUhtSd92NFE0=; b=FKQm3pA2vPIGeRNvrEOEYs0w0OnaR3fnf4F0OmOWVqWWz5eUma5pOB4Jw+YNxmUZuq SubEJDciU699jIUX3Xde0P5/vA9n56fdjeAQQ5va2mY+rViLXYm7MGOT0vhmZcJl92Pa FFtQe0I+FFZapl5t+aCES0l27xlRwg7WGlDscsZWtoP0JMZ+7nfgjdlE4QSCVWGJLUoT A+EKmbC9fLdKX+C4PVSyNXciUNRtdLQlMhtlKpYBJNAvC63xx9UuUbm3Apm44xaEwPCK TWSZSN+PZa+C2MiyNd+RVmtYWoFJaVK3vfuQI+heprXu0ntC0x6qHNF09yhKeRDhJt5Q 2Riw== X-Gm-Message-State: AOJu0YzGHTSYeIYVUHjVedxq+QBisDGBZ3oaCo2fCKrDJuYsLyOrPJ5Q CCtJRR2Zht8LeEIynVwfrQbzylW4u0NSfgesF43sAzzj/hfDMkDODaSeTVk8vms= X-Gm-Gg: ASbGncu+tF0VvD6s4u0z4VjAJM5lDrVG+VQBeWzOG+YdefYL4eJwcEO5c2O8R+hm/hC +0KzfAYZmF0pOgzSpTVX4sgiw5reTMo5l2wLgACr3Wj13EGHNc6arLByNMSt0bo+yGI4iLRAZ55 RN6sUWYbzKLkZdL3v2Q3hU+QLNtRIv4wxxZOEvKSK4EvNwwMVi7Tcp8alS8pBW4aOQHXFwUwSGy 42avBrcOqIWuc5P36o7fhAQirm8cThcEF38PpalbfEC6DYFG+CxxS0= X-Received: by 2002:a05:6000:1f85:b0:385:e411:c894 with SMTP id ffacd0b85a97d-38a873377b2mr31016041f8f.43.1737043395954; Thu, 16 Jan 2025 08:03:15 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf322a859sm215673f8f.43.2025.01.16.08.03.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:03:11 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 9A73A6087C; Thu, 16 Jan 2025 16:03:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 12/37] contrib/plugins/howvec: ensure we don't regress if this plugin is extended Date: Thu, 16 Jan 2025 16:02:41 +0000 Message-Id: <20250116160306.1709518-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42a.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20241217224306.2900490-3-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée --- contrib/plugins/howvec.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/howvec.c b/contrib/plugins/howvec.c index 9be67f7453..2aa9029c3f 100644 --- a/contrib/plugins/howvec.c +++ b/contrib/plugins/howvec.c @@ -253,6 +253,8 @@ static struct qemu_plugin_scoreboard *find_counter( int i; uint64_t *cnt = NULL; uint32_t opcode = 0; + /* if opcode is greater than 32 bits, we should refactor insn hash table. */ + G_STATIC_ASSERT(sizeof(opcode) == sizeof(uint32_t)); InsnClassExecCount *class = NULL; /* @@ -284,7 +286,7 @@ static struct qemu_plugin_scoreboard *find_counter( g_mutex_lock(&lock); icount = (InsnExecCount *) g_hash_table_lookup(insns, - GUINT_TO_POINTER(opcode)); + (gpointer)(intptr_t) opcode); if (!icount) { icount = g_new0(InsnExecCount, 1); @@ -295,8 +297,7 @@ static struct qemu_plugin_scoreboard *find_counter( qemu_plugin_scoreboard_new(sizeof(uint64_t)); icount->count = qemu_plugin_scoreboard_u64(score); - g_hash_table_insert(insns, GUINT_TO_POINTER(opcode), - (gpointer) icount); + g_hash_table_insert(insns, (gpointer)(intptr_t) opcode, icount); } g_mutex_unlock(&lock); From patchwork Thu Jan 16 16:02:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857894 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp276142wrb; Thu, 16 Jan 2025 08:05:11 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWw267M+Q96MStO/LNBFJltg8Tzo2fc3qr1qShXHCBuCO2zkUyTiFlwpnn7ugfqpw3SXVeWgg==@linaro.org X-Google-Smtp-Source: AGHT+IGs8380VlO+RsR/GS17DTg7DDykTLBzsun4lG0tWdD6yI6fBhM0H+iLtkSmQBHeVrJfJLuX X-Received: by 2002:a0c:cd8c:0:b0:6e1:a4d6:185f with SMTP id 6a1803df08f44-6e1a4d61ae2mr46895936d6.34.1737043510762; Thu, 16 Jan 2025 08:05:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737043510; cv=none; d=google.com; s=arc-20240605; b=V2yZA6d5BV5+ecIMqtPbeNAR4CMKMgcqv2bwFkKYwIDWbq4MxtSRGk74tRirQ7t2wW XmcuhCc0SSdhj2tnL/al59M0/BK1cEJrEpFvvpDbEwf2CguEpcDVX1W1GST2g3x35NmA SlC0wbEE57OoeSHbRUFFbfEGGgz6My82k82XEK1eBBPEg1pY6OEy2xn2hDXV2glFFXP8 dz02zLHCS09LnOSc8w9Vh8as2klhw9tmAZ/ZJDBS1xpvCIBEoIe/JdBpURHR6wG/aKh3 5eFWBPkSy/or8D7KZAQMqVV2HuPK7TeOqHDegR4IFbXFdTIOd2zY0qZ7aBs1f1Cz3B3S px7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=v2wuVbnc7sEvmDoO7gmBrl9t4VirrSgx6WEqdbF/SEU=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=af0VIO9S0PQ/OexQRSGfj+73Gz2/ATzDxb5q/gR/AMx0//t+RzfoPuQQ0kf4VM6Jpn vFydEciJvHEK+ejSpPNTQYIBwv8KYdObIEvP1jmbJ/QVBx7AP/Qocj0lnh4ai/KVjEhf cUQNOXMq9tdrgFWEkLAVZMP+6ur+9HK96uHfdgqxt6EHLpgt0BCpETCowLLj1934Qqwm RJp2hUUvtR+lHaQ7htqnC4zNiwWMcsxAPhWjWaSqVuX2Tq2L6Pv/RN3alK9aLRvc3A0+ binR1IDskFThZjXi2Ld0fcbk49oO9t+zPXg/yTJ/ljQnJQdfL+8+ObRRTd4APc0Nu03N ahpw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dEgbu3Fo; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e1afc1af3dsi2756486d6.145.2025.01.16.08.05.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:05:10 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dEgbu3Fo; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSLt-0004Os-RC; Thu, 16 Jan 2025 11:04:19 -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 1tYSLC-0003Yj-Kz for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:32 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSL2-0001JO-0X for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:29 -0500 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-38789e5b6a7so649731f8f.1 for ; Thu, 16 Jan 2025 08:03:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043398; x=1737648198; 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=v2wuVbnc7sEvmDoO7gmBrl9t4VirrSgx6WEqdbF/SEU=; b=dEgbu3FokfA0m9MaffO3a8t1kHCv1EECqUvjLvhqEDY80/5qQSNprqJXa31S18tKoC xfJyxvNp++7pKEENvcQTIgKnNSJsondO3qVfKgY7hGmd1ipcCynV0+v9OVw/pHyGNoOg s+hlQFLJQT20glvjtbbPUMlIO6qS8caajOsTxDQy+U2NvZDVfPO43Y8LA1NJoZwgyZsl fhxLVfZ39XYum77dvS+luwkKPi5a6VWEJ7tRZFqAez2RBdJ+f/I0NLDIBSfxuksXgo0e 8nxSunoYmHU072B3GjUfuAG1ij9M3Jwr888Y8TEzIeKsNUdlqkSUXFN0fzB901Obv/8s WeSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043398; x=1737648198; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v2wuVbnc7sEvmDoO7gmBrl9t4VirrSgx6WEqdbF/SEU=; b=ZE7J4e7OQV7vv1xfB4Xzrk6CMNd7FsRIp31rfQV+hTvCgYmKmFYWWcFZk4v97GJBDD 1J/X8BHfPexe1NEGFKoG03Bitzyza3MzMcyKFThFO3FsMrzNohXI4wd8lCEguo2+8zSZ VvzWdhzyWF4Xdz4ChQT08QNXrN9CRzV74TW/5+v5huOFTYfykShv718flCZW0PrMcg9v 4ZznK6IuT+mIz3EcPR2tw0Q0Wzb3w2xuVpCUF7DqegdQX8oZLsR2qluyQWcVKcZEG/3u f7WtrVg725aESqVjEcOHxkIjPif8US5b/MH08t36qZQarGtLC0zkhYHKyMS4PL7qIthy 5lmQ== X-Gm-Message-State: AOJu0Yx0JV9NW1FVuZoutUKOCQDkOfEgUPOli+ozqY62uJoqouY3YB4x xZLlKIl4qNFoOXi9OIzxlg7S8yeM/h3XThQYyBVZL2Pvo6lhAEx5kmyi1bpf+DQ= X-Gm-Gg: ASbGncub3uo3JHHJCW7OqTy1ysrIvE7VHUvBp+dwEJdtTioss71W8bcEUo0ohF4DBIp dUkjNs54KtnRKo2WSFRFKFBFIzafE9zWQCNK6NTgDsWlsOuR9K+dML+uXzIMikxFCq2C/+HZaGy qw8NFbbDUltNzeGlu1t5Yc3NSGX1m2E+LVxzagg+uHKDMzgaP0trNklxvxI9WdWnZtTL/NxLOKh qoxemrjqzL8zi2uZ3CM9b64cOL8BsQhMHRbjcIX9+XCikdF3jxfBR0= X-Received: by 2002:a5d:64e2:0:b0:38b:e32a:10ab with SMTP id ffacd0b85a97d-38be32a13a4mr9806902f8f.9.1737043398075; Thu, 16 Jan 2025 08:03:18 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43890462195sm3278435e9.30.2025.01.16.08.03.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:03:15 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id B328360884; Thu, 16 Jan 2025 16:03:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 13/37] tests/tcg/plugins/syscall: fix 32-bit build Date: Thu, 16 Jan 2025 16:02:42 +0000 Message-Id: <20250116160306.1709518-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20241217224306.2900490-4-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée --- tests/tcg/plugins/syscall.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/tcg/plugins/syscall.c b/tests/tcg/plugins/syscall.c index ff452178b1..47aad55fc1 100644 --- a/tests/tcg/plugins/syscall.c +++ b/tests/tcg/plugins/syscall.c @@ -76,12 +76,12 @@ static int64_t write_sysno = -1; static SyscallStats *get_or_create_entry(int64_t num) { SyscallStats *entry = - (SyscallStats *) g_hash_table_lookup(statistics, GINT_TO_POINTER(num)); + (SyscallStats *) g_hash_table_lookup(statistics, &num); if (!entry) { entry = g_new0(SyscallStats, 1); entry->num = num; - g_hash_table_insert(statistics, GINT_TO_POINTER(num), (gpointer) entry); + g_hash_table_insert(statistics, &entry->num, entry); } return entry; @@ -232,7 +232,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, } if (!do_print) { - statistics = g_hash_table_new_full(NULL, g_direct_equal, NULL, g_free); + statistics = g_hash_table_new_full(g_int64_hash, g_int64_equal, NULL, g_free); } if (do_log_writes) { From patchwork Thu Jan 16 16:02:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857908 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp280391wrb; Thu, 16 Jan 2025 08:11:50 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVhwjSHgbjtHxzGQAwf26uPSfXzyPq6b118/47Akw3d6iXXnuGSWKgp9mrk4kNdTD0t+bHehg==@linaro.org X-Google-Smtp-Source: AGHT+IHaqPRLtV3JUaEVYaC2vzv+SskcZsYGNkpISd1FRi+h/0ONlhuqFUZcU6YF99VK+n4TKlO5 X-Received: by 2002:a05:6902:2604:b0:e57:94fd:61da with SMTP id 3f1490d57ef6-e5794fd6360mr5198233276.14.1737043910390; Thu, 16 Jan 2025 08:11:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737043910; cv=none; d=google.com; s=arc-20240605; b=jmGDlDVjUuSm8WRIrZ9Z8rZ+DgSPsEgREMlG9hn9oMJHHp+hSwscewQW2JRiuH4K6h PEQzPNfJ8AJrFPiWbmzKplWZwrMWEkGIBhsPL9vmBuAHF/HvKagyHfJUpFJiBdTk06FM W/HvHjVmxiN9TzA0Vixu3t4/yMSDaEbtg9b6VGt7ePZ5g3fwKsc7B6ocYX35O0cbeXr1 dvw880xj/P/l74OVcVi88A9gl2X7AkFt4FE8Edz14P/LkwKAlDp8B6qTKrTPdeB2ypup nscfmmDCrVAuPJExUaOgZ7PlPkxkdpnuSIm1Y0FPEM5jI0kZ2wlwEctXhQ38xQPB6yhE wIiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xbdq8PuzmcKgRuOS6aY93DBa464+R41QKxYxX1E5oro=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=iL6rqRxOnF1K8A9v/DprGkS+PbNUqU52TTnASyChiALxfaafZEeYniB1gdUnY7GDAk X6yI269ILVTs3c9U9KZE6KfB5nq7yjIsNNUuKAroakZ6rd/9jBuxC1veym0g+w1CZDbu s+2XJ40oct0CeeP6IuJjZeFmODkfnKGcuTAZrXN6nzKJHtmgy4xk+ZgbR0ZTWE+8GVS6 VQM3w+l8NefCGxrLlZhi5REz8dhImbO1basZJ19lpiOwochAgbw2OtNnNvy05K9IcFOn rpnHBpx3QjWXu/piUULM2lR+zvGCkXFPy+ObakCt9YfqmSNGvOs6W8OFxI1krBS3xrHw Nn7w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Ba/EfVrs"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 3f1490d57ef6-e57ab5a8c38si393805276.454.2025.01.16.08.11.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:11:50 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Ba/EfVrs"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSMN-0004g0-LH; Thu, 16 Jan 2025 11:04:46 -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 1tYSLC-0003Yo-Ny for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:33 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSL2-0001JC-0O for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:29 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-43690d4605dso7410955e9.0 for ; Thu, 16 Jan 2025 08:03:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043398; x=1737648198; 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=xbdq8PuzmcKgRuOS6aY93DBa464+R41QKxYxX1E5oro=; b=Ba/EfVrsOYsgr6+CoC1Z41kcWp9YAg6op3MYoPUHEnFVOR+gWex6JAeCZUjoIdAJnU //gIa/FUiclbbc+BKNbOrNbK1mFHr5c36kaLPF/ITbdBTY+5aWY3f+BE12HXcjyz8cQj y3XNtZG8zECCKuNALiqpWoASp8b92h0z4hvCTJoDh2b/3gZ0ghpchIOMj8FHzmYX5+tb U1S1dXwngTOkMJtB3SjMKdkL8A/n9Ym0tCar/bs3H4IqMjZjIX8N1/qEBEiC6udijbtF 1R7HCg1zUk6rSVSuL5e2HMH8bTMwpY71Jpcs/FP6+ZHJndw9EumA6bgeOVO1/VJUPL/w F/Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043398; x=1737648198; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xbdq8PuzmcKgRuOS6aY93DBa464+R41QKxYxX1E5oro=; b=LIJpoCWbS85S5qHC+9tTLaaSoJAWbCJ/A9tKH/7NAbfsHRAt/4d0R/vcBY72QrPZSx 5c64hU8Wqy28z8b2ZzP4zfwxxH/XN0x4kTZjYJ0Dy5shGP6xJ1UnvS1YxerGSqetl0uF uh7S2rn+sNP2loHUUyndNO1s65F9cv8rpfZGYV0DDNoGTyT5c2xPpbWyRtqqsyY9xbPe 8PIP6veU7OQHeZVvDHVgZdGkr174nB+v+nVEcnJQSKsm1jP5Vg+zCWCF0PULVNRFnh6K w/ehRoig1mGmX5jDFivPBo98dNPE7vpy5Z8Wi5ohM+kdY2HmoM/jL8OeWfyuYx/6p8x0 8pVg== X-Gm-Message-State: AOJu0YwDHxf4RytuKRsMvOt4qagOZu6Ul2kjXPSsHJaO2QBbqtwbX1B6 M84YB2kEjbeFMUGVgxebC8JG2yJPlNJ9ve+anQcw3Feu6QcU+9bUzQu99d1Aygs= X-Gm-Gg: ASbGncuyJny/oozphs9dELMMw94SL8D8qPJFk+9ZfornqyAbQSNJ+cN+7cbQ9n41qIU aD5k/81cgi0YfSIrhnQFxHVm9dCPX74OskJYsfGbLSVmY6IL2NGNhlHRCzQ+hya2+i1arhuaM77 ABO2B6feMLxFUXY0M8NU58YniAjk60243VG/PUqQ16wfpI5qx5Z583DEhKOwhqmocU4m0gu0sYH jIVy1n2g9avfxCVuQgdwkWXKVeJ66QlIFHYfDUsrV/pVmUlGhx8YU4= X-Received: by 2002:a05:600c:314f:b0:435:9ed3:5688 with SMTP id 5b1f17b1804b1-436e26a1f79mr339091715e9.18.1737043397377; Thu, 16 Jan 2025 08:03:17 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-437c74c65b7sm64838375e9.23.2025.01.16.08.03.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:03:14 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id CBC2160890; Thu, 16 Jan 2025 16:03:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 14/37] tests/tcg/plugins/mem: fix 32-bit build Date: Thu, 16 Jan 2025 16:02:43 +0000 Message-Id: <20250116160306.1709518-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20241217224306.2900490-5-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée --- tests/tcg/plugins/mem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/tcg/plugins/mem.c b/tests/tcg/plugins/mem.c index b0fa8a9f27..d87d6628e0 100644 --- a/tests/tcg/plugins/mem.c +++ b/tests/tcg/plugins/mem.c @@ -135,14 +135,14 @@ static void update_region_info(uint64_t region, uint64_t offset, g_assert(offset + size <= region_size); g_mutex_lock(&lock); - ri = (RegionInfo *) g_hash_table_lookup(regions, GUINT_TO_POINTER(region)); + ri = (RegionInfo *) g_hash_table_lookup(regions, ®ion); if (!ri) { ri = g_new0(RegionInfo, 1); ri->region_address = region; ri->data = g_malloc0(region_size); ri->seen_all = true; - g_hash_table_insert(regions, GUINT_TO_POINTER(region), (gpointer) ri); + g_hash_table_insert(regions, &ri->region_address, ri); } if (is_store) { @@ -392,7 +392,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, if (do_region_summary) { region_mask = (region_size - 1); - regions = g_hash_table_new(NULL, g_direct_equal); + regions = g_hash_table_new(g_int64_hash, g_int64_equal); } counts = qemu_plugin_scoreboard_new(sizeof(CPUCount)); From patchwork Thu Jan 16 16:02:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857922 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp282215wrb; Thu, 16 Jan 2025 08:15:00 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUEtDnAfSDtuPLeruSS98GY8iGBPZGb0oQY7pUwUEX9KH7e7PqssQ+Zn8JieLGsKP3CPsCjyg==@linaro.org X-Google-Smtp-Source: AGHT+IGsWTp92r/+VRhfou/Mau8F5Rz3H6iEGpXg+q7CcXVTFE7hEBNdWkYZSR90DYYDjGRdWnYT X-Received: by 2002:a05:622a:199b:b0:467:52d4:3c0c with SMTP id d75a77b69052e-46c7102c96amr555303081cf.32.1737044100381; Thu, 16 Jan 2025 08:15:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737044100; cv=none; d=google.com; s=arc-20240605; b=LEjvKS8ocjJsHJj3jwEQnm4nehwphxGtuhMOTUe4nJVYt2oYc8d3Cqrxfx1sm0LehX povbQUkWwLnLeusaR/pQx36toAz1fi11bEx7v2SEAR0KyiBBYpDPdOEsrzbkFQeonCbb EtQLr37uq7nZURQ1k6Br2Qco77VxlVrADiVfzsk6KxMYfRpGH5dCDCUt+TMpRR5OANbl AaI+JDkWDbZm7LcIJOPIT3MdzKINojjdETmc+vVt3Dg9JccV4pod//+oB7GZBciQF86B j+rDwXhDe9Jy/IhnoLld4ZHEtgr55mzp8G3UVIP0TsXR08dMyBqsPxo/e0yEkQnJxXqj v0QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Ut5L3H7ENukAVXMf9ucpT4mEYkt3Qt71rdTcSo9h+fA=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=dA4dMcLk2an9sBUITSRIYBC+YNNHb65cnDH0nLrJzLdEgklcdyeCzv9mCzLYj6Dm5/ XT8Z82FMprXMnPH7JQjnybesE7dpWQiMXKo+zAyQab88adIXw/hGndjYWIvMBSQwkWQ6 6JHL42M9d4ojj26z8soj4cAwuSg9IKgWHMk/GdN/xgNtp51SaYAAvkiejgin+BzHrHlU ZZHK0Cu0yVyNLbZyru9B10S3lNy95WnQR90U2syqSj+lSM2HVeGILsurf9eSVzYcCxTi JfNWWDVqVrjmrxRdhn58AW/1fRiDCtMhH2eJY7AK4Jpw4MjR7HasKSQ/0ihx7fMPZQqz NCdg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qmry38Zp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46e1040ea59si1737091cf.283.2025.01.16.08.15.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:15:00 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qmry38Zp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSVq-00014g-43; Thu, 16 Jan 2025 11:14:31 -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 1tYSTw-0003mA-DO for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:41 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSTk-0004YF-SZ for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:30 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-43675b1155bso11763965e9.2 for ; Thu, 16 Jan 2025 08:12:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043939; x=1737648739; 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=Ut5L3H7ENukAVXMf9ucpT4mEYkt3Qt71rdTcSo9h+fA=; b=qmry38Zp4SddZ+48O5xfOFBaensQWs0VpCDoYB7g/dE3oo2LkPrXeVxIgI7NVvx5JW ovQLVHJad2cXesrvRgrdfRZI/rJqbTzV3fOXDoFDTo5ybpV3C3ahIBWN4tGrFScfCfgL 601pfFOAZQwqllFAH2/EwOd/kvHrFnvmFScTmlKwjoFlvJtC/Y+MpMtUUXlSCRlUCdu+ Knv5eHmQqDrVCKNleQxZz9b+YOzKpLVKMY85+DA5bkNyVjGzbub0NH05j1okZUnjpn+A aENR8yLeQo02rsqXUhaf9v/3UufSd4nlWi23cSEhekJ025PabDvI4lBQTDnHt2te4JOw bzFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043939; x=1737648739; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ut5L3H7ENukAVXMf9ucpT4mEYkt3Qt71rdTcSo9h+fA=; b=ubti4jPzE4zeilf3wJ6h5jTM0O/LvAQBUbjEFxuYIwVzf2dFISI8Pz6olCJ1Ooe5ZM pDwZqNvQT6jazmsBDnhBoZtljxGKaUAz1xlJdi0oZoEVIobZe4kUtQ/zMfsX8PEMt2n/ i81ci+bA6Euh8CeMyrwJZJmKMcttTvCl348AejfQyfv481rsX3PkzJf6Iu+HJjRJE2sc QTAM9yr6BR5TVtBSul/pOAZDsinz0QyGk0zxOIHrZZLkKb3m6gCe08XBqwHvk52DEiGA YJqCbGp15VUcOd9WzqlOFyNfnvlWv0HA5EdTpXHkT4ggreDEHTb6e6U6hPl1OYvZPxJK QucQ== X-Gm-Message-State: AOJu0YyFd4ZUupqjjLFaBDWeB/leM62ILhCBSM0vZwteCAzbZwOOw066 2wRTU7yzLMHLTTW1rvSK2MmXJD97+HFpa/KzjpFJyR9ns3PoS9eQM1++EfSAzFE= X-Gm-Gg: ASbGncsFHbt8lYAedf7nSURCu/GDPfxZ9pvj6kAtdTnSZcj5LHXI2QvPINi7ZwjrW/h qia/qmlMuMmD4yR2G9yA6+fwYD1aobXohuHAVaQglI76JyUNYArMAU1Iyl7La5At3p8w6y39NOP 8thheHpDw9WyC9hHCRdnhPdhkVZenOmfCbQlfBlPYkwSufYd2EM8ALAPa8GF1RXvij8OVOm6gkY aZtyUywrs8A7kn+x4JE2Ru0TeRiym6LfJUqPjbL0eNsXiWJG6fLcCo= X-Received: by 2002:a05:600c:1c8f:b0:434:f586:753c with SMTP id 5b1f17b1804b1-436e2686096mr321124675e9.7.1737043939201; Thu, 16 Jan 2025 08:12:19 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf3288f79sm214917f8f.100.2025.01.16.08.12.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:12:15 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id E36A860898; Thu, 16 Jan 2025 16:03:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 15/37] contrib/plugins/stoptrigger: fix 32-bit build Date: Thu, 16 Jan 2025 16:02:44 +0000 Message-Id: <20250116160306.1709518-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Signed-off-by: Pierrick Bouvier Reviewed-by: Richard Henderson Message-Id: <20241217224306.2900490-6-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée --- contrib/plugins/stoptrigger.c | 48 ++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/contrib/plugins/stoptrigger.c b/contrib/plugins/stoptrigger.c index 03ee22f4c6..b3a6ed66a7 100644 --- a/contrib/plugins/stoptrigger.c +++ b/contrib/plugins/stoptrigger.c @@ -21,9 +21,11 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION; /* Scoreboard to track executed instructions count */ typedef struct { uint64_t insn_count; + uint64_t current_pc; } InstructionsCount; static struct qemu_plugin_scoreboard *insn_count_sb; static qemu_plugin_u64 insn_count; +static qemu_plugin_u64 current_pc; static uint64_t icount; static int icount_exit_code; @@ -34,6 +36,11 @@ static bool exit_on_address; /* Map trigger addresses to exit code */ static GHashTable *addrs_ht; +typedef struct { + uint64_t exit_addr; + int exit_code; +} ExitInfo; + static void exit_emulation(int return_code, char *message) { qemu_plugin_outs(message); @@ -43,23 +50,18 @@ static void exit_emulation(int return_code, char *message) static void exit_icount_reached(unsigned int cpu_index, void *udata) { - uint64_t insn_vaddr = GPOINTER_TO_UINT(udata); + uint64_t insn_vaddr = qemu_plugin_u64_get(current_pc, cpu_index); char *msg = g_strdup_printf("icount reached at 0x%" PRIx64 ", exiting\n", insn_vaddr); - exit_emulation(icount_exit_code, msg); } static void exit_address_reached(unsigned int cpu_index, void *udata) { - uint64_t insn_vaddr = GPOINTER_TO_UINT(udata); - char *msg = g_strdup_printf("0x%" PRIx64 " reached, exiting\n", insn_vaddr); - int exit_code; - - exit_code = GPOINTER_TO_INT( - g_hash_table_lookup(addrs_ht, GUINT_TO_POINTER(insn_vaddr))); - - exit_emulation(exit_code, msg); + ExitInfo *ei = udata; + g_assert(ei); + char *msg = g_strdup_printf("0x%" PRIx64 " reached, exiting\n", ei->exit_addr); + exit_emulation(ei->exit_code, msg); } static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) @@ -67,23 +69,25 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) size_t tb_n = qemu_plugin_tb_n_insns(tb); for (size_t i = 0; i < tb_n; i++) { struct qemu_plugin_insn *insn = qemu_plugin_tb_get_insn(tb, i); - gpointer insn_vaddr = GUINT_TO_POINTER(qemu_plugin_insn_vaddr(insn)); + uint64_t insn_vaddr = qemu_plugin_insn_vaddr(insn); if (exit_on_icount) { /* Increment and check scoreboard for each instruction */ qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu( insn, QEMU_PLUGIN_INLINE_ADD_U64, insn_count, 1); + qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu( + insn, QEMU_PLUGIN_INLINE_STORE_U64, current_pc, insn_vaddr); qemu_plugin_register_vcpu_insn_exec_cond_cb( insn, exit_icount_reached, QEMU_PLUGIN_CB_NO_REGS, - QEMU_PLUGIN_COND_EQ, insn_count, icount + 1, insn_vaddr); + QEMU_PLUGIN_COND_EQ, insn_count, icount + 1, NULL); } if (exit_on_address) { - if (g_hash_table_contains(addrs_ht, insn_vaddr)) { + ExitInfo *ei = g_hash_table_lookup(addrs_ht, &insn_vaddr); + if (ei) { /* Exit triggered by address */ qemu_plugin_register_vcpu_insn_exec_cb( - insn, exit_address_reached, QEMU_PLUGIN_CB_NO_REGS, - insn_vaddr); + insn, exit_address_reached, QEMU_PLUGIN_CB_NO_REGS, ei); } } } @@ -99,11 +103,13 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, const qemu_info_t *info, int argc, char **argv) { - addrs_ht = g_hash_table_new(NULL, g_direct_equal); + addrs_ht = g_hash_table_new_full(g_int64_hash, g_int64_equal, NULL, g_free); insn_count_sb = qemu_plugin_scoreboard_new(sizeof(InstructionsCount)); insn_count = qemu_plugin_scoreboard_u64_in_struct( insn_count_sb, InstructionsCount, insn_count); + current_pc = qemu_plugin_scoreboard_u64_in_struct( + insn_count_sb, InstructionsCount, current_pc); for (int i = 0; i < argc; i++) { char *opt = argv[i]; @@ -124,13 +130,13 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, exit_on_icount = true; } else if (g_strcmp0(tokens[0], "addr") == 0) { g_auto(GStrv) addr_tokens = g_strsplit(tokens[1], ":", 2); - uint64_t exit_addr = g_ascii_strtoull(addr_tokens[0], NULL, 0); - int exit_code = 0; + ExitInfo *ei = g_malloc(sizeof(ExitInfo)); + ei->exit_addr = g_ascii_strtoull(addr_tokens[0], NULL, 0); + ei->exit_code = 0; if (addr_tokens[1]) { - exit_code = g_ascii_strtoull(addr_tokens[1], NULL, 0); + ei->exit_code = g_ascii_strtoull(addr_tokens[1], NULL, 0); } - g_hash_table_insert(addrs_ht, GUINT_TO_POINTER(exit_addr), - GINT_TO_POINTER(exit_code)); + g_hash_table_insert(addrs_ht, &ei->exit_addr, ei); exit_on_address = true; } else { fprintf(stderr, "option parsing failed: %s\n", opt); From patchwork Thu Jan 16 16:02:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857898 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp276814wrb; Thu, 16 Jan 2025 08:06:11 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW+yOyrR2kYjGlPMahYYTaTpM7FoSjahn80+w3QY3tYAjbAV5QBvu2FJO29kH2aXQUs7ljTIg==@linaro.org X-Google-Smtp-Source: AGHT+IF4oTEVYNMnqvp0og8ULdgW04JV5SeB1MjqTrRe7JXPkfCkwlDtV98Id2CFOkjJQcvw9GYy X-Received: by 2002:ad4:5943:0:b0:6d8:96a6:ec22 with SMTP id 6a1803df08f44-6df9b210064mr344407186d6.23.1737043570960; Thu, 16 Jan 2025 08:06:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737043570; cv=none; d=google.com; s=arc-20240605; b=S1qajbrRTYhOXTYSLeTJh29EYcToiGTTcMx5KPGfHtWbnuCsec41mZuY4I83e1IpmQ mc5AZKwro5Z6ISSbsY3y/1zMCFrXsbs9Vkyq3RC+QzjxZTwe9wlPlIVOyr7nYhsaXR7o JY7msOXxC6Vqb+xDkmElTVoxfkXPHszOcME3drieFsnD/hr70BTVr/2O+US/Qg9FCDKo dWBCRt+u98bTpxlzFtsFfxe6EcKYUb8BR3vmtDZRi4pAGPtm9EQqxsOiiapvSHNSQLKy kHfrlidhiWc/6LytQsMo0HVx7AKYh/iWKxrh/eKGdNy2BXoyO6bgYG27D+g027Rblmrl YsfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Z/fE5ihsW9j0TdJrNyGqxXoPll6S7jQ7QqKUoC+ldgQ=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=jiEqIfgDFkLuNB/sUkKA5s1+oX8iCfPJZxE+ZwjTR3tNfPVIr791ZWCPgx4KRvnVD/ U9bgnloWrO47RoG20yoS/u7JPsc03QOx0woNK4H3U08MkSooPo6wsa3kyCBIUoa05BGH UP8X0zrn/e9k65E/rheb2ES/ea2trPmmGT+7KSjvGN6BIDBW0IFixu1RWZkwGoXxzCVQ 90rmfIVv29cZdyNgFxsfaRYculiDzmIIyHeRprVJ99tRmFSu+GoTKikPbpqOTODRwY1v 2WbKKJrekjyp+QImDr2eXVgGCBq/g2D7K7pyJZLR6ypmTSQTFr7FpxQtL3ARttDUpE/y oWTw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KkbFIQLi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46e102f2c46si2248861cf.127.2025.01.16.08.06.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:06:10 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KkbFIQLi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSND-00068J-0A; Thu, 16 Jan 2025 11:05:35 -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 1tYSL9-0003YC-Cv for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:32 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSL0-0001IE-Gy for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:27 -0500 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-385d7b4da2bso1028832f8f.1 for ; Thu, 16 Jan 2025 08:03:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043397; x=1737648197; 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=Z/fE5ihsW9j0TdJrNyGqxXoPll6S7jQ7QqKUoC+ldgQ=; b=KkbFIQLitSN2xAOR7g2Xs9CdfbSaaOmzmsr/AbhWQfFgehQJihFfrVXHx4sGz5rT4s v2+9aorW66o1P1EoT1NdtYGgSkwNKNtmGwyyFzyWfrDYeWRtuFoGWIwFnOk6WDM0hcrx J4i//9kfT8QKT45U5hbqGD35TqM42OdBNcMyjaa5t7OjIb3Oy/AjVjLR3W6qN0FJ0F5k FD4XEe8irWWkNUKBurGV8VOlrpIbRpqhz5r7PiT5UDJZ4vPR+3Z92h95k7h9gzALZhif NpT0Uv/rk07nyCTOeBC4s6X6DIZALFv69YGduUNW2HbZb7eESXywTzO7HwW8vYqAuFCo fACQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043397; x=1737648197; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Z/fE5ihsW9j0TdJrNyGqxXoPll6S7jQ7QqKUoC+ldgQ=; b=E/GiNdkVOzfJZDWG6gHg9Q4QqUdwdfzF71QxkyqpcSVng7vm79e4elYW7lMoUof6Ri IAZsTk6aH3PGXvC/IY7q7fkX+8JHAgEROOV6PdQUQLDkcrnkGAXdA5NpV+5KH794wULT 8SnpYSLkMo3m6X+1CuBTTzoZFaFh4TviCnw+WNlZpGBKDc+6Bq1QcmFYH9f4ucE4FnlI MqMhgoAhYR+wrpL0Q9o2dnIYZTVAmo/cFnM93Dm/q/UsuFm9wLUWjkyF1lzLpdfv4IBk +4+NBp1SjRH1JSuVlQqx4IwEh1RMKzoj+wooZJn/eadJQOHKx45Xbgq5XThuqo3/47d6 6qoA== X-Gm-Message-State: AOJu0YySTO/Ntr2ptW3b0O0UYpw/P2TjNl4YepU2kOPka57ZCK8CLeKr pWIRxO8Hsx9UA4Q2Cl9FK18g/c4zdW0vzpesfwmGeZv0nEHkQjj8VODMYwgl+4E= X-Gm-Gg: ASbGncuG6As0KDbmTkwiSfTLXDDxZEti5XypQU55a3998LdecboG15GE17QqDbFvtQO YdMb/0SmYvvpALg+pruNj65gDV9ccGFMezE7s8Md/ni4z6WM9kwy0F3Rm0JyD86Lbl+wSD2N7oC C+t9Bebmq0SbL6Pc0dMyFjARG5BFFLa974bx75mgUu+vMNnzKYMGSgjgHQ9JopErsWbypQ73vKR bI8D8zCbAQBCEoNeSgzRUyz9aHf1No5C71JZmc5PnLPyAYqQtxcgEY= X-Received: by 2002:a05:6000:1f8d:b0:386:1ab5:f0e1 with SMTP id ffacd0b85a97d-38a873052bfmr32432858f8f.14.1737043396783; Thu, 16 Jan 2025 08:03:16 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf321505asm226352f8f.7.2025.01.16.08.03.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:03:15 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 06F41608A9; Thu, 16 Jan 2025 16:03:08 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 16/37] contrib/plugins/cache: fix 32-bit build Date: Thu, 16 Jan 2025 16:02:45 +0000 Message-Id: <20250116160306.1709518-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Signed-off-by: Pierrick Bouvier Reviewed-by: Richard Henderson Message-Id: <20241217224306.2900490-7-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée --- contrib/plugins/cache.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 512ef6776b..7baff86860 100644 --- a/contrib/plugins/cache.c +++ b/contrib/plugins/cache.c @@ -208,7 +208,7 @@ static int fifo_get_first_block(Cache *cache, int set) static void fifo_update_on_miss(Cache *cache, int set, int blk_idx) { GQueue *q = cache->sets[set].fifo_queue; - g_queue_push_head(q, GINT_TO_POINTER(blk_idx)); + g_queue_push_head(q, (gpointer)(intptr_t) blk_idx); } static void fifo_destroy(Cache *cache) @@ -471,13 +471,8 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) n_insns = qemu_plugin_tb_n_insns(tb); for (i = 0; i < n_insns; i++) { struct qemu_plugin_insn *insn = qemu_plugin_tb_get_insn(tb, i); - uint64_t effective_addr; - - if (sys) { - effective_addr = (uint64_t) qemu_plugin_insn_haddr(insn); - } else { - effective_addr = (uint64_t) qemu_plugin_insn_vaddr(insn); - } + uint64_t effective_addr = sys ? (uintptr_t) qemu_plugin_insn_haddr(insn) : + qemu_plugin_insn_vaddr(insn); /* * Instructions might get translated multiple times, we do not create @@ -485,14 +480,13 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) * entry from the hash table and register it for the callback again. */ g_mutex_lock(&hashtable_lock); - data = g_hash_table_lookup(miss_ht, GUINT_TO_POINTER(effective_addr)); + data = g_hash_table_lookup(miss_ht, &effective_addr); if (data == NULL) { data = g_new0(InsnData, 1); data->disas_str = qemu_plugin_insn_disas(insn); data->symbol = qemu_plugin_insn_symbol(insn); data->addr = effective_addr; - g_hash_table_insert(miss_ht, GUINT_TO_POINTER(effective_addr), - (gpointer) data); + g_hash_table_insert(miss_ht, &data->addr, data); } g_mutex_unlock(&hashtable_lock); @@ -853,7 +847,7 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu_info_t *info, qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); - miss_ht = g_hash_table_new_full(NULL, g_direct_equal, NULL, insn_free); + miss_ht = g_hash_table_new_full(g_int64_hash, g_int64_equal, NULL, insn_free); return 0; } From patchwork Thu Jan 16 16:02:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857917 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp281716wrb; Thu, 16 Jan 2025 08:14:10 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUJwFT9jY6BQ99f2ynB4ravjB7FUJQiZJPvHFECSvJ4XKNKfjI2g7J83JupIFLnqG6PlpYDmA==@linaro.org X-Google-Smtp-Source: AGHT+IHtkP5neilH9WIuicx4W3OCHkmseRogT7CcVijT/rvuZt0VMqKwNvKNRHf5f2brTm8ttjJ/ X-Received: by 2002:a05:690c:6711:b0:6ef:60db:5e8d with SMTP id 00721157ae682-6f531223024mr262329837b3.4.1737044050546; Thu, 16 Jan 2025 08:14:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737044050; cv=none; d=google.com; s=arc-20240605; b=O3OW8CjLYVesJfqNblNJwumMXFk/vhwxstutvoUuPhIakbuoS+tP2U64JLR2WRxdnd aSVqc3QjWxbGVXs44jLBz8sImpTweKZgJXHW0pp7W+Erxl6pBX4HN8d7iHpbyMRvACX3 Gen1Q0cm1ofzgvEdDAE8tv+a2eQeXbK6qxgY+Rqe8eG9GxT7KPAd/ejI+0nCLfJobSTU F929PcF4t3wII1bjfpYVV9iaX4dQ9Exq5OuU5/fpGDzrJZJB8/I+pLg1XBdTeX+XGTtW jHjpMNRQx1Ho7ivUZTFntLEcG/cL6zXmCkkpbU9PPQ+LblciULxzOPqLf/Nv7SA/5zQi cd1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2F/PrPslSIW6Y9g5K7Gs/QX6OA8vuL+PxeLCYDC6PuY=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=BuN7SuB6tiSlU6Por1iIZd2N+dw9OCWfIeN9UhkI27d/ngflmKVuXviieoE73j5gD5 Z2jQhi4SZ6pUoHfnK45VPDRmcZDz5lpNT38e8wIxCgMT+Ua13IlfPhz7m5WrLk0tWKPX TMFys/mhPGNxc7O/o0B5djd++vz0RqHlotNsNGgVIzU06t2UsipHywzQ7leTTHGk/7kt +VV/6voP9msoI16x3qHeoleAeVlBf76Konash8pIiQ+E1Fk1MYu1TvmdliLPx+xk/lfI 8IhD83IX/D8ZpRZuKg35910VhVJLePlN/bER0viPv9Mrz9mdzjiYd3ByRqOQCB8RL7TQ MRKQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Pc3/ma2A"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 00721157ae682-6f6e66d93cfsi3974567b3.288.2025.01.16.08.14.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:14:10 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Pc3/ma2A"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSVF-0006XQ-HS; Thu, 16 Jan 2025 11:13:53 -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 1tYSTk-0003aw-Pm for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:23 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSTf-0004TD-8Y for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:20 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4368a293339so11745275e9.3 for ; Thu, 16 Jan 2025 08:12:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043933; x=1737648733; 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=2F/PrPslSIW6Y9g5K7Gs/QX6OA8vuL+PxeLCYDC6PuY=; b=Pc3/ma2Apvo4MIo7xCUs2rjDR+MBhM4s7bWKDDQDI7YAVtAJGr41x9EhBpqyL0O8J1 yIt1192HFLoVvBpG/hlbPvgJTUQ05p8BDqSaLGTi9cXbSeU8kiflHfbVdHKCkY9Xly8k 12Xc8qBwqGsLjNnrcuNA6kLqQ/2ox9/iCLV71uV9YvZfQnR/rEmMj0htvjnbMeKKYo67 8vXHnVO3Upfhv4iDzsRhya7ZKba6MSEWcyALq0cx7GBsXlmxsDs6CgO4u9csdlOt5y1R I6UDqycKBUKB1e/0lqyIlJyswDdksy22PoO83UlNMJQ2v/xw9Zx810qb/oAjOiBrJa1V thKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043933; x=1737648733; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2F/PrPslSIW6Y9g5K7Gs/QX6OA8vuL+PxeLCYDC6PuY=; b=oIGz2bFf6l7nDFesumM10SNQBzKJ+x0nPM/aDkKEKfmH/wxV8jgJXYchSfzimv8JQ9 T7UmWHLWyZaaKtK74swXGVKTI288DyZVL3EJfnAxJOI7/7knBGbozUkEZcJvMexbDzq+ 9WHyVa8Hod4SVN3fRUR7ZvSSsUlye/kikYhre5sZG/RfAdI9Da4uL8VMQW+gX83NN17W PUef6vPpmdjG3U+kzds9jQ7oXEi3MGQI95Cow187ufV0nmvBAGjyG9bWvMNwpWN3oHPj O4enUFAoB2NguEx0ZtTlqddAo3l9FlSLeUxlDvjSk+NqewxDDutxohdvW5tUR5WQ39f6 oVsQ== X-Gm-Message-State: AOJu0Yyhf4abfaukrhta/x+W6sPBSvSCx70u5G+qJR2J+zNtXjkLIdNQ LeMq2JqQVPf5VJbi9ls5NLVfgD0bswqmX1p3SJhf8/beBlV0aAAcjgMQZspumEg= X-Gm-Gg: ASbGncsvXGgXGN6wneKuALDeh3rMnvWdG/YK6qoaPv3mGAo7uzTk7HBEtEVqRQDpOO3 enKBDazwKWiNbSY7sC7Q2ETklUgLAyBsUft7hESMeT6zc79HKJeeYYCo9U4Hw6eU6aPt4uA0Zqr V6itpPUPojm09AQzWR0uvSbq0+AkLJYmlVxEPVVdzsjpo5VJNZfB2xReV8kCsT8YkhiMqihPBid cOpliqAqR8ZOyiSLU/1oGnNLS66DWKXtZbFH2KxNwDeCWPBf8GbzsM= X-Received: by 2002:a5d:584f:0:b0:385:f638:c68a with SMTP id ffacd0b85a97d-38a8730b738mr29985496f8f.30.1737043933410; Thu, 16 Jan 2025 08:12:13 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43890408a66sm3915205e9.5.2025.01.16.08.12.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:12:11 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 1F85B608B4; Thu, 16 Jan 2025 16:03:08 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 17/37] contrib/plugins/hotblocks: fix 32-bit build Date: Thu, 16 Jan 2025 16:02:46 +0000 Message-Id: <20250116160306.1709518-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Signed-off-by: Pierrick Bouvier Reviewed-by: Richard Henderson Message-Id: <20241217224306.2900490-8-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée --- contrib/plugins/hotblocks.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 02bc5078bd..f12bfb7a26 100644 --- a/contrib/plugins/hotblocks.c +++ b/contrib/plugins/hotblocks.c @@ -29,7 +29,7 @@ static guint64 limit = 20; * * The internals of the TCG are not exposed to plugins so we can only * get the starting PC for each block. We cheat this slightly by - * xor'ing the number of instructions to the hash to help + * checking the number of instructions as well to help * differentiate. */ typedef struct { @@ -50,6 +50,20 @@ static gint cmp_exec_count(gconstpointer a, gconstpointer b) return count_a > count_b ? -1 : 1; } +static guint exec_count_hash(gconstpointer v) +{ + const ExecCount *e = v; + return e->start_addr ^ e->insns; +} + +static gboolean exec_count_equal(gconstpointer v1, gconstpointer v2) +{ + const ExecCount *ea = v1; + const ExecCount *eb = v2; + return (ea->start_addr == eb->start_addr) && + (ea->insns == eb->insns); +} + static void exec_count_free(gpointer key, gpointer value, gpointer user_data) { ExecCount *cnt = value; @@ -91,7 +105,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) static void plugin_init(void) { - hotblocks = g_hash_table_new(NULL, g_direct_equal); + hotblocks = g_hash_table_new(exec_count_hash, exec_count_equal); } static void vcpu_tb_exec(unsigned int cpu_index, void *udata) @@ -111,10 +125,15 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) ExecCount *cnt; uint64_t pc = qemu_plugin_tb_vaddr(tb); size_t insns = qemu_plugin_tb_n_insns(tb); - uint64_t hash = pc ^ insns; g_mutex_lock(&lock); - cnt = (ExecCount *) g_hash_table_lookup(hotblocks, (gconstpointer) hash); + { + ExecCount e; + e.start_addr = pc; + e.insns = insns; + cnt = (ExecCount *) g_hash_table_lookup(hotblocks, &e); + } + if (cnt) { cnt->trans_count++; } else { @@ -123,7 +142,7 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) cnt->trans_count = 1; cnt->insns = insns; cnt->exec_count = qemu_plugin_scoreboard_new(sizeof(uint64_t)); - g_hash_table_insert(hotblocks, (gpointer) hash, (gpointer) cnt); + g_hash_table_insert(hotblocks, cnt, cnt); } g_mutex_unlock(&lock); From patchwork Thu Jan 16 16:02:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857919 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp281907wrb; Thu, 16 Jan 2025 08:14:30 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWfDvlxS9/rHYxMcUsP/W0YuEqoih5ePrr6dXoaXrZcuqz+NQppe3gftYPaZ9VePitJd+/gaw==@linaro.org X-Google-Smtp-Source: AGHT+IHl3HM3ovFDJtKPw+wC3N3aUFX0zKVHHly5WIclRH02JgYhqwHjO2f0joKBfJWZhw7R750O X-Received: by 2002:a05:6214:8111:b0:6e1:7223:19a9 with SMTP id 6a1803df08f44-6e172231a99mr203815646d6.24.1737044070123; Thu, 16 Jan 2025 08:14:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737044070; cv=none; d=google.com; s=arc-20240605; b=h2HQLkhEGMk9Jv1lDc1PNr4Vr6HvfjVHSgzrpyeTRv/0LUbEYNVGqOSFJ6Rw2pWGqz kdMDeZ2KkfgU0byOl58clMck//0zGo3sd03w1mCye9UwbNCMOWtgHILPVrWelqBrK7dx PkA7MZUjlJxnw1ccjHlpS8EKvvX0GgDPFmJrZOYYtCvZ5SKuqkYqVu01aI+gEiPE1URA EJ2hGVMyO1n+Omr5o0W6LnqLc9ScmHyaauj4eHtfKmBNRMwq3lhUBgZ0CT9h8NlKDp1P TZAUwrZUeXv+YR5Jgj/Uf6ol6lGR/qpu7SlBvxb/k5u0iFVakcIP98SzGxDw88ehrYpF e4YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1tw2ZvpgzU+NWUchIsRD68y5QyIwwYntbgovoaeHxtY=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=fyJ+MtOU9aKVjyMfJZhRU7RmOFomvauHcjazQkEa4kr419PQn1CNIMtAp8B8pxOnJD JuNCsOjuy3Be35GOvHaIML8Oul93NyKM/a0MUhMJKDxBa/KwhGdWAcYCG7mhKOpAwRkg yqhJaVMOJXu8VlNfo9uLBVDXOV4tHD9Ogj9LeD2g1J9rAFcF4Kk46ozjusYY4y27s1bG odBFHxJ2T3f3KL7FM7xnKUYv4A2SURkWwBZ32N+zit3HMGFru8lTSIUGKafOckL5FRY8 4kOK0I4Y1BAJy8wDbHncg5iVvaD9g+FP8GO9AfRZusLYMKe5PYZP94xY7lZNO3PplVir Ee9g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U1jwbgSF; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e1afbfabd0si2869516d6.78.2025.01.16.08.14.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:14:30 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U1jwbgSF; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSVV-0008My-05; Thu, 16 Jan 2025 11:14:09 -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 1tYSTo-0003jN-MV for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:31 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSTg-0004UL-VV for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:22 -0500 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-38a8b35e168so820535f8f.1 for ; Thu, 16 Jan 2025 08:12:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043935; x=1737648735; 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=1tw2ZvpgzU+NWUchIsRD68y5QyIwwYntbgovoaeHxtY=; b=U1jwbgSFYG60UK647y5+aYgFM18NZo8PYqwI5LflpqOLe/nEsIxiuZN3zPnC1AcnE/ Vk/cXKmYUdFMiNSedUvfTKGsjuC0mJNa8q45xza7fmbGtadjknlfFenniAoguWDOai3J Xq8cZpKbdY/yZIAYaaXpDrG9Sxhh7mxN0/0ZYEomL3glgom/u0xbgmCcZXFj5M1HKRQ3 lJvIdYygri2q/mwX64+xU6TcqxofE7wmd4vaObLqUGwuKi8DOAq4ahd1hGX/0L9W8hre azAa8qvnFVVSqYQOdJBGa5u6xzfbaOCfaaO2f0+LbSN8qL9ODXDQLLW3RZn3opTc4Unj qjpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043935; x=1737648735; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1tw2ZvpgzU+NWUchIsRD68y5QyIwwYntbgovoaeHxtY=; b=k0R+gIXQ84ZxABvy+gsCmpWSjeH1ZXKLlaozsq2jgEdbMTTF1/AdZw0lWqCzQTny1m NCZRGeZogNWcAUIULz7aTM0+bbAVcXtwkz8+DbJMrNJoDfFfnbW53Q1x7VLGy3tw4uLK mRqCok72sKqTzrC0H4zvXx9uIUGWz1sRM10rLQ4TVj1qJAaAkdOTSfr+NnPjhR7H+wmU l6nQUWJH5jCt7bhqA7aRN4YmlsB6peCyZ/c0UgHHGbxOq1HzhMRXrK9wDoqYwDOy00qJ z5gxgsUz1yQfWsomfIpEeSD5LTHHunQ0sm8tYDacMGkMtHSkZm+ePSPGSNHl3f2GsIUQ iKLg== X-Gm-Message-State: AOJu0Yxa0Rxx4N8wYxgscAYlKSwMQI+K16+iGIjR8SLs/gylfY+kNPBU +DFUNGx9kEaf9CZy0+mVNM2Y7qsuLOq8oCEFcqTMEQ6yUGl5C+s/InsbmhzgH9w= X-Gm-Gg: ASbGncv9YNi1INOyE3SG2V7Rfoh6iUtRHCPtCfs3VBNZnrdHtkf5BfeDzSP9edSTSt3 VdqIILYdXm3MnQmGpkMjkEFL9JbjJEf6ck4oO7wbkR6TpeS0bkw1FTm4KRl/vX8fVkKh/Lbm5F7 OuWVNTu0qTfOrpD+PYisduErQE5h6tBlfI41FB3KHFEasWhO1VY10LN7aGQ/E5R7YmZ4co7r9T1 I4C5tygW8pK1vtUer8JqhgGwxMsUsPu5/DGDYmVAxc8c6h2EGa7dbA= X-Received: by 2002:a05:6000:18ad:b0:38a:6183:77b9 with SMTP id ffacd0b85a97d-38bec4eecb3mr2742753f8f.6.1737043934873; Thu, 16 Jan 2025 08:12:14 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf321508esm248143f8f.10.2025.01.16.08.12.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:12:11 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 359786082D; Thu, 16 Jan 2025 16:03:08 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 18/37] contrib/plugins/cflow: fix 32-bit build Date: Thu, 16 Jan 2025 16:02:47 +0000 Message-Id: <20250116160306.1709518-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x436.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20241217224306.2900490-9-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée --- contrib/plugins/cflow.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/contrib/plugins/cflow.c b/contrib/plugins/cflow.c index b39974d1cf..930ecb46fc 100644 --- a/contrib/plugins/cflow.c +++ b/contrib/plugins/cflow.c @@ -76,6 +76,8 @@ typedef struct { /* We use this to track the current execution state */ typedef struct { + /* address of current translated block */ + uint64_t tb_pc; /* address of end of block */ uint64_t end_block; /* next pc after end of block */ @@ -85,6 +87,7 @@ typedef struct { } VCPUScoreBoard; /* descriptors for accessing the above scoreboard */ +static qemu_plugin_u64 tb_pc; static qemu_plugin_u64 end_block; static qemu_plugin_u64 pc_after_block; static qemu_plugin_u64 last_pc; @@ -189,10 +192,11 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) static void plugin_init(void) { g_mutex_init(&node_lock); - nodes = g_hash_table_new(NULL, g_direct_equal); + nodes = g_hash_table_new(g_int64_hash, g_int64_equal); state = qemu_plugin_scoreboard_new(sizeof(VCPUScoreBoard)); /* score board declarations */ + tb_pc = qemu_plugin_scoreboard_u64_in_struct(state, VCPUScoreBoard, tb_pc); end_block = qemu_plugin_scoreboard_u64_in_struct(state, VCPUScoreBoard, end_block); pc_after_block = qemu_plugin_scoreboard_u64_in_struct(state, VCPUScoreBoard, @@ -215,10 +219,10 @@ static NodeData *fetch_node(uint64_t addr, bool create_if_not_found) NodeData *node = NULL; g_mutex_lock(&node_lock); - node = (NodeData *) g_hash_table_lookup(nodes, (gconstpointer) addr); + node = (NodeData *) g_hash_table_lookup(nodes, &addr); if (!node && create_if_not_found) { node = create_node(addr); - g_hash_table_insert(nodes, (gpointer) addr, (gpointer) node); + g_hash_table_insert(nodes, &node->addr, node); } g_mutex_unlock(&node_lock); return node; @@ -234,7 +238,7 @@ static void vcpu_tb_branched_exec(unsigned int cpu_index, void *udata) uint64_t lpc = qemu_plugin_u64_get(last_pc, cpu_index); uint64_t ebpc = qemu_plugin_u64_get(end_block, cpu_index); uint64_t npc = qemu_plugin_u64_get(pc_after_block, cpu_index); - uint64_t pc = GPOINTER_TO_UINT(udata); + uint64_t pc = qemu_plugin_u64_get(tb_pc, cpu_index); /* return early for address 0 */ if (!lpc) { @@ -305,10 +309,11 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) * handle both early block exits and normal branches in the * callback if we hit it. */ - gpointer udata = GUINT_TO_POINTER(pc); + qemu_plugin_register_vcpu_tb_exec_inline_per_vcpu( + tb, QEMU_PLUGIN_INLINE_STORE_U64, tb_pc, pc); qemu_plugin_register_vcpu_tb_exec_cond_cb( tb, vcpu_tb_branched_exec, QEMU_PLUGIN_CB_NO_REGS, - QEMU_PLUGIN_COND_NE, pc_after_block, pc, udata); + QEMU_PLUGIN_COND_NE, pc_after_block, pc, NULL); /* * Now we can set start/end for this block so the next block can From patchwork Thu Jan 16 16:02:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857915 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp281680wrb; Thu, 16 Jan 2025 08:14:07 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX1O1tz9p6T3dRXnpkxeWO8h/tNRMamopX74oshaW7vhThJAN8UWkCSfvU4r13PD8jIRZlwdw==@linaro.org X-Google-Smtp-Source: AGHT+IFU92/EukuOIR3U2EzPvGXU1btcMzeCsy0DBAsxz6s1JzL5yQWJbAdrSkeJvJ6y6xjoq6yJ X-Received: by 2002:a05:690c:6d88:b0:6ea:8901:dad8 with SMTP id 00721157ae682-6f6c9ad35edmr64254677b3.3.1737044047075; Thu, 16 Jan 2025 08:14:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737044047; cv=none; d=google.com; s=arc-20240605; b=GJFOE/kn+FbsRD4a0H4jhH9sp8fC3I8zwwIlH9Rdx5GmtYwKYQzCObRSNcLOLuWxzI zo1Khkg1HZKOhQy9bwXzKyWETWGywErXwmbJn73ynpaCa7/tbCxP19WRQP+HOOpOjoCa ze+NL6wfioRAeBiD3TMJ5KqurKDIVRx7Hts6BdGcNL5kqJMPAThuuyCmqiy/7CVi8eAT dnZgh8mAdE2ekVGfMKyDBBR5Bv7M4CPA2p6Wminj6dKm5mpjA2h59mQ63S2ATUNOm2r9 iuw65Rsn7J0F0++zwTO6uXQh1x4BLeECnmlaY17HYv2LeV6H8LKP9zfpdOGDpbfi4e+E 7NfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kTnA9glybPs3zdhSbJS9OZOTx27Sx361JrQqUOFibUA=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=WQgebFYYHjBsUyf3X8vNp3UfQ7TGHU3zymK8V6f2DmyPMJWCyD8bRRhiGYqg9SQXUm zZ1nq+KpfEv92/yVh7/KcFKnCMQB5pNLYcbwRPattpcGBDrn3WxW1TfBLlRt9L2JzfSS O6L9xS37UEDn7VlKTWZD2EzQxXIBYIlaww5SckA0rkp0XV2Szo8nP1nfYJmmEBbr159R kqgtGaspN7dGTnePsG52/qkwWgi5C1aXToBXbLu0vojV+m+tbkdiQvCEOVorvZdj+7R0 xqQST0UcYWqJA0sWhBoa9gU2bZ82slFuroGVYpwNUvwGT7i/E0WDcxnRcDSKyW2DICvc MIuA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GrMyWh77; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 00721157ae682-6f6e63ae5a8si3676877b3.42.2025.01.16.08.14.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:14:07 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GrMyWh77; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSUU-0004RL-4z; Thu, 16 Jan 2025 11:13:06 -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 1tYSTi-0003Vt-PF for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:19 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSTd-0004SH-KM for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:18 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-38633b5dbcfso1245666f8f.2 for ; Thu, 16 Jan 2025 08:12:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043932; x=1737648732; 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=kTnA9glybPs3zdhSbJS9OZOTx27Sx361JrQqUOFibUA=; b=GrMyWh77BuK5ZnWghuQ68UwzBMwX0pOX2WYvCuniuLvWXAlAlEQs1GibfRv5JV5gAT gricQFT/oJIedGBlCcJcdjqL+kgtID82ndbbLBBYipj4fuwsEcfzD679FCFsqr+aaNig j0Z7L6fcrUZtB9DRQlG3JkyWmJ2nvFo4PoRVd3UGN/1BjCxGM6LPdj5uCDh/hRlXvuF/ oKXndqG6Xy3xw6QZg9ABrXdW+H9gdbbC2/EAR9WvK1WcYIirEv0+dBakk+Lc95wFPmN5 v/XozvEraeBg91tLJLl2W11jEy5dDOnEB5S5E2vF176BcCeHoLMteeKr17S0rRmsDyov mJug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043932; x=1737648732; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kTnA9glybPs3zdhSbJS9OZOTx27Sx361JrQqUOFibUA=; b=HclcsZaTIzRMKyPlbGP1EnZFNMxFsaw06jOioGrISISoiOfzoGdmGbj1dqriq/8iMS 1mDGeHn+AkiJbawjOaZl1vxnM7r8PtRnxSRk9pNv3sF1wIXVh9qjVoyxVXjtxbI9aYVF fvq17YKjRGg9XwWtubEN9dBHbPlKik/j+0QhAXyvyoWgavf28L3xjPzHeU9YS5M55gNf /VN7shEQmdoDyZY89UrBGIfrAMVsdj+oIXIzopJmAJV5GsS5DdBO2M1RGgJs+u6ggOlu zq/PU1ErPQRZGvBIhuJkzCPGl8EwzoorndJP5BEY3/er0B8HUVU5jdkoGKxOUjrz9zNP lLVw== X-Gm-Message-State: AOJu0YxzD+Qg9dJWTr0QsYnT1L/Fp8J4Ur/C8Q81TalAQDm9aGGfTD14 QzHzJqRuVzSaCm0KbJtUuiJX/5RkerXpK6IhrubUVapMnbsS5Cn/A4Jw20w38P8= X-Gm-Gg: ASbGncsCqR9Sv/eiOta7sPOhXso5MBkJGY11tD7NByucVJjJa2xPIlVRqjp7dsbCm1O ulFlj4F16z6a4+tYKMXi3NFsfr95Eq72JbYy4pTJoIYxVvGyuUEeVquKkHy0c1qLWs10z4+q4w3 i31oz90GfRg1/rq20Y/Rcrkt2J/jOhMjMNRAIEcjyjskIEWPDsTcr0B7Ulg0y+b2gKkpd5SijbG GDmCkQz0fg8l2ytIwN5JxjEGe1lYNViq32t2NQ48QnuSl2SlWQY0YE= X-Received: by 2002:a5d:59ab:0:b0:385:eb7c:5d0f with SMTP id ffacd0b85a97d-38a8730db6cmr30348488f8f.26.1737043931956; Thu, 16 Jan 2025 08:12:11 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf3275995sm221666f8f.74.2025.01.16.08.12.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:12:11 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 511FE608B7; Thu, 16 Jan 2025 16:03:08 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 19/37] contrib/plugins/hwprofile: fix 32-bit build Date: Thu, 16 Jan 2025 16:02:48 +0000 Message-Id: <20250116160306.1709518-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x431.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20241217224306.2900490-10-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée --- contrib/plugins/hwprofile.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/contrib/plugins/hwprofile.c b/contrib/plugins/hwprofile.c index 739ac0c66b..2a4cbc47d4 100644 --- a/contrib/plugins/hwprofile.c +++ b/contrib/plugins/hwprofile.c @@ -43,6 +43,8 @@ typedef struct { static GMutex lock; static GHashTable *devices; +static struct qemu_plugin_scoreboard *source_pc_scoreboard; +static qemu_plugin_u64 source_pc; /* track the access pattern to a piece of HW */ static bool pattern; @@ -159,7 +161,7 @@ static DeviceCounts *new_count(const char *name, uint64_t base) count->name = name; count->base = base; if (pattern || source) { - count->detail = g_hash_table_new(NULL, NULL); + count->detail = g_hash_table_new(g_int64_hash, g_int64_equal); } g_hash_table_insert(devices, (gpointer) name, count); return count; @@ -169,7 +171,7 @@ static IOLocationCounts *new_location(GHashTable *table, uint64_t off_or_pc) { IOLocationCounts *loc = g_new0(IOLocationCounts, 1); loc->off_or_pc = off_or_pc; - g_hash_table_insert(table, (gpointer) off_or_pc, loc); + g_hash_table_insert(table, &loc->off_or_pc, loc); return loc; } @@ -224,12 +226,12 @@ static void vcpu_haddr(unsigned int cpu_index, qemu_plugin_meminfo_t meminfo, /* either track offsets or source of access */ if (source) { - off = (uint64_t) udata; + off = qemu_plugin_u64_get(source_pc, cpu_index); } if (pattern || source) { IOLocationCounts *io_count = g_hash_table_lookup(counts->detail, - (gpointer) off); + &off); if (!io_count) { io_count = new_location(counts->detail, off); } @@ -247,10 +249,14 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) for (i = 0; i < n; i++) { struct qemu_plugin_insn *insn = qemu_plugin_tb_get_insn(tb, i); - gpointer udata = (gpointer) (source ? qemu_plugin_insn_vaddr(insn) : 0); + if (source) { + uint64_t pc = qemu_plugin_insn_vaddr(insn); + qemu_plugin_register_vcpu_mem_inline_per_vcpu( + insn, rw, QEMU_PLUGIN_INLINE_STORE_U64, + source_pc, pc); + } qemu_plugin_register_vcpu_mem_cb(insn, vcpu_haddr, - QEMU_PLUGIN_CB_NO_REGS, - rw, udata); + QEMU_PLUGIN_CB_NO_REGS, rw, NULL); } } @@ -306,10 +312,9 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu_info_t *info, return -1; } - /* Just warn about overflow */ - if (info->system.smp_vcpus > 64 || - info->system.max_vcpus > 64) { - fprintf(stderr, "hwprofile: can only track up to 64 CPUs\n"); + if (source) { + source_pc_scoreboard = qemu_plugin_scoreboard_new(sizeof(uint64_t)); + source_pc = qemu_plugin_scoreboard_u64(source_pc_scoreboard); } plugin_init(); From patchwork Thu Jan 16 16:02:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857923 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp282222wrb; Thu, 16 Jan 2025 08:15:00 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWhPNRBmXvYsbUYvAnqLC/VxjKl02JsDIj22OrNXiFlHT6qr+gmASm2/o41t3Ov6TakmnlqOQ==@linaro.org X-Google-Smtp-Source: AGHT+IHPD7bBZPQ/z9xSNdbvSngYQw7H3gOHPRRkX66/3Ivcc4UY8p4opDfV2G+BTRSSOuXFUUGc X-Received: by 2002:a05:620a:4796:b0:7bc:db5d:aeb6 with SMTP id af79cd13be357-7bcdb5db077mr3544643385a.42.1737044100499; Thu, 16 Jan 2025 08:15:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737044100; cv=none; d=google.com; s=arc-20240605; b=ch23D6e1tLzfZvPD0cKmqb0Gh8fwRjQgIqGnbbyIbbuoyz8/AZCOHNhYgcXd82gD43 TDFcmLrJ6FMQ2VLVzKN6fogetYVm4AGW/pTjXwbI70aXdDSwpzlXTWx5DJ/+VNzagpIh TkVg7bUq3TyHGV8N1ZmJQ2vwqirTU9D/a4eai0Vf48jp5UEAS/r49coczNAaZHWYja+4 cjoRBofUEjjehLZbJs7n5neRN3FPg0AKdlIEVcVB4rlVz81kfruqa1ViB85rggh7oz9X Rg/cpikuTdK3bekJb/iroVkJx3ruLlujX7dj9NXIVxXO7GoU9sId9p+AU9Cb6IFzm5A+ Mb2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pERnavJS02WsVkpfgEIKcxRU3EPSk+CF5JdtAAMvhiw=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=jWZtXlrdrrJsbqJL0SiDB7P3k5vjJfgimn2l3crG6F3fYxAVr7RVzF7qP4ENo47VqM 01bJe1JRQxrxGaUUZTlFMcyadP/LrO8vO3OsUq3Sg5NTYJ9RJd5rJFKW7bc0B2+smUpW P09jMly4uBZ7x/1ogp5YJe/g9Wi62vAYIt4ZxzXilgl3Z1QhDdUdL32zxdztfvvhmQr8 ykybJQEEHGsMXql/CkP3kem2cd+ACti5J3JOzm9N0V9YLUeyCaDXj67kfww2ZCGrghgO E4rwMQPDnXy2nuyfC1K1SUOF5iUcoK8mvTUGpmOTw8CHlAICYXXCXQIW+FYHAT2ubE5t r+tA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zzqMGghh; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e1afd11183si2656246d6.407.2025.01.16.08.15.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:15:00 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zzqMGghh; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSVv-0001Nd-OS; Thu, 16 Jan 2025 11:14:35 -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 1tYSTs-0003ln-DB for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:42 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSTi-0004WJ-FO for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:26 -0500 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3863c36a731so972831f8f.1 for ; Thu, 16 Jan 2025 08:12:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043937; x=1737648737; 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=pERnavJS02WsVkpfgEIKcxRU3EPSk+CF5JdtAAMvhiw=; b=zzqMGghh+t31Z5RHf7Slz3eW1XWjS3xX1YjiKNwfnnnLe/Dxa3lNtCi+dGidvSttBn /+y8LC3VQuFYkNsI804cgnRdgqlSn5gPVN7K3gTd/ne8DBlioqBXTKTg1RWPwZoduRYJ zH6gJF3wPsy3wOWe7E24OrZjoC0GvjA45pebIfahfV+IEdAeKUwnaypP0x8wYDh8tPtL fuMZFkUaXxUo4pH7De7O2a313PCnoig41GEU7KMy8D1QKEFhn+lcJw8AwM7WFl+NIIs1 7deO8SOnuErnwUwmVPMuzYOxw67NSuXApMS+/TPvm1TwDkGPtMuYSNd1lNWi3V9jdTxG qc+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043937; x=1737648737; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pERnavJS02WsVkpfgEIKcxRU3EPSk+CF5JdtAAMvhiw=; b=LXIUgSeUwt6h8KabDxa0LPLH6A2YRu/b9WB9DSMp619ZN62m+bIesLSNBd+1BFPPD2 mgb6tNGmvhCqaYEK2EI9/LuTNV2woDsdfufrVv7t3AveiqfmY2iJaVIwWI4KBYNZPOSB UEJy1bwfchmUkD0FPCkHZ/sUPrLOEd4aisBIWp4HS756IxSYtrKWcJ+CyGlAkgiZwT0l /ITDqLZYXCV02foECGEG1PVG54+ew98oInkJ8374OZjxTO/1r5KPGtqahOzlLddP8gpl bbdCDsLA6k7DA3rHBHD3vdNIYmKRmojba9ttSyUbGKW6vZqbBnp/swBZp+BO/X+9+JHt mEvw== X-Gm-Message-State: AOJu0Yx2w6gJFUQ74rksyFvuhQeg1xOUkPbz9uQ8zWRt0BW747p9ph7c PtCwwle8NXQ+rG1pZXE/UGtN6WFat6586O8xQgogW3BvDP5DukMLoED8fWNaoEo= X-Gm-Gg: ASbGncv8BHwxOkb41Msichbe3dPaNUkFy4bU1WRCWwm37jQoei1a/FA0cFL685jQyq1 +7Vi4cxu0Oi5G+a/pPDEm0OC1c7TBTHfoFPomdeCbw4KCkXJV1468BQzq8RUY54DgIIIXf+TPkk NraI414MSwW/qSW2rU4GJfPMf9Si3R8rUx3SmDWHc29H3UOT/Jrg+ItnIs9ldTrE54IM44opu0g ICNLh7nLIUsOJg0nH/qcLpMjlmkLBCSE+g9ZMVnlJs97lcK96+A0wc= X-Received: by 2002:a5d:584f:0:b0:38a:68f4:66a2 with SMTP id ffacd0b85a97d-38a87312bdfmr30802999f8f.31.1737043936687; Thu, 16 Jan 2025 08:12:16 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-437c753c617sm64370335e9.37.2025.01.16.08.12.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:12:15 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 6A8F7608C2; Thu, 16 Jan 2025 16:03:08 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 20/37] contrib/plugins/hotpages: fix 32-bit build Date: Thu, 16 Jan 2025 16:02:49 +0000 Message-Id: <20250116160306.1709518-21-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x429.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20241217224306.2900490-11-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée --- contrib/plugins/hotpages.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/hotpages.c b/contrib/plugins/hotpages.c index 8316ae50c7..c6e6493719 100644 --- a/contrib/plugins/hotpages.c +++ b/contrib/plugins/hotpages.c @@ -103,7 +103,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) static void plugin_init(void) { page_mask = (page_size - 1); - pages = g_hash_table_new(NULL, g_direct_equal); + pages = g_hash_table_new(g_int64_hash, g_int64_equal); } static void vcpu_haddr(unsigned int cpu_index, qemu_plugin_meminfo_t meminfo, @@ -130,12 +130,12 @@ static void vcpu_haddr(unsigned int cpu_index, qemu_plugin_meminfo_t meminfo, page &= ~page_mask; g_mutex_lock(&lock); - count = (PageCounters *) g_hash_table_lookup(pages, GUINT_TO_POINTER(page)); + count = (PageCounters *) g_hash_table_lookup(pages, &page); if (!count) { count = g_new0(PageCounters, 1); count->page_address = page; - g_hash_table_insert(pages, GUINT_TO_POINTER(page), (gpointer) count); + g_hash_table_insert(pages, &count->page_address, count); } if (qemu_plugin_mem_is_store(meminfo)) { count->writes++; From patchwork Thu Jan 16 16:02:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857899 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp276846wrb; Thu, 16 Jan 2025 08:06:14 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUOLsJjxJy0+MitvndKpHHIHzLJxTT8uec2xjxS6C/vbQJsmZDt8lQ4j4H2HO2cMY9u77ywOA==@linaro.org X-Google-Smtp-Source: AGHT+IFEJW4syDrChKfX8/PaAly/Z2W1PBi5aMakCza73cDd/hN/q3qEozc/xqYCX6hFWWB81uBe X-Received: by 2002:a05:620a:6601:b0:7b6:d643:59a9 with SMTP id af79cd13be357-7bcd972718fmr4774243885a.11.1737043573854; Thu, 16 Jan 2025 08:06:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737043573; cv=none; d=google.com; s=arc-20240605; b=Q70fzqwFfS8QswvxzmLLuiU9+RGQn5ldVq/I4MNWT8UqqysEa6fJ/YgcMCgNofLF68 VdaX29lEFFa8tOSV4eEQC6GvOpzOTyPZ+FcdJCHEfpjStm+4jEoFzGav876L8Mi+G3Un vJpzcbY7JxmdZMHdpPGKLlVYpf+sFBfBTfr/syGuSNx8Nisf+Jwu+7PdAfIe/u0V6ciQ aY52QN+Uc/IVcY0JWOAwSAcqH32pAWNSxT/7aFwo64LFg9bonAYFxMr1emr3o7sokrOD IPTVRMeIOgvCPJCwUwEJurytniT9gnr+LeMuhQ+81pQpWZfZjDoKWqjBfc7KkbKVo0LJ o6Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dqmHD2ejeCU6vyBEybsqYUS9Cxg0cRrbaI6dvUsODH8=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=i6v5d16/o5JYRPS75rzK1Op4svLOz/Kos5zCPtO/rFVWO/13EFFIeNAu/b21Iu4GXT u7yqUdKHmtb+DaIxysnjS/LT8LW+y3R0uwz9A9thSj4fLLXqKXgQx+BZlXXf9WHxXjYO OWTDIE6i+EUaIFZB+lEFYdFz1RKk5j4HXp6/FqenvyfI0paAXVfSs6XiIehXZYQ7ByKh 6At0SmVf/ripod8hmWF9fHhg/NxRNzJUoJmbUNFID+FOrLTHX8sTnTZuuWTEZiO9v5gn FOWjyXEI6r2Vcmy2IExJ8XfgJJqZQEFl0Bxopg4eRVhzZ8DzqS16eThGT3vUZXUk1+DM Dsew==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="MYLs6OQ/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7be6146cb97si38816085a.23.2025.01.16.08.06.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:06:13 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="MYLs6OQ/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSMg-0004ts-Og; Thu, 16 Jan 2025 11:05:03 -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 1tYSLG-0003dM-1o for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:34 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSL4-0001Kb-Pg for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:32 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-4361c705434so7215395e9.3 for ; Thu, 16 Jan 2025 08:03:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043400; x=1737648200; 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=dqmHD2ejeCU6vyBEybsqYUS9Cxg0cRrbaI6dvUsODH8=; b=MYLs6OQ/nMafsVqnR90My+j/uMCVYChB069uhO0iF2QUZOmqGGJpAKMASfwCdPNlyE 9pY5pJvjgJhW1Ay2r3xrmYs2oWW3637fyVfZLx0Nfv9WWtHd8fl2szK+xNHOQ1W73Fs6 eRdSZsZG+Yf58P2U2Ki/vV56G1av93mefIzmmhaWQ3fCRe95OpVVrDsYpTuALzZ0YkPP fMGUi9y+RC/Bs3ueXABKdedlavjdJvWiY+uwQRNe97A7QzfXzAhaXF9QsQTEPwO+hFrL 2HD5xZYHohRweSY5exFvL6fmQRYZc9MmiuLnLAWdXrid4lEyyPwKtivCYXeWxl3iimAr w2sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043400; x=1737648200; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dqmHD2ejeCU6vyBEybsqYUS9Cxg0cRrbaI6dvUsODH8=; b=kVsvGS9g5pZI9CT3+zGSQlFYGslZyAIIPnPrwiXtv1WcwdLiq0J2ZVDIJsQ69zzant sYCaoGTstGmRu/T4rlyiMnS7jZCbNfsZVMrsbupyqB382JmllNsaiysNYg7JXmDthNaY C/D99vzNHSWPmneyG9YXshcs6q8AgQu1rq9NRk/op4pIkjxmOfrBjP6Mf9CGKVRG3QGG 0fKM7q+gBqbJhZyz6oCHyWiiRv1z1B9kqwX+8HajXAjSHUUW7G2PW7XLD7WkKCYeaXJL zmuFz2wvhU4BEyIKP0dlnVMVqS68i4mQT9w4NlBHlcYUmkFcfHIGzSuAssoXyFetXrIk XFZg== X-Gm-Message-State: AOJu0YydZCpNx/B5kJ7Y/JrWaaHdQOtwksV7rQ0Xy5fWZIe7d73kUWrR YexWVESpI0DZNLEEHQBFOXyPhO96skGBkqGR3YXFI0R9KQ+DCC3kzJlKIxc9plc= X-Gm-Gg: ASbGnctU9eq2qoCro2lQphjk6sWj5R5BlAN/wfjve81vfkd4JhYMtuxdeGUC8x9RvSi T3VI6mUf7MZgbAn93tIoThGLSR8rpb1t/o135T5qCDd3M59mzOnXyWzyEuTNxwqJkIHtT+6GQbo aZ09GZkrvKsIm1Y+HzhZXX6dYRC7mRsOkjQOQYsHIRZ0JLvXmxH7hJRvtIz2psrxMbg+DcB8qlW E4G01BoJDHTVuYkdx5b1e0Nw1eGPK5LamuAhu347S3Bzy0aukmaAl4= X-Received: by 2002:a05:600c:3143:b0:434:a929:42bb with SMTP id 5b1f17b1804b1-436e26b9d45mr342166125e9.18.1737043400130; Thu, 16 Jan 2025 08:03:20 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-437c7527fc4sm63651915e9.27.2025.01.16.08.03.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:03:18 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 8066D60853; Thu, 16 Jan 2025 16:03:08 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 21/37] configure: reenable plugins by default for 32-bit hosts Date: Thu, 16 Jan 2025 16:02:50 +0000 Message-Id: <20250116160306.1709518-22-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32e.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20241217224306.2900490-12-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée --- configure | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/configure b/configure index 18336376bf..02f1dd2311 100755 --- a/configure +++ b/configure @@ -528,25 +528,6 @@ case "$cpu" in ;; esac -# Now we have our CPU_CFLAGS we can check if we are targeting a 32 or -# 64 bit host. - -check_64bit_host() { -cat > $TMPC < X-Patchwork-Id: 857909 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp280679wrb; Thu, 16 Jan 2025 08:12:22 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWBigINdECcXYDEmniyM2+DIy7g6asYkF8AuTVnA9UzV3efSPxVK4N25X/9ded9i370MxVL7g==@linaro.org X-Google-Smtp-Source: AGHT+IGPVlUnB3gm/fFkrcM28e4cBSOJE97qDgo3mXsVnoNTxodaIwdchZbjHDBkcIHy/mtrRiSQ X-Received: by 2002:a05:620a:8215:b0:7bd:bafc:32b0 with SMTP id af79cd13be357-7bdbafc364bmr2556754085a.47.1737043941907; Thu, 16 Jan 2025 08:12:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737043941; cv=none; d=google.com; s=arc-20240605; b=FQ5BwOhfxUCoU2Z2rza8gyuNe9xVdDgGHjucj4PpUyjAnhC7n6F4z10BO0mNaAyi4N L9kHDSMEnk1feQ9YdKX/YXZk4wbdEe3C6soPz+xWUJ5kE2W5XJHg4GRRLHYMWn2zny53 LPZRMFlZlsJvvyKnaslSrfA+dALan/sNL3XBC18rFxOioJOu/293fScB8UUlq+o5TVe5 /CMEYW90J281mUFh6E5BHuaa5cEdPjP1lqRzIjCEKelz7YoatBgbC3XpKXA+el4P/Ft/ 9vHZN2g2xYyy/eOVqB1RuZewyca4OwDnzB34wKP1kU37mSC9l9tk9ngCUlUCmqM74wtF AcAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/xR1sdOln5uQTQB+HehunftAymFm05ADSFOJij2asec=; fh=Zfjt0bva8uZbgMJcH/Ob/DsvSQK7NPA0HN/eaTtupr4=; b=KKOAIBrAtLJl4/FUcCTi9lAxkjF1sFTnG2uRCXiOeu7oSCbe0pK+bK1UO4cMVz4kel UMlhZNs9oXMX0NhOkuIVNx1W6p4At+Uo61UB0lHG/JEHXtLP1JRC6sBqxkpbyp6x7K3g FoIKq2bq5EVTagk3ywu3KbwTK5ECND49rnz9cWHrrSZ8Zl/1X0rM/1riOaN824I/JqSC Bn+xEZZuf0g4I05+8vokCVqhwZucRUs8Mb55yAcCnWKEJmbeEm54iao1kl74jfER4FmS ptZ1TOtKVtcHOdFxQXrcHx7qs/rs40Q7gVJESIr1KQA8PokDiqxppDNNa8HP4kixAay+ iuag==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iiuoRKLj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7be614cbf1asi39548285a.441.2025.01.16.08.12.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:12:21 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iiuoRKLj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSTh-0003PL-UP; Thu, 16 Jan 2025 11:12:18 -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 1tYSTd-00039R-PV for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:14 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSTb-0004RC-OV for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:13 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-436281c8a38so7429425e9.3 for ; Thu, 16 Jan 2025 08:12:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043929; x=1737648729; 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=/xR1sdOln5uQTQB+HehunftAymFm05ADSFOJij2asec=; b=iiuoRKLjGRlVmkwluMh+Asqh6FoeT+QL4DXxM+4o1etriMpjfzBECAMoj6EDQIrc5N W8viv+cJNTDsi1p5uvGHAg0ityNpCPCW9ZTbhZeFbfKsM06kefgb3gTmnQ60zlbNi6te /sWa1m8+wehnX3X4zJuwRT9MMBZbYzEwqiPxIKiEvaY6AKpGM0z2F63UnqIYJW41y2It ZZyRhW8hcuKzaO57wMs9coMyLwCDur4QrAiX1AcgeAkacNvywNZUl+aAmGhXNMCq9R5R rOHCsKnoWik+ffveQR/LpJ9E4whSaBy6QyfJDtpZhJKz8sxuPBNy4cuRFo3Ed88gylpm utKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043929; x=1737648729; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/xR1sdOln5uQTQB+HehunftAymFm05ADSFOJij2asec=; b=Vf5NloSW5QaTO/PDH3wa0ATxXspXnddSXo3ZMVvAl87G58AOgwu5ieuIZhBqD9qzQ5 RaLGdOJ6K6KqYAfyIJ3Vd0CK0bdcc0j8uEgJF7JRYVAMCI3g3bfnZUitrAE1SF9dKcIw EdvmHaFoZmzSEU3VGT8soGWqLdDpSKqKHTL36tNpwddmTEz+XeBtnfe64iLrJ8HYxVnp MYj3GPcAooDz6k9flAb6othKgoCIv+ReYGIrAkLir8T83OlRStlSIBMAwXG/tpN850Jz ARe8lIWWdkm7nrPWofM+81ECnL6E+SQgm3j/tOP0mKzZM39I8EPcjPysH+39PMnylkUH ntjg== X-Gm-Message-State: AOJu0YzcOyExrxfd2h+NiMcgo+QLPIlyw9Dcde3xX1/WrD5E2YJ9HwDA XlmrR9xCqDzRvyUbCHnXUg/nVTvlndLuud3BC26RWPMTMVQ+F3pX4zg0MDo35oE= X-Gm-Gg: ASbGnctNS71yAiYHypdFD92iUZtK/wC+CxGa50OmIiiYsTMmYDs4+LL0PyugvRiEHJ8 3XBvaOW8KWGjeswaL5gEmFYAHQ4VwU76WshHKywAuSmH5Kkqt2cLRqXpwKRAoLLCTKOhgp+KDCA lNQv1kIhh1LUPJ2WQ4pZ2eJJwKdqIQjlPOG2kFkfYhN/RyNMP1nkKoXneELnE6SsnNtDaNV0+yv vCzBHBudZfa+tiwv/21GQJaABSqI+JcALx4nmPj75OHpLNGI6PO4qs= X-Received: by 2002:a5d:59af:0:b0:385:f677:859b with SMTP id ffacd0b85a97d-38a872f7fbdmr34031511f8f.10.1737043929538; Thu, 16 Jan 2025 08:12:09 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf322ad74sm242024f8f.56.2025.01.16.08.12.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:12:09 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 99552608C3; Thu, 16 Jan 2025 16:03:08 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= , Julian Ganz Subject: [PATCH v3 22/37] accel/tcg: also suppress asynchronous IRQs for cpu_io_recompile Date: Thu, 16 Jan 2025 16:02:51 +0000 Message-Id: <20250116160306.1709518-23-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org While it would be technically correct to allow an IRQ to happen (as the offending instruction never really completed) it messes up instrumentation. We already take care to only use memory instrumentation on the block, we should also suppress IRQs. Message-Id: <20250109170619.2271193-23-alex.bennee@linaro.org> Reviewed-by: Pierrick Bouvier Reviewed-by: Julian Ganz Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Reviewed-by: Julian Ganz --- accel/tcg/translate-all.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 453eb20ec9..d56ca13cdd 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -633,9 +633,10 @@ void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr) * Exit the loop and potentially generate a new TB executing the * just the I/O insns. We also limit instrumentation to memory * operations only (which execute after completion) so we don't - * double instrument the instruction. + * double instrument the instruction. Also don't let an IRQ sneak + * in before we execute it. */ - cpu->cflags_next_tb = curr_cflags(cpu) | CF_MEMI_ONLY | n; + cpu->cflags_next_tb = curr_cflags(cpu) | CF_MEMI_ONLY | CF_NOIRQ | n; if (qemu_loglevel_mask(CPU_LOG_EXEC)) { vaddr pc = cpu->cc->get_pc(cpu); From patchwork Thu Jan 16 16:02:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857921 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp282080wrb; Thu, 16 Jan 2025 08:14:48 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUBgDezHEuJKntYC/zD2fxwi3yMQuWW6NrJj+cjRQn2DcQkmwfOrs2JZiIb6Iz+iiz0nFlJyA==@linaro.org X-Google-Smtp-Source: AGHT+IFg1u2st+WO+0Y/A3CwXDutHCX6BsdK8LENAsnV8eI7vEuiAIo/h8EQnheY6RDPOoIhv3+R X-Received: by 2002:a05:620a:4014:b0:7b6:ce6e:2294 with SMTP id af79cd13be357-7bcd97d7ac2mr1008111185a.56.1737044087834; Thu, 16 Jan 2025 08:14:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737044087; cv=none; d=google.com; s=arc-20240605; b=I5lrJXN9NSA/HCm2OG4NO3gTTjfhX/YY+vfUIHIvBNo7t/17EGRNNSO4KfRLfrGdCH Y3+tmM1KWjBXfDxW7CBqI1Z+47RWiwNeZ130MiAHGK7PBwjuhZ+yUiH/omVbD1NbVOFu QgDhs6Xc5FEnMQgaeNS23tAn1kWHrX8oy6Dwbiy1xc7eyoj+6POUQlEQREx0ciLSveE0 c+oSapqTkmCTkXw8X8/kXDTUjUeqdF61HW7Sa1CTbeoJH5wwppe+gJN2UIZykF6+XgH3 tHivrQvW8y2zxunYYMqBG429IJQFWWfm6QrrOEYeEzttQvWcymgql6x/b86pD9Jyru+K FqKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=r8aoZ+4wIpFt1loPUkrjNZIwpI4hyfnz2K8d4L8ae9I=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=Nf5QpBfpkRAc1M1biHo0h/9ae4BqK3iIY/SxeDgXS/7TVNsbCvGrkXMeUItLaqiscu jPN61+x40a96Fd2Pr5Yp6yrajjpPWxBvlAy3QoT1coPWiqhea2XVflmgjVTbT7QOnmBi rcKwWHkfDXLk787FKHb+AsajLh9poeD0ZaW2kmsBkj4OPce7aUlIO42V1+WcMX0dfe1J 29DTGTbAQNTZiN03ps/3A+39C2PSSwjgOGw8G7z0uMhU2angwXDHI1/4m7y+ARJY3vjv dAlUPDqCP4hi9SQQ3nXMA/L/9FwPM8QrseOoz2g/Cz0j8IHkkCHgeMTvsguZnV2eI6MY WldA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dyGCsp8M; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7be61477b87si41952585a.193.2025.01.16.08.14.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:14:47 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dyGCsp8M; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSVU-0008Lr-FX; Thu, 16 Jan 2025 11:14:08 -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 1tYSTw-0003m1-9V for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:41 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSTj-0004Wx-Hr for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:29 -0500 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-385de9f789cso880794f8f.2 for ; Thu, 16 Jan 2025 08:12:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043938; x=1737648738; 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=r8aoZ+4wIpFt1loPUkrjNZIwpI4hyfnz2K8d4L8ae9I=; b=dyGCsp8MXtoz1cxO0M2BIymsCRCpWD5xJg6dQGTg8oSihysF2KUVO++6c46OzaUPIf 0WGTFQ24V4WyLhgJmxnxylJ1Yicx46rRsWxvXhdfPr5OlRLEJxMUlQBq6D4Bf6Zjg8X3 zOEPP3T12Bmt1BlsyFRSJ4aHBLvghh/kLMSdZaQrKBwm6LAHKbavd8mrlbd3bKHqUgWy g+3zRNGROStNfYR3/v+C8QJnTIFZ/VKZ6ScdQl0HsSb2KAoj5Yam1zNu/q6gII7a69lB OTYXJw9cWK03X6aB8oDAn/jcWpbrNREgwSpc6Lk18Q84ykxhYPbEx//OpPc/zQjL/j2w RGJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043938; x=1737648738; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=r8aoZ+4wIpFt1loPUkrjNZIwpI4hyfnz2K8d4L8ae9I=; b=N0Hvy4+hin5+7v5cnkrgvC6t/7X9eQEY7LBYuw4ZVcnMaKAl1aXXnccF5vPseWChC+ I+OfVZYat0tTOEYwbewZ8hS3ygnMn/fIFO2A94btZqcIHqW/hYhQ8mAzRLjpoFRndOiM TOXF/dNDiixOGOQbnX7TI8rjrYUGCaDkqA+yoUkAXi+o9LOoQL68S6lzTIG7yMPioSJB JBffh2bC6j4tGlOJEuS6Y1Ygt4azmvPSbcP6BuJacl3NcaftHriLt9F9UmaKJRFB6OMw ooyDB040XNpYTKIlj+i67FYmxg5M3cOjOSiLqGGXzuYJX1wwCsnfF1kbcnMf/7Stf31U tYRA== X-Gm-Message-State: AOJu0Yze4eBzpO5rSJdYobLnJKwjFsbNgQodyby7Pz3ZlPRmjoG9HLSC sDCwnlOXCFvwcq4q9HM4rFFQNEij8I2CKHa7kfOT6OndNwdPY4NWp6ehDglMfB0= X-Gm-Gg: ASbGncveAtGryZo+FzpCCdN4DsyOSSkzpDrMl7n14cPgjCEiuDFpgDS9leZ0bQyjgOb v3jQ71ZXxp+yuiLeLMsU8Oc6iLcqArPH4/wB4lJZxdQoS8MwAlB5hVksIRGYLND4QsPvyQP1aZ4 8iBIVWJIxWFE0If2nyD4nZnKITrNsaonisWXgmp5qBaXyWBSg5Lql8F/8bRe7I23H4mA2bDAikj /slbqowVD4FJm/lb051qlxsP7wT4FsKZiDmrLFJBrnEqFnpOOLHt6g= X-Received: by 2002:a5d:47c5:0:b0:38b:ed6f:f00f with SMTP id ffacd0b85a97d-38bed6ff21emr2468045f8f.17.1737043937822; Thu, 16 Jan 2025 08:12:17 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf3221b5asm238633f8f.21.2025.01.16.08.12.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:12:15 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id B1806608D2; Thu, 16 Jan 2025 16:03:08 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 23/37] win32: remove usage of attribute gcc_struct Date: Thu, 16 Jan 2025 16:02:52 +0000 Message-Id: <20250116160306.1709518-24-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier This attribute is not recognized by clang. An investigation has been performed to ensure this attribute has no effect on layout of structures we use in QEMU [1], so it's safe to remove now. In the future, we'll forbid introducing new bitfields in packed struct, as they are the one potentially impacted by this change. [1] https://lore.kernel.org/qemu-devel/66c346de-7e20-4831-b3eb-1cda83240af9@linaro.org/ Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Acked-by: Stefano Garzarella Signed-off-by: Pierrick Bouvier Acked-by: Michael S. Tsirkin Tested-by: Stefan Weil Tested-by: Philippe Mathieu-Daudé Message-Id: <20250110203401.178532-2-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée --- meson.build | 5 ----- include/qemu/compiler.h | 7 +------ scripts/cocci-macro-file.h | 6 +----- subprojects/libvhost-user/libvhost-user.h | 6 +----- 4 files changed, 3 insertions(+), 21 deletions(-) diff --git a/meson.build b/meson.build index d06f59095c..da279cc112 100644 --- a/meson.build +++ b/meson.build @@ -377,11 +377,6 @@ elif host_os == 'sunos' qemu_common_flags += '-D__EXTENSIONS__' elif host_os == 'haiku' qemu_common_flags += ['-DB_USE_POSITIVE_POSIX_ERRORS', '-D_BSD_SOURCE', '-fPIC'] -elif host_os == 'windows' - if not compiler.compiles('struct x { int y; } __attribute__((gcc_struct));', - args: '-Werror') - error('Your compiler does not support __attribute__((gcc_struct)) - please use GCC instead of Clang') - endif endif # Choose instruction set (currently x86-only) diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index c06954ccb4..d904408e5e 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -22,12 +22,7 @@ #define QEMU_EXTERN_C extern #endif -#if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__)) -# define QEMU_PACKED __attribute__((gcc_struct, packed)) -#else -# define QEMU_PACKED __attribute__((packed)) -#endif - +#define QEMU_PACKED __attribute__((packed)) #define QEMU_ALIGNED(X) __attribute__((aligned(X))) #ifndef glue diff --git a/scripts/cocci-macro-file.h b/scripts/cocci-macro-file.h index d247a5086e..c64831d540 100644 --- a/scripts/cocci-macro-file.h +++ b/scripts/cocci-macro-file.h @@ -23,11 +23,7 @@ #define G_GNUC_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #define G_GNUC_NULL_TERMINATED __attribute__((sentinel)) -#if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__)) -# define QEMU_PACKED __attribute__((gcc_struct, packed)) -#else -# define QEMU_PACKED __attribute__((packed)) -#endif +#define QEMU_PACKED __attribute__((packed)) #define cat(x,y) x ## y #define cat2(x,y) cat(x,y) diff --git a/subprojects/libvhost-user/libvhost-user.h b/subprojects/libvhost-user/libvhost-user.h index deb40e77b3..2ffc58c11b 100644 --- a/subprojects/libvhost-user/libvhost-user.h +++ b/subprojects/libvhost-user/libvhost-user.h @@ -186,11 +186,7 @@ typedef struct VhostUserShared { unsigned char uuid[UUID_LEN]; } VhostUserShared; -#if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__)) -# define VU_PACKED __attribute__((gcc_struct, packed)) -#else -# define VU_PACKED __attribute__((packed)) -#endif +#define VU_PACKED __attribute__((packed)) typedef struct VhostUserMsg { int request; From patchwork Thu Jan 16 16:02:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857924 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp283716wrb; Thu, 16 Jan 2025 08:17:27 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXJXTkbYt265SFOR7ZT50WyF1SdE27WNDs5Wltwv1YDoLmIRnekRsUW8t4D6nrg1a3rn5x8Lg==@linaro.org X-Google-Smtp-Source: AGHT+IETfkIzY2S4rR5yNC82LJZW/cDYIITpVWluxS1F1w1/25x5ji6zF0YthppsRFH/je1CaL38 X-Received: by 2002:ac8:7dcf:0:b0:463:1039:fc2c with SMTP id d75a77b69052e-46c7108c061mr592200151cf.37.1737044247266; Thu, 16 Jan 2025 08:17:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737044247; cv=none; d=google.com; s=arc-20240605; b=akEH+3iVerP3fAZo0loD5a5+FdGGyK+YU+YirEIuQAqyAIA0cGUucRGOZ/6SMtC/bY 4pTuudwOJNUSce7YC6NHzxAv+GCXc6E2u9m1bO+42KfMmB65ElygYq9Cgxk9CcpuOvjP JsSCc7C3w4R4Ml6lCEk4Cis9LBXAFtm6h3Bq3P9W2DXhLEFyEp/Mrre1nSsio/wVIVf/ gJGJVgRKezayubZd+pjiXoBmBF75aUJ0PGPzauWHWgi6/HucifgzBfMY2sezC+DTFPgL Rguv10ewW/RGvdGO57fcNSB3PBqfwv41kJqBKTPjVZ3rUMm8+PaekNM7SbPBruhcFb7v 8p2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tO4+dhgDNIyv7ebOS6QWgeVxieJfX0lz0H9vGOgOWgE=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=fnDsskhZhOSmuwcVNWSZsoMRpe0LEfjGonJKc2O0NkpACHmgGJXYxyqjisYWq07MV5 o10ghT3Q+aAX9sfNlm+FFSvKZacdABRC/JnUrdSKjNGeG9BYb5OdQ9L3dsQbEnQ4GCQQ 8x0BwRGZFfNBLrqh+KK5cFSZ6YAyzByy+PiHrXRx+BYm7EJLbEgyHCyLegNYFdL7Ja/r eV4JwypZgNd0OTj/IneBiFO5Ds58IKPJ6E93XVFVTxwhfYcvB1xn6pTcmPg3ir6294Fq DfX1g4RRO0tTOHZEYZLi3HAYp273c8jTnF3v9fnSvpy8QdnU/y+1RYedHA2CCj6gvPVO 2K1g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SqhRb8Na; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a1e0cc1a2514c-8642caaf19asi237565241.35.2025.01.16.08.17.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:17:27 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SqhRb8Na; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSVO-0007Xi-J8; Thu, 16 Jan 2025 11:14: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 1tYSTs-0003lj-BC for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:41 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSTi-0004Wd-UD for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:27 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4361815b96cso7238145e9.1 for ; Thu, 16 Jan 2025 08:12:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043937; x=1737648737; 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=tO4+dhgDNIyv7ebOS6QWgeVxieJfX0lz0H9vGOgOWgE=; b=SqhRb8NauczcF3YsQlrsb/JIHNW+TGf5xtMhG/1pqnqWLB7AJLobffOVceTyQKdruT xcUuZpic93TyFawRRquFvbPLVyA9gJ7vSYxHdwx/eOT1e2b9A/71+I+OyI879n0IihZe tYJ5H86YwaP42STFg70FCFRAECsAtVG7CjwajjWY44/w92MSrnTn30leGSmTxNCAtmr3 FGXrSh90rb0sJMDkRU/BVmjy1WPx7N/kaZ9yB0vc9KoMYbi8RqwFiMOlOIUMuhR7momm isecAGaNbd5IiUBMhs2mdEFcBS7mopGe4QrIdllSwYKz8rXJcaI/BBxn5SyxQcBfOafc +Y1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043937; x=1737648737; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tO4+dhgDNIyv7ebOS6QWgeVxieJfX0lz0H9vGOgOWgE=; b=uuncro9v6wnidVjyI8GLz1pmGwG2Zr9ElWgM4gSYfz9FvmU9w80jGVEAKkVgz8irm7 6BSE4mGFYIXOlsFvbzvaBtWob5APv0plc/u0Jyabu4D4WUZT/90XipYUf1kB8ZBOO2Bz sXHPcMUfPtrR6zEAAfAIzGECX7KfEFkiRA1hkHkAS9luYBHLbNL7pqMaf5nh2JP9mPQj pxZ1CASXYy2emU7NR9eAobW9KCS5xQTgMELTcC/GNYryxuql81Pz9WsV2rBAQqVvupee R1i+FTgLX1/oaLiFv48U8+lqbulA7hvaaC+hHsST6khmU9d+Qee55/8TLdZjFnZdIDSn TQqg== X-Gm-Message-State: AOJu0YwhM1csHVTwu5jg/hBj0PgCHvMC0vOHTJiaTq+8KOF/ekIgOlos dMGEOwEMF+TQOuSO5HXQMWz6qXM5chGBq04OYf9G+DAHZln5xRBzGiNPPZLkNn0= X-Gm-Gg: ASbGncueidBvprTgRXgX3cYVYVwnqhgI9Bt3orY5WgN/RocfeXEC2mdm0czvibrCNEI M/PE5kasPv0mCh0hjnH+04wWUeX1tES0A7+soDi3keTISdGwaJz7uPzb1YocWxBLJ6BkzEUtfd0 AgRWETuLAcSnxe0KihKqHmTryaCnbTDVCqLDEractPTPf4BFOY1kW50D6Z+gfiJfDJuZu9twq7x 6E8gyCL3SySJ2hccPyYUjjQxgJcpg4JMyUOonkkKIEO31mheQ2h/WE= X-Received: by 2002:a05:600c:1384:b0:436:1c04:aa8e with SMTP id 5b1f17b1804b1-436e26bdac1mr366312215e9.16.1737043937257; Thu, 16 Jan 2025 08:12:17 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-437c7499884sm65557275e9.5.2025.01.16.08.12.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:12:15 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id C7FE6608D4; Thu, 16 Jan 2025 16:03:08 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 24/37] docs/devel/style: add a section about bitfield, and disallow them for packed structures Date: Thu, 16 Jan 2025 16:02:53 +0000 Message-Id: <20250116160306.1709518-25-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x329.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Tested-by: Stefan Weil Tested-by: Philippe Mathieu-Daudé Message-Id: <20250110203401.178532-3-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée --- docs/devel/style.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/devel/style.rst b/docs/devel/style.rst index 2f68b50079..d025933808 100644 --- a/docs/devel/style.rst +++ b/docs/devel/style.rst @@ -416,6 +416,26 @@ definitions instead of typedefs in headers and function prototypes; this avoids problems with duplicated typedefs and reduces the need to include headers from other headers. +Bitfields +--------- + +C bitfields can be a cause of non-portability issues, especially under windows +where `MSVC has a different way to lay them out than GCC +`_, or where +endianness matters. + +For this reason, we disallow usage of bitfields in packed structures and in any +structures which are supposed to exactly match a specific layout in guest +memory. Some existing code may use it, and we carefully ensured the layout was +the one expected. + +We also suggest avoiding bitfields even in structures where the exact +layout does not matter, unless you can show that they provide a significant +usability benefit. + +We encourage the usage of ``include/hw/registerfields.h`` as a safe replacement +for bitfields. + Reserved namespaces in C and POSIX ---------------------------------- From patchwork Thu Jan 16 16:02:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857926 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp286246wrb; Thu, 16 Jan 2025 08:22:33 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXLygtUZJ+8BQp4lDKDqyVfrz1LwcLt5qPvGpL6dkWUScqjC3mD+PNTsIip0+cR7zeTVipKjA==@linaro.org X-Google-Smtp-Source: AGHT+IHPOAtyMKDES65x/9SA3In+/SnixpD16buZW5D//KjUH4ICi9djr81naXC7qwxJB15+GrXT X-Received: by 2002:a05:6214:29e2:b0:6d8:a39e:32a4 with SMTP id 6a1803df08f44-6df9b22888fmr182113906d6.25.1737044553310; Thu, 16 Jan 2025 08:22:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737044553; cv=none; d=google.com; s=arc-20240605; b=WRRJ8ObNjlpgIuOH0Vo+HntU2S9mq2qqUexbVdQb1G3XVRmk6LDXrxHpvqMIG+jIsp X5WBDorMeZwP/rVwg9DhBNaTmewjEueZjOIkmZ3U7DO/glha1DojJg8C+Ypo4eugcBDm xwIRBvhoOBcie25Qdn1gO2kgpupJokUmabdeZ3R5a5rsH+yJE1d7hPha5k5dpzsj8PnU nshs22MHZVuFTOz+hR9An1TGVCjbMauLy0VLASSJsUnksU21t7gjt+a2vWpTPSGlN7LX CiPmOdW+ob5F+3BGCAbNIg39a9uK3wx7SRtpdc65ukPvwoT7hdlv4bZrjjrez+t4YIBw lSRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=castUuYEMS9/+bXLMhhSaPLlf0YHd3GiZGeVC9CY3P4=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=FJ4GHvqvU1ZGF/1stv8rKsoIPf+jD/zhwHHCl1VgOsMniC7pypRQksae7pwbjS6TTv vTcC2WeC0W5P32dQ/3g7WF2ixzPtNovmpsfDIUS+F/8XeJFS4Ms4rK+ymmemV9rdQXd7 fKMh0Juf8PhfkvJueKNBAocS1V1CXNDdMddCbsuGwqFBL98tm1bIbfXL2qrJovFm4tX0 vllt2PySdd9c3RcyIh0Vx/BgXxtEzbYsj4w6QHPUmmu0Uz26nuc0tiDz6exKWNqV7o5Z AB43tYAB1icwkJNWoTvYCu2ORx2T3RaCP4UjkagMG6fhfFgRAM3s3hLAdwnCpZi8FLX3 7Dng==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wuxl4+uR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e1afc00f17si3041886d6.87.2025.01.16.08.22.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:22:33 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wuxl4+uR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSdP-0002bM-Vi; Thu, 16 Jan 2025 11:22:20 -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 1tYSdJ-0002ar-Ia for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:22:13 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSdH-0007RN-Hq for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:22:13 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-385de9f789cso889726f8f.2 for ; Thu, 16 Jan 2025 08:22:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737044529; x=1737649329; 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=castUuYEMS9/+bXLMhhSaPLlf0YHd3GiZGeVC9CY3P4=; b=wuxl4+uRwd5ZBUzIpofRS4qeBMnF7TpfZH2UIRy8wUAfqhfWQBUKzaWyXt2BgCN3Aj Z0SW6Q8GPrpCdQDsXWiCNSLIwCYW8TrYr+06l8AjfjSk6sJRrCyq57JEyvKNsLmKHiUU fiADUDoLqvKIPLtueH6apgb7851m5sYZ9BHeNLhWF8Whjx8fBe9LEPQpD3MEkf/b2yCj KvoRHOvTMQl/ID1CMAtEGKVDAyt7yD+xbiV+paReI7YAeJMhLu9bpZ2nj+HoY1Dz71zy N7bgqSbb2cDaMxOmwAHBJQxX56T90BbLrW43oohNgtJ0Gwe4fuPmfECpbHpunIGcH5/O 3+sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737044529; x=1737649329; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=castUuYEMS9/+bXLMhhSaPLlf0YHd3GiZGeVC9CY3P4=; b=NH4ujJcUnQj+tq0GZDFcr+sEdxM55q6c1Y86S47JBE3hlqt6EEM1uSN7qm34M8tXwT cKVGZghKSW0OoLr7uQOVyc4hkVWLvIuT8wcQihx7wEcXCqOW+jku5URFQOOd0YnVDsJH BlA2YFcz3wOjNHxgHgWoKW3fhyhx9jDSL/bMcJJJRfCCcZuKG/h8iGlUTNBiZs+iosPp Z4j0ClJdi3vrXm/Y/jqCDAXRxfx7BHxDgdc7JlSsmxaProP+aOtePa4NK4FLNQmtzpFv F+1dhyD7jjvYaqZ0VteSQnVyuMUFtyhTlEqm8N6fU15YDdxMGS1KWiN0d6hkBk+wjGNt EuJg== X-Gm-Message-State: AOJu0Yx1ZaEVt9/tuUfAEUo6sbSTqQX9lsHnbN6SqL78F4pB2iykCwpI iekpLIdoFeNWkW27Fq/IMlx5QHFEePQCFTTRpbLPE8OUzLznN7fJOqP7iU1MAhY= X-Gm-Gg: ASbGncs2GUwksKzu/G+aUn6b/Yb2y6ElY626nYcVrmVyORxRVOWD9SceZ14G1yyTJ7A O6y61V7aqXRm5UA3+R77qPf/WRH+Vv4CoCIVtcbLnslxbp6d4QRXFx1q9d3ZISopoZDrOFsPhzV hehSh7/0fUmiTd8Zj6xGtc6UQ5KnvE6D7ayEqmi+BcI0yjcDctRQm9nnzKskbawqCTEWUOsaOUA v9//u09I7/L8yUMcDelm75UEIn7ocUiY758aeLsX8Yqdp9H6t5Na2I= X-Received: by 2002:a5d:47af:0:b0:38b:dbeb:63a2 with SMTP id ffacd0b85a97d-38bdbeb64acmr14758393f8f.55.1737044529421; Thu, 16 Jan 2025 08:22:09 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf327556dsm240452f8f.71.2025.01.16.08.22.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:22:08 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id E5479608D6; Thu, 16 Jan 2025 16:03:08 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 25/37] plugins: enable linking with clang/lld Date: Thu, 16 Jan 2025 16:02:54 +0000 Message-Id: <20250116160306.1709518-26-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x431.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Windows uses a special mechanism to enable plugins to work (DLL delay loading). Option for lld is different than ld. MSYS2 clang based environment use lld by default, so restricting to this config on Windows is safe, and will avoid false bug reports. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Pierrick Bouvier Tested-by: Stefan Weil Tested-by: Philippe Mathieu-Daudé Message-Id: <20250110203401.178532-4-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée --- meson.build | 5 +++++ contrib/plugins/meson.build | 2 +- plugins/meson.build | 24 ++++++++++++++++++++---- tests/tcg/plugins/meson.build | 3 +-- 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/meson.build b/meson.build index da279cc112..15a066043b 100644 --- a/meson.build +++ b/meson.build @@ -377,6 +377,11 @@ elif host_os == 'sunos' qemu_common_flags += '-D__EXTENSIONS__' elif host_os == 'haiku' qemu_common_flags += ['-DB_USE_POSITIVE_POSIX_ERRORS', '-D_BSD_SOURCE', '-fPIC'] +elif host_os == 'windows' + # plugins use delaylib, and clang needs to be used with lld to make it work. + if compiler.get_id() == 'clang' and compiler.get_linker_id() != 'ld.lld' + error('On windows, you need to use lld with clang - use msys2 clang64/clangarm64 env') + endif endif # Choose instruction set (currently x86-only) diff --git a/contrib/plugins/meson.build b/contrib/plugins/meson.build index 63a32c2b4f..484b9a808c 100644 --- a/contrib/plugins/meson.build +++ b/contrib/plugins/meson.build @@ -12,7 +12,7 @@ if get_option('plugins') t += shared_module(i, files(i + '.c') + 'win32_linker.c', include_directories: '../../include/qemu', link_depends: [win32_qemu_plugin_api_lib], - link_args: ['-Lplugins', '-lqemu_plugin_api'], + link_args: win32_qemu_plugin_api_link_flags, dependencies: glib) else t += shared_module(i, files(i + '.c'), diff --git a/plugins/meson.build b/plugins/meson.build index 98542e926f..d60be2a4d6 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -17,14 +17,15 @@ if not enable_modules capture: true, command: ['sed', '-ne', 's/^[[:space:]]*\\(qemu_.*\\);/_\\1/p', '@INPUT@']) emulator_link_args += ['-Wl,-exported_symbols_list,plugins/qemu-plugins-ld64.symbols'] + elif host_os == 'windows' and meson.get_compiler('c').get_id() == 'clang' + # LLVM/lld does not support exporting specific symbols. However, it works + # out of the box with dllexport/dllimport attribute we set in the code. else emulator_link_args += ['-Xlinker', '--dynamic-list=' + qemu_plugin_symbols.full_path()] endif endif if host_os == 'windows' - dlltool = find_program('dlltool', required: true) - # Generate a .lib file for plugins to link against. # First, create a .def file listing all the symbols a plugin should expect to have # available in qemu @@ -33,12 +34,27 @@ if host_os == 'windows' output: 'qemu_plugin_api.def', capture: true, command: ['sed', '-e', '0,/^/s//EXPORTS/; s/[{};]//g', '@INPUT@']) + # then use dlltool to assemble a delaylib. + # The delaylib will have an "imaginary" name (qemu.exe), that is used by the + # linker file we add with plugins (win32_linker.c) to identify that we want + # to find missing symbols in current program. + win32_qemu_plugin_api_link_flags = ['-Lplugins', '-lqemu_plugin_api'] + if meson.get_compiler('c').get_id() == 'clang' + # With LLVM/lld, delaylib is specified at link time (-delayload) + dlltool = find_program('llvm-dlltool', required: true) + dlltool_cmd = [dlltool, '-d', '@INPUT@', '-l', '@OUTPUT@', '-D', 'qemu.exe'] + win32_qemu_plugin_api_link_flags += ['-Wl,-delayload=qemu.exe'] + else + # With gcc/ld, delay lib is built with a specific delay parameter. + dlltool = find_program('dlltool', required: true) + dlltool_cmd = [dlltool, '--input-def', '@INPUT@', + '--output-delaylib', '@OUTPUT@', '--dllname', 'qemu.exe'] + endif win32_qemu_plugin_api_lib = configure_file( input: win32_plugin_def, output: 'libqemu_plugin_api.a', - command: [dlltool, '--input-def', '@INPUT@', - '--output-delaylib', '@OUTPUT@', '--dllname', 'qemu.exe'] + command: dlltool_cmd ) endif specific_ss.add(files( diff --git a/tests/tcg/plugins/meson.build b/tests/tcg/plugins/meson.build index f847849b1b..87a17d67bd 100644 --- a/tests/tcg/plugins/meson.build +++ b/tests/tcg/plugins/meson.build @@ -5,9 +5,8 @@ if get_option('plugins') t += shared_module(i, files(i + '.c') + '../../../contrib/plugins/win32_linker.c', include_directories: '../../../include/qemu', link_depends: [win32_qemu_plugin_api_lib], - link_args: ['-Lplugins', '-lqemu_plugin_api'], + link_args: win32_qemu_plugin_api_link_flags, dependencies: glib) - else t += shared_module(i, files(i + '.c'), include_directories: '../../../include/qemu', From patchwork Thu Jan 16 16:02:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857910 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp281169wrb; Thu, 16 Jan 2025 08:13:10 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUmsekMfiMIWZaNjiIal5VDtFJrbrqZQkzw1JrWR/kUDlTAwWygaBPxxbkjuWJ5PpcMlTgDyA==@linaro.org X-Google-Smtp-Source: AGHT+IHIJzaSO7faTWdPhwVWaqeLa8XyW6ky2RI2d5uaR5+f3+VugOHJdELwmv4bzUkiC2pCO5WO X-Received: by 2002:a05:6214:3009:b0:6cb:d4e6:2507 with SMTP id 6a1803df08f44-6df9b25c894mr517677976d6.22.1737043990771; Thu, 16 Jan 2025 08:13:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737043990; cv=none; d=google.com; s=arc-20240605; b=VYlO5VYtHBqW8drg08w16itB4eQ9yu+cinN58pOO3lhZOsjvcv64fXPeNw2VZh2BPC agW2lFmkLiegAsZxNp/TVxY/krYPoPpTnH+RL+h8UVmBe15/KsL17PjESzJVzlcW/LUx pVdSIDTJhj6QPfoESw1gbv1pm0Q9zZXJ0qFWowqrtE0Q3guQr8x5Nfp+yPBV8Xk6ZIAl 0WCpfIhKJOXZxXt6kVpRTS+kf0zWKnah2RZaVKrbbPIjCIE6bc8DBQ/FHPMgPW7mwfjD bPz81MkeHa75EeqjVnWtrSbSQ7vsGww8dtJMXkG8LSWTenQqlwa6GJGZpQwgvWE2+aqA JHSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BtnW/LF2WEplKztk1bREiMVmkuT4ROwnxcTr9QA0i2w=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=AHrKgD3Yw4SSIg/KE+NVZlCHSOCaJAUl1IKp4NY5oouL7fPfSUq7PNsCsd3CQjdZjD 609kBjUKGPEtyrU+IeKdX51omFzqnNZXoMaN5RXnrIoUG1pgWFJs1zbGniqJsgMnFpJA OkaBOohT3ImZpNiyzWfhQI+XZH+UldfEhVEXqcIIYAqdl/MHsV23SIsgiDnXxwOPh1j6 315yx6Q23aQFmKNb4TyJS9dtqX8KDVh6n25jo3aS4KzHezFir7BNdsFGbhjEUI7zzOyj pk2ccto7AF1MGqoM0BMSal1s0XAq3Vu+Nbxj2kqVsUEE/MYqPZ+mlzOWxcmVYzhza1p1 fPiA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QFo+xNI4; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e1afd0bfd9si2531676d6.392.2025.01.16.08.13.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:13:10 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QFo+xNI4; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSU8-0003jj-Vv; Thu, 16 Jan 2025 11:12:48 -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 1tYSTf-0003Go-Gp for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:15 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSTc-0004RW-36 for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:14 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4363dc916ceso14147055e9.0 for ; Thu, 16 Jan 2025 08:12:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043930; x=1737648730; 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=BtnW/LF2WEplKztk1bREiMVmkuT4ROwnxcTr9QA0i2w=; b=QFo+xNI40ZL14pqbuw6qLawIN59c7r6FTGbQjh8tSueeHU8bktzyMSObfBElJSI3kN 4pBcEdz2NtN0mzYuEkVn2UV7bcM+fpuzy1Tz2bffxSfxVhzlSHp10W4cUdb2YRHIpaDa ovzUsDstIHBLIaqRBGslPuUmtzZ38LicuhoaVJ/Go//iXRWEI7fGvemRANZEURANUglF qs17ZP3Npvy9pSsTa6/X9kx/pZgV2mNa5gvGfw+TTOtnaRz7PmXnyQDwTxzrznULd56x KhiCWVTD8M5FlyCMUV8w/dulbyJbvrOesWqSMEpq/QbK8NHEigNDiDYq6pQHpj7cXg4f yiTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043930; x=1737648730; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BtnW/LF2WEplKztk1bREiMVmkuT4ROwnxcTr9QA0i2w=; b=vZb9l1mKJq0Ppktzc20KU6TkcwhGKmYTLOpG/cTxk0Q/08h1otg3sTD1tHJ8SCsCui vIcPO8IACOYUuKJ9oXDx/wIiVDFsXMPcde/z0hABwifjoGge2IDysh+aFLCdJ2Sz04DE uFHy3xkcOPdu5gy4BZG6heQ5vVmq2yncgJyXTApDwlxQIBAwxEfytnIsFwkNn+o8qY+u ALHyZjUjW5AdATPObLR12Lw+g9wKTQ5blfI9/D0D39dnaWinXNxTn4VYbaEtjPnbycQV SueTD10hsyU5cIxb2cpmSSaskJRbAGRG8JzCFiCx/g4Is94XZA/PDrP7LPPeGX/S7rY/ bcUw== X-Gm-Message-State: AOJu0YxO3h2ljTdNzfdvEZnmGtHLM5s13Jb/79TW1IuEI57cFkCPNuNY ELbHJ/bHN4vysmCQTAYVMhAAlQw9cU9fScluHKnQ/ZsHD0fjil80kZHlFCUm864= X-Gm-Gg: ASbGnctybfkVKXkyrrn3A9Rl71PqLmTnAavHobbBRTNBjREA/5MefTxzEYVC/Hfr/gk OOL6cjn/Yv6LVuVIJI5tNxFa2aoIF8wz1+WYWgp+5c/Lv+WfQ5c76TfnbcRX/nx24lr9rKV26Ki P32WXKiR9OKDJiY942SIwBTz3X8Xpi1xXKfoULmQKhv2zY8HCXESnciVddFu8r5nSNA/+nVvdIy qzaRtJ/bsuUZa+e4fw8kjNjP810sQ7PWd/9c/2lbXHZFLYuXNFL7pI= X-Received: by 2002:a05:6000:2a1:b0:386:42b1:d7e4 with SMTP id ffacd0b85a97d-38bec54287fmr2772092f8f.19.1737043930201; Thu, 16 Jan 2025 08:12:10 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-437c753c60csm62649535e9.36.2025.01.16.08.12.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:12:09 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 0B3A16084C; Thu, 16 Jan 2025 16:03:09 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 26/37] plugins: fix kdoc annotation Date: Thu, 16 Jan 2025 16:02:55 +0000 Message-Id: <20250116160306.1709518-27-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x336.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The function is qemu_plugin_mem_get_value() Signed-off-by: Alex Bennée Reviewed-by: Pierrick Bouvier --- include/qemu/qemu-plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 0fba36ae02..3a850aa216 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -583,7 +583,7 @@ QEMU_PLUGIN_API bool qemu_plugin_mem_is_store(qemu_plugin_meminfo_t info); /** - * qemu_plugin_mem_get_mem_value() - return last value loaded/stored + * qemu_plugin_mem_get_value() - return last value loaded/stored * @info: opaque memory transaction handle * * Returns: memory value From patchwork Thu Jan 16 16:02:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857912 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp281369wrb; Thu, 16 Jan 2025 08:13:33 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX+bu7ECqyQB7peDrw6/Q6y30sNQtYEeCdMKNZRBe/nT1GqqxAKVclh6FCU5+DCPSACsKNrsg==@linaro.org X-Google-Smtp-Source: AGHT+IGW274oxp6zXQpAwc7y4HB4GWdT1Gn46lf98bTpZmoMpc5cdBkOrPzav+H/q69wCR9MpxIQ X-Received: by 2002:a05:620a:4721:b0:7b6:cd90:c0e1 with SMTP id af79cd13be357-7bcd971a16bmr4721511885a.37.1737044012964; Thu, 16 Jan 2025 08:13:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737044012; cv=none; d=google.com; s=arc-20240605; b=Rxg721vsBalHqcKCVnf9YLzp1HMF3eqxv/UOD4w0dRvugxiHAmZvimVLevl0QuyHhL VFuqjuZFAvdXJVRaJKkgUJdkiTQFHAy7qXUayUBAXr9QarDHQwrxFW2xjgojxTq6M2RF qySKDSh93l8oM3t4PdMWLvFoKFkGEPezIexsgiHsk7a1IAZIfc3hfV2UiG6ehoEUbOAl nZWDO+JTlyxnj6pQNuaVvBzDLjCODO5rlaAAePKFaJTVWEgrMmUZzMbDb1Z4KCs0inwh ROReiGirTDCZqpIAAWJ5UuBrSsVjmbggPIgedKdDKeFdYTMyU9g1xmJb7E1W8Uhwmu/P HnIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cjBkm+9kt7SVmlp5MaEOwiSxlmy3tkhLPU0UETkvsQU=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=KcqXE1sVlOZR/SAngjBFHVZxXrGjrNnABlSX3q5hARzaFIZ5pRvmvaN4xqZv2oqug+ uHJJMk7YW2YMnN8m5mSs3ZNoTGEA/roSKx+9D0BFMHKvrG2nLR3y8LNdnwpF0v1wArvF MFCYc3Vk+yOO8Uta56ANhkJ5fKueH/iQbs9Hu2daqA58J029I3as1Hf3xzbjGwgbj9v6 1XPLdKZ+7gXiWlwlOzzU1TjIb1ORgkNVge3Jb+s/rR+4uViHOYogte2fUPfwapHysH42 V4mJplFxy7EsCuNXrCKIrfVictzwJKm5zE4Vq4ClIePIiCAQsdu0Ak+Fs+b11XY7OHbD JRqA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gQEk2jjZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7be614bf94bsi41105785a.198.2025.01.16.08.13.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:13:32 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gQEk2jjZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSUm-0005JY-7c; Thu, 16 Jan 2025 11:13:24 -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 1tYSTl-0003ch-Ka for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:23 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSTf-0004TM-Ja for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:21 -0500 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-385ddcfc97bso948733f8f.1 for ; Thu, 16 Jan 2025 08:12:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043934; x=1737648734; 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=cjBkm+9kt7SVmlp5MaEOwiSxlmy3tkhLPU0UETkvsQU=; b=gQEk2jjZxk75AFSJg7Nyub06ZToDirlUK/TZ4abkZmRGAdfdFjnoJvTbvarcFJUbM5 gb4vIx1oHVTEk9OBaQdtl7NPIeOWgsIhSnGfJv70vn1ls0/nXX2joKY8zlJ/GVx9eRLk JmV9dmCIrc8HCQdAa03doT/vFdw8t1+2q60BYNlHLJ8XO2+idO8bXAHMrdz50ZiYZ3Vg D4WUTgrXHAyyl1YFtiL1o21Xj1Wt5jW3/FnGH19PrNrnl4KquoWe3eI75kyA6aVU/wAS MTsO1hb8gXlrKP6V5jDJBUcDv5/NughjuqibzDUwdU2iqufLkyBexYzkOumoo8hBpfUL atlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043934; x=1737648734; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cjBkm+9kt7SVmlp5MaEOwiSxlmy3tkhLPU0UETkvsQU=; b=t/OBkJ46fahKLqhg3i/GsqmWo5CJg8At1mZkyr0rbPxWADMPPNQt1q49UVt6Y4gR7u VaneRsGZgocgG5V9u+MtGsMYQ/cY72lVP4zpDqpF6IfUNRQ+hOrYvbRnFgt7tavcXA7W pNL9MTjKt+TIywsnPM3rrcoKWjQICEyqyNOSB9WNvDWkLPdvRRmDvYuIJyuxiHRVo+5k mDaH4qs5E+aZdnuh47iH7MwRawqr603Ti7AFVRarC+oWjIEYI6N0SH37sF29Gp/PRKFK naJi3RrKPuTFCxW91q3P0kgh9EJ7HoOJOpEwxhH+JNDcgKpY7z1oomiQ8MmNbZSMmvZK CHkQ== X-Gm-Message-State: AOJu0YyGJxw+MbvKTmqvmz4d6nDD+m/gfxBxfgtNxQdrO1+RmVlf7Nt4 j7BjyvZQO6+NMIrW2qitXtPgbY3XPdbElYGQq/aIUyZ0T7iw+OSDrAX/7HetqvQ= X-Gm-Gg: ASbGncvD+PLBEoHt5ApumePwlyBzyRA4kbFQa/5D7XhXLGh9Zd0ZMgEzMIIGLBNswxV QMPm5wLiLkK5SjmkLWS7M9inRU3f7Ts2jLQ4HNMEP1gxaGQTn5OJZWbYSLwxu3smJzhS/SXKslD gM1j/+Yty2jXKPP3nE0x50vmWJ8yJRjcWZjoPOJr2fdhkNZPfys1Qp1zyfpRERrDoWDpRNDP493 60L5+DIzzmxvUsGd4Onx7GRNFhGL7re/Q4bPbSQSFOEWZ6i14mnBSA= X-Received: by 2002:a5d:648a:0:b0:386:3e87:2cd6 with SMTP id ffacd0b85a97d-38a8730fb57mr32640790f8f.38.1737043933741; Thu, 16 Jan 2025 08:12:13 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43890409758sm3931075e9.2.2025.01.16.08.12.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:12:11 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 1EF3A608D9; Thu, 16 Jan 2025 16:03:09 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 27/37] editorconfig: update for perl scripts Date: Thu, 16 Jan 2025 16:02:56 +0000 Message-Id: <20250116160306.1709518-28-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We have two types of perl scripts in the tree. The ones from the kernel are mostly tab based where as scripts we have written ourselves use 4 space indentation. Attempt to codify that in our .editorconfig Signed-off-by: Alex Bennée Reviewed-by: Pierrick Bouvier --- .editorconfig | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.editorconfig b/.editorconfig index 7303759ed7..a04cb9054c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -47,3 +47,16 @@ emacs_mode = glsl [*.json] indent_style = space emacs_mode = python + +# by default follow QEMU's style +[*.pl] +indent_style = space +indent_size = 4 +emacs_mode = perl + +# but user kernel "style" for imported scripts +[scripts/{kernel-doc,get_maintainer.pl,checkpatch.pl}] +indent_style = tab +indent_size = 8 +emacs_mode = perl + From patchwork Thu Jan 16 16:02:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857925 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp283718wrb; Thu, 16 Jan 2025 08:17:27 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVm5NkoRPN3wDqpV7jMFBaOdSHl79KGzNPdENjirCqUYMzV32THozxqtUy40cfVjcDO7jv2Lw==@linaro.org X-Google-Smtp-Source: AGHT+IE0TNekh2PnDQD8AVagyIUkRMEhvEgkm4lkLwkKLh4UfipFxU3tlOTevCBCxnNyX++Zdz7C X-Received: by 2002:a05:6102:41a1:b0:4b6:3d72:5c28 with SMTP id ada2fe7eead31-4b63d726a44mr17275194137.18.1737044247389; Thu, 16 Jan 2025 08:17:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737044247; cv=none; d=google.com; s=arc-20240605; b=UHCKJc/Tco2hG0uD89GtQFuBVVDBnsOT0qcnECHh7tUkDADuAsizTMCmia9oH9BPWx UQ2tOmFNpm9VjF0YHitx6KxxCGbN1aNMHAjSA/SxWJ4CpbDbyvuRSHY5CEgjmjnWarhX jJtVK5/cO0fB/hI7zWARSZ/eNM7tlS4bEN7yY+Sr9dKmqeyEuhjh0LjHjChp40YEAC+y e/Ucxk1hXD5gDFc2OCQlCvxBlQ824VVcRru/rNCuSsr9F7i0qPLmdtC5+BQY79+nOwHO 5MaL2KUuJ3eiVhy6KKA8PIzwhobOrCtaZWDLpUo8Ggbsfr390BcWjtIjD7Oe5yog4Ai8 cPwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WLe5w9j4DHWXPaIRe+z3KvHnXl+5bNcDKy/lW4VDWAc=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=YrrTozgUpAj1NU/HYrEmLsnHpFEEvvfIjHFZ1IgevxsJb6ITCNMkTgdjreCjUhhY7+ A05TOT4JL+kU3bFh2qkCVhG8yR3NxYQUMKIRVBi9OXG0/AII103RbnPNAxS678PRrfI4 0+WPAqPBZG5/SwU7ZSz5HK/wf+eGA9LkFieAmeMjVtCSHOEpMAECaT09SoAwxS8SZTAU ka/YoB0rBLm4H4Yp3dTckyhMJ79Aw55SqYTbFlD7oxNruHpq0TmK4ov9Kw6tECm+BEZb zU0uV73NeSO5I1mwuiTvwpiHZkDwI9p4vQQ4S473zRl51CxNT748PBWIICY1su5D9/nt VsKw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b8AgYZ7v; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-4b68a1aeaf4si246858137.120.2025.01.16.08.17.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:17:27 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b8AgYZ7v; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSVJ-00079z-MM; Thu, 16 Jan 2025 11:13:58 -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 1tYSTo-0003jd-OG for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:31 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSTh-0004Ue-1L for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:22 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-43621d27adeso7365125e9.2 for ; Thu, 16 Jan 2025 08:12:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043935; x=1737648735; 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=WLe5w9j4DHWXPaIRe+z3KvHnXl+5bNcDKy/lW4VDWAc=; b=b8AgYZ7v4Ci5SiEAI1jmHvCkVJkCFl3OIi1EMoENcN/OgUvOoOu0oYOic9VipuR3aA 7+raSBpQbI+k2xNQyCHeB5H6OwGV5NGDy+/MwkQwf7CjKqOPTboXh7oNd0N1/xHXTTtC 4bneX0fUk4un/hp1JSJTG3b2jUvOG82iaeSfPP7+l8im1AUfyyKuJ6v2hcPSxeKPQcRJ OahPh0JShLO/9wUbwB03Lzy4R6fU+2D7ddMjhp6RtQlBqiLx9l86sCrGVX/t+JUsHgHA 0ERnfQb3oBetbpiCO5Z0oMXgGmBMSQIuU7v5Oaq5KxAdpgTaU9lOKd7Uv7uBsANZhv94 jbDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043935; x=1737648735; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WLe5w9j4DHWXPaIRe+z3KvHnXl+5bNcDKy/lW4VDWAc=; b=G7W+7lOTyTYFMPBmS7k9kSUVWS+N4T5Lw6CME5Q9XbFQEACMdwSORc2XvR/3JZ4VDK 7a8lva2zeXA/AxNNWsehWLVoZb5UuroEFp3O6vKFgDZvRhVH7LUlbPNI8Dabs87ZpvBd INQvns6B0rPVaDnJGCIVFXmE+pYTWdoQ4Ysa9HxEbjCU+V54KLCPdtHrkT21vZAyAm7k 6SAko0HcQ3/rVD7rJIWdKqT2W9jmu5iPRMbKaHsIBgFUtbiF4qP+CD97DwV9Pbel4us9 ndu0ePmNe2EbMnPHfLVXuIf0zjGYmvXFeRv/iPxsM8aYWf843EYpBxT1Je5DZRbvnnsj ZLcQ== X-Gm-Message-State: AOJu0YySfY78MYmFq/D4gtntMXb2dcZZ7h+uzsX95ocs7bpjjGQTAbVr EJmQZabu3BgW2AJnKireQ/I0fkLkHMtBBeg0OvbRCDiKSGLj7xLKXjvHRN6v8RQ= X-Gm-Gg: ASbGncuUig/CPYCJLXR6E9cYm7a/bDd4m1NZW1BenXBAW97McLfJJaxwHBYyLSMmXRO N1Z7TJspoaEZKSvGM8DysH5muUDsqn0yox3hJmmoeNbG40HchYa84bsiTCE5xrfzen37E2u2UXQ j0XSNyHASYMExRYUW/62HU6hRjKjGNHfS0NIKA1+dZwlZ1Nrs6kgJTVqHnb0cT2FC0S2wNeJyYm ROwYRFBiEAYbCfyTgf9zezwX9e45olRmlEH3NKgHIqEjctinjX/w30= X-Received: by 2002:a05:600c:314b:b0:436:5fc9:30ba with SMTP id 5b1f17b1804b1-436e26ebb6fmr201501935e9.29.1737043934086; Thu, 16 Jan 2025 08:12:14 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-437c74c6179sm63871185e9.22.2025.01.16.08.12.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:12:11 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 36F35608DD; Thu, 16 Jan 2025 16:03:09 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 28/37] tests/qtest: fix some copy and paste errors in kdoc Date: Thu, 16 Jan 2025 16:02:57 +0000 Message-Id: <20250116160306.1709518-29-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x332.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org A number of copy and paste kdoc comments are referring to the wrong definition. Fix those cases. Signed-off-by: Alex Bennée Reviewed-by: Pierrick Bouvier --- tests/qtest/libqos/qgraph.h | 2 +- tests/qtest/libqtest.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/qtest/libqos/qgraph.h b/tests/qtest/libqos/qgraph.h index 1b5de02e7b..81fbfdd0e2 100644 --- a/tests/qtest/libqos/qgraph.h +++ b/tests/qtest/libqos/qgraph.h @@ -355,7 +355,7 @@ void qos_object_start_hw(QOSGraphObject *obj); QOSGraphObject *qos_machine_new(QOSGraphNode *node, QTestState *qts); /** - * qos_machine_new(): instantiate a new driver node + * qos_driver_new(): instantiate a new driver node * @node: A driver node to be instantiated * @parent: A #QOSGraphObject to be consumed by the new driver node * @alloc: An allocator to be used by the new driver node. diff --git a/tests/qtest/libqtest.h b/tests/qtest/libqtest.h index f23d80e9e5..fa08c7eca5 100644 --- a/tests/qtest/libqtest.h +++ b/tests/qtest/libqtest.h @@ -365,7 +365,7 @@ QDict *qtest_qmp_event_ref(QTestState *s, const char *event); char *qtest_hmp(QTestState *s, const char *fmt, ...) G_GNUC_PRINTF(2, 3); /** - * qtest_hmpv: + * qtest_vhmp: * @s: #QTestState instance to operate on. * @fmt: HMP command to send to QEMU, formats arguments like vsprintf(). * @ap: HMP command arguments @@ -904,7 +904,7 @@ void qtest_qmp_assert_success(QTestState *qts, const char *fmt, ...) #ifndef _WIN32 /** - * qtest_qmp_fd_assert_success_ref: + * qtest_qmp_fds_assert_success_ref: * @qts: QTestState instance to operate on * @fds: the file descriptors to send * @nfds: number of @fds to send @@ -921,7 +921,7 @@ QDict *qtest_qmp_fds_assert_success_ref(QTestState *qts, int *fds, size_t nfds, G_GNUC_PRINTF(4, 5); /** - * qtest_qmp_fd_assert_success: + * qtest_qmp_fds_assert_success: * @qts: QTestState instance to operate on * @fds: the file descriptors to send * @nfds: number of @fds to send From patchwork Thu Jan 16 16:02:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857900 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp277178wrb; Thu, 16 Jan 2025 08:06:42 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXvU/LbLpx/M95rFSK9OrE1e+XF4WG1+ysxk7DPTWMHn50mOttvY7JrOAYlArbtixzTbi+DFQ==@linaro.org X-Google-Smtp-Source: AGHT+IGXZuzq7jN8tFDeiUSSt3bGxVmOmFinOzEdj7dICtFYZTsbFVLWl11A4lIlVjwEz1+FxVB7 X-Received: by 2002:ad4:5def:0:b0:6d8:8f14:2f5f with SMTP id 6a1803df08f44-6df9b257096mr618223696d6.23.1737043601819; Thu, 16 Jan 2025 08:06:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737043601; cv=none; d=google.com; s=arc-20240605; b=RdOTqzCQe2eX7fWP7HFXpwm7IpBaKSMrpl09HlXpppM4z6cK7BJ5Lr7AVxkxwqP3Pf /b5P+QY+cTe8ZSeJLMZXMD+9XThTFomWN7hjOa+klBef/6GNvU7aI7hfgXisyik7ymNV VbMzbYM/7QOCKRjaBwemG9ZY8Qrk4tFS0K7laoB6O8wA0ijkXw/K551pG3bp7zWxKrNb p+dUCMYIRO0pqWwR/ZFVt/dcd9T3P7LLH33VM/eOuTVbxUp/GvbLkrHMsG/4oTa95kv2 6tJr1zr1WfOUUrTV7LNDGfcX246A5eN1gJXje8dl8QYSK2yQNgVImS//C5cW3LV/uc4L coSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1MpW/2n8t4Ifykf0XW914wylYygUjob9/Znajs96aYA=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=kZTf+Fdo8Dinw2za9JdWMo4V/QLXgPerLR00CIag9IqyHeW3dGdjOGMsWKr7pT5CKY 65pEZpkdmvDKuOUwEJzZGtv+WLMMdyhD/DLLvUSr0qjOztdMaAoXcUq/zVwSYgrdP6I5 Jyb2k4uYmV7LRWbEMbIlh6pMPRyY0/s/mraTsG/cb47OQLhgkJT09nYqod+I7YjJv5QG VNIVuXCCSxM9QYLARWFYk6RsD/wdHkh+Uka+5e+kQ3VSv+qWpeic0I2puZUsCdO9DugB li5znCzse+iliKDuk5mbL6OZbG9xTLyXlEy2FDzIu5ORlE5Uu6XPP8VSOULzbtBIcBRO v4RA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FNiUvkM7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e1afd2006bsi2220036d6.489.2025.01.16.08.06.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:06:41 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FNiUvkM7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSNJ-0006ct-QE; Thu, 16 Jan 2025 11:05:41 -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 1tYSLC-0003Yr-RD for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:33 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSL3-0001KI-Qr for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:30 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-43626213fffso13957395e9.1 for ; Thu, 16 Jan 2025 08:03:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043400; x=1737648200; 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=1MpW/2n8t4Ifykf0XW914wylYygUjob9/Znajs96aYA=; b=FNiUvkM7sFZQ+a2zMmgWkVi7l+PH2hFj57ISsO/gO9zQxUVuOq0T7bIvg2H8XAhL8i 0V/M0HKR4OFgNoVbOe+1KlyjoVXHdzqmacrPK+kplBlhxPXRiYH0azNZYvrv1B3fSY2G o0fq1nhgnBc/09XECcgn7WFxsFMULpN+jwW6gbQMEtg3DIc63ODAKMJ2Pl1veju7NBJu Bixj+7AHcKC2sqT1NjOcKVoEZXRLYLBvW3dC7cRgy6+yYobJrSLZC8USF+foNHJ3Rr3j hk1S1PI8UC6yxr6EBlDFjcM0KuVQlJVeRe0FL2Eae9dykHvXTScN2bu4SoXlEzQAGF1V 4qzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043400; x=1737648200; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1MpW/2n8t4Ifykf0XW914wylYygUjob9/Znajs96aYA=; b=jI1Ut4uMbsc6Ug+ShPUdNqQ470qGZ/hv95qPMTvLz5va0os2TpOsLS5qypdXub1TIF ov4KGOmApbeAOzoxf+C9VIo2wE6fBfHPh8jyIWux4LShw0Cf4UYu4uk5SAxZbxzcjiq7 XkFXNx/++uyVJnbwA+s6R1RWgI+pkIc2JgRQXnTOStDPSMotLyDXvluhdCrHyPugGGvc 7yx1XOajZKQoaJk8BVrAe8rWRhpcz8PcitBG9PxkpHvS+0km9mTwwEX4DKgoGb8L7Heu xhPIoQDgMJZcly1WdD7VSDr1Ro/NXKhdxUPCoGZe00FlldQMdgZnmE4hRP9lDQezFqJ6 FopA== X-Gm-Message-State: AOJu0YzWZfuNVUqdpNV5f8wZa7IK8++spWun39FdXxmmMGbKH3lj6YVJ ieIw6Srabe3z4aOeRqQY+hUXz5OycEt85iqiLF9Sx8ygvM0D3/M7RDBz+62kiC0= X-Gm-Gg: ASbGncsJKoWAksZGTQSllcBxGXToymCjZHnwfOPoKb7o4rgT3u2FgIAbsNO6ZO/CHW9 JSo3lVTZVknl+PN60MtuKYwnVc+NTj13ZBEmd9LX/6mElJvJ4grjGxwKhtnQ4YenVMV9u4UVH+m oud192Ie0I76PQUJLRkkFhtqnqXTDmDyeMX54/sXVF1f2xuYJ1UX2cjXEHmxmpCjxaUEtECkQwv tp66cpdYlYBaLguEHCxHQa3qDP812lWfGb6oOR6zHk3H3g++8RNvxM= X-Received: by 2002:a05:600c:4f54:b0:434:fddf:5c06 with SMTP id 5b1f17b1804b1-437c6aecbf0mr65929325e9.1.1737043398506; Thu, 16 Jan 2025 08:03:18 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43890367b48sm3792705e9.0.2025.01.16.08.03.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:03:16 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 52FBD608DF; Thu, 16 Jan 2025 16:03:09 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 29/37] include/exec: fix some copy and paste errors in kdoc Date: Thu, 16 Jan 2025 16:02:58 +0000 Message-Id: <20250116160306.1709518-30-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32e.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org A number of copy and paste kdoc comments are referring to the wrong definition. Fix those cases. Signed-off-by: Alex Bennée Reviewed-by: Pierrick Bouvier --- include/exec/memory.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 9458e2801d..605687befa 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -1194,7 +1194,7 @@ static inline bool MemoryRegionSection_eq(MemoryRegionSection *a, MemoryRegionSection *memory_region_section_new_copy(MemoryRegionSection *s); /** - * memory_region_section_new_copy: Free a copied memory region section + * memory_region_section_free_copy: Free a copied memory region section * * Free a copy of a memory section created via memory_region_section_new_copy(). * properly dropping references on all relevant members. @@ -2510,7 +2510,7 @@ MemoryRegionSection memory_region_find(MemoryRegion *mr, void memory_global_dirty_log_sync(bool last_stage); /** - * memory_global_dirty_log_sync: synchronize the dirty log for all memory + * memory_global_after_dirty_log_sync: synchronize the dirty log for all memory * * Synchronizes the vCPUs with a thread that is reading the dirty bitmap. * This function must be called after the dirty log bitmap is cleared, and From patchwork Thu Jan 16 16:02:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857901 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp277820wrb; Thu, 16 Jan 2025 08:07:42 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWMMUbK8o7/22d32CBuA6wiTEdwPb8xWt3RQfh1XBijOngcAYvDUjt4WYjCQbNbHgdcUX1xZQ==@linaro.org X-Google-Smtp-Source: AGHT+IHsiprWSejorPC59aw4D3d6exLSRs09gn4XqT3wWB8c67SihXgKk9uelmF6yjHlh6SIKCp9 X-Received: by 2002:a05:600c:1c14:b0:434:f0df:a14 with SMTP id 5b1f17b1804b1-436e26786a4mr137508305e9.2.1737043661717; Thu, 16 Jan 2025 08:07:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737043661; cv=none; d=google.com; s=arc-20240605; b=lYlOR6x4cvMCToQsPDU+/mThSE+P04im8fekFynExYLFWAHHhunRNtez0ECUywGdtP YSXjXIJ3g3tqvnsfTHiNnf+QivXVemAsbtud8lPO62YTDi8T8VOt7hPQ0M2NpxH+nrrm VdZu4OvesW48JhcF3Are9uKw+7HdR8P0/xbvN8PqRm6bXFjPSNaHyVqgMwvF1/ViR/WR kOWPdBqs1kwaU46m33wEk99vLG8r27oy30pPLOypXtXIl4gJTnb4eX8gPswY0RIyYcib MHH+84Jc5gNWGAPWgpCrYLbszL7E5aa+1vc1ISrjHOWsNbdtSXVXmB4tFzHfGStTMufy GKZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AlXy29NBIjMy0Rkry+U475eKhew1JRy9bb9HkntANSQ=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=htl2uJXTxb9KiqcRld8cyBSp0yhrFG4lAOggRVw3eFFCpsJg/F/H9W2qptedfRsJvb 1vMHCmIvBsNyXXDLTK03QZ9baRtk1tV8I2uWlcpuOYRm8p2oPj4PtHDEnJynxDk4lcQL yY30RBg9WNjSfV4VS6eglQXmPRa8mt20VecU6fn8hn5fME/QYsN5m805cusCmRK1MLyp wt4qICBS2fbyycgh0SMF893d7PKvV957aikpLXNo5H9mnzHpsgP+Hrl0n1xbgMzOGHU+ 0giLLDYklYrlfgKm5OaA24yH1yesLEgBXAmAeF9a60ZoEmXoITcH0TaOLqIRrixNzr3U eL8g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="CZ7pBd/0"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 5b1f17b1804b1-438903facd5si2133635e9.29.2025.01.16.08.07.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:07:41 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="CZ7pBd/0"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSMi-0004zx-Km; Thu, 16 Jan 2025 11:05:05 -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 1tYSLG-0003d5-2a for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:34 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSL4-0001Kf-P1 for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:31 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-43625c4a50dso7515455e9.0 for ; Thu, 16 Jan 2025 08:03:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043400; x=1737648200; 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=AlXy29NBIjMy0Rkry+U475eKhew1JRy9bb9HkntANSQ=; b=CZ7pBd/0UBbU+cZ+mQpm8uGv4guvLuI/Zw2ZQD43IEJ6Sb2BKPR2bYTJuIr/Kh8STH Kj9rFrkY1tFvjZ5dAwF5Iu9hM7Sb5NsWL4222+CiLsqAcntIWWh5YKPz4Wg9A6LNTAPO qCNFsvr+aQfCRlLb5aheBrdkdjCeIeTYJoOR1GzQ6BRS79ajT7QXW7kJ+OHT/3GbtKXW 2pI8eRZUn9YD3iZt2bFNfaF3I5+OhNvlFqIaE8lTU8XeJFcKfgLSfrGjdio2r29qYGmS L8gkPWHOeJdrxY7vVkS3fKJkehIfVPCfdfNuSmqHRaleOlNll9hqEqLKH4+K6FSHOdwC jG+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043400; x=1737648200; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AlXy29NBIjMy0Rkry+U475eKhew1JRy9bb9HkntANSQ=; b=SYyoioVek03+JOqgAsRCUeChB8gl+oI+EKa0pNOIYs6Q/xtov5h4v5dmJV5G8sLmk4 Msh2MzLICslHDNCoP/yX/FaEvByKz+K8W5fZgSJemOEOuNbnjMvExIY8yI42hk4QFPqB xlYosyhGCYwmEcFFbj9YDfa/UM0T3O3G4YeMosxhEDCIGcVPMPQqRDWvkvWm4Oo4PXdp qy/MZ1A+2vQ9fpyUERW/3ImtTnsjkA09ckN1lwAa3RwaTUA42wOT2iwkzaNFzlTgUNRD QjqUFJ9w6CXBc2lZ76+xc7hlMiRlV5CPCbsyUqYKiCfVbh2j9Fg1A5OWIyi1X+Rso+5y sfpw== X-Gm-Message-State: AOJu0YyHTrNXKRXYeMYrw9n6I58EcLt+EDOh7L2D2jjTA/cVMh5HEjFl ZBVirG7D27nMueJSE6000pWKY96bxHF8BXMCoYyLlW/7+3s0Xw6s1tcpeVvzSD8= X-Gm-Gg: ASbGncsGNje1lntFyy6wqvA9qm//iV3RDuWVjfaidoBcsAKewJZkfCAhv+wJUoWxeWn qZ91kvYStonUdLc034z/TpIr7L+SA10qOFH7ZcRcqi0a19WG9p0Ks8dnoX4hQSVLhb6Y8diCCVc Aeu+yIPJqr+wqP96FyCj+4WJukXAJkQ63ayXA+5AT4jAuThI+Q9PzIDNJZYu9ZkG8NllAF/cAyT SxEspv87hZ/U1fFHRvrDIZsDtv63R2VPlW42BJ9kL6UQJQr2eLU7BU= X-Received: by 2002:a5d:6d05:0:b0:38b:d9a3:6cff with SMTP id ffacd0b85a97d-38bd9a36e6cmr20309143f8f.16.1737043399699; Thu, 16 Jan 2025 08:03:19 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf322b337sm220980f8f.59.2025.01.16.08.03.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:03:17 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 6B833608E1; Thu, 16 Jan 2025 16:03:09 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 30/37] include/exec: remove warning_printed from MemoryRegion Date: Thu, 16 Jan 2025 16:02:59 +0000 Message-Id: <20250116160306.1709518-31-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Since d197063fcf9 (memory: move unassigned_mem_ops to memory.c) this field is unused. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu --- include/exec/memory.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 605687befa..3ee1901b52 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -784,7 +784,6 @@ struct MemoryRegion { bool terminates; bool ram_device; bool enabled; - bool warning_printed; /* For reservations */ uint8_t vga_logging_count; MemoryRegion *alias; hwaddr alias_offset; From patchwork Thu Jan 16 16:03:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857916 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp281709wrb; Thu, 16 Jan 2025 08:14:10 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWmlmjrAwQ67mCcjP8tSGTUbqipqvgO1Xz522doCaqHq0vFMHMp+bFDuOGd4x2wxeW7C2XdeQ==@linaro.org X-Google-Smtp-Source: AGHT+IHUlVYDVid75/7wiFrtSBsK5YcOIRq5fiDcGrw+4RqsYVT9pTx2BIdkFYKqwRUzsDjwEzEh X-Received: by 2002:a05:6214:240b:b0:6d8:963e:b4d1 with SMTP id 6a1803df08f44-6df9b22f816mr479712436d6.18.1737044050025; Thu, 16 Jan 2025 08:14:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737044050; cv=none; d=google.com; s=arc-20240605; b=kYAmOA6BNxGPAm7i8dOpzKRtydJmznVU2WncgmVWWjnqeI4HTpN6qJdvZaDstMETQi 3HDiLhYAZIE0rZFX+0ZPAkIVV2BplVnetABXQetNWBqi3Tx5l3ZFa0A+V34yYixIByw6 3w++vuUWtE+U0TMBgr2FQ3RD3RWrAMjoO+iFAgVYaNlmmpNLRP70Rv5/ignTVwq4E+kL w7F4HIcbHQ8uHZEprZFArUrQRb9Klc4lh2vB3Fv0vsbqNE0aRNNh2AeeNO9FO1ho7wqX 4xVrbT32x1Z6yM5GOxk9VnWYCuqypyGHQOWFBHjNlPLB8ZXkaYdo48B2OQhOLdGFUnFa O7yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=j93GecBEOMwiOkIFmK122dF8ntsByPuKMq5HKst7wb4=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=aFFnbXL5IwvsS1WQu3BPV7vHatjbFOWZyY9HwMfKY9bFzK1EsoBaj/rfSQVbtC9NO3 o7IF99t1/UTyyOtrnMYnobUcvNK+Ihvpl37fRNH0WQifRkBWvssi3nsbY7zXqZmWUWy5 yRvbg6uMJeFnUVkJn0AQz+e+s8/jS4OeBs1rn1UESvpw4etk7GZmMghi0h69bxCYZzza HuAam21Fu34iaiekg02Y3Rry9cCbR7/VJM0d9FVzsgV0nYa2E5Yqkro8NRBXlnQa2Rn4 624tVgXdWa3eQdMRf9331SK/v55rlDE6kzu5rr/yJcAcuAerl9yskCUiLblB3Du4bbbM N5fQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fOjePmQ2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e1afbfd58fsi2880526d6.53.2025.01.16.08.14.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:14:10 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fOjePmQ2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSUs-00060D-R3; Thu, 16 Jan 2025 11:13:31 -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 1tYSTk-0003ZY-AX for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:20 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSTe-0004SV-DT for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:19 -0500 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3863c36a731so972763f8f.1 for ; Thu, 16 Jan 2025 08:12:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043932; x=1737648732; 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=j93GecBEOMwiOkIFmK122dF8ntsByPuKMq5HKst7wb4=; b=fOjePmQ2omcNwNPJd9tvjGYERgtraNoZ1boYDNzQ9+gd9Cyg/aIlF+EF7mcK6p/DLh HHsL4B6gNiXC1cChUwzMG0ZeWskZTWi0Qso9IDvKRX4aGhSVY0ZZO1Ssus/o2gLE8m2J kipKfShPrJsOJ82BB+g2N5VeWiGaSyJH5ULVPlA0o/wzsS+1moeCnMI8Bzz1FovnAJVQ vVFEksP1OIv3mGwTCYIbw+UrlwgmWnIRLVlIkG7zAfrKPnewA/fzyh3CHkrEIp1ni2MS 3zg2axS4fa6jtCXXYRixT4ir33U+jICpwXrXQO1xOkp1zHEzmSiyIw+nV68DFrVGfAzB 9cgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043932; x=1737648732; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=j93GecBEOMwiOkIFmK122dF8ntsByPuKMq5HKst7wb4=; b=eKgqcOO0GztcLLqS9ytbXzxzzscwfrk4PT6DVC9qAvGJBZvYKncVlpzfJ8tCgVqxRx bGgjstVCl0/ufrL4LgbYKT6ufGaMrSdwyM0gL64x80iwpRMRcBFENPE+i/qh/qdPOr1X kGona9PM+ZAGlG2ygjV6mdg0QEfOiLd/IDa8ZKSdJJjKNSZPPVyNlyi3KBvpkF/2gi70 EpyU55lDkDyp6PvAWa1l0x4HJUSA5BFHUHs2VCUGnrZwBm71FSr38Lc7zw21UD+9RZR0 cGma1tlYpFF42J4jGSZ6TnNJLgpqigL0rXE1EZqBKKEkO33k2FZFWIA2r9GTGaOr/Gp+ Kncg== X-Gm-Message-State: AOJu0YyfHbRbuZrHSWZg4EeFB5mf6cQOGraWhUq37caNVluNtYIjUL/I rf3zTiToychtWIZPNaBMkTKf86uAA7DYREirDx6JCKudlH/1oR4HQrt8n8GEEzE= X-Gm-Gg: ASbGncuJWnPiLyLCq1jlU7heMNuGSLiqa3XBjvkjQrkgZB6n0Tz7hJvi5amo0W9QrgP CTXB0gk3G05+icu61ZwRk7wsiBgDwVyWHzNu6TFmScx66uVWE/5XIRa10T6zOHkZxTy45zsDfJn uFh/Xn/Nuagl4r+qKU91Mxt58BTleYcIHukncynGQeDFxUGsEs3g8fMEwUZXZBRNk5kH+HSaJU8 CHSCzHS5gl1eEs5kLdBzV0dOLFlnqFNwJs2I/eGAQvgATKR88V7esg= X-Received: by 2002:a5d:64a4:0:b0:38a:8d32:2741 with SMTP id ffacd0b85a97d-38a8d322aaemr23798721f8f.19.1737043932285; Thu, 16 Jan 2025 08:12:12 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-437c753c60csm62650135e9.36.2025.01.16.08.12.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:12:11 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 81E01608E2; Thu, 16 Jan 2025 16:03:09 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 31/37] docs/sphinx: include kernel-doc script as a dependency Date: Thu, 16 Jan 2025 16:03:00 +0000 Message-Id: <20250116160306.1709518-32-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x429.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org When we update the script we should rebuild the docs. Otherwise breaking changes made to the kdoc script don't become apparent until later. Signed-off-by: Alex Bennée Reviewed-by: Pierrick Bouvier --- docs/sphinx/depfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/sphinx/depfile.py b/docs/sphinx/depfile.py index e74be6af98..d3c774d28b 100644 --- a/docs/sphinx/depfile.py +++ b/docs/sphinx/depfile.py @@ -31,6 +31,9 @@ def get_infiles(env): for path in Path(static_path).rglob('*'): yield str(path) + # also include kdoc script + yield str(env.config.kerneldoc_bin[1]) + def write_depfile(app, exception): if exception: From patchwork Thu Jan 16 16:03:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857911 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp281170wrb; Thu, 16 Jan 2025 08:13:11 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVPRAFtn/bN30l3Qob39W+3L7VFFDqXTsLbTy/aop7iujVtdqK5GxL2LwalYRegFlEPT5J1/w==@linaro.org X-Google-Smtp-Source: AGHT+IEGqipF+DwmpqV4UtndxUbhrWAKxi0LDV1so639P654ZK37RguOT7nUfSYQ+J25m7JBf9rW X-Received: by 2002:a05:622a:1104:b0:467:774b:f04b with SMTP id d75a77b69052e-46c7108fda9mr173528881cf.22.1737043990756; Thu, 16 Jan 2025 08:13:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737043990; cv=none; d=google.com; s=arc-20240605; b=lT1gp0/hxlyGBycFeg/L4JcP9qWInN8UAMm03SwUqDvHJA0QyyXIwGWrh9HzfOCpv0 F+sP4IHTU1GcvOM5UMMx2jEtRypVqo07zkqnIjV7ZB4kfoVMBJb8ke+TIdPZejgJQQqm 2ta3Xz2EZrr3CgRGUKFSRjnG7vgU/UjnInozslz5xbLY9Tn3nirqBMdhjMD7PVX1OwYW hwpN0U8D5+ptpQThfLwK9VRL42jSEYXQtR4dZGlllRo/IAdW+A5xOELB8zEMOBe8VBt3 lTxuB2+QNciqk/HUWx6JkcdrjjgyeI7PYUQzS4HTH+2B4vow/xJghro0Cd+T7YXG8IT1 mJSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=E36UvEspsa4mA6pTf+HFiwfFj5ukjbDFpFJX/Z8z6wQ=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=SPegwBuyLyKHGA4jUTioO7pGCckY2BneeyM/M+dH/g0O1BTLTxN61FIF9awzRmKXMw KGyGhp2r1TJYvmluRndL1GPYo9Y9w1oKY+gKE7ezna2KYDh/s3GirFt/ysmeKncDM65R ByJBWtTuTG6YoBhmOhO5cnY4ZYNgtAtsDRutnRVijHiAPnNHlcFXzWpAO2gY5cDPHKQt rKnNzu4LKz1780KlQcbuXZ5QvSbtRRjMnosE6qwIr0iYCn6Dn65nZjs/7hlGJXSyGvj3 2zg3PS6o5+kZ8q5PBbmvomzuxyZgrdqxAOiyvF6GRDxVAlf14niVs+swCBjodw4UEko2 H4gw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kHS8rKRz; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46e1040a2a2si1660531cf.266.2025.01.16.08.13.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:13:10 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kHS8rKRz; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSU9-0003l1-00; Thu, 16 Jan 2025 11:12:48 -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 1tYSTf-0003Gt-Jm for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:15 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSTc-0004RN-2b for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:14 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-3862b40a6e0so686914f8f.0 for ; Thu, 16 Jan 2025 08:12:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043930; x=1737648730; 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=E36UvEspsa4mA6pTf+HFiwfFj5ukjbDFpFJX/Z8z6wQ=; b=kHS8rKRz5YSXwuv4zaMFKCjtxWCWUVWAs0vfmKTwEGd7NHRnb1e38EcDDudOYHK0XI keRbdHMkx5MkwvpfteUz4pxJI3tyUJfFymBZcdFwesc+xsy/T0vGdBo5Y6jr7+6/KHyS LDvNyZR6b+kIpAfXG322U664xqgzMM2iQFCbNjvhP+sn3IKQb1CGG/+4ICpcbHipNe9u NX01LM0DYYvWV3HiGH07ZTeXRz0NAX7rFu1PmejPFMsvb8x68M3fxxJyxLckJ0XzO2pH 72eKuOdRIxYUq1FT7wtaHnRy+rUWyyev7EAPVq/obVVGnuqPCg/Xe/kI0v9TaddkrGqf RSeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043930; x=1737648730; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E36UvEspsa4mA6pTf+HFiwfFj5ukjbDFpFJX/Z8z6wQ=; b=rOQx4qh4Eqak+3Vg5XGlKfInD+6lvW/qf60GXFAsuCJf61mChukrzueDVBFo7BL2jy HTTlNp+1/2WAZlCt6dIhvxWtow3oktQrd58HqxMJjcDlPq/AHF59SMZ4FfDrtBXnWCfC SIAoRtvWFraKOJ9MYnOTxO0Gel1bIBHeXvRtfXB8GCi7zk7QL1iUDpEv8vxpd575M1U0 BLvbowoMXAljbwZhx6Sc5cLyKh43nNp1+aKfUtiJT6ciCyzbpWfxwBuE5sBZwJZ4EvKP X4+Krw8ksmC7Dkm14s6Sw0hpJy7J33cQiMUAZ+WftIPpY08UxmDmaMGmD2wj5qFuX8fc /wOw== X-Gm-Message-State: AOJu0YzuvC4KTm21r7MJLSNOKmVN91//Jl6eVumQQY8paJLWzaSCLkYv gxSQOF6PFWgKK9q/iK4pwRfGEB6xYaxZo1DIiGPGM9btlwfzCSUUjKeCjduUs/g= X-Gm-Gg: ASbGnctXEqME5EzK7FojITyKekwIPGlDz6oqN+DIgiaUQT21QqOOZGhH4XI8Veexkv8 6cQuMgP7eIklNZpQJ0VRmq1yPsrqs9IrCQAWsoZWVlVrfgm6tuobljGUke35Ul9Q7NkIXnmopnP vN6NDVaQ4tnFzVD9aVQPLMiKOnO3PkuchijGnnehXt5uzfBkdFYOp6bIdi699GEBuBB6iZD/2m/ D08uq/8CVUwKocZjulbAHpiYQXu1Rxdwr0gsZyECM5KZdSS6aHFWtU= X-Received: by 2002:a05:6000:1869:b0:38a:8b2c:53ad with SMTP id ffacd0b85a97d-38a8b2c5601mr32435195f8f.39.1737043929874; Thu, 16 Jan 2025 08:12:09 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf328847esm215843f8f.98.2025.01.16.08.12.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:12:09 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 984F3608E4; Thu, 16 Jan 2025 16:03:09 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 32/37] docs/devel: add git-publish for patch submitting Date: Thu, 16 Jan 2025 16:03:01 +0000 Message-Id: <20250116160306.1709518-33-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20241209183104.365796-3-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée --- docs/devel/submitting-a-patch.rst | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/devel/submitting-a-patch.rst b/docs/devel/submitting-a-patch.rst index 03b2ac298a..69df7682c5 100644 --- a/docs/devel/submitting-a-patch.rst +++ b/docs/devel/submitting-a-patch.rst @@ -235,6 +235,31 @@ to another list.) ``git send-email`` (`step-by-step setup guide works best for delivering the patch without mangling it, but attachments can be used as a last resort on a first-time submission. +.. _use_git_publish: + +Use git-publish +~~~~~~~~~~~~~~~ + +If you already configured git send-email, you can simply use `git-publish +`__ to send series. + +:: + + $ git checkout master -b my-feature + $ # work on new commits, add your 'Signed-off-by' lines to each + $ git publish + $ ... more work, rebase on master, ... + $ git publish # will send a v2 + +Each time you post a series, git-publish will create a local tag with the format +``-v`` to record the patch series. + +When sending patch emails, 'git publish' will consult the output of +'scripts/get_maintainers.pl' and automatically CC anyone listed as maintainers +of the affected code. Generally you should accept the suggested CC list, but +there may sometimes be scenarios where it is appropriate to cut it down (eg on +certain large tree-wide cleanups), or augment it with other interested people. + .. _if_you_cannot_send_patch_emails: If you cannot send patch emails From patchwork Thu Jan 16 16:03:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857914 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp281664wrb; Thu, 16 Jan 2025 08:14:05 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXRz9RgIhy5NG+oZnv2UwO+U7g1MDp++mlXWSJ8JqV5ddEX0G0gYnJA+Z+LALE3oNw8x+ox7Q==@linaro.org X-Google-Smtp-Source: AGHT+IGF9HK8EpW6Fx6laoag89yesbVkMiegH5XoLlFOJ27HuCABBo0ohUdpv4KlquZqaTgtQTY1 X-Received: by 2002:a05:6214:2421:b0:6cb:ee08:c1e8 with SMTP id 6a1803df08f44-6df9b22de77mr562996546d6.23.1737044045384; Thu, 16 Jan 2025 08:14:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737044045; cv=none; d=google.com; s=arc-20240605; b=FyVLS3TZPrx7Uj6UnUOJdY3V76vgSF6lIW2/p0ckUPxyb8SmeiaFtUAb5X1pUFMFvP jUKzt9o+vPmYUzF6OkiuLsywCdOMHZsltzhrCRpWOWI/Pplfzr59zllJJVOyjs9jKMLN Z+rvbwj3VqtfenZzR4E6AidVeLZYC0KuXXiY15B8m4SzwuOCn59xKYkiEPIPsiRxyvsQ Bph9F3bEq6d4YfNuBBxdkJvmwCFWiQhb0XVN5Alrcx67xtuqg/usrCyzEuSiv6CHRNnV TlIjMkdP86R25d5FbVy/EOVNTpzURiQUhASDSErqJK7nbumiZUjyuxHhIr/fNj17IROo QWTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Rem+PqKJwtTryCp5+P2h89dN9I6AHO+TdjB2QsczI6k=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=M/rJgnN06rkIfNT9As20wLjVlqd/xRnKS7f1Vq9290+HOdyd+W/aQWWiegjo9QS0gV +U6lKTotc4UrT2KcaqIwSI9s60Q2xe/UQg/Im9ilkSd5R0qEj4XCRelENRlnYOFb9oj9 MLUyOijtdyQLhYNJITE12gx4SGpROpIOtLngzZJ4ndcRMRcfxTrgdRLoaGKfv+pMJQCQ Omo/URKGgQMna+898FkYjQ5I5Gx3cFdksUnwQFiiyd5rruarPnm7PN7olix+oysHTxZv eEGG1l77mmQFrVL9sHcoUjGUovc8GmxKxRCVNtvKdt3mP0to7fxIm2IUzYmD+p7t/CK8 e0aA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ORIAvb7Q; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e1afc1af57si3098726d6.146.2025.01.16.08.14.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:14:05 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ORIAvb7Q; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSUs-0005zU-R1; Thu, 16 Jan 2025 11:13:31 -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 1tYSTp-0003jn-3G for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:31 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSTh-0004VO-MM for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:24 -0500 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-385deda28b3so793059f8f.0 for ; Thu, 16 Jan 2025 08:12:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043936; x=1737648736; 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=Rem+PqKJwtTryCp5+P2h89dN9I6AHO+TdjB2QsczI6k=; b=ORIAvb7QS//IvRNHnCvpPlFBhmH8dXPuHCaAlKjPGqblY7jJU3FM0NZWpKCEHk+uUD wjjCdTkAB0LRCjkq07ue0uW/rS03TCgFf+AIApkX/fAZU/ssdWKM98lYq4nsSnlPdCdl /I968RP+Y2nEMpSps8fyBE/KQvHHIomYmw3basSqMH3xdr0ladtfcU61uOyyacIbrQ8h 8qE0kb9gHesLP2ILU+sNS9EYyQN+BGrT25k2lai95AmiUC3jcXQkZaXMwIbUcebbWeFr otsSqFsWrQrF/0AbDyctzmlwqffh/NinoK58mqTXqjPFTPQxOs0vhmSbKykXm3LyfUxw 4vkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043936; x=1737648736; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Rem+PqKJwtTryCp5+P2h89dN9I6AHO+TdjB2QsczI6k=; b=PfInQrKRVv8zfufOH8ds3sK/oykk2QPPNiFRdjYQ9ovrkAmVcPEy0R+FxiZhtuq5g5 WjkrTJBwmG5jVJ/cIcdY3O1Z8ZPCGzUgOf2BW2aT8giY4yaw8xKmzP3fD6GacIBIztFi tVbPJRn5bb+/NU4unGhH20f5pwBPhErmZMBRGCAecu0Qe4xRVbJHlgZD8g1YHjNWWfIF 7HHSJ2/t05JkfHnyjruZtMsFb6rJqMQEqHMFf/hRnfywjjQhUEY4DfwSkv7OXYI3yOcE /U9CAMhyRZuUS1dLtNNzBF0b54wJHQusym/Nq18ToOKLcyfzlB8bRxcIzCfF9TARCkpl gU1Q== X-Gm-Message-State: AOJu0YzPtAAOOvHMuThGpdNngymBwZEY5PnziRvyIYT1LIYr4pIsr691 uFTDED8mOyTMSBKrfYWVfctjkolYSRmIxtRT4KOYQMALGNPyWIRKv8S2GGaISEc= X-Gm-Gg: ASbGnct/BodzG0MAwlZ462JzicgRLwzb8vTCHzTkg9ZuUc7risdXtIUj6N4FQfC3H3r LXOGyo0dkhwa0ZmoL4Wig+X3B46mfY8YdnwfuBJ0V3sZObmrGPmFnzkRjAP3oKb3xRveUd83eyH TM15GZtx3uHvjxC+2w79GspFEtHrAww1OYsTMa6B8Hhku0fE7Vo/PkSDhw9yF60k13rzmIPS9y1 1VJeuzMSSVR3w0/BNHvDnMvbID2+aquW1I/vN2LvYZKEnIOQUFNJuo= X-Received: by 2002:a5d:5886:0:b0:386:4312:53ec with SMTP id ffacd0b85a97d-38a873049c2mr28737544f8f.17.1737043935929; Thu, 16 Jan 2025 08:12:15 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf3275755sm217697f8f.80.2025.01.16.08.12.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:12:15 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id B131360812; Thu, 16 Jan 2025 16:03:09 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 33/37] docs/devel: add b4 for patch retrieval Date: Thu, 16 Jan 2025 16:03:02 +0000 Message-Id: <20250116160306.1709518-34-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20241209183104.365796-4-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée --- docs/devel/submitting-a-patch.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/devel/submitting-a-patch.rst b/docs/devel/submitting-a-patch.rst index 69df7682c5..65c64078cb 100644 --- a/docs/devel/submitting-a-patch.rst +++ b/docs/devel/submitting-a-patch.rst @@ -433,6 +433,20 @@ For more details on how QEMU's stable process works, refer to the .. _participating_in_code_review: +Retrieve an existing series +--------------------------- + +If you want to apply an existing series on top of your tree, you can simply use +`b4 `__. + +:: + + b4 shazam $msg-id + +The message id is related to the patch series that has been sent to the mailing +list. You need to retrieve the "Message-Id:" header from one of the patches. Any +of them can be used and b4 will apply the whole series. + Participating in Code Review ---------------------------- From patchwork Thu Jan 16 16:03:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857918 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp281758wrb; Thu, 16 Jan 2025 08:14:14 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWSTje/oW0At6AHebURqfVUitCfV6D+rm9XtCnQYac3iDw9oiTjzp9ADVPr+QIUu5vzTD7Z9w==@linaro.org X-Google-Smtp-Source: AGHT+IEEC+zglcWy8fRSEZYDgwZM6lalYTEf8N7FLoS54CpvEnfHdGwx3wg0wBx7i91fmyERy7BK X-Received: by 2002:a05:690c:113:b0:6ef:6035:8298 with SMTP id 00721157ae682-6f5312d1195mr294471407b3.36.1737044054056; Thu, 16 Jan 2025 08:14:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737044054; cv=none; d=google.com; s=arc-20240605; b=Qr+BITnp4o26/5v9jvboAS3wf1oaSUpb3J2PqkINLoGSKOGuDwKianF8cgtpUiFQTm WC4GIQkrcRGdxFElOSZc4EIvahikwuaNhis/rv8GAj6gRW6f1nZ9vtpCdMTukDMaBMno emHZJD88bcbn7lFKMpTrGc9XBhHbRE93C5Q+u6keCKNqWRXiemWkMrtfBLemFOQXfGEj 0rGfOQcBoSg7bv9QR5y6pPJycx+WZ42IL1kEKV0fFH1DTmAVzkIucrojZlWm7VeRVuLC GjdVddpymBZ9rgf3y4PZs8H06tsUleQqWNUXRwieiz4VhrCHG/hv2UE2L4JZiSIWEorD AYow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pEspZFwbygWOOIYPmCL2T56SZ8LCQYpRTOvfxo1nLt0=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=C9RNFR2btCpJn613TiHcE7kg3sJFNRJKKRCJYC+snBpNyjbQpU9uzfWTjErgOKD9MH fm1t9Ft/z2fjXoCRhnEnICKEA5WDVmYWdN6Bochhi49ZhkD/8NkZRDxs2UyTdiMAFkoZ ixiSb68FZnajCzrfuSZWmFXccsDYz6JiC7q9cKE6qW4AvcjaB5AVxoeFSW0bgNXqzmO5 kNjOgdZspkMzZ6LZf2EbMtPMJBrLPpth8ioVtg61HNLWFmPAzZ2k9SuQYKrZWObE41EE VmS7CBsHU+CQADoGXQ8TDIUkB++hMISqZJ7QxS2L73xFlLXRbe1Y+Gn57wTIvgVXidpG TB1w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bMefCXWJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 00721157ae682-6f6e63b4832si4238067b3.77.2025.01.16.08.14.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:14:14 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bMefCXWJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSVR-0007uL-Vo; Thu, 16 Jan 2025 11:14:06 -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 1tYSTw-0003m6-Bf for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:41 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSTk-0004Xr-G3 for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:30 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-43626213fffso14036105e9.1 for ; Thu, 16 Jan 2025 08:12:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043939; x=1737648739; 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=pEspZFwbygWOOIYPmCL2T56SZ8LCQYpRTOvfxo1nLt0=; b=bMefCXWJWdlKAnWJwrD+AtJCrLIf3FfImYQ3UA/ynUadbfnIA7Gnpww3zJYrDsaMmS XlCDwqv+pA0Pgpl8Qj/VSziHmwl/90iVOVlQO2k4Yecz4NiyVd2PxTFYa8vQLQJBkMiN GSWbFeEqcj8SsjkkGIx/44tWpV7Bhbiv3zIjrGuB+2Z010V/q9VAV6UT+jwze8JJb2Jt KSlt8Ru2fzn1IZMvpbpYwfUPXfBUSpJRQgDQeyh1B+HqOD04oY+P+/m9Yvyn6EdQn7F0 /vgt7iIBZGtVyhjHGPwm2CoyVwqaUyOkR4GuUu8P4tlVyyrElFBerbGb3YM5lEybAq6I eWXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043939; x=1737648739; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pEspZFwbygWOOIYPmCL2T56SZ8LCQYpRTOvfxo1nLt0=; b=vUdxTzFc4DS2dPJC6P3EG78/GplWxEZoQnbJM4UWW4wtHO3ExitCT1kU++A2zCefU2 GtEtQ+GwDPat+qYe3/6+TBGFA3gn5sxQL9NNtF6s9u351daZZoVj0jf94+n6UnUgLMmy adMX//XucAcEQBNhVPITnb+7iqXBzrjuF4f78z0Hb+GjMF3GymYHWaqsgu8erjTKe06I iQUCoiY4W7ThI4iNHlRIMw7vXmxSaIpRsET6iDxOocepZ5zWoSrfN+F9gfEduHvPV23F vsQ9zHpzTuuNS+DLa1LmG1a1gbtui5RNUhg6WCtRP6bcBSZOf5uIrNC+2LjbR5HNxmkQ iL7Q== X-Gm-Message-State: AOJu0YyLxBlVpitwAXxgQGG4hW1iv13S3jOnlvHX2XFWq3LuaC7lJ9Wl E1Zi29zIstLxNCestVzK6e8KeMP0YE70f2clb98pRHV7UiI4PWcPFyLAy2j3YMk= X-Gm-Gg: ASbGnctqdqLdTBVwveRk/xkAZGm3zSetnq/j46lYv/o97Ke0MSyy2jL2rOPF2W6/zrO zvgmSEJEMhb+ZaeeGHzrbjyaZWdBTKbwN+eJGJfG0vKxqtDMw44D61X+9gsfM28zfOasw89vtfo T+x972XzxB642H4YnVLA28QOL+Gw6E70Wqi1vPnfyDovtwn05/g8rnNO1WXZbQ+997lfzshQM0i Nw0fy+WdpIwR43hn0GlkW2Bkv5sUnYYjLG+8NSDEjzfQii8n3+IySs= X-Received: by 2002:a05:6000:18ab:b0:38a:49c1:8345 with SMTP id ffacd0b85a97d-38bec542923mr2986490f8f.18.1737043938566; Thu, 16 Jan 2025 08:12:18 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-437c7527fc4sm63884695e9.27.2025.01.16.08.12.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:12:15 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id CC355608E6; Thu, 16 Jan 2025 16:03:09 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 34/37] docs/devel: add information on how to setup build environments Date: Thu, 16 Jan 2025 16:03:03 +0000 Message-Id: <20250116160306.1709518-35-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_SBL_A=0.1 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier MacOS and Linux are straightforward, but Windows needs a bit more details. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20241209183104.365796-5-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée --- v3 - add new files to MAINTAINERS --- MAINTAINERS | 3 +- docs/about/build-platforms.rst | 4 +- docs/devel/build-environment.rst | 118 +++++++++++++++++++++++++++++++ docs/devel/index-build.rst | 1 + 4 files changed, 124 insertions(+), 2 deletions(-) create mode 100644 docs/devel/build-environment.rst diff --git a/MAINTAINERS b/MAINTAINERS index 8b9d9a7cac..1d2b9f4ab8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -72,9 +72,10 @@ R: Markus Armbruster R: Philippe Mathieu-Daudé W: https://www.qemu.org/docs/master/devel/index.html S: Odd Fixes -F: docs/devel/style.rst +F: docs/devel/build-environment.rst F: docs/devel/code-of-conduct.rst F: docs/devel/conflict-resolution.rst +F: docs/devel/style.rst F: docs/devel/submitting-a-patch.rst F: docs/devel/submitting-a-pull-request.rst diff --git a/docs/about/build-platforms.rst b/docs/about/build-platforms.rst index d8b0445157..482b09819c 100644 --- a/docs/about/build-platforms.rst +++ b/docs/about/build-platforms.rst @@ -29,6 +29,9 @@ The `Repology`_ site is a useful resource to identify currently shipped versions of software in various operating systems, though it does not cover all distros listed below. +You can find how to install build dependencies for different systems on the +:ref:`setup-build-env` page. + Supported host architectures ---------------------------- @@ -130,7 +133,6 @@ Optional build dependencies cross compilation using ``docker`` or ``podman``, or to use pre-built binaries distributed with QEMU. - Windows ------- diff --git a/docs/devel/build-environment.rst b/docs/devel/build-environment.rst new file mode 100644 index 0000000000..f133ef2e01 --- /dev/null +++ b/docs/devel/build-environment.rst @@ -0,0 +1,118 @@ + +.. _setup-build-env: + +Setup build environment +======================= + +QEMU uses a lot of dependencies on the host system. glib2 is used everywhere in +the code base, and most of the other dependencies are optional. + +We present here simple instructions to enable native builds on most popular +systems. + +You can find additional instructions on `QEMU wiki `_: + +- `Linux `_ +- `MacOS `_ +- `Windows `_ +- `BSD `_ + +Note: Installing dependencies using your package manager build dependencies may +miss out on deps that have been newly introduced in qemu.git. In more, it misses +deps the distribution has decided to exclude. + +Linux +----- + +Fedora +++++++ + +:: + + sudo dnf update && sudo dnf builddep qemu + +Debian/Ubuntu ++++++++++++++ + +You first need to enable `Sources List `_. +Then, use apt to install dependencies: + +:: + + sudo apt update && sudo apt build-dep qemu + +MacOS +----- + +You first need to install `Homebrew `_. Then, use it to +install dependencies: + +:: + + brew update && brew install $(brew deps --include-build qemu) + +Windows +------- + +You first need to install `MSYS2 `_. +MSYS2 offers `different environments `_. +x86_64 environments are based on GCC, while aarch64 is based on Clang. + +We recommend to use MINGW64 for windows-x86_64 and CLANGARM64 for windows-aarch64 +(only available on windows-aarch64 hosts). + +Then, you can open a windows shell, and enter msys2 env using: + +:: + + c:/msys64/msys2_shell.cmd -defterm -here -no-start -mingw64 + # Replace -ucrt64 by -clangarm64 or -ucrt64 for other environments. + +MSYS2 package manager does not offer a built-in way to install build +dependencies. You can start with this list of packages using pacman: + +Note: Dependencies need to be installed again if you use a different MSYS2 +environment. + +:: + + # update MSYS2 itself, you need to reopen your shell at the end. + pacman -Syu + pacman -S \ + base-devel binutils bison diffutils flex git grep make sed \ + ${MINGW_PACKAGE_PREFIX}-toolchain \ + ${MINGW_PACKAGE_PREFIX}-glib2 \ + ${MINGW_PACKAGE_PREFIX}-gtk3 \ + ${MINGW_PACKAGE_PREFIX}-libnfs \ + ${MINGW_PACKAGE_PREFIX}-libssh \ + ${MINGW_PACKAGE_PREFIX}-ninja \ + ${MINGW_PACKAGE_PREFIX}-pixman \ + ${MINGW_PACKAGE_PREFIX}-pkgconf \ + ${MINGW_PACKAGE_PREFIX}-python \ + ${MINGW_PACKAGE_PREFIX}-SDL2 \ + ${MINGW_PACKAGE_PREFIX}-zstd + +If you want to install all dependencies, it's possible to use recipe used to +build QEMU in MSYS2 itself. + +:: + + pacman -S wget + wget https://raw.githubusercontent.com/msys2/MINGW-packages/refs/heads/master/mingw-w64-qemu/PKGBUILD + # Some packages may be missing for your environment, installation will still + # be done though. + makepkg -s PKGBUILD || true + +Build on windows-aarch64 +++++++++++++++++++++++++ + +When trying to cross compile meson for x86_64 using UCRT64 or MINGW64 env, +configure will run into an error because the cpu detected is not correct. + +Meson detects x86_64 processes emulated, so you need to manually set the cpu, +and force a cross compilation (with empty prefix). + +:: + + ./configure --cpu=x86_64 --cross-prefix= + diff --git a/docs/devel/index-build.rst b/docs/devel/index-build.rst index 0023953be3..0745c81a26 100644 --- a/docs/devel/index-build.rst +++ b/docs/devel/index-build.rst @@ -8,6 +8,7 @@ some of the basics if you are adding new files and targets to the build. :maxdepth: 3 build-system + build-environment kconfig docs qapi-code-gen From patchwork Thu Jan 16 16:03:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857920 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp281902wrb; Thu, 16 Jan 2025 08:14:29 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXL9TiRV3iFsHFRAm6gYAyLiurtAdNDtcoI0mMEGtv+Y+3TlJwLS6vqxnX7Zrgtqg5b5RHXvA==@linaro.org X-Google-Smtp-Source: AGHT+IGTO573c/eCbTlJcX77XVoxUW2rPHpstQSBXYiULDnLSVopRVRmI6KJQ1r3rF5JE5Q+2sV7 X-Received: by 2002:a05:6902:15c1:b0:e57:46c9:5aa5 with SMTP id 3f1490d57ef6-e5746c97cd7mr17223924276.44.1737044069315; Thu, 16 Jan 2025 08:14:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737044069; cv=none; d=google.com; s=arc-20240605; b=TvWEHZO78vwho+5FCrckCr8GWgFPzA2KyD5tG4qMfhKXPIxu/XmMNnCw/huzzH3olG DvJ3F//zxN/eatWDvLXXaNWVPNVkb+nA/LEAfQfDbxFzfttpVuWVCrBeGvbJwQm7Ud+u MZuXchTBlcmjssxQ9rcnUE1ptH5ClwYGJxcm8zXAqYb4EiyxxZ/+Pm+435cGmnylOCNs +T1iepgKHrsuFC6FOvQa2ioDfwy0l3VtE0Qym6LA42+SFxPfAZha/LLw38zzjv/x4t1E 3SnEB57Zd1fbAXzV6m68TBdC992LmK4xVEiUBaYH9ZvsMONX+jWYSFy/co2HAPJ+WJuV +F4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=In8HamOA6zK8DcWGLqsNTRBfkvFfPIUyFK6wDzCpYkM=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=Nfu8jqxLcmJIJ0YGjlt2mdsPH/APV7owcZI/f3nKazzoX1ua+4SM6h3+VpFYsc2a+q QAqi5TKtN5yQ21TMq7ryOzKKFYxw6fPiifdZqBRCnr2E/EOYPfsUT2wk+G/c/j71QwGa OOGFW15RvZXkOIY8jTzA10AYN5J17jj6OzPr6gKMfbPE0P5e0ANKDPlErVeMHSycbKrW ovHzfk1Xzr9Cd7JmfeFGHkEL6c0WOkg1XywBn6b1ZASu+1CwmxGk2/uukR9XGr9QvbsD 6aQfzkVyVmF0d4IpdWMSq4z//ROB/sjT/Av3bbh+WManaq6c5gzDLzdX4ovidO5l+fpP 4DUw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eQgFuxB1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 3f1490d57ef6-e57ab2d1adbsi456638276.62.2025.01.16.08.14.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:14:28 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eQgFuxB1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSVP-0007hD-A5; Thu, 16 Jan 2025 11:14:03 -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 1tYSTq-0003l7-Cv for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:31 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSTh-0004Uq-CU for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:25 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-3863c36a731so972802f8f.1 for ; Thu, 16 Jan 2025 08:12:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043935; x=1737648735; 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=In8HamOA6zK8DcWGLqsNTRBfkvFfPIUyFK6wDzCpYkM=; b=eQgFuxB1npyi+R/rCoWB+jlKehdxNx5h3N/TdFnXMAOEpsdfEBskEsYqa9y8Qkp8T6 tyAZU6RSHXSoHcdufIHwGqz9OWeRqZY7Q1xSS2gVy7T/amUWZrpcSaSY8k9IXgRlQhlW 3TLjq35YKP3gwjIOAppqD8nrI/C9DiPZ9uXI5oKmv/adyY0I/S8jET383NIcMoUaeaEx j3K7aIJIJUuyeh0qpLVsQn1sj4JNL8hD8wWH2feb96UFANQUZcgrZE2auM1yE3/4Y/4I S+GxvGVwaBPxEdmQbTkh+tSturyhdIqXl6gMMg9/HjVydBhdUGVzmAkzzRSe98Cvi4L3 CVyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043935; x=1737648735; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=In8HamOA6zK8DcWGLqsNTRBfkvFfPIUyFK6wDzCpYkM=; b=EFufojBxqB02+8LKL2lKJ5IjeauyQC7UCsh9UotqkOPlOaz45Larjf+p6NhTgsne8C RHfoLPF6Vi130blb2qkYGtjKVHyUlubu+1Bqpa7ebG+VIPGhgI0bq1mqa6DEhkHTZY3O XirOGCpaJuGYnEtgoikdkk+MoPgpoBbaWDEpf7JU+NFFEAxBsX6HTHnxXzF+jhbF4UdS UX1j9K0UmFYpBfGY0ktGx58V960XGlLXbrtzdzlhTrzAshS2lEDUol3pqjsGmezsnbxn lP/H2JmI8wQAl3AfQmscTNpFRwSRvaak69Tu4+k3K540fIt5Tg1vuUmiNFWcPEK6sP67 4i+A== X-Gm-Message-State: AOJu0YwhIZ0AwhFIsd/VJw2nKn9Egx1ONWjDgkFCBrQJQHQyFAL3r9dc 5rPVf5PHubSEQrHi79xFsCdCLByRfQr5FSyMUSWI1xvkINW8U2MHBVpIQ4L03go= X-Gm-Gg: ASbGncuUKGe+vA+BRiyvX9AzG3WEP02ZFIVXwcYzkXgeat2HQiUpxbv2w3XO7P2mMpL pv3ZT6XXgJsCw5h+d7jWX7XM9PaUuVICWXVBnngQSN/4cW5OiQM4QWAKxJhbnBwtg4khM4remtC rM7f734Z1GamIWLcdQUa+KYmqtrEcfIaixhuf8B9XD5Y5MSBw9U5ojFe5eVrAqads2FQ+wLlskd YXLCgyyyz4p2EtTG9rMfADzXvX3+L1yiPy4BV4+HJUpMJcFTx4T7PY= X-Received: by 2002:adf:a312:0:b0:38a:88bc:bae4 with SMTP id ffacd0b85a97d-38a88bcbb29mr21168612f8f.18.1737043935271; Thu, 16 Jan 2025 08:12:15 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf327e19fsm225102f8f.93.2025.01.16.08.12.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:12:11 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 031AC608EF; Thu, 16 Jan 2025 16:03:10 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 35/37] docs/devel: add a codebase section Date: Thu, 16 Jan 2025 16:03:04 +0000 Message-Id: <20250116160306.1709518-36-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x431.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Present the various parts of QEMU and organization of codebase. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20241209183104.365796-6-pierrick.bouvier@linaro.org> [AJB: tweak commit summary, update MAINTAINERS] Signed-off-by: Alex Bennée --- v3 - tweak to docs -> docs/devel - update MAINTAINERS --- MAINTAINERS | 1 + docs/about/emulation.rst | 2 + docs/devel/codebase.rst | 220 +++++++++++++++++++++++++ docs/devel/decodetree.rst | 2 + docs/devel/ebpf_rss.rst | 2 + docs/devel/index-internals.rst | 2 + docs/devel/index.rst | 1 + docs/devel/migration/main.rst | 2 + docs/devel/qapi-code-gen.rst | 1 + docs/devel/testing/main.rst | 9 +- docs/devel/testing/qtest.rst | 2 + docs/index.rst | 2 + docs/interop/qemu-ga.rst | 2 + docs/system/qemu-block-drivers.rst.inc | 2 + docs/tools/qemu-storage-daemon.rst | 2 + docs/user/main.rst | 6 + 16 files changed, 257 insertions(+), 1 deletion(-) create mode 100644 docs/devel/codebase.rst diff --git a/MAINTAINERS b/MAINTAINERS index 1d2b9f4ab8..480902493a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -74,6 +74,7 @@ W: https://www.qemu.org/docs/master/devel/index.html S: Odd Fixes F: docs/devel/build-environment.rst F: docs/devel/code-of-conduct.rst +F: docs/devel/codebase.rst F: docs/devel/conflict-resolution.rst F: docs/devel/style.rst F: docs/devel/submitting-a-patch.rst diff --git a/docs/about/emulation.rst b/docs/about/emulation.rst index 3028d5fff7..3bc3579434 100644 --- a/docs/about/emulation.rst +++ b/docs/about/emulation.rst @@ -176,6 +176,8 @@ for that architecture. - System - Tensilica ISS SIMCALL +.. _tcg-plugins: + TCG Plugins ----------- diff --git a/docs/devel/codebase.rst b/docs/devel/codebase.rst new file mode 100644 index 0000000000..4039875ee0 --- /dev/null +++ b/docs/devel/codebase.rst @@ -0,0 +1,220 @@ +======== +Codebase +======== + +This section presents the various parts of QEMU and how the codebase is +organized. + +Beyond giving succint descriptions, the goal is to offer links to various +parts of the documentation/codebase. + +Subsystems +---------- + +An exhaustive list of subsystems and associated files can be found in the +`MAINTAINERS `_ +file. + +Some of the main QEMU subsystems are: + +- `Accelerators` +- Block devices and `disk images` support +- `CI` and `Tests` +- `Devices` & Board models +- `Documentation ` +- `GDB support` +- `Migration` +- `Monitor` +- :ref:`QOM (QEMU Object Model)` +- `System mode` +- :ref:`TCG (Tiny Code Generator)` +- `User mode` (`Linux` & `BSD`) +- User Interfaces + +More documentation on QEMU subsystems can be found on :ref:`internal-subsystem` +page. + +The Grand tour +-------------- + +We present briefly here what every folder in the top directory of the codebase +contains. Hop on! + +The folder name links here will take you to that folder in our gitlab +repository. Other links will take you to more detailed documentation for that +subsystem, where we have it. Unfortunately not every subsystem has documentation +yet, so sometimes the source code is all you have. + +* `accel `_: + Infrastructure and architecture agnostic code related to the various + `accelerators ` supported by QEMU + (TCG, KVM, hvf, whpx, xen, nvmm). + Contains interfaces for operations that will be implemented per + `target `_. +* `audio `_: + Audio (host) support. +* `authz `_: + `QEMU Authorization framework`. +* `backends `_: + Various backends that are used to access resources on the host (e.g. for + random number generation, memory backing or cryptographic functions). +* `block `_: + Block devices and `image formats` implementation. +* `bsd-user `_: + `BSD User mode`. +* build: Where the code built goes by default. You can tell the QEMU build + system to put the built code anywhere else you like. +* `chardev `_: + Various backends used by char devices. +* `common-user `_: + User-mode assembly code for dealing with signals occuring during syscalls. +* `configs `_: + Makefiles defining configurations to build QEMU. +* `contrib `_: + Community contributed devices/plugins/tools. +* `crypto `_: + Cryptographic algorithms used in QEMU. +* `disas `_: + Disassembly functions used by QEMU target code. +* `docs `_: + QEMU Documentation. +* `dump `_: + Code to dump memory of a running VM. +* `ebpf `_: + eBPF program support in QEMU. `virtio-net RSS` uses it. +* `fpu `_: + Floating-point software emulation. +* `fsdev `_: + `VirtFS `_ support. +* `gdbstub `_: + `GDB ` support. +* `gdb-xml `_: + Set of XML files describing architectures and used by `gdbstub `. +* `host `_: + Various architecture specific header files (crypto, atomic, memory + operations). +* `linux-headers `_: + A subset of headers imported from Linux kernel and used for implementing + KVM support and user-mode. +* `linux-user `_: + `User mode ` implementation. Contains one folder per target + architecture. +* `.gitlab-ci.d `_: + `CI ` yaml and scripts. +* `include `_: + All headers associated to different subsystems in QEMU. The hierachy used + mirrors source code organization and naming. +* `hw `_: + `Devices ` and boards emulation. Devices are categorized by + type/protocol/architecture and located in associated subfolder. +* `io `_: + QEMU `I/O channels `_. +* `libdecnumber `_: + Import of gcc library, used to implement decimal number arithmetic. +* `migration `__: + `Migration framework `. +* `monitor `_: + `Monitor ` implementation (HMP & QMP). +* `nbd `_: + QEMU `NBD (Network Block Device) ` server. +* `net `_: + Network (host) support. +* `pc-bios `_: + Contains pre-built firmware binaries and boot images, ready to use in + QEMU without compilation. +* `plugins `_: + :ref:`TCG plugins ` core implementation. Plugins can be found in + `tests `__ + and `contrib `__ + folders. +* `po `_: + Translation files. +* `python `_: + Python part of our build/test system. +* `qapi `_: + `QAPI ` implementation. +* `qobject `_: + QEMU Object implementation. +* `qga `_: + QEMU `Guest agent ` implementation. +* `qom `_: + QEMU :ref:`Object model ` implementation, with monitor associated commands. +* `replay `_: + QEMU :ref:`Record/replay ` implementation. +* `roms `_: + Contains source code for various firmware and ROMs, which can be compiled if + custom or updated versions are needed. +* `rust `_: + Rust integration in QEMU. It contains the new interfaces defined and + associated devices using it. +* `scripts `_: + Collection of scripts used in build and test systems, and various + tools for QEMU codebase and execution traces. +* `scsi `_: + Code related to SCSI support, used by SCSI devices. +* `semihosting `_: + QEMU `Semihosting ` implementation. +* `stats `_: + `Monitor ` stats commands implementation. +* `storage-daemon `_: + QEMU `Storage daemon ` implementation. +* `stubs `_: + Various stubs (empty functions) used to compile QEMU with specific + configurations. +* `subprojects `_: + QEMU submodules used by QEMU build system. +* `system `_: + QEMU `system mode ` implementation (cpu, mmu, boot support). +* `target `_: + Contains code for all target architectures supported (one subfolder + per arch). For every architecture, you can find accelerator specific + implementations. +* `tcg `_: + :ref:`TCG ` related code. + Contains one subfolder per host supported architecture. +* `tests `_: + QEMU `test ` suite + + - `avocado `_: + Functional tests booting full VM using `Avocado framework `. + Those tests will be transformed and moved into + `tests/functional `_ + in the future. + - `data `_: + Data for various tests. + - `decode `_: + Testsuite for :ref:`decodetree ` implementation. + - `docker `_: + Code and scripts to create `containers ` used in `CI `. + - `fp `_: + QEMU testsuite for soft float implementation. + - `functional `_: + `Functional tests ` (full VM boot). + - `lcitool `_: + Generate dockerfiles for CI containers. + - `migration `_: + Test scripts and data for `Migration framework `. + - `multiboot `_: + Test multiboot functionality for x86_64/i386. + - `qapi-schema `_: + Test scripts and data for `QAPI `. + - `qemu-iotests `_: + `Disk image and block tests `. + - `qtest `_: + `Device emulation testing `. + - `tcg `__: + `TCG related tests `. Contains code per architecture + (subfolder) and multiarch tests as well. + - `tsan `_: + `Suppressions ` for thread sanitizer. + - `uefi-test-tools `_: + Test tool for UEFI support. + - `unit `_: + QEMU `Unit tests `. +* `trace `_: + :ref:`Tracing framework `. Used to print information associated to various + events during execution. +* `ui `_: + QEMU User interfaces. +* `util `_: + Utility code used by other parts of QEMU. diff --git a/docs/devel/decodetree.rst b/docs/devel/decodetree.rst index e3392aa705..98ad33a487 100644 --- a/docs/devel/decodetree.rst +++ b/docs/devel/decodetree.rst @@ -1,3 +1,5 @@ +.. _decodetree: + ======================== Decodetree Specification ======================== diff --git a/docs/devel/ebpf_rss.rst b/docs/devel/ebpf_rss.rst index 4a68682b31..ed5d33767b 100644 --- a/docs/devel/ebpf_rss.rst +++ b/docs/devel/ebpf_rss.rst @@ -1,3 +1,5 @@ +.. _ebpf-rss: + =========================== eBPF RSS virtio-net support =========================== diff --git a/docs/devel/index-internals.rst b/docs/devel/index-internals.rst index ab9fbc4482..bca597c658 100644 --- a/docs/devel/index-internals.rst +++ b/docs/devel/index-internals.rst @@ -1,3 +1,5 @@ +.. _internal-subsystem: + Internal Subsystem Information ------------------------------ diff --git a/docs/devel/index.rst b/docs/devel/index.rst index a53f1bfda5..29f032d6a8 100644 --- a/docs/devel/index.rst +++ b/docs/devel/index.rst @@ -35,3 +35,4 @@ the :ref:`tcg_internals`. index-api index-internals index-tcg + codebase diff --git a/docs/devel/migration/main.rst b/docs/devel/migration/main.rst index c2857fc244..cdd4f4a6d7 100644 --- a/docs/devel/migration/main.rst +++ b/docs/devel/migration/main.rst @@ -1,3 +1,5 @@ +.. _migration: + =================== Migration framework =================== diff --git a/docs/devel/qapi-code-gen.rst b/docs/devel/qapi-code-gen.rst index 583207a8ec..3e26d2d104 100644 --- a/docs/devel/qapi-code-gen.rst +++ b/docs/devel/qapi-code-gen.rst @@ -9,6 +9,7 @@ How to use the QAPI code generator This work is licensed under the terms of the GNU GPL, version 2 or later. See the COPYING file in the top-level directory. +.. _qapi: Introduction ============ diff --git a/docs/devel/testing/main.rst b/docs/devel/testing/main.rst index 91f4dc61fb..9869bcf034 100644 --- a/docs/devel/testing/main.rst +++ b/docs/devel/testing/main.rst @@ -39,6 +39,8 @@ Before running tests, it is best to build QEMU programs first. Some tests expect the executables to exist and will fail with obscure messages if they cannot find them. +.. _unit-tests: + Unit tests ~~~~~~~~~~ @@ -126,6 +128,8 @@ successfully on various hosts. The following list shows some best practices: #ifdef in the codes. If the whole test suite cannot run on Windows, disable the build in the meson.build file. +.. _qapi-tests: + QAPI schema tests ~~~~~~~~~~~~~~~~~ @@ -160,6 +164,8 @@ check-block are in the "auto" group). See the "QEMU iotests" section below for more information. +.. _qemu-iotests: + QEMU iotests ------------ @@ -679,6 +685,8 @@ The above exitcode=0 has TSan continue without error if any warnings are found. This allows for running the test and then checking the warnings afterwards. If you want TSan to stop and exit with error on warnings, use exitcode=66. +.. _tsan-suppressions: + TSan Suppressions ~~~~~~~~~~~~~~~~~ Keep in mind that for any data race warning, although there might be a data race @@ -901,7 +909,6 @@ You can run the avocado tests simply by executing: See :ref:`checkavocado-ref` for more details. - .. _checktcg-ref: Testing with "make check-tcg" diff --git a/docs/devel/testing/qtest.rst b/docs/devel/testing/qtest.rst index c5b8546b3e..73ef7702b7 100644 --- a/docs/devel/testing/qtest.rst +++ b/docs/devel/testing/qtest.rst @@ -1,3 +1,5 @@ +.. _qtest: + ======================================== QTest Device Emulation Testing Framework ======================================== diff --git a/docs/index.rst b/docs/index.rst index 0b9ee9901d..78285ebd6a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -3,6 +3,8 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. +.. _documentation-root: + ================================ Welcome to QEMU's documentation! ================================ diff --git a/docs/interop/qemu-ga.rst b/docs/interop/qemu-ga.rst index 11f7bae460..d16cc1b9f0 100644 --- a/docs/interop/qemu-ga.rst +++ b/docs/interop/qemu-ga.rst @@ -1,3 +1,5 @@ +.. _qemu-ga: + QEMU Guest Agent ================ diff --git a/docs/system/qemu-block-drivers.rst.inc b/docs/system/qemu-block-drivers.rst.inc index 384e95ba76..cfe1acb78a 100644 --- a/docs/system/qemu-block-drivers.rst.inc +++ b/docs/system/qemu-block-drivers.rst.inc @@ -500,6 +500,8 @@ What you should *never* do: - expect it to work when loadvm'ing - write to the FAT directory on the host system while accessing it with the guest system +.. _nbd: + NBD access ~~~~~~~~~~ diff --git a/docs/tools/qemu-storage-daemon.rst b/docs/tools/qemu-storage-daemon.rst index ea00149a63..35ab2d7807 100644 --- a/docs/tools/qemu-storage-daemon.rst +++ b/docs/tools/qemu-storage-daemon.rst @@ -1,3 +1,5 @@ +.. _storage-daemon: + =================== QEMU Storage Daemon =================== diff --git a/docs/user/main.rst b/docs/user/main.rst index 7a126ee809..80a77f0a0c 100644 --- a/docs/user/main.rst +++ b/docs/user/main.rst @@ -1,3 +1,5 @@ +.. _user-mode: + QEMU User space emulator ======================== @@ -42,6 +44,8 @@ QEMU was conceived so that ultimately it can emulate itself. Although it is not very useful, it is an important test to show the power of the emulator. +.. _linux-user-mode: + Linux User space emulator ------------------------- @@ -175,6 +179,8 @@ Other binaries * ``qemu-sparc64`` can execute some Sparc64 (Sparc64 CPU, 64 bit ABI) and SPARC32PLUS binaries (Sparc64 CPU, 32 bit ABI). +.. _bsd-user-mode: + BSD User space emulator ----------------------- From patchwork Thu Jan 16 16:03:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857913 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp281378wrb; Thu, 16 Jan 2025 08:13:33 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX/Onu+WN0jNVJ+dDlV87q7eoAAn0ahuStaiEkcB/0ptjCFuRQkMYLB1W/Ks4Yj13BM2g30EQ==@linaro.org X-Google-Smtp-Source: AGHT+IEd1DT/uWjrGegKa5RUts7yJUe/SbGVyPIdcnjcRZ1mKFBzVM9ArjC07wi5arBoO7qZYfs6 X-Received: by 2002:a05:690c:9a0a:b0:6ef:6035:828e with SMTP id 00721157ae682-6f53130a7d6mr291149087b3.35.1737044013317; Thu, 16 Jan 2025 08:13:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737044013; cv=none; d=google.com; s=arc-20240605; b=M92WSpYLf52sCiLeuHcEw+Tl6Ldf1SWBejToLA4HJnnf2SuU1DCfqU0pQA2PeJDoVM hQPfRSIGwZ3Ldgr4d+0Yf5R/aNtNiSu85W2laqPxuo8ljycymdZ5U2gSIf0+7DuapBZ3 e6NlA2EDlh79+EXc5gbDKA+fOzPergBhKqXIpjkz8g7EehQ+cYOHscCcUQ/8XC9j3onP Wen6r0TZzgvgTeBrnLZGj++E4qu/yafccG/FZMJWc+9rd7Of9Vuggd85lZJ0cPw4F5Tx RqxysGzrYG8RM/TFQJ7Q15r5MUiPzmz1BEF9bCjw61Zh57obE/YVZ2yfs6qOSjDHUP75 Fi5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VHZaaybMQXo6bZA71gPVErDeDk+1E6DxFZkUrlRcO18=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=UGvDBVpr60BZPOd4UiFAMAFH1mazANk7ySB7Z3jg2so59+W9QOY/NYAPHIOQw7m8j2 8ubDZbEGvncVaNIgtBB5XrbyuLfD8IaCB2HMqVNVLDdOxZELwf4+vez4IxSkgXk9mFdL QvIp9nnLaSfgkVu5wBfRpOfJugfDHr7s95DsSDxBgfQw/SU0aPdBKtgIFHhWCuMImnuf UrRYQdf8qsBb0eSar+3PAgFLFfmscCuqxhc8yff160wmdyV6SZ16NhN4iiUMWFhGsJtt xioWLm170+TQMi2LaloefaBgw6o3xM/KpxKtr7b9hWyT6lCPSu+Drl5kbXrCfgEz6vC+ vayw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=siXUytSI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 00721157ae682-6f6e671fa9fsi3983027b3.447.2025.01.16.08.13.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:13:33 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=siXUytSI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSUU-0004X2-Si; Thu, 16 Jan 2025 11:13:07 -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 1tYSTj-0003Wg-7Z for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:19 -0500 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSTd-0004S7-E4 for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:12:18 -0500 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-aaf6b1a5f2bso440642866b.1 for ; Thu, 16 Jan 2025 08:12:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043931; x=1737648731; 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=VHZaaybMQXo6bZA71gPVErDeDk+1E6DxFZkUrlRcO18=; b=siXUytSIYmpujlSQoqhCUjlYPCaSmYArGECmUn918NsFlDy/3+mhoLqjBukY0Xoex1 91nzy87De+tvjIYkeEzyEiopYeHJao4Zyj2eDnxBhpNF6INwJb/LewpWsZDMGL5mokDz 1V/TARid800AIRr6/v219kygP87SPloQvt6EAnLrV5j04+ydNdR0oL0dmmpZQiXyeWmf WowEZ3HIaWnvqppq0GpFf4sPtKrLKl1Q56fSmeh9X+ya0AoUxxn8WO4UcX0c9bCVer7v +dckM0FWLZ5VFqbxLwmg7qOp6LmIfRyAE90hGKIgR6fJmGUpNacNBnE8NiTxdX+g6QbO LA7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043931; x=1737648731; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VHZaaybMQXo6bZA71gPVErDeDk+1E6DxFZkUrlRcO18=; b=C9i8ln+LvWFSNpaRwKDCjSpC5vqWBpOcuCWHBwfCFrZLBlkMchDEks+QxY809TsIO8 ArLZr1P85VckJhPfGfoj3J/MHkh9Dcp4NB0CjIJBPHGQfFgdpj4Auhp1N3f1mSNVOZAe 2pWxoKueqkzL97QpzlXPa8ezKsoF74G3yU/zqgaEHWS6yoxZFxAPeWConR8K+lkzeA60 RRfH5ZCuI1Nbxj+AMIbC8lreMWyqAheVMF2ne+PvHeYqM8Zrzcg7VsS3wWH4HLw4WGrP t+ABnxwDOSttilmNZpsUeFIbOdszibsOZ9l96KsGAn/6uzUEWDJQgpYJZDMGIfUwqN+E Y7mQ== X-Gm-Message-State: AOJu0Yz/dr6OK2NtB5vPxOaWAmp5FYLriu7tobjTT0dLb4ed3SIdCnyi m9pDd7MXI5Cy8xcRG0VDOtteG1H5G13QC550Rww13q1DwPfhoGMc1NVPJs+lXUg= X-Gm-Gg: ASbGnctGdaL5vAfLZGKbUZkhaOxsDXIZJaVxMzBL5HDzl4WWEApsxg2FXlIHUOmxCks kfWE3kFC5TMMufWes/xsEzBoxoJt+iSr3ABjc7ODghsg6q4P+syfDsvFJQgfGrVyxP3PD6j45fk HQ28aRBOa+CcVDJ8DeY/6U+2Haa3rtd1wjPnZB9Blmj6nJLef5A0RKTkfE2qtlbJwA3Fw+1UCmU zTPWU5UCbvjWrUPGwqE1aeCtZ0WRpJtwsN6anP2AlaKEwLjBhIDeyM= X-Received: by 2002:a17:906:35c5:b0:aa6:88be:729d with SMTP id a640c23a62f3a-ab36e4001a1mr278158766b.21.1737043931347; Thu, 16 Jan 2025 08:12:11 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384f86265sm14529166b.130.2025.01.16.08.12.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:12:09 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 272EF608F4; Thu, 16 Jan 2025 16:03:10 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 36/37] docs: add a glossary Date: Thu, 16 Jan 2025 16:03:05 +0000 Message-Id: <20250116160306.1709518-37-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62a.google.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_SBL_A=0.1 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20241209183104.365796-7-pierrick.bouvier@linaro.org> [AJB: update MAINTAINERS] Signed-off-by: Alex Bennée --- v3 - update MAINTAINERS --- MAINTAINERS | 1 + docs/devel/control-flow-integrity.rst | 2 + docs/devel/multi-thread-tcg.rst | 2 + docs/glossary.rst | 280 ++++++++++++++++++++++++++ docs/index.rst | 1 + docs/system/arm/virt.rst | 2 + docs/system/images.rst | 2 + docs/tools/qemu-nbd.rst | 2 + 8 files changed, 292 insertions(+) create mode 100644 docs/glossary.rst diff --git a/MAINTAINERS b/MAINTAINERS index 480902493a..6709a2ea65 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -79,6 +79,7 @@ F: docs/devel/conflict-resolution.rst F: docs/devel/style.rst F: docs/devel/submitting-a-patch.rst F: docs/devel/submitting-a-pull-request.rst +F: docs/glossary.rst Responsible Disclosure, Reporting Security Issues ------------------------------------------------- diff --git a/docs/devel/control-flow-integrity.rst b/docs/devel/control-flow-integrity.rst index e6b73a4fe1..3d5702fa4c 100644 --- a/docs/devel/control-flow-integrity.rst +++ b/docs/devel/control-flow-integrity.rst @@ -1,3 +1,5 @@ +.. _cfi: + ============================ Control-Flow Integrity (CFI) ============================ diff --git a/docs/devel/multi-thread-tcg.rst b/docs/devel/multi-thread-tcg.rst index d706c27ea7..7fd0a07633 100644 --- a/docs/devel/multi-thread-tcg.rst +++ b/docs/devel/multi-thread-tcg.rst @@ -4,6 +4,8 @@ This work is licensed under the terms of the GNU GPL, version 2 or later. See the COPYING file in the top-level directory. +.. _mttcg: + ================== Multi-threaded TCG ================== diff --git a/docs/glossary.rst b/docs/glossary.rst new file mode 100644 index 0000000000..693d9855dd --- /dev/null +++ b/docs/glossary.rst @@ -0,0 +1,280 @@ +.. _Glossary: + +-------- +Glossary +-------- + +This section of the manual presents brief definitions of acronyms and terms used +by QEMU developers. + +Accelerator +----------- + +A specific API used to accelerate execution of guest instructions. It can be +hardware-based, through a virtualization API provided by the host OS (kvm, hvf, +whpx, ...), or software-based (tcg). See this description of `supported +accelerators`. + +Board +----- + +Another name for :ref:`machine`. + +Block +----- + +Block drivers are the available `disk formats and front-ends +` available, and block devices `(see Block device section on +options page)` are using them to implement disks for a +virtual machine. + +CFI +--- + +Control Flow Integrity is a hardening technique used to prevent exploits +targeting QEMU by detecting unexpected branches during execution. QEMU `actively +supports` being compiled with CFI enabled. + +Device +------ + +In QEMU, a device is a piece of hardware visible to the guest. Examples include +UARTs, PCI controllers, PCI cards, VGA controllers, and many more. + +QEMU is able to emulate a CPU, and all the hardware interacting with it, +including `many devices`. When QEMU runs a virtual machine +using a hardware-based accelerator, it is responsible for emulating, using +software, all devices. + +EDK2 +---- + +EDK2, as known as `TianoCore `_, is an open source +implementation of UEFI standard. QEMU virtual machines that boot a UEFI firmware +usually use EDK2. + +gdbstub +------- + +QEMU implements a `gdb server `, allowing gdb to attach to it and +debug a running virtual machine, or a program in user-mode. This allows +debugging the guest code that is running inside QEMU. + +glib2 +----- + +`GLib2 `_ is one of the most important libraries we +are using through the codebase. It provides many data structures, macros, string +and thread utilities and portable functions across different OS. It's required +to build QEMU. + +Guest agent +----------- + +The `QEMU Guest Agent ` is a daemon intended to be run within virtual +machines. It provides various services to help QEMU to interact with it. + +.. _guest: + +Guest +----- + +Guest is the architecture of the virtual machine, which is emulated. +See also :ref:`host`. + +Sometimes this is called the :ref:`target` architecture, but that term +can be ambiguous. + +.. _host: + +Host +---- + +Host is the architecture on which QEMU is running on, which is native. +See also :ref:`guest`. + +Hypervisor +---------- + +The formal definition of an hypervisor is a program or API than can be used to +manage a virtual machine. QEMU is a virtualizer, that interacts with various +hypervisors. + +In the context of QEMU, an hypervisor is an API, provided by the Host OS, +allowing to execute virtual machines. Linux implementation is KVM (and supports +Xen as well). For MacOS, it's HVF. Windows defines WHPX. And NetBSD provides +NVMM. + +.. _machine: + +Machine +------- + +QEMU's system emulation models many different types of hardware. A machine model +(sometimes called a board model) is the model of a complete virtual system with +RAM, one or more CPUs, and various devices. It can be selected with the option +``-machine`` of qemu-system. Our machine models can be found on this `page +`. + +Migration +--------- + +QEMU can save and restore the execution of a virtual machine between different +host systems. This is provided by the `Migration framework`. + +NBD +--- + +The `QEMU Network Block Device server ` is a tool that can be used to +mount and access QEMU images, providing functionality similar to a loop device. + +Mailing List +------------ + +This is `where `_ all the +development happens! Changes are posted as series, that all developers can +review and share feedback for. + +For reporting issues, our `GitLab +`_ tracker is the best place. + +.. _softmmu: + +MMU / softmmu +------------- + +The Memory Management Unit is responsible for translating virtual addresses to +physical addresses and managing memory protection. QEMU system mode is named +"softmmu" precisely because it implements this in software, including a TLB +(Translation lookaside buffer), for the guest virtual machine. + +QEMU user-mode does not implement a full software MMU, but "simply" translates +virtual addresses by adding a specific offset, and relying on host MMU/OS +instead. + +Monitor / QMP / HMP +------------------- + +The `QEMU Monitor ` is a text interface which can be used to interact +with a running virtual machine. + +QMP stands for QEMU Monitor Protocol and is a json based interface. +HMP stands for Human Monitor Protocol and is a set of text commands available +for users who prefer natural language to json. + +MTTCG +----- + +Multiple CPU support was first implemented using a round-robin algorithm +running on a single thread. Later on, `Multi-threaded TCG ` was developed +to benefit from multiple cores to speed up execution. + +Plugins +------- + +`TCG Plugins ` is an API used to instrument guest code, in system +and user mode. The end goal is to have a similar set of functionality compared +to `DynamoRIO `_ or `valgrind `_. + +One key advantage of QEMU plugins is that they can be used to perform +architecture agnostic instrumentation. + +Patchew +------- + +`Patchew `_ is a website that tracks patches on the +Mailing List. + +PR +-- + +Once a series is reviewed and accepted by a subsystem maintainer, it will be +included in a PR (Pull Request) that the project maintainer will merge into QEMU +main branch, after running tests. + +The QEMU project doesn't currently expect most developers to directly submit +pull requests. + +QCOW2 +----- + +QEMU Copy On Write is a disk format developed by QEMU. It provides transparent +compression, automatic extension, and many other advantages over a raw image. + +qcow2 is the recommended format to use. + +QEMU +---- + +`QEMU (Quick Emulator) `_ is a generic and open source +machine emulator and virtualizer. + +QOM +--- + +`QEMU Object Model ` is an object oriented API used to define various +devices and hardware in the QEMU codebase. + +Record/replay +------------- + +`Record/replay ` is a feature of QEMU allowing to have a deterministic +and reproducible execution of a virtual machine. + +Rust +---- + +`A new programming language `_, memory safe by +default. There is a work in progress to integrate it in QEMU codebase for +various subsystems. + +System mode +----------- + +QEMU System mode provides a virtual model of an entire machine (CPU, memory and +emulated devices) to run a guest OS. In this mode the CPU may be fully emulated, +or it may work with a hypervisor such as KVM, Xen or Hypervisor.Framework to +allow the guest to run directly on the host CPU. + +QEMU System mode is called :ref:`softmmu ` as well. + +.. _target: + +Target +------ + +The term "target" can be ambiguous. In most places in QEMU it is used as a +synonym for :ref:`guest`. For example the code for emulating Arm CPUs is in +``target/arm/``. However in the :ref:`TCG subsystem ` "target" refers to the +architecture which QEMU is running on, i.e. the :ref:`host`. + +TCG +--- + +TCG is the QEMU `Tiny Code Generator `. It is the JIT (just-in-time) +compiler we use to emulate a guest CPU in software. + +It is one of the accelerators supported by QEMU, and supports a lot of +guest/host architectures. + +User mode +--------- + +QEMU User mode can launch processes compiled for one CPU on another CPU. In this +mode the CPU is always emulated. In this mode, QEMU translate system calls from +guest to host kernel. It is available for Linux and BSD. + +VirtIO +------ + +VirtIO is an open standard used to define and implement virtual devices with a +minimal overhead, defining a set of data structures and hypercalls (similar to +system calls, but targeting an hypervisor, which happens to be QEMU in our +case). It's designed to be more efficient than emulating a real device, by +minimizing the amount of interactions between a guest VM and its hypervisor. + +vhost-user +---------- + +`Vhost-user ` is an interface used to implement VirtIO devices +outside of QEMU itself. diff --git a/docs/index.rst b/docs/index.rst index 78285ebd6a..5665de85ca 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -20,3 +20,4 @@ Welcome to QEMU's documentation! interop/index specs/index devel/index + glossary diff --git a/docs/system/arm/virt.rst b/docs/system/arm/virt.rst index 766a7455f0..0c9c2ce035 100644 --- a/docs/system/arm/virt.rst +++ b/docs/system/arm/virt.rst @@ -1,3 +1,5 @@ +.. _arm-virt: + 'virt' generic virtual platform (``virt``) ========================================== diff --git a/docs/system/images.rst b/docs/system/images.rst index d000bd6b6f..a5551173c9 100644 --- a/docs/system/images.rst +++ b/docs/system/images.rst @@ -82,4 +82,6 @@ VM snapshots currently have the following known limitations: - A few device drivers still have incomplete snapshot support so their state is not saved or restored properly (in particular USB). +.. _block-drivers: + .. include:: qemu-block-drivers.rst.inc diff --git a/docs/tools/qemu-nbd.rst b/docs/tools/qemu-nbd.rst index 329f44d989..4f21b7904a 100644 --- a/docs/tools/qemu-nbd.rst +++ b/docs/tools/qemu-nbd.rst @@ -1,3 +1,5 @@ +.. _qemu-nbd: + ===================================== QEMU Disk Network Block Device Server ===================================== From patchwork Thu Jan 16 16:03:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857905 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp279624wrb; Thu, 16 Jan 2025 08:10:37 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX2Ztzlfu75WsGBRAtkQMXqQpKUE4lYme/sAg408JJ4UFCdMUX5ljHnUXKI1Erv+Q09Hrn1Mw==@linaro.org X-Google-Smtp-Source: AGHT+IF725K7Z9etHezvrxI/DlTcCk6jBz+CaHdA+0HbCnIuErdI0eVVe0Px0PX8ypgU/pv6b281 X-Received: by 2002:a05:6214:e83:b0:6d4:3437:d858 with SMTP id 6a1803df08f44-6df9b22e404mr526821646d6.25.1737043836831; Thu, 16 Jan 2025 08:10:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737043836; cv=none; d=google.com; s=arc-20240605; b=PvCIv0c0eikY0BfsBw2OCz8gxqZtVq7gmjEQ+aVgp53XODgUjtJPgfT0YJbNkFS5No eMrf+CKh5hqWurmGUKi9OE49A44Tt6DqpiUz3Gh79EJ2m8tZX8AEXxAQNt/sd/zU+FQ/ tMq31vUZQPgWcS6pWqi55FlO9uplxrtqvjFZc1x4KGt8Fp9m7KLy0CBvq371V5Y3N2iJ byLm2fIIHxcUlwPS/wLCkoVSg/m2hNIeBbI/U/UDGrPJ4MCL7hCeWY/9iuhfpWJzxpOE GnRUP9qqgwWEQmasv8+vFrx+Vm635h8JL9/YZTnMjK0nOuEBQC/XbWFaOYfO1pyArBHZ Bm5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+2KBORBltMfs4JjAXKxZruuaRZjbGhUmZm0A1SXI8IE=; fh=LWJxUxOPIoAG7kV40OipmNLMiNyFM+gQ1dWz4vBqJQ4=; b=Y2JUECZNgg/ixvk/BT7VUqPspk6ZZHJMDzKj5PYAdKxli1PAom3SxTKbZQzDcRuBcM PTE6b82DiftPtP38WnqKRIn3ThxeqVFxO1og5riRBaBIVfaV4Z6rI0VKy0J2rskCG8rl h5p8NBAU9psOGA1OMKwild9G7lWcLD7/GAmVoYugAEwnmZL5GbtttUP0m1Twf+gPmEvQ eX+gqrdLbTeK3gqYTMwnvgyjiXSfTodLEpGjOYXHm3WPyHXxjmIV0GSN5/q1npJNjQn5 dQTMF0CTFcmAAIbe8KswOjghiBu9ATzLtlmCr1Tst4Z7/sQnaCPdp7wJQwv7xaz+pPqx +8SQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lHEi6K20; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e1afc1b82asi2702556d6.106.2025.01.16.08.10.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2025 08:10:36 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lHEi6K20; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYSNM-00075o-MP; Thu, 16 Jan 2025 11:05: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 1tYSLG-0003dV-5I for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:34 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYSL4-0001Kx-Qs for qemu-devel@nongnu.org; Thu, 16 Jan 2025 11:03:33 -0500 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-3863c36a731so964771f8f.1 for ; Thu, 16 Jan 2025 08:03:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737043401; x=1737648201; 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=+2KBORBltMfs4JjAXKxZruuaRZjbGhUmZm0A1SXI8IE=; b=lHEi6K202B+QlIZJrcClU4pBIP4qPYJdmDdZdP5gexYL3mlMeL5xpYsLAkRk2jchaA W6OjiP0KlUiy+YlM2OZLgiTPn0LeO0o5tkKXWyw+rOOrkLJYiIJoP69m+vdspVnIU/eH H7gXNL+iEeTVkPyfvcuqLT2VihHDZrUID5vXuL0YMD+5I+T/qXrdRRkdXS9XuZhY8cir AkM/VujGioc1rboKn99a64lQQBHZzYj0QA6nrAiLklPZzGyUfP7UsMT89T1Lq6Q9djkP dl0DHgiVY5B+9SKjDMkxWGOq4ZB4yzwr7VF7J089/WUBdk3zE1XheFAcsm3hW9msYML0 z0xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737043401; x=1737648201; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+2KBORBltMfs4JjAXKxZruuaRZjbGhUmZm0A1SXI8IE=; b=oXmPQhRIHkfIPXmm49Xdt9fTOiR0gREivCwq83v5Xt3BtKAoGdJ95xC3GmVBUl2Nxf er/t6hYjPBtcYzA+F0iH5ZdFJj4E0yTcZHjRp2QH8bEADq/06KbRg7+JcNkQzVyXYQFP GWbKJVBtp3y5yNrLNg/uxze3pX3NQ6N/j8T3t794jes/WPfJyyvQjfLZP+p3EwG1VC2M 3CtJbvxM2qPjTpMFRaRQqhjKMdl1pnBo2TdtrqL3eFTet/1/dbn2AljCgr4yJy/sjztc 97xWYJ6ik24z0PfL53VHlkSs3fSGu8A9BxzsFkGCdNfHubm3pCjU72VmCms7+mEqiB11 OgUg== X-Gm-Message-State: AOJu0Yw9DFslocW00nM03y3V2N0Owlh+HNRZUpLg4RCv2+bd4Ch+YCaN VhC/67CDX303zr8Ssu73NrdjmqXBkUHDEEDtdHrgP38iDqFhe3XhogrAg83lcDo= X-Gm-Gg: ASbGncs/D4T+276AYh8aWXz16JJh3uLUKaBflniwvqUIdaY43ja9i0qlyVgDz+PRz97 amPGU7dgB2SvIiBgNZxRzZrX7RAQbEOH/8pffKbC3uHTps3J0IAvORnDzCXBz4mx3VDD8PHPSyL K4CMKnFkg3VByEpRkRQDgNlQuKW5+Tv53MaWiUHAJmJQy6L8FBH9PsKDqTUo211MnuctpAivaip v76mLTG9mQOVIKGufapwMn68RIlFna0BfEmmXkuXOqdMuf4hlMiENE= X-Received: by 2002:a5d:6485:0:b0:38b:eb7b:316 with SMTP id ffacd0b85a97d-38beb7b043fmr3484175f8f.47.1737043400466; Thu, 16 Jan 2025 08:03:20 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf3275562sm205273f8f.66.2025.01.16.08.03.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 08:03:18 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 3F10C608F5; Thu, 16 Jan 2025 16:03:10 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Yuri Benditovich , Jason Wang , Cleber Rosa , "Dr. David Alan Gilbert" , Peter Xu , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Stefano Garzarella , qemu-arm@nongnu.org, Michael Roth , Laurent Vivier , Mahmoud Mandour , Andrew Melnychenko , Konstantin Kostiuk , Kyle Evans , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , John Snow , David Hildenbrand , Fabiano Rosas , Alexandre Iooss , Eric Blake , =?utf-8?q?Alex_Benn=C3=A9e?= , Vladimir Sementsov-Ogievskiy , Pierrick Bouvier , Kevin Wolf , Peter Maydell , Laurent Vivier , "Michael S. Tsirkin" , Thomas Huth , Warner Losh , =?utf-8?q?Dan?= =?utf-8?q?iel_P=2E_Berrang=C3=A9?= Subject: [PATCH v3 37/37] scripts/nsis.py: Run dependency check for each DLL file only once Date: Thu, 16 Jan 2025 16:03:06 +0000 Message-Id: <20250116160306.1709518-38-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250116160306.1709518-1-alex.bennee@linaro.org> References: <20250116160306.1709518-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Stefan Weil Each DLL should only be checked once for dependencies, but several hundred (781 in my test) unneeded checks were done. Now the script is significantly faster (16 s in my build). Signed-off-by: Stefan Weil Reviewed-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20250111215244.1680931-1-sw@weilnetz.de> Signed-off-by: Alex Bennée --- scripts/nsis.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/nsis.py b/scripts/nsis.py index 03ed7608a2..af4e064819 100644 --- a/scripts/nsis.py +++ b/scripts/nsis.py @@ -37,10 +37,10 @@ def find_deps(exe_or_dll, search_path, analyzed_deps): analyzed_deps.add(dep) # locate the dll dependencies recursively - rdeps = find_deps(dll, search_path, analyzed_deps) + analyzed_deps, rdeps = find_deps(dll, search_path, analyzed_deps) deps.extend(rdeps) - return deps + return analyzed_deps, deps def main(): parser = argparse.ArgumentParser(description="QEMU NSIS build helper.") @@ -92,18 +92,18 @@ def main(): dlldir = os.path.join(destdir + prefix, "dll") os.mkdir(dlldir) + analyzed_deps = set() for exe in glob.glob(os.path.join(destdir + prefix, "*.exe")): signcode(exe) # find all dll dependencies - deps = set(find_deps(exe, search_path, set())) + analyzed_deps, deps = find_deps(exe, search_path, analyzed_deps) + deps = set(deps) deps.remove(exe) # copy all dlls to the DLLDIR for dep in deps: dllfile = os.path.join(dlldir, os.path.basename(dep)) - if (os.path.exists(dllfile)): - continue print("Copying '%s' to '%s'" % (dep, dllfile)) shutil.copy(dep, dllfile)