From patchwork Fri Jan 17 13:42:20 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: 858170 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp704482wrb; Fri, 17 Jan 2025 05:43:45 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUXmyWTl+aWaIyjZUXyaHHGXnyf1Mym1uYv4s61xtXMzZWw3obi/lDMx7cRBQqzPNjVbqFhiw==@linaro.org X-Google-Smtp-Source: AGHT+IFeFblwKHdtkFGbkKaPrsZLCFLr0bv7KIsPMZ2WLoDC3LMX0RPTrNCeFUd+cVbPPHvY+g/6 X-Received: by 2002:ac8:5814:0:b0:46a:2876:d667 with SMTP id d75a77b69052e-46e12a56144mr41537751cf.18.1737121425109; Fri, 17 Jan 2025 05:43:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121425; cv=none; d=google.com; s=arc-20240605; b=eatm+bIk4jDDCCAwNY5AK+3f4YemY3aX5Jn+Rg6TIJ6EvFoPIBVAAQRXz+HbL2F/Vj FXgWLsyhXRn8b7ZNz0lZK/+YTaK8ngzQUhL+IQpzfo3ki0JvKXS/L1gdBWEz/JzMZTvG 8pX7Z474mWO+aXF1VdbG6R1Yk9PRpvSGErIQKcjCClfwfNIcq8yUT9JBa8wGv+aPfS3m tGs3cGuOtqu9cLKzTA41yzUHWnVTjeWYzsRnYN3oPF0CFB63Wqgzje4AMRlW/CWuJJHz 4iSlVM4yuA9Q2bR+ctnOObTbpDyWKNYUpvWx6wFMBVkc5rE3zsbGzJfciom+m/OIxk/U iORw== 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=SPhUiahc8AcG/DudZ+NnvJ9oGMqaRHCp9nDZpFVSZuQ=; fh=Gx9DtyNvQGBGx72Z12no3KggLYwBGD0Je53Cblw8uQs=; b=di2/h+/nRNpi7klMI/D0pMUmzMYUgWmloWRWbABAD/o2ftpSYfqF3DjOYIyAZsgCR4 35lNd6ZUUTe7A1pveEK1oM+qe4MubCZXXqYEs9Md2p3UHPg2E3FKD/xSQT6HDBno2LZb vNCPY2noCo4bJMstV+Spd/uI+fWvT2R/lvy3StVpX4ArsVob2OE+yjxS8A8G7KQR+nFD Vz8V7PpFj2wYVY6HKAL8lt2tIrZi9dRLtnUGQwxEU5qHs24iBsGBoxg7r4waiHxl0AxZ hioC84Ln5RcKC4tw/ghhoTHYnG6vyZHaFeW+bk3CbR0avlS2gqaNY2B+dVtTWrb70zI+ UhkQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QYRYaxln; 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-46e102f2926si24198071cf.13.2025.01.17.05.43.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:43:45 -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=QYRYaxln; 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 1tYmd4-00014b-Ha; Fri, 17 Jan 2025 08:43: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 1tYmcu-0000x9-JF for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:08 -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 1tYmcq-0002CP-7w for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:06 -0500 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-aa67ac42819so328466466b.0 for ; Fri, 17 Jan 2025 05:43:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121378; x=1737726178; 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=SPhUiahc8AcG/DudZ+NnvJ9oGMqaRHCp9nDZpFVSZuQ=; b=QYRYaxlnaVtvi9VsrJl6JYzdghVQlTuNtC5Rrqe5skykCMHTWbbKQ31mhVgDthvY1b ylzNOv4rxFJbmgtTLQ90NKH88YsiYG/o8iVP604iQRI4kRYy2Vq9Ti72QN2iMwF/iC0U xBZpS5H1hJVK1yxUv3x9auZP3+wV01wkPw82nWB3MqTfhES/LwKAk4X/edJMwVbu87Rg 5AXvS+E1E9OXV69xEH+2jVsJLhJ3crA/3nq3PjZMPF27oGsjhE8JrmctLFdjnnIuDSOx Wu9C9YSTfEfSLs2Qr9B4wHQiuAhC/99vauOqIiqJHyX4Z85LAfLTZ7xJiMNkRwfcGX0m K4qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121378; x=1737726178; 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=SPhUiahc8AcG/DudZ+NnvJ9oGMqaRHCp9nDZpFVSZuQ=; b=l1uPKAGEr1tUS0JPE8u4YtYU0d+UhrKo3ARFpKlCQj4S3SgyEqHZ+PcV5Az2LuwNZn 4miFtGdV+z2FtUnJWFfDYJPxVmOPvQ5uzSe1n6bKpsFO20m8HolXfQHvEI99alwRqYjl WZQb39dRVJuIRtqUNBCabCU5/TDbQCynUdMlSMIc90pZps/sjTgGxrQbUbU2HvjNereu PPmzixPpfbz8hnYwRe60jAVBq3Nfz5wxnAQtXCOfSzojGkcXcqRBBKEH6bVTMRLSI/70 J7gS0F8otAAZ42qBtDN5AUkOyeMGR+xpG2jR4YsvawNDA/1YeVIa/CkAi5dgIqffHKMg GsXw== X-Gm-Message-State: AOJu0YwUteDWWV3lijE4HDX7BiJPANmtQJSwuNA9QrzBuTj9ZvlQ9mZ1 JaChwOJPFuci0ikiM3jLc8DX5gpHXAilNxQoyT+VnDO4eJVghE2lgY5eAJTHij7m2bi0pJ9fmFG AnWw= X-Gm-Gg: ASbGncsiTP0blQlFEv0xVf+Dvaelkv4QxBSCrHa0pTX+LfgX9nNKmDtQto94zIW47n+ zyKKM/4N695Imh9BZBJVleFfBsgaFif1AnD+WcH0/2g8xdkHti5StgktgZ946RxVnVeW0E8mYCk xbXaHq3ECqYGJX81KICr5XaF4iFl462deWmkG3FmJfOCMW6bQoK5SH4x6XgwHpKI5asPjjVSyCM z1+hOl+PBIf8jmfdnFQfFR/DIFMBTuJPMAEVfM9mpf1iySuHdldKwc= X-Received: by 2002:a17:906:6a20:b0:aac:23f4:f971 with SMTP id a640c23a62f3a-ab38b1b45e1mr280462566b.33.1737121378166; Fri, 17 Jan 2025 05:42:58 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384f22fd2sm171481766b.110.2025.01.17.05.42.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:42:57 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id F1D386084C; Fri, 17 Jan 2025 13:42:56 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier Subject: [PULL 01/37] semihosting: add guest_error logging for failed opens Date: Fri, 17 Jan 2025 13:42:20 +0000 Message-Id: <20250117134256.2079356-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-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: -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 usually indicates the semihosting call was expecting to find something but didn't. Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-2-alex.bennee@linaro.org> 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 Fri Jan 17 13:42:21 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: 858183 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp705163wrb; Fri, 17 Jan 2025 05:45:19 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVHBoXXGT+fVAJ9YRsB8qX+WDjY9sHmg0N9ogNL83kmeqfsq/wnLt2OqgP9b8002eqFgCpcbw==@linaro.org X-Google-Smtp-Source: AGHT+IEXDtatCEENunZD9lmxgk0XJMygj6eIPbJ43aRw9ju5IYwvAAzQ+RLUxh50Ax8FxWqZlbli X-Received: by 2002:a05:6102:5106:b0:4b6:3700:d74a with SMTP id ada2fe7eead31-4b6909bd57fmr1733315137.0.1737121519449; Fri, 17 Jan 2025 05:45:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121519; cv=none; d=google.com; s=arc-20240605; b=CgZLfSzjFJmq/8yJ543ElJyGnqWdUghE08mNZR2etc121cxwJZcOKgEGkSDlNpjhDz /8/kQ9UlNUArf+evACzOqKfQs4xtXkoh52s69TMSqRmOq3s1/cY4HY6PqHNbFBNQHT3i sr9Ng4I6K8IXHkDim0GmrKmzUqL5tPj1HqwGQdd4jsnKsFo0kWBH510OxwMN7XMiGM3+ 3mM2HcBWfqOVQS9eBknSOXavPsqk3cSBq9NrpErGW17kF9G34g21ylJ8uPafgijIL8Mh xi93ekk9MMx172OAbGxPATFx2bGOiinViQv1maxTz+QY05dUOXurdsyqN8Dy3ItaCz4x 1u+g== 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=HvyvcMT5Ik5FGrm6V5mlorp+UlJN6JEGaToeVYNLLOk=; fh=Blf2oUU/YG0QI3K9EaXy3qgSFUqguV8JMcvhxUv3o9M=; b=JvOwgT8y5a79fzxDNdYHslD3f/QFbusaz3jHW45ShVtiUsBFbBGZaZqa3zEOdfdYv3 1kH8Kmm8Ybn0uq6Rs/48CwDAsDS9pK+kzYzcWC5Uomq26MPr+5ChmJnI3Vau50dp9SmY WlDWIIXAZV4tnVWiJqv/cQV80UokiVkGAaPebgKmflZPr8wOcbRFX3jY+2vQKuSLhDcJ SEkMC+o3rnMFEGU2giL83TfoNk3xKgk7QmYyUOvV7YmViai9qwPjckUuoE4/yfXUdjod Ez94ac9cPreO363q006I57Ln/16ZGtswLtzlEqCJtWR7o5kshisErMqTWpe0LyRzfzdu vDgQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eUqBOWaN; 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-4b68a1b0608si846541137.110.2025.01.17.05.45.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:45:19 -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=eUqBOWaN; 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 1tYmdA-000189-Bf; Fri, 17 Jan 2025 08:43: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 1tYmcu-0000x2-Gw for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:08 -0500 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmcp-0002CR-1g for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:05 -0500 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5d0ac27b412so2822743a12.1 for ; Fri, 17 Jan 2025 05:43:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121379; x=1737726179; 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=HvyvcMT5Ik5FGrm6V5mlorp+UlJN6JEGaToeVYNLLOk=; b=eUqBOWaNpZszfBaqsHYyNC/Zqb9cJv1JtN3sMKDijEeuYGl3O+qgdZuOynEPskL37y WKjwK9xL406c3JAl7EjfapiY2oDFdUGNteUNNT/ZO4Xh0OHMSNmmQbvhP1DyTHUZwGXQ dyw+0RzbCcre/Y7xB7VPPOgpn4TkC+9YEFqW7HDTWHl/ROdxPcto0XHlxkGWHIx8ufzO /VAzwW1iSYE22QhdvRNejcAn9IvGr5DcMFABXOvcCt56xbJ3enGFWjmjapw/WhJcVWWo H+MBwuDjlVTe214Mbm0MNlqoD5h32k8u13IgXYfpdoLGKE3zdpTGwpjFw65xV6hKNbPY rucw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121379; x=1737726179; 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=HvyvcMT5Ik5FGrm6V5mlorp+UlJN6JEGaToeVYNLLOk=; b=X9FXAv45vIa2LS8eYroHl4UWZTh2mhMcr/jS7IoDaS1ac6ur4Z8fkDsJLEvWunOa/C cMY26HVYho9udfMmUer3L+wR4ikDw4aKwepLU0cuwyf47KeTkmJcyFEWu688KeyJAo1E lA5gE8GESeCB/LdDys+vhYxFHx7Htp+2vXT/zANPvECcvQ/wXxvweyy8VIObqOwEBr2W zOomB548CxuBHNQROl2/ETiDzGEPbS32PI9NPB8CVue0N6iTU+qTSjLIUs+ZRRmk0bTm XHwYII2p8xDDYK3HaWWKcNGo8vkpV2xzTD16PTR0dUmBxEaGqHoVGbkbJcA2uf7yKfH5 iJew== X-Gm-Message-State: AOJu0YxH7V9rpKCBXqoxflC3xXOs/CxBAnYVKcBonf/CCbJfUnU3xVSy jqHx6k5JdieRv9NNecESS2drLlR7AEaNa0JXxea+BYklHRGl30FAbCspLo7qC78= X-Gm-Gg: ASbGncu3k2nE+WVwHUpVrJQxHzkd2ePSsGM3uZQMTlXNookcPxF619yqTpBt9LcpFHH RdIm+Q0CjQOKoWEc2fWeRWITqPKhgZmEAPE/odDSmxh7aBa1iK5MR27WS3I86VHTrowEoZQVfA4 gtLYYMcG2lQr+V/uqS7q1LL5mMqhdVlopEWemB9O6o5mqOVHExzz8RkqAmtLznbwBpklyI3iOFm RWHUYc+Y2y/zuHXy8z+uRGUyaJR+yV5gxQCkO7P7diTx2AgqK0oT0k= X-Received: by 2002:a17:907:7e95:b0:ab2:ffcb:edb4 with SMTP id a640c23a62f3a-ab38b162801mr210575466b.25.1737121378573; Fri, 17 Jan 2025 05:42:58 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384f87d5asm170559766b.124.2025.01.17.05.42.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:42:57 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 1300C60853; Fri, 17 Jan 2025 13:42:57 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= Subject: [PULL 02/37] semihosting/uaccess: Briefly document returned values Date: Fri, 17 Jan 2025 13:42:21 +0000 Message-Id: <20250117134256.2079356-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52b.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 Message-Id: <20250116160306.1709518-3-alex.bennee@linaro.org> 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 Fri Jan 17 13:42:22 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: 858172 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp704489wrb; Fri, 17 Jan 2025 05:43:46 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUA2JhkYyCyFiFApVg0OWmaUgYiKnGFW3ij1ObbYx+RA0vJZ+2aYyQfdH+oHSVGkAnVQCn6cA==@linaro.org X-Google-Smtp-Source: AGHT+IGKxTS3N4uz78gY0Ok+1t6m3VIS7f9HlchvHyVXLVAJZ0s56Ewn3z3Ps3KA73Qi6FPRQq23 X-Received: by 2002:a67:c41a:0:b0:4b6:8bd1:6b5d with SMTP id ada2fe7eead31-4b68bd1722cmr2690079137.1.1737121426069; Fri, 17 Jan 2025 05:43:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121426; cv=none; d=google.com; s=arc-20240605; b=L6USrwnLldJs4OQJb99s3ckAJqXXghuTec+i/Kqrx/lLsVjw4UycxpVxtY1yJ9L4IJ HS8D8kaExx7EU1iTmLXn528+FhewsD1giUxXP04lqKdEYBjbPJFxXXv15aS+xeW5LXur WZQprjUhES3b4x5iBrwMQgNpT4/1zXYUV7SmOliC3tZKo/2TtV2kapyRtHvU3mfepEpD b/lGHHAuxFzdXQvp78u+ocCpuuNwHuUWyeHHnu8Uu4NE+7xZ0INQ5pMyILGP8ub8cKLu EZgyGkCyXLNZojBDqjOr5114WlTJX0lv+6HKppBhIKmnMJxURxkbgGA7TROlADi0cpSq CAew== 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=iXBLUkL8+yV2RgOy7GvclV3RoZ3IJx6imsmC3PeKgzg=; fh=Blf2oUU/YG0QI3K9EaXy3qgSFUqguV8JMcvhxUv3o9M=; b=L/9Hv1OeshY70jgVY0KsC8h8jshBWINapX239AonKPZ5mv+xM7k4noLZXdFUaYuSbR 6TF8aTWKFs/3z0nBX2LtwYzAiklEd/2XT2uIQJ7ZxNUSGvrtdN+2tFmJ7/8f2whDfHDi caDSMYMMA4Af6voLybMhadVrYSZbRl2Z3YDel3OZCVPEEJDr/USysSH4kUJ3dvd5slcH IbmAmD+SjcJdxGsArSKZ4/+5N+M6pvQZ/ih4BK0L/7yoCFizufKM7EldB+bUD1LCtL8Z gxkMs54YXWLE9lbSYMBJRGnuTFsbvbltUrzrA2c5l3LTTYb/m9FL84kka0Oh38eVQsky /20Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GVokmrSd; 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-4b68a37c43fsi1081288137.642.2025.01.17.05.43.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:43:46 -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=GVokmrSd; 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 1tYmdM-0001Hu-Un; Fri, 17 Jan 2025 08:43: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 1tYmcu-0000xH-Jg for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:08 -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 1tYmcq-0002CS-7x for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:07 -0500 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-ab2c9b8aecaso329038566b.0 for ; Fri, 17 Jan 2025 05:43:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121379; x=1737726179; 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=iXBLUkL8+yV2RgOy7GvclV3RoZ3IJx6imsmC3PeKgzg=; b=GVokmrSdyT/lwVZRQaZofRkTOLzLgB493e+eKcmLXCkXZ2bUarJBrJqogyNVspnN61 +aEolV7NbFb5/WatLbfZZiK6ImDE9+Loy7c8IjoAd20Qgh2e6dtwsPPCEE59yHSFz+cL 1zdRMfZO3MMZ/804uAZUI4hPuT8TaxM5iiATtfMGvGgu5Jv0N0GykNcDVKF0KjuqMJxl g/zGUWTX5pwJ0C5rvUhP2HZFC/JPryLGoAlPeMaBm/QsNL/1B7ksuWkQjihgVgaZ4VW/ foXhzUnl30GabcsMZrSWLznfHuSxgfe/kDhMXgN4a9Czx/dFdGYFhcNBOA3D9kh4b+uj 5wyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121379; x=1737726179; 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=iXBLUkL8+yV2RgOy7GvclV3RoZ3IJx6imsmC3PeKgzg=; b=oOVzLuUTDC6BtRAuVwL7zIHUf4oRHHGE7PdSjvyi4trlme7BGaxTRodwEy7tGkWfXP z+ydLVEsWhR3jV2DiNEEbuDl8G1Jwit3uTDF1Vu2O85AgjvICIA7QP8gQf3v/H6FhuOo yaIA3mFn0ceq8ak1x8EH9pVnQ5g17SuQu47Cv4g9UzhvHE/JB2dPLlTT7W9Dmxtrpx6T arpYnbo+eh69h9dnN3djSaiWtcm1bWwDQUKm/WM6FL/C6gbAEtGrxKycuKdRrWxJm5oK c/4bO016F+GrSRSUHV/WVSbIMI2eJ6R9c0f8Y/6niBpPoJ3CVxDQ6mPLmkJHgF6eF3ek CsCw== X-Gm-Message-State: AOJu0YxkGQcd6RFLvpS3pJ1M9afJVIvdG6AQSVfzZflnDjDjsFW39C5s VhIzAyvmkpqlOdgnUv+nQvoQYDtTZAb33b0cfN2ol2P+9T4pXqEJ6VZOVFfRZOI= X-Gm-Gg: ASbGncvf7GNHlVKkohnNU6uMVLHF/3qrYXvChKf3+EBQGWK5YmcdvUfBfLAyrbfaU3X 5M3je9LvNey13wdljIY1M7WNR0KgcU+fYpbJrjP8scA8HS0m/cU3v36We/LIEAeVfyQxaicgUai tLJBnLgEjhViF0Q2IL676/lkZ2Xytt1Jy3tgWSumfTlRZNaFabXBh1i/QofaQYGnd+qSsNLmUxr Oveg+nI4eifILF6zP7vHmStbfKi5nw0cpZdMovtFPxJIBtduiB/yzI= X-Received: by 2002:a17:907:72d4:b0:ab3:84b2:4247 with SMTP id a640c23a62f3a-ab38b3808fcmr272000666b.40.1737121378861; Fri, 17 Jan 2025 05:42:58 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384fcd90csm169662666b.181.2025.01.17.05.42.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:42:57 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 28B8A60858; Fri, 17 Jan 2025 13:42:57 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= Subject: [PULL 03/37] semihosting/syscalls: Include missing 'exec/cpu-defs.h' header Date: Fri, 17 Jan 2025 13:42:22 +0000 Message-Id: <20250117134256.2079356-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-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: -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é 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 Message-Id: <20250116160306.1709518-4-alex.bennee@linaro.org> 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 Fri Jan 17 13:42:23 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: 858186 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp705544wrb; Fri, 17 Jan 2025 05:46:06 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUZhEwfX5VNTaORAeCEQXwZZ6mq70RfSMlHp7Eu54XWkkp6zZcHxTtk7mB8gsSFVaDjDjYjsg==@linaro.org X-Google-Smtp-Source: AGHT+IF6dkhytBhyXwUCs/2sbF0PuDkI/3rGEMvUYdBw03oB5iXuGlV0sINPgPkR6bZwcxkPYpxz X-Received: by 2002:a05:6214:194f:b0:6d8:7ccf:b692 with SMTP id 6a1803df08f44-6e1b21732afmr34061346d6.11.1737121565762; Fri, 17 Jan 2025 05:46:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121565; cv=none; d=google.com; s=arc-20240605; b=Wjq0WSjR414A/uUEcaUH4O2A2N5HqZq5NT/fyOlhCS0SDRHJ7tajxi+8a48VG8ItYo X7mrMPuqyQE6jxohfzGTTI1v4Y18vHhUj1L2e7xNKP0yQd7lZSnsZPZXGDsB1lQS2uCz ponUY++b31t38zdvqHDsaHURbeHpYJyn8mzeUqGPLIjxZzgwXWP+Yl5u3DZSFz3G6vTz UJqZtDh54fa0OZ5HzCeY3ivMS6nNQq3w2e3RRQcWQ5qZDN1Gzb8FWy/Y5JTDnytkP8Dv D2B65fAaIoh3UucDDYurMVf4tLOlhPYoizfJVSj7RhHHubLT1M62Be8ZGGEj0yrjrF5B Mdzg== 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=9VoavrIr417Jut4poNQurXRcCbKSqVL6eDWL02YIVTs=; fh=Blf2oUU/YG0QI3K9EaXy3qgSFUqguV8JMcvhxUv3o9M=; b=PCebg0a25+F8G/TkcbdafI+v+pirq1Md0FtWa8kBbLEYI+X2zGP/t3rEv8Vcm2rXuQ WB72gwRZ3HqVoZigBM3IX9vThvDahEDS1XxbpjGTFdYDsQmmE9LnrfK2fri3XNLxfpac sefNXQIp+mLKS3tDMwgGYAilDg9VgZFt3rQDcqKSelj9FsfvCy0KjTwqQjiSsaKconRy Nn97wxXRmElFkXyHHGY0xbFBe3qw1+IMEU8XklA9pNyN9tv6fyrnNwz6ELhfCpTVjWY1 Ljds4eXZED38p1Vh9t0NL5RRHtIHHTfO28nwzn5faCdZC6XOmjVxW52gW/tkBRl6OVFE r+jg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fFM9F6sP; 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-7be614bfdfbsi283764085a.215.2025.01.17.05.46.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:46: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=fFM9F6sP; 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 1tYmdA-00018y-Vv; Fri, 17 Jan 2025 08:43:25 -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 1tYmcu-0000x5-IN for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:08 -0500 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmcq-0002D9-8e for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:07 -0500 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-5d932eac638so4156158a12.1 for ; Fri, 17 Jan 2025 05:43:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121381; x=1737726181; 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=9VoavrIr417Jut4poNQurXRcCbKSqVL6eDWL02YIVTs=; b=fFM9F6sPiEcKqKuQ1fOk7rSuVGlisfoSviJegPfsbnTiFbcsB5mK5vZv3g3xMS2LEQ pnLORanv8suQ9EmIdmxYigdCuz//+T6VTNjqydoGLiWRDMYJmipxtf6xZeszcxoCQ9np ecWnC9LvnWQl+vrMltbN75fKPdj32aEBkesYf8szDxyV3hbMryuTqCpJ9jwvcIEVZ4KR OMp/AuGeWwUC0kS9st2Kn/w82RfB0z84B8dfhKoT4lG7xoZs74AvHbKiaMYGlPRqAIbQ HDYpfEYLlBw50vNzEYzuV/NqERG3n12MiilQF5OEDlohTpPB7LfH2rqxTQ21s+x6O5Wv OD4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121381; x=1737726181; 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=9VoavrIr417Jut4poNQurXRcCbKSqVL6eDWL02YIVTs=; b=W4RLN+N6fS3cLCU4r9lPLilBXmjISgiOUqUpH1ynBMuv2edxjlr1zZJPqQJYPGn+1l 3D7MMppfh3o/+LGb/Sj/e23sgACvwV6AEEgqyrYZ+Rqh4CHYz7iS9PozXrlK3TYeyx24 mBD8E7Q+UzYKevEeiOgRyLuonH3zNTVGceTm0opg3bbC6G4ybLQSYwE2ZrdZUxgNJUVI YQgJ+ZgAmh+BvXgazej/MO8DTdPS1+1gZUHAKnqSTM0cK5402TRrT0Owr8zQEuSPm/Vl e7f/iUeOuaNSNmzL/3WtuZJWUV5EoqXRLkH29JnzWHNNlI4JveuD+4SY5+ms3p4PBkxz idTw== X-Gm-Message-State: AOJu0YyygASydgh/2cTqWHZamB/J97+DLXYw4pHrgz37Rxzc9DFh5GLh EQopNGlfxTSaL+oB0i+Az7QjDHDZ+Pii/CbPdFQAk+chAjC+tNsa7nk8gzodxIv8OseJQU5lLKb rW3M= X-Gm-Gg: ASbGncsLVhm+8ds4F1eW7l3iXDZpcstT4HIICyMnO2qOa5qmQE/zaS3fWtTbF0n6Zfw WQIklhvmLUzFj4VdWUr/Vf3PEpguOzWG4p5XlvhzsJU5mpo29Y6aTIeAMWLTpP8EevEM4JNg4UZ wbl7jH1Nl1OvkNKkZzK5WMNxPCHgv+GVORKLFZt8c59aPaz4nGYmx2teEQgQXdBWjUbDZyER0S9 DaCEf/h5JbOyGGn3Hw9mSwy3uogcryneMedalbmC5s6E1ygrAfC6Oc= X-Received: by 2002:a05:6402:2803:b0:5d2:723c:a568 with SMTP id 4fb4d7f45d1cf-5db7d2f105fmr2103569a12.10.1737121381278; Fri, 17 Jan 2025 05:43:01 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5db73eb59dcsm1513790a12.61.2025.01.17.05.42.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:42:58 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 3DCFA60859; Fri, 17 Jan 2025 13:42:57 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= Subject: [PULL 04/37] semihosting/uaccess: Include missing 'exec/cpu-all.h' header Date: Fri, 17 Jan 2025 13:42:23 +0000 Message-Id: <20250117134256.2079356-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x534.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é 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 Message-Id: <20250116160306.1709518-5-alex.bennee@linaro.org> 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 Fri Jan 17 13:42:24 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: 858190 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp705727wrb; Fri, 17 Jan 2025 05:46:35 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXuTO2uPMqbUhnMYDIu/uP215/MiKavKnuCkJc7LNrov3CBcRyKktZpiBR7IKLsrtypISm+qA==@linaro.org X-Google-Smtp-Source: AGHT+IEXHfWlMcaPoijyg4DcBJgpxQx9+GiGJ5akKTN/bAw4zRe5kEquyjlESZU0nZlXtwwaoMqT X-Received: by 2002:a05:6102:3f41:b0:4b2:5ca3:f82a with SMTP id ada2fe7eead31-4b690bb6273mr2175077137.7.1737121595411; Fri, 17 Jan 2025 05:46:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121595; cv=none; d=google.com; s=arc-20240605; b=jpD3N3VItIVe1n6tJgAms4U4RBa01rRNT+GvhDGP4NWooDchyaiUS2k4uQlsuzf3D4 +VFhPgFv+V4sJZqh5o0dkU9zoR3FiQ36hb4A6yEdr8LoWZh8Tq7N9YDwqAuV6xmq6hxy 3T9KNjUx5f2JO6/ufdVMVWo23BBDT0XWbnQzDAUZWDBg5nPIuL8UHHnCHj3pyEVrFEYL lh08Z88G/kFiuoY8wdZxX9DU272dDPmApH5TKvN75xQIJ/WZl4vIHBO2/qwzDg4ng1K8 6zXPvdB5ukyK6+ryE2WQ5hLH0SY1O+qZhaCXGxZSAv0DJ/O+41J2loQMFtw0tj6X2E7n 5h2A== 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=SUu6i8T057JPO442k8CSrwOIxRNKi1DJo3XfOqemq7M=; fh=Blf2oUU/YG0QI3K9EaXy3qgSFUqguV8JMcvhxUv3o9M=; b=Pg/2mQNB7fa3N0fgZ/YOz+AkYkYOG0JyUIzN8RBVE1HoysDHEsm3yw/gm2PYyb2CTt DaUUORKjkdVFW6YZWeoyo8kRCRo9ClxxG+3DoXLoePGck+rZTwqSWhFXopLmhYtn3ON7 gx5k5AY0cW/M7gA/Ubmd5ULG8M1yv20Ohv7Xn6HM8o9PBpyIoEN9jdSG0nBMWHmXbkUr WSPAAK0mViJwzz1Gntd1OD75Y1YJJlG3lC6LVeXmTySABPVamlBJy+MvbG5cMBs3pRru 2GLtYHsi62gA1z5SbgWapDS3EeH4KcmnYDUpOl8eCdag/kKAP4SZlgl9vDhbgL1/G5Qa Q8IA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gpceqZ25; 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-4b68a2fb090si1021961137.262.2025.01.17.05.46.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:46: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=gpceqZ25; 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 1tYmcx-0000zh-Jy; Fri, 17 Jan 2025 08:43: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 1tYmcu-0000x4-I3 for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:08 -0500 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmcq-0002Cy-8c for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:07 -0500 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-aa68b513abcso397510966b.0 for ; Fri, 17 Jan 2025 05:43:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121381; x=1737726181; 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=SUu6i8T057JPO442k8CSrwOIxRNKi1DJo3XfOqemq7M=; b=gpceqZ25XuXEym/X1EKiqezLap5I0/ZMG58Yg0xM7NTmfT6PPSlEdEYLP+NDxREjYE mvS1786s0D/KnmSTVdvEVw2ZXQDXBhRfIIAAYew82+x23lPC8WQh5HF3eWDofx0I79fU tFt9ETMIK9/y6ikaxIDAuwH1yuxJDQ5Ozt/h78i/43zg2dm4e5aG5VwnUpEFRkfD1Aus nNTPlIAk45bqPW9X0RaBo1g8TgCFO2FSnZW79OesOoP4Pmkt4gOADh/yO4XH2li3uZth POYBDEnjDrA6vn7i4pMEFIKAYjvfpqPO50foZnqPmL8GInGEMWNxsHeskmbTMIm6ochD Bvqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121381; x=1737726181; 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=SUu6i8T057JPO442k8CSrwOIxRNKi1DJo3XfOqemq7M=; b=lBjuJLui3RTmFb0nT++jmfVDbPNhMRPY/GZrHMaFuo07+O85fCRYplU7+vqoJSA0x1 vVmsEg7r+tGQGp10ocBQLtlaXHA4s0pm+HrxgatcqJ2wzmQnmDYYAGnNHQCB79yGzXyQ 2GxmMC9jX2G5nPY6qvhCF+zjWGz7tZDaC9/MHrtYBxHrRIUeJK5cXGWIC0vu6YWsOVU4 GZTHAC0V00UFEsewb6bWtOMQiQDrft4i71m6AaQglUqmjXgApQ/Tmv8tSi+GLrN/mvGE 92tUPO6Ch/5WY7COBHf287meuPvey5ijp66EUAi3Ik9k7+fFQAzix+LrFKRcmlq4GfF5 Ud8Q== X-Gm-Message-State: AOJu0Yw9YhmOA1QZl76+lXWO2cUtjBdLEqjPc+60t7Q1SRcDayX6vcDx xIqaDTG6MIHj6O1Iyv6lT1NT2iShVL9uFT+Z8UP21Hc5tgObWhxTbdg8/tk1o8Y= X-Gm-Gg: ASbGncvFF2L1I2h4KZidOQrIpiBrfXXd2z3NokvFbYfwexo8zTJe15JfTonIkhWvPHL JxktMnCJEg4VVTDzgJYvGQYQcbXiDKM12r4TOoudlFmAnKztTpHty/oR/US0/QBSJaZzWoA7ioG pAJHwXrG7Xd00lM4xTN1ahs/ff73Us0QZH04ZYdfvO5zi6GH51kIEb1E9o7K4r3CgpEOHF+6O98 qsIOZIcHYYxIOXIicXApkDqWgiqfApStN22ZQsNPdqgPIGm/n0AkMs= X-Received: by 2002:a17:907:1b1c:b0:ab2:c0ba:519e with SMTP id a640c23a62f3a-ab38b3701d1mr258354466b.35.1737121380624; Fri, 17 Jan 2025 05:43:00 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384fc35ffsm170337766b.160.2025.01.17.05.42.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:42:58 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 5486960865; Fri, 17 Jan 2025 13:42:57 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= Subject: [PULL 05/37] semihosting/arm-compat: Include missing 'cpu.h' header Date: Fri, 17 Jan 2025 13:42:24 +0000 Message-Id: <20250117134256.2079356-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x633.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é 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 Message-Id: <20250116160306.1709518-6-alex.bennee@linaro.org> 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 Fri Jan 17 13:42:25 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: 858197 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp706487wrb; Fri, 17 Jan 2025 05:48:37 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWSlRUOImbxXOEpB5KfI3H+Xsbjt0bUD9w0vIoalgn2sIbSTYvQ2IjONTU8JHjEMnWXDRbyzA==@linaro.org X-Google-Smtp-Source: AGHT+IEowHa9FHWEjx3OgejbuNt8XaCF+YVapGOX5QIlsJ/PT4qGPW3GcV9BEJCXZOzDL2ZmoSSp X-Received: by 2002:a05:620a:258e:b0:7be:5bc1:9460 with SMTP id af79cd13be357-7be63278e84mr364340485a.35.1737121716980; Fri, 17 Jan 2025 05:48:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121716; cv=none; d=google.com; s=arc-20240605; b=cpfndlIIuM4jxua4fpX7PGZTkFV9eHZz5exh92Hhy7R4P+xFREdUaSF3/YorhYMy9y HbFyggIOfvfxIxmDdxBGPF1UInhZtr87mjfIgDvjQ5UDjTYTcR6k2W2vIDq7tjRARK8E cDXg/aoM4iriVz2C1PRCXlPpt2Uusvv3npuBgp5Y9TszwkPdVji2CbgmScrQUWc8zVUx w+MwMVoZmAPY8tavWjSv5mIjzsPOtoHl0wqdWaVhVGJh2bsncmKmrHx9iMap2MM/0rz1 c3B+3gPTmQF9oyZETF7j10Tb5lEt+HdpjUgQ4lKI3owhL5nayfbxGkjLZAzCoJD6Aqvi WZXQ== 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=MTfYyauxFj85w9TzqXO1KGgQnkDy6owgJRE7biN3a3w=; fh=Blf2oUU/YG0QI3K9EaXy3qgSFUqguV8JMcvhxUv3o9M=; b=BbyEmc/q9QGhioztOSnXO+991lcRjpZQaR2PtQyteper+pI6dEktCoROvC7YIeKCtg FWkuR5ItkYUfEUs2cGtYXGs+zWphwd4sGrgqKltqBPVbTzOqGddxtg+EgECdUJvZPzte 3SDQcvX1+oDktyAondFqkBUjv5D2Ul8CUoMeSt0kvIaPx8N77/SOo+GpcXTSsX5ID060 TBMKf6OrdyzinaAhTd03DxkGLrn2nxtiClwGaiHFcSlTwKdRUxZsM4Le3gxoaxVm8ixY DrLakAUYjvfIb33Jt8sCgKVxPCUN9rFDU5hdo0+IfyzQN4/QO9WxomsISsaenAisdAWB 73DA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xidxAFHW; 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-7be614bed90si265472885a.303.2025.01.17.05.48.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:48: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=xidxAFHW; 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 1tYmdt-00020J-OU; Fri, 17 Jan 2025 08:44: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 1tYmcu-0000x3-HD for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:08 -0500 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmcq-0002Cn-9o for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:08 -0500 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-aaf60d85238so360725066b.0 for ; Fri, 17 Jan 2025 05:43:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121380; x=1737726180; 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=MTfYyauxFj85w9TzqXO1KGgQnkDy6owgJRE7biN3a3w=; b=xidxAFHWp4qPn3kKJJ9H8zTtzNfaCibSiZDV2Spp6VvynrkAkCVQwHDOGUQfBP04a2 gHhNiw2xVnV+9oTQt269rJkmAaGm3TQEc1370ABcncTKiecV0WD4Z76qwVc/VRvpdPd8 xZpWCsVg309/h9woD+2GYRHkgbwEef5ZtKE7NNYHBzSgiXvDHz/z4ccUBhsgxJ1FNVAb jXrC+9M9V2QQCqpod2LgOtTD/K6NbxOzRJgu5IZ5nOPj2WkVd+DBU4VKUqL/l9SQBK1h px2F0JjgrNOX+6dHb2Mxi1D+ujXM9bUP1Brwk/EfNsJYvXTxuvIh0EBNiSPPiF9O3K09 4oNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121380; x=1737726180; 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=MTfYyauxFj85w9TzqXO1KGgQnkDy6owgJRE7biN3a3w=; b=jVM2CZ8h/jnYPct/80YyYzuzZ9PGxIa15QZ34KC4r6AGxUYapfSB7LGTleleFAU9Sx 55aRnF1FhjJULnktZpW8nGgmYnZsEB7QZg37a7xMAxVcpD8dPi3njTHZlLGlvGx3DGef SC02o7FSkkuXWCYQo9czMuTd1XFgGSUWuJevKC/kuLhlLNyGv7DylASYxVvV9BysVXn1 WCClVE+6n1x11T5jBo3lX5OzuVY4ulCdNbX5zM7WwJjU6tMmQJ1AKAVBR8I/v+j8b1Or 8E3R3d1Mk31o6yoYm0M0/kHxSd3E7Eb/WWmP3CYTTU43sUQG/uKybxH2cJfMG2j6Yh76 KFug== X-Gm-Message-State: AOJu0YyE0bJny4kxb68dpuxRfQkstxMV8Z1tQRa+XBL4dB56BVcvAv6M mwhQt3QdeCa03V2wM037iFItOB/pBxYCRjLvshXIFz+xxPoY2mbxkOG7YaO6TGblqnNRKzKSxtA /dKY= X-Gm-Gg: ASbGncuozYUhgs4xuvX8aMvQ0xJtFi10LWOVnme9mUkZaukBzXNdztHHhruSsneU3YH ALyNsSbdCrnOx7iOWHLXx18zy9LXhw8pz744H2oMd3j4zC5DNFPKXVMPB73+HQKnwH+flXnpZ9t LiL349+xCijkAnmdawPBObUs21Q0yIlwkIZ8nkmSVSZDsyAhMLw3RSmTRk4gLC/L8qMoPJjw3Rn 1nrNyqoYLJxtnYpc9neJD8WoqlCwQ+v4yz0RbmNOJRyJcK+BYIqCbk= X-Received: by 2002:a17:907:1b15:b0:aae:b259:ef5e with SMTP id a640c23a62f3a-ab38aedb10amr290897166b.0.1737121380098; Fri, 17 Jan 2025 05:43:00 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384fc35ffsm170338066b.160.2025.01.17.05.42.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:42:58 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 6E49260866; Fri, 17 Jan 2025 13:42:57 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= Subject: [PULL 06/37] semihosting/console: Avoid including 'cpu.h' Date: Fri, 17 Jan 2025 13:42:25 +0000 Message-Id: <20250117134256.2079356-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x633.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é 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 Message-Id: <20250116160306.1709518-7-alex.bennee@linaro.org> 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 Fri Jan 17 13:42:26 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: 858180 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp704880wrb; Fri, 17 Jan 2025 05:44:39 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXe5Q/oDzLH3lV+gNo9PzPbYIFGb/WVARVkz1Ai7osSXstTFnaWB4bVDxKEOIb3oZSEDWyDBg==@linaro.org X-Google-Smtp-Source: AGHT+IEz1HFkQCC+0SIsS/9koYMLdy16C02HKyPvHIGJ9IcJi6l1UNWiQqq6Z4IjQae++q/YbEvQ X-Received: by 2002:a05:6122:438d:b0:518:9dca:f0fb with SMTP id 71dfb90a1353d-51d5b3b3da4mr2075465e0c.11.1737121479148; Fri, 17 Jan 2025 05:44:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121479; cv=none; d=google.com; s=arc-20240605; b=RWx3Mq8O6ykcVxL4wrhet3a4l8J2iDtGD6117FIde3PIhObmUvhmH3+/2Hmtw8VnAD JhMUNw6hYQHe0F+D+HBdzYIK1Bda9LWtwHTvkhhHAWieknNpX/HTF2xMMLky7geuynpw Y7rL0FlCM/Hg6lbRRHUAoMu/TB+Zs5pBImDsGdvy+aqk9Nqh8mgvIXhkL0PSRfmBhfcO Zrv+JvUDsOYKkyZ5cnRQSFjr7AraCtqS7nuFM8AW0D5JWmE03zgCippdTWpGcXLXt933 hRh1pnDCsRU4nSI1EFQBWEWmMSX3e/0DAO8zysqFygkNj7uIt21nVdKY48LRaBqdYbdY AAvA== 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=GXvDUDHkugKiilyR3D1H0/yadk87FxFT1Mw8vy1ltsA=; fh=Blf2oUU/YG0QI3K9EaXy3qgSFUqguV8JMcvhxUv3o9M=; b=Hd5zg2dHocDyi9N5J3KFixCOkjmGXmPu18zAWxHZiv9/41kmBdI7hxbc1cD0m21Tcn EnY4cT60tGfnxmmPy5z++SKAgJFDlmt+jNj9SRb8b+4l79UByg9R2JNzTxecxPrTJkBG kaSeB6C18XJWU0+1At2NLYot6xbkEH3zLocamdtLIicbRWbujrXBXYekFFhHa5N2P3V1 K3hDe5pYcmz+BgdqR2xaGYp6aOsHQqJ9mStLdlZCGfuUNE/uWsq1h4Dn2PQozeW6mrHz eq0ZX15UyXlkUHlBzbAtPfsT2LcU5hIJW+B2xhyxPmn1GsOaPBzAIXfB561OPJQJDrcA NiKA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TNPyJykw; 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 71dfb90a1353d-51cf5573677si929277e0c.7.2025.01.17.05.44.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:44:39 -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=TNPyJykw; 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 1tYmdH-0001Bq-5D; Fri, 17 Jan 2025 08:43: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 1tYmcv-0000y3-Bn for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:09 -0500 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmcq-0002DF-9R for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:09 -0500 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-ab2aea81cd8so358244866b.2 for ; Fri, 17 Jan 2025 05:43:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121382; x=1737726182; 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=GXvDUDHkugKiilyR3D1H0/yadk87FxFT1Mw8vy1ltsA=; b=TNPyJykwJ6oxeyVdOc0KhqH7b75d7bWLjwdn1fIv/zZ2SyMcXIaWNIgxD9DzGv3eVF cUYUQ2qKj5qpjEl5rkrZIsIk8/LKCJwB+Y1uqtdUW3FSXRgOyJuZRIkqgfOyzSTeDQtB aNDbf5jBVEzAULRoQgHrraO/iEDqvPI/FRWGr/raBuhMF654Jb6D9EF8LC21F0+K5n60 757eO6LCyLHbxCb3HfrrLwtiAs3qUMIagnTYaHWNTENob0md2QtLPcJEy2PNig9TLF+Y keBEzrMurKx5jCsjtbBaSukEfZFXJJaqQCJ4i8MyFFufiCe5VsSBGTyUuPgxYodzyyhu tYfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121382; x=1737726182; 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=GXvDUDHkugKiilyR3D1H0/yadk87FxFT1Mw8vy1ltsA=; b=kw++KZmIDPZkWpwqF2gsnn9xu8x3QP8An7PhDd4CR+wv5I+uC8WvEgzyYLTKOmxOZZ cRIoPJ6UcTB8Bv5wIidbkBlyKqU/zruF9qOKRt/+J9A9pxmtM1bwB6i3MlmjfaQQamjA TsWerP7ahcoE8IZLsD8r88eD4uwr9f/xuiUojzZQmX/c0PQKC1R/kOnwKlWDeuiXJ1Lq lr/aSfoXDQdMFe+tDt1xHBu9ZvSiutsbEmTG4kMe+J8SdHb320m02MNsKJuZq4d/1ukL QwhHHJEOUxeXtZwEY6IeOqyX/CjJGF6UG3Kxlu3oALF8NuI/zc7xflJ/CJCt0UQw9PIu LpzQ== X-Gm-Message-State: AOJu0Yy17fOm7v3h7oRsGjTgfX/2ChcG8HH0Cb2yOm3KSIXaR36OjGTF TJ6v3/sXB2Fboz0616k2ZsmE1zxI9ZEuJIMtdmTcb2EpxMm93Sg0aQggJh3qk0M= X-Gm-Gg: ASbGncscSbc87BGNI3f86vjjaitPPcYeVDDyBGBqvH5pbvMdwV55SgGN8Izr4O9ZP3d TIIPDVfMlbXzio1iIke2URc9IatyRrY/V5mwoyp3G8DOMwP0s0Zuf/5pHD/HQfGN1M/JvcbuOOk /aiE1aIub9t+XVvV4lnWkZ36PjYMb6SPoM5yKl1Q/bItGhAMs7LJpU+HwiFFmOzyX79+mqQka/l IrQFAg0tgHtX/e2XhYZ8y4nZqXr20w6T7bFiN8us2MI3uudrwRwoCo= X-Received: by 2002:a17:907:980b:b0:ab3:61e1:9b06 with SMTP id a640c23a62f3a-ab38b0a2221mr308042566b.5.1737121381863; Fri, 17 Jan 2025 05:43:01 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab39aa6a7besm38093266b.68.2025.01.17.05.42.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:43:00 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 8797F6086B; Fri, 17 Jan 2025 13:42:57 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= Subject: [PULL 07/37] semihosting/meson: Build config.o and console.o once Date: Fri, 17 Jan 2025 13:42:26 +0000 Message-Id: <20250117134256.2079356-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x632.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é 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 Message-Id: <20250116160306.1709518-8-alex.bennee@linaro.org> 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 Fri Jan 17 13:42:27 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: 858174 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp704643wrb; Fri, 17 Jan 2025 05:44:07 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXLNPawMnMHOjl6pUukV4AFus+5YlCB3TSa/v/8GZR8yacv8glV/eO4GwNtA+hw5D9dnGe1RQ==@linaro.org X-Google-Smtp-Source: AGHT+IHwzP5Fj/rR7QH3dprZ8ioA62031VewqPzsUTOP07tl+DLXh5b2Hl6tT8kSANT/549NNG9K X-Received: by 2002:a05:620a:404f:b0:7b6:6b52:8bb1 with SMTP id af79cd13be357-7be63215c8fmr473171185a.14.1737121447408; Fri, 17 Jan 2025 05:44:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121447; cv=none; d=google.com; s=arc-20240605; b=gG2SzZLgvMLYdXZLz9gIPA1u2lU7leGffb+s4XqEssFMOxkcZav3ZB9bF1MAzGyFdA Ih/LwlLf992fod7jcppsZVEhgw7c7Ys7NKB+/uqEtBX1mEPeCfrwx5TSlzMyCq2EL+P9 K3ATjfq+7N3SPnQ39zUxcfyDl/JNPe+kTXcrDbJruRxd0BUtdtqrUXcMYZJrTSHaLT6C X96+oYw07LPuBC2C7Op+YIRJ4hXCxL2XxhJH3zuIc6QgrsRNR2B+RxRPwOBDmbUp5+bk xJZqiElfub+dwRtJNL/JTTgLzgXhsMQNv9VLCxbp67m7ut0S2bZE2W2PWVAVCcEcTkvK fzsA== 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=HMQ58Acbctk4+YTi9iqzJht+eWjui8AFJynO1iL5Mfg=; fh=fLIS6IvI1bTWNYZNCj5Sv61QToRAv11pv1hqeKgnR04=; b=M8OmH8kHLBcNIZXKvM1+dB6IyhBkxAHn6d3G8HL0o4DlNjP+d8YKhCl6Zw1q/6xjKm HyL1YcCSy6r9VQV1TRjbZa9G23tYuJsZU2JYeveMrMrIOwRCoXLRGCUTlvxWKAVWBLsp AjkaZRajKTGnND59mpD9rZNtUmATqtu4QrNufptQ+kygcnU9v1sR1KYT8jpnpl0TVoPd a8w6NhQz3jgY6EWdKEPu/gH0uUbc3JNz3AoY1KyvNS1A5/AWVdR6mJGwtYLffWm9zS5f atGLsZ1OkGXnSUvhCODt9RDsEjZNOq0FHtZ2PimfirJZuKRZ/l5ehlMo7nZr1QbP/Ntx kwTw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l+aJ8gVu; 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-7be614eeea5si281510785a.575.2025.01.17.05.44.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:44: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=l+aJ8gVu; 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 1tYmdL-0001EP-Hr; Fri, 17 Jan 2025 08:43: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 1tYmcv-0000yR-Lj for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:10 -0500 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmcq-0002DL-9m for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:09 -0500 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-aa67ac42819so328474866b.0 for ; Fri, 17 Jan 2025 05:43:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121382; x=1737726182; 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=HMQ58Acbctk4+YTi9iqzJht+eWjui8AFJynO1iL5Mfg=; b=l+aJ8gVuW8CAE5GSMBQTjcjALr+Bc3agYqL8WCYxI6HXrLM8sSkrReUEKaAhhj+chd o5AyAkjZyHOfa9ZiWIx4mcuhZbUx+W17F7igYP9819pdjBKKN1KplfMWm5AOXYIKGQnC cQEcDtYGcUBwAyp88zoB2FuhjMgRk4B5fDCrg3vSE8zfyXgB58TnAySyztPCOozdPnS9 e07qYQEyMnqMPDGlNHAcnpBDXn4NKjsckNQp16EUFDYqnxjE2Oi5QDkaTXbIEKhqQTMH co924p7hjdwpAUGXWG6dQkYDNwszHfDsA8MMTPXeNSeJFjicdTFfZUZeEvuiODnYhjC8 lyKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121382; x=1737726182; 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=HMQ58Acbctk4+YTi9iqzJht+eWjui8AFJynO1iL5Mfg=; b=WlInPNj/x/EoOiZQ76s4AFRRqTj9oybux7GDmz5MsMXTlOC9/rE+XBG7AsxugGlZaQ N7iI7Fc3NYWo2d/tQ7w2yDX+nSJmekEMcQe1pPCudg52B1epClbTQK0Jl4mrZ4sEHOLl FbiVuv3EhA4Fj/qj4H3gjlfBLKLANbAje7FkJNosVWAYE/kI0ANEfEWt4cR5AqtspcXX H1WvguqlVdXCZ9Tn0B4YEgFpqIFwLlMs6Wj32L1cOpeWm7c68EgPT0lny9ZlYZ+H57Dh tE0oyRBlJpr/TfAn0GhQ5BQJEgvjehd4NLWfqg2w8lQ7ABVlP3u5bUH2C+GMjxj7ejSp 3kUw== X-Gm-Message-State: AOJu0YyBQRcs92kWqygl9o3wqykVirBJ8eoQgRch9DMVWuz3yArZDa+3 8yDtIQ0bfriZkRNj21E0VaIEY/X7Wr3qMcXye/bABtdmUnZgohVR767xaEYLkwA= X-Gm-Gg: ASbGnctvl+aTdYidyHCjYpO+bcEkxV83lzWf6Fr+q9j1HitqiH1KlQNQlQSN1+N3TuQ My1XoRRbTsOPlwAFYQUZ5KZ8O+RzN6R9L5XQpGe/KCRKBAUxevt/Q4uaVpw7rT7pvvOUh0C6v52 PVJUTdTYNo2HJMliSYwBjjCMBOWdiKZOTRwzXdqv4gJX9CRPlntqVLq3iTlq2unQUq4K2549WNR l0ALKpzoVY2P9Qe+8qJxv99QSgqf7CvqHa6OkJ5Utw8gmrhOFYGTVE= X-Received: by 2002:a17:907:8691:b0:aa6:7470:8efe with SMTP id a640c23a62f3a-ab38b10cf47mr233120366b.13.1737121382318; Fri, 17 Jan 2025 05:43:02 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384c5c47bsm174136766b.16.2025.01.17.05.42.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:43:00 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 9F3976086F; Fri, 17 Jan 2025 13:42:57 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= , Pierrick Bouvier , Richard Henderson , Paolo Bonzini Subject: [PULL 08/37] system/vl: more error exit into config enumeration code Date: Fri, 17 Jan 2025 13:42:27 +0000 Message-Id: <20250117134256.2079356-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x636.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 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. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-9-alex.bennee@linaro.org> 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 Fri Jan 17 13:42:28 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: 858181 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp704898wrb; Fri, 17 Jan 2025 05:44:41 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXK7k5wiOx1d9hcXklC4IWEItVril8BMTakjehOlIU5K0LHkBtlAYLLGW/7Hx6COUK371GGuw==@linaro.org X-Google-Smtp-Source: AGHT+IGU3zv+AVmMzGVKwMv8KKTjWHNhlNHCkgD48gK/MxOLDfQG9+DDri0x8fSDuZo4D2uO5zXa X-Received: by 2002:a05:622a:145:b0:46c:72a4:35a5 with SMTP id d75a77b69052e-46e12a87a44mr43648541cf.28.1737121481203; Fri, 17 Jan 2025 05:44:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121481; cv=none; d=google.com; s=arc-20240605; b=G3aoqXlkb5oPS1ZTGN4MNHhB1Ta5Mgm7w0csKW0TlT0IghnTIDmjcgyVlgxsv5/JWV 5nl3nmQmwypIZjK49B+WWrR6ai+gQBBEvnCyqNoFw5T++noJNdaPShWv8EKFcSBex5B1 U8Jm2VnkYr2L7rwBwrcw36rjQ5VpwCXSQndKJTSf0I8MsWa03Ghz0qJgQ/N/9iUa0ZuC S2X6oAUJWsOGYj30jIivOJfCFYkbOe0fprD78Suswzeopwbp/i1ahjyO0U6w27vu13dX jOGG8rx8R6R1S9oNnd/lfHBn7cf3zt5h+V3xILu0xnPFds6DJW7Y3p++WTXXlzoKNymI dMFw== 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=BzeJsOhL7cM2HJmzGNoIr2AKwnH1ajX9mBPNfI6j2oo=; fh=WrhSajnzlsHKetlYSOy6QNmhIyhred9O9vTEtjn/JDA=; b=IpL4SN93oVtT97+seYPR+tSzlUq6jIZ6hGUD3KNvO0BOUwjAlyEk/sTX2TRqNPr04j d4DxymGDinCggAGpsoCizoKPfh2swQ7M/LZmIxQv8eW1Lbi0Dfk/quAu7XGsUr+7TrHK AUB/fKJqQBNNo07qIredhQTZ7lyMdcOiA6jsGvmGzEjRBRIewmVhB2V4stkT8YJrKQCa DXcliwMNM+nrqX/q0bZWkLm2Gre286PzGoRL1PXgGFN7nY9xAf7iE8yZwlhY2d6jWWXo xG8Hs9OLOURciXXRleeUwz8IxXlwBNgQZmRfMnsIGldd9JFMm3/k9QuXuIy8M8/Wt5oG Xtsg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oL9dZZ0P; 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-7be614f5436si265221885a.634.2025.01.17.05.44.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:44: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=oL9dZZ0P; 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 1tYmdv-00028C-Nq; Fri, 17 Jan 2025 08:44: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 1tYmcw-0000zn-UZ for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:11 -0500 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmcs-0002Dj-CI for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:10 -0500 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-5d9f0a6ad83so4301234a12.2 for ; Fri, 17 Jan 2025 05:43:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121384; x=1737726184; 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=BzeJsOhL7cM2HJmzGNoIr2AKwnH1ajX9mBPNfI6j2oo=; b=oL9dZZ0PPE/H9gxOxUyCSd2PLu5/AXAOXEPzv/m3OyD1m9GGziQ5q02LNco2QXs+Ad 6aaS+fVOmCh3Fmirv7B+VC0SgBMAVqHt+n6m9iEUecyHOZyYbPKQ1cmUV9tFsb9ST5hn oZ3o4mCKDq8icXYkhcwfRq5KHjD6JfmwKLZjdJuy/vf2pexNymSMVK5KjA1bTWB/UBoC 15QPgYeomCOsIfdvVlUnZ9/SeHDPqoTQrSRZ1TBdhqv2YX2Q6KIUJGuxFy2xU04FzBF3 vPWVUNQLrfUvnx7gus0EHYmrLJuwSVSvPXWrb1opKhA2IS24nrBCkR0lt5hJaOq/oaSx SDoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121384; x=1737726184; 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=BzeJsOhL7cM2HJmzGNoIr2AKwnH1ajX9mBPNfI6j2oo=; b=VqjqYnKQIgwbKUjDA0lEkqfONYy+nKcjY9HepmA86LuuwEirwbJEK0z64zujEVJSo8 6RJCAVOq1+xDCWY3zb9SAPgX6COgFBj+AAhG9frJ7ept3rUjb7svfkZUnWVDrQZnIJQj 9wARWB8whB3lvqtXW117Uh/rhx8c0Ax8f6r2B9yKr348WDfmEgxVYSz3tWT1hrY3a/Ta dCLgSz3xDRNTWGHbYkqXDDU/Vz7L+bEzEn8zKEXXE89n0LazZ3sm5vmFVt1ZA8kVbp5g PAkMggAbNgM4MK7mBSBQgARaE9AxVKANo60v42V8aPUqRcvfzVVIwvP68CpdcGT0i0pP NlLA== X-Gm-Message-State: AOJu0Yz2Q94tV85wzRtVeWcM9iNEAZNAoorFm3nIFzaaydSjmomlsBhb XZN5GI2LwuruFZhXR8vqoOYJiITt4VTAd9U26IRot05wApHVzW7fwhQKTp0OVWlqwjVyDvGZgKS jmHE= X-Gm-Gg: ASbGncuYnMr4z0II4qsJwo051JcEV4VBphE+b/4oKaAyTtgsQbW9icV4K+82jnJxHTl JCITUEFuWQAiNC48jIm3mA7fzFn+C8Z2j4Im2lLKGYvtLH2HAeB0gk4+JuEz9Ryid65L1sa3m/b aI7f0K+4trt2O84L7Y+id8hiz+WHuKrc2TJrowNMDzBx+2h2t2ILh4YADqhR1/otojBQamupt4g G9HNjgMRZg6IiVV9ABEdHlmSK23XNOo27teomelFNh0rSx+6KGyU8I= X-Received: by 2002:a05:6402:34d2:b0:5d2:728f:d5f8 with SMTP id 4fb4d7f45d1cf-5db7db077a0mr2378036a12.27.1737121383878; Fri, 17 Jan 2025 05:43:03 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5db73670fb5sm1557595a12.25.2025.01.17.05.42.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:43:00 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id B6E0660872; Fri, 17 Jan 2025 13:42:57 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= , Paolo Bonzini Subject: [PULL 09/37] system: squash usb_parse into a single function Date: Fri, 17 Jan 2025 13:42:28 +0000 Message-Id: <20250117134256.2079356-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x534.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. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-10-alex.bennee@linaro.org> 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 Fri Jan 17 13:42:29 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: 858188 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp705663wrb; Fri, 17 Jan 2025 05:46:26 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVDo9JCTqwdj4+mUHrZCE6WGAYeRGBjHrfLRLLeLje7E4HcyU4ntnxCek7f3PUZVSxU64zuMQ==@linaro.org X-Google-Smtp-Source: AGHT+IGyiT6dRVdOB0aL+A7ns7fjD3wuHB2Bz2yh1bP20UM0Uney82yBlHgUR81Ue20eg5EFwEnp X-Received: by 2002:a05:620a:17a5:b0:7b1:41b8:9ed7 with SMTP id af79cd13be357-7be6323b6f7mr370741085a.16.1737121586115; Fri, 17 Jan 2025 05:46:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121586; cv=none; d=google.com; s=arc-20240605; b=EkHSZ6+EMyhKmhRYKkHj0f25Mpl3rDB18Yd9j5F70pUtoa4yF6zGBzsFz0xPcPIAR7 1wYdiF0DqgThgzbQirNmkD0lDwsZi4BbyKnv8Y93+O+hjIDuaKfVTaaKvtkJ78n0CYaH fY4L5qlr9TF2QOszAgTibFxF0UyBF/ztgtHzbJXvmRkTssB1SGf95ez9VqfXFFNAVz2I B41YMFEzoHw3I0UHaE/tcoJh1c5RUX/ARqg9FOihffjwXxz1h9pgOXqib5W4mx8QXDdv pA5OBwTYrITyoZQZ/4gCw6YFYP2Vr3P/9eskKzUscNtwtUGLhAC6M6RSst1zukA/PomB ARJw== 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=0lC5KFJs3U8ND64w3w/maXMUrgMg2IESIZ2mhbwm7gU=; fh=j2Q1GEmduXhwiZTMV8DjtprIrPvGmTXPWu6dLAVBA0k=; b=DB7mfgiMr91vmGaC4Tho5/i2oLSXkER7IV8V2ezFoEozOtmBhgz7fiXqV8WFTMC03O ohuHJ/1p9thJVzBuXg8HFg9dha0EUNBk1s/TC7E3o2JjdkywvP8LgYUL++3qcsAHq6SD NqmrJsP1XFJIgsJce4/h5ZvlSu0IZYb/LgwFR1bJukc9wxOWPSqAf2bp+BrC4jaMYgwC 0jR5hKs4alu6RFewJB0grDTOKMYOzBZj6hQwKDgkYO2cpWfeR2DGISVzE9QvI59zQSbq Hdst6p8bxapHWOmjcOrkWZ5SXo7okXIdUU3zonBMeg9e2jMhMs1byDZxeWUJzC1MFBal TVcQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GWRFGAQ4; 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-7be6146c8f6si316210385a.74.2025.01.17.05.46.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:46:26 -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=GWRFGAQ4; 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 1tYmdN-0001JU-RQ; Fri, 17 Jan 2025 08:43:37 -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 1tYmcx-000100-89 for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:11 -0500 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmcs-0002DS-Bf for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:10 -0500 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5da12190e75so4279785a12.1 for ; Fri, 17 Jan 2025 05:43:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121383; x=1737726183; 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=0lC5KFJs3U8ND64w3w/maXMUrgMg2IESIZ2mhbwm7gU=; b=GWRFGAQ4pJ9KDXE3CPItiHyxIMT0GFbqlhcoMsn/fU/JubAC3jjNZqAfUxpTd6PPA3 56XBFFY9JS7Zi/3YzgJBNad1tenR46haS+An085t5VZbqgmgfKZnzo9X7YQiAK81g468 39d6P85h7ZErzW1SMnSPFBHIg3wu1pQQk4V6Nf8DQhvO9qtrcFsvnsGWV5o41Imb6ZG7 c+l7VrHL3NGn+VmQntKez2fWxjtvcLsLh/oZedtNjEcg6XRMDgo812aSwu94WVqwabau B8tJrewfrgmayzMT5y8QYZadw3Lag5iCvtpojqU5X1yxLsgNijXYcwXGGAe8aVbwskKY 4qVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121383; x=1737726183; 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=0lC5KFJs3U8ND64w3w/maXMUrgMg2IESIZ2mhbwm7gU=; b=CXyo2RCboQ54/IUzTqrOnQDwOh/btw6nSQ/rZ5rpcxmcW1dRDqU4BKEaaWs2Rg4RB+ 1XE2j1bxdCI2WhF4Vvg3GTfcLo53sZ7Ft8OPN6DDCSF9WCn3yMHMwfXtYsKXHKwxE4no uCBVUb3h4RLjoOsoPqBHS7rQuNUfHwCLQ4EAoJgYyB23d5ZEf1MVZIKafYsresBVLHVZ UXz9uPJB3YMc145P1BfUiNK1Z3AYrh7xWW5qzNzYVPipXTdy1Gx5fxtuGIYfv/UAygJo 6XR55myn+2LoA7DSFokhjcPamu2+U5sF9+3OfTRp7gYLT0ywJY1W/UoiTo95RrtCfwYQ mVoQ== X-Gm-Message-State: AOJu0YwHGCIC+N1q/+dnaP/rv0E0CW5FBfRXLPsvj5xpfHKv9pd9uZ3U Pr2tyxjLtRUgNZGMWyR/6Rt0gm0oqf1qdv4cnirTIFGtsVcqlC071m2LRZBPI1Q= X-Gm-Gg: ASbGncukTGyMShpdMTO0YLUJdAUQbbvqfaXmR0cZ+64KBYkSzp6vW9xfPfKM2Pm99rQ 4MdtPlDAZwCznmydcR5x4PvBw9bjVaU09D9EXHs47XD+M19jR86YajUvJYSTjgrM5r3sc8BLdzl 7VbVOcldU3HRn8P0D9iIiYpReJVS3GhHT5+QV/9kv2QhYG8j5TVWfvtUDNbfy9HRl7dXWd+IoR+ UQW8STwT9/bS5hUKSbGJqh0NflDg2eEEqGCRvddyDZ363rHFxMI828= X-Received: by 2002:a05:6402:2812:b0:5d0:eb2d:db97 with SMTP id 4fb4d7f45d1cf-5db7db06dccmr2568242a12.25.1737121382697; Fri, 17 Jan 2025 05:43:02 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5db73642332sm1520161a12.9.2025.01.17.05.42.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:43:00 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id D73446087C; Fri, 17 Jan 2025 13:42:57 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier , Ilya Leoshkevich , Warner Losh , Kyle Evans , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Laurent Vivier , "Dr. David Alan Gilbert" , Paolo Bonzini Subject: [PULL 10/37] system: propagate Error to gdbserver_start (and other device setups) Date: Fri, 17 Jan 2025 13:42:29 +0000 Message-Id: <20250117134256.2079356-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52d.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. Reviewed-by: Pierrick Bouvier Acked-by: Ilya Leoshkevich Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-11-alex.bennee@linaro.org> 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 Fri Jan 17 13:42: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: 858176 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp704696wrb; Fri, 17 Jan 2025 05:44:14 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUCRVwh2Xi8ReVDeuObw9MZAB0U63HjiEsr511orPJg7l2MhhAOirAWkpizFFMSUc/5eIrSdQ==@linaro.org X-Google-Smtp-Source: AGHT+IEkRA9xglOiO1Ow862zVQjg5VC7hrqc2GsuaAuNQ8ZLYme6dbZaoKbAGIN3vbLgVqqeWTBE X-Received: by 2002:a05:620a:d96:b0:7b6:ce6e:229c with SMTP id af79cd13be357-7be6325df39mr486179185a.55.1737121454044; Fri, 17 Jan 2025 05:44:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121454; cv=none; d=google.com; s=arc-20240605; b=CvubGXeBdo5rwlHR4z5VfJvU6KJF1WyEXqc7lyR3CYXVxmfILbHdO5newAjbX8rRCI zlnOdblw1Qw09PZjNv7PQnSxqRPZKKT4nEsa64tcTuSSlu0YgYpGr41EA3GwjAKwZtQm bZwd4Ys82TF25YwZAveUGBQSpPL/VmI809WoikksyS7XlaIA8ETbxsF/e7jOkVPUnbGV zotgasNEz500YayQLvEiJgqzFfJVEyEV83dufJRIWNTnmocA2OCo115bTeuvPjAYG4rl T05HSRrcue9mTP/ff4ApPgUbWdxu17yfzs8jyUxWLY+An4AvcIbdayHMqWKIoFqaO7is S+Zg== 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=RmjVABPbnCsJ8Mr6h+L49GfrK8//sgmPrYPBbRhvLAY=; fh=zpmTh0lFY8Y9gScv4m7Dcr2yTbITQ9nqGHuTTiGY4tw=; b=UxrRFHtjzey/WLMdb5HUQVtL+ZeDwaOLBNo6gTy6LAnVXfjBxvXMc6UQA4C7OE9Fiz kr6RdY6jnqoZTp2BsID8GGWRITQGpr9bSeYVZDiaGaNVYmeKKjRIuf+T0fZMjo3zOt7T hvw3IF07U/yi0BUPT49BkepR5mEDXSi4SMmdVCRUTJCtf0NcYGUJoAyrEWze2V46DBz7 f+hUPjiSFr/QGxOYXjX6JvU8vymWY5LUxuhC+7QeoIXxECvrk5fl+2iscYSWZcZg9/W8 ZVNP3gWlO4Js7wKIUvJrJORKAMzXjbo3YxhgRBKv5KalQaxjf87q4sMVZiII6mITGj8W cnAA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ibuq4Yfc; 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-7be6146d3basi277435185a.56.2025.01.17.05.44.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:44: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=Ibuq4Yfc; 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 1tYmd5-00015P-IR; Fri, 17 Jan 2025 08:43: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 1tYmcu-0000x1-Fn for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:08 -0500 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmcq-0002DH-98 for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:07 -0500 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-5d414b8af7bso3968588a12.0 for ; Fri, 17 Jan 2025 05:43:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121382; x=1737726182; 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=RmjVABPbnCsJ8Mr6h+L49GfrK8//sgmPrYPBbRhvLAY=; b=Ibuq4YfcqznUg/DbVMmsb8+I75Hqd+4yySzd6UyvJnt1dy5msd2bAEJDGIu2gjr77P 7kv4E57YFLAt5TGS4EDm6FO2v1u8m+4a7rQti4CG0kv1gdrXPttuVMMuCt2cNm0s2WsQ gLw3x/+iDI/wPl9il2MLwX12gP4Fwe8C8Pjx1Eaktd5wAUjC3teY8pMDIsxubdGepbHA 7NIj+f83kmSDXzLb21rO75NRe1lwv5MgYsmuPDSARvE75qwjelGlz4eGRnvmWAl0jyzy FES5UrBFi9Z40NnbidD6U45t4oGJCIlZk0NB6RGUT+K09AONywiUOrOwCkD1g7qORTLQ PO+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121382; x=1737726182; 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=RmjVABPbnCsJ8Mr6h+L49GfrK8//sgmPrYPBbRhvLAY=; b=a0wfKc170NznYUlm6Gqmiqw4ItE5XYjrKZdYpB10yyLH97KLvP/7Zxx+ZkSf5UMixm ZVfUEF6IJfgHhe0CzoeX3ftKT3ZNWq0Zf251/VXTPQwdMxTKOCUkjHL3KcWISpWja6GB Weq406CrPy0SR7iAd9oyXB3borBcALYfHDrW6JZvX2pf7hB6rarLvPMMpodlmR3GrZuF YLjBtb5pCht+X/lFa8cg4nDhVtf2USdIrxSrtmGUXJKISjzEyFdVqbxTo3eiaYjt7Giy GHVcpGgjB/NCsco7mcqxMLBSjSma2h1cjIzYiIT6A+NAMzjiUYlCbpHUEQe7DgT+QFv5 TQPg== X-Gm-Message-State: AOJu0Yzl0J0BDXpYMjRk56YTzhw5WWQBMYi8yn0Nzn3iF/uNqyvlhEav pbmGlJWqRqExQ1DnJhOc+DVTLFY9Q2JAo9xcCtk2sHf58zPHD7IpJv5ioiw0b3g= X-Gm-Gg: ASbGncsRTTBNmkghaR7xN1PxzAgMmUNle/nIA5MWh4HNdPh9Kk32IU6daMeKPKH5wEm B1B9I50aBrzbV8ILuG9e+ygkCT0KuhQWoDpB4HsoDbb94sOyWw4fL7AY0b64inEyZyaI8RuwOoz lPKJz08GEsjI3AiHLurmaI9cOR9iNiG+q2xJRgYsKss523ZKeZLfKLXtBQuKHleQSK3KEWY9dUL w1Xoz3FHmLwwn7gq8BItlFOKYSxZY1UuypAzaErh0VOsMORNB5OvEA= X-Received: by 2002:a05:6402:2692:b0:5d0:e73c:b7f2 with SMTP id 4fb4d7f45d1cf-5db7d2d2ffdmr2654110a12.7.1737121382176; Fri, 17 Jan 2025 05:43:02 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5db736428e3sm1486362a12.14.2025.01.17.05.42.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:43:01 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id EC3CF60884; Fri, 17 Jan 2025 13:42:57 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Richard Henderson , Alexandre Iooss , Mahmoud Mandour Subject: [PULL 11/37] tests/tcg/plugins/insn: remove unused callback parameter Date: Fri, 17 Jan 2025 13:42:30 +0000 Message-Id: <20250117134256.2079356-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52c.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: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-12-alex.bennee@linaro.org> 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 Fri Jan 17 13:42: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: 858187 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp705593wrb; Fri, 17 Jan 2025 05:46:13 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW9wXkCucja8D7sN7Vc0ma3yP/Lk1NSmhmxvZAO22+DqhM+bZSj+aufTUJOfD9ImgqCxAsexw==@linaro.org X-Google-Smtp-Source: AGHT+IHsaG2FFA5ufFhLkVhiHTlrfdanrL6Bb4Oj0qUFAzvfIwCbguK6/kNs8cT2HHzNLk3Jyylp X-Received: by 2002:a05:6122:d88:b0:515:4b68:c37f with SMTP id 71dfb90a1353d-51d5b2e7e9amr1899404e0c.6.1737121573547; Fri, 17 Jan 2025 05:46:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121573; cv=none; d=google.com; s=arc-20240605; b=KUgA3WUqS/oWnG57VbgzQSZFQaNgQEgZgg8qcb+DFfSWLcbDF8NJts1uQKfWSibOzS QBvhHu2O7bOxj6ANh1N/bWefLQzmB/7dJcYAnPfy3h8TSGS1rKTESEk5jc1gQpAnHJCz yO5P2MNOfm2mT9H9NxtCr9s5vbqMYpz/VOW9t2qEhO2DVr4N1qPl+ZH/Dif/cJ2kzOHf RDrIx5+gfssoOPSLLRvV0/u+jJKqhpQ/+tC1PFQ1EFpMReyhZAiMCYvEVN0uWXt5cXaE L0Ub52zg4Qpuu5FZE2frYgsgD77w4/TMm6Qo9KX3Tg57mlZ44ZrMXacAWKBcVRbN70Y4 AjJQ== 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=z7WoTOR0MdrCgpCyDuf9KKFcIa92OwQaEc+knkLDVrg=; fh=yu0InTeBwSZcLajIY49SmB6DXvx9wTO9ThO8p5pbR7k=; b=NACAW08tY5G3cm2n7/yWsV35JmZ5oahe7qkaZIs2ZBvgiXPl061rRgPijlxyQTVclp JIZs0iWHr5TLhDWKeFMiha9ou0+cNSe0/tCUMwQ3QLCFOYp4XAKGYSdomm0pA0l++hrR HPwliQGCIfyBwCrkzL06OxDW1uZIfFL41vHRNvQET7sSOUvHVuozE0oY6hR8k94tyGoa DAvScpac8E3kqvOc4o9lQoB1GSPva6bI1JVV6aHG7VJ3ynva1KwpAUv1YSMpt3MMJ0/u Abh8Dx9gRyZnTAlO6WS/aRV/i9DjMzgiv1pcEmjmkSzdWL/ArHTzXSNQPrKVOCzrSr2r tvEw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=O3IXrqWS; 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-8642ccdc7desi821326241.147.2025.01.17.05.46.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:46: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=O3IXrqWS; 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 1tYmdh-0001cl-To; Fri, 17 Jan 2025 08:43: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 1tYmcw-0000zp-VH for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:11 -0500 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmcu-0002Dm-82 for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:10 -0500 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5da135d3162so3483191a12.3 for ; Fri, 17 Jan 2025 05:43:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121384; x=1737726184; 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=z7WoTOR0MdrCgpCyDuf9KKFcIa92OwQaEc+knkLDVrg=; b=O3IXrqWSOtFiGqaW7arbGmjO2Iik4lXM9SZYuaH4Hx2DBMRCZOfGoMxIYDkao5dGxZ d2ZN8NTYxv3d3JKZcTujsVqKTr6tGvQRkVHbRFgkNhTGWlJrf+aXc+gCZ8dEo36764pO 9yOolJqCfAlNgbQJkWOx6e2p39YIjJ6uU76brIZnfc3Fiodf+e4kKuy546jZPl5hvRHY AzxJYL5juZQ/wyHaFXS5279Ht5Gh9aRNpcjEuAS3Lz7nZz7cQ5wOJHxutfaJJPxo5A4W mwc4QbUB0ZNlt6ZEu2MKnk22qQYLX7h7tpgpDNhwuwl5KrIwlNLduKWckq+2nCgRSc5n 2ggA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121384; x=1737726184; 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=z7WoTOR0MdrCgpCyDuf9KKFcIa92OwQaEc+knkLDVrg=; b=QpWFjKUNiKQWv5IGhcfKnPDqGx2S87EpdlPz+5bIIQ0elLpXiTe6wdD278H1WIv1Ge GTEPk/GOJ11ehSVWP+CzJgKpZgjHIRIrxJW1l/wU8lgai6np9RG1r9sfYAzEWMslnkqb S43WTBx4HuY4NUDa3MTO1g4KRAKmahrkqVV1g1VsB+oTRxmm9i3lHqRHNVXNLAbym3nW IILIZDsqXBoLZ8GKSM3hEDMuViSPuHJbm/JzOwUCk0Hyq4vNaK1AE3hV/cb7IM63Plyw TQugh/I1gpUuME1ciTTy/f1pUZ5f96lFa0X7DQTgp9qiVw1Py8X7jgUbuFFsNj7N28Vq 5NhQ== X-Gm-Message-State: AOJu0Yz6s/ko32ryNJDDU/TpCmrpuyQr1nzmMiOQ+WcZXhgY8+sCdv/r /UGROkZTZsojOIAkOGiiasU5Q5xhoKLTCGbBZpxnVMMSGqnWb0eVjVkj5naRC5c= X-Gm-Gg: ASbGncsOSk//ka1eY+wZEn1DVQuRF3JMPdQv8+avq9Sye6kIXIuA8wAsXD8GFUFk3sl ALPa6EFAOYPYpauh20HXipHIb5oZUOa8X+07SQNrqNhdm7uIEjSjzXlIDPSIjWYpBpBMl78wlOd 1+Qae9xy3nsaUG9BnGcWPRlUB+hVl5Avb6XKnaOyQf6P6CLukX0acYlT5IrvkDHpXHkFE78MBm9 +Z2lCLiOCZzDF6TD79N8Whn5E6QsRREAJEtqMj5+v+IQ5KRvIj8BP8= X-Received: by 2002:a17:907:7f9f:b0:aab:d8de:217e with SMTP id a640c23a62f3a-ab38b163550mr267921266b.26.1737121384191; Fri, 17 Jan 2025 05:43:04 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384fcb262sm170003266b.169.2025.01.17.05.42.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:43:01 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 0EEF760890; Fri, 17 Jan 2025 13:42:58 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Alexandre Iooss , Mahmoud Mandour Subject: [PULL 12/37] contrib/plugins/howvec: ensure we don't regress if this plugin is extended Date: Fri, 17 Jan 2025 13:42:31 +0000 Message-Id: <20250117134256.2079356-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x536.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 Message-Id: <20250116160306.1709518-13-alex.bennee@linaro.org> 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 Fri Jan 17 13:42: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: 858185 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp705446wrb; Fri, 17 Jan 2025 05:45:50 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWGp22e/YR7GUMXwrIDluvKfMA17SEe/iZdjaCqHgsPsrn9xlPpsauNceEgoCrhFnj/U3h+QA==@linaro.org X-Google-Smtp-Source: AGHT+IHckrmyDtTYSYuV0mdo/KNQT973h5UGbnTEeUvxQiJXmy2YI17VTdth14z5M72QJ9md+vZ7 X-Received: by 2002:a05:6122:29c2:b0:518:865e:d177 with SMTP id 71dfb90a1353d-51d5b33f5c9mr2060694e0c.9.1737121550253; Fri, 17 Jan 2025 05:45:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121550; cv=none; d=google.com; s=arc-20240605; b=AapGC7uTJKbWxHVAFKzFeaoKPaQKK7+5eYPc3AhuUSb7AeXwe5uR/ClMTZ+bJmYCR8 7Ue1hsejhdxKjzwnulFXAdIJAHTaXGOBWMNZmmytPpuDHCivduGkQmEJHQkaB41bUHbv i3+UmtQir3OJEsHETcgZYQmtBkFhkytmU2TTzMh8B5evQkb7gEkn6Rei7CMzRjODmK9r /dmPw25vq3zy1Hq13MzzYP8wJN41+G3M8MOqneIjgV5EOm1NLHRcoXBYZedF8kW6pgoW zTlZBX+WOH9wdngAfh3XF5BWP5PeQgiAwVYAh3qQs5X1ySSNUssG9AkqhZREQl6tkWP3 VEhA== 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=2PIlRNEhkzbf8X8MOcKyxsekvkuQSHwlU51Y1LPAQWM=; fh=yu0InTeBwSZcLajIY49SmB6DXvx9wTO9ThO8p5pbR7k=; b=lL/kQ++oxn8SQEKq0b0yjIPTZtugwjc07b3ehohW+hxgXzaRv6udviysJY0W8v957C r7inG8kAiWwcmJBFbN99vT6B1oyJLlqDU3Xhmu+XLhEPiqTF5Ny5Ni+mrClBnUErR35q J7fFq2cFps36Q3ykPOM+DT+FmdkfJyn/YrsF3kypJ86YsgrNlsEdTVJ8a6XDfO1LjGsW yn9PTL3YaNcAQyaEnEFz9qPPUfdtyNE4KCsdkb27D0+mR60gtFJzRS8K/tf35N+xSQuj 0TRvIM7WX2oRO1baH1NUEPxTbBuj9HeaAWJLgj3+aUhy6MnCmoMGneFGu9QSpwx2moDE KfWw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p6n8wi+u; 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 71dfb90a1353d-51cf57bd76csi817347e0c.215.2025.01.17.05.45.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:45: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=p6n8wi+u; 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 1tYmd8-00017O-8o; Fri, 17 Jan 2025 08:43:22 -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 1tYmcw-0000zo-Ul for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:11 -0500 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmcu-0002E1-8n for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:10 -0500 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-aaef00ab172so326758766b.3 for ; Fri, 17 Jan 2025 05:43:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121385; x=1737726185; 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=2PIlRNEhkzbf8X8MOcKyxsekvkuQSHwlU51Y1LPAQWM=; b=p6n8wi+u3o2zxFwENdT39a2/JvLoCcQqEYXncne5DCi3NDODgUJNnoIMQLG8IyHi7W o1T1qtr3b4yTlw/rmyiSti3oPAZ4vYE9pHc5MIqXyln5FBpipqhNpwKCvvHhRE/TvxuA rcxXmZ6qi+/NAiSGkyZq4rmOJK+OEC5sEkFpyFJS18bC225nUcR6CsTTTkez5jAbHM/z 12zge60wDX0e8wv6oigKob3d3zRaGtxkun4OplGxsLRY+kz6fUeS4++voB52kV0v87Ll csTAanh7+Zg46NEuh3dYIFzf1SE272Ts3QCz7Bdk/QlAwM9LqcBnlXSkqXSsj0z0htmj tqjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121385; x=1737726185; 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=2PIlRNEhkzbf8X8MOcKyxsekvkuQSHwlU51Y1LPAQWM=; b=lf5wRLmJKOkDZ5bDuVa7L75BtvHdAHv13fn9Hc+ym6Z8yI3DBirbkpdGuhhgfmh0y5 HPisduAJT6Y47OFLWIko3wJZWMuukUbHLmVzPUlSE1J/iyGCScqBZX+fam4g9MhloyOP v5po7wAUE4g5HqbzOTkx4PwvYeq0iFE4B6Lurzce63xcd078cZ7+EEUpk0Exzed+ynZi e4cuqYC1UVOCZCo7yI0AN2jTAfcxP2aOozFCdMOqDWKCXzn8U2x0ZtdbLfbmyWLWnz97 liav+Eqquy/YJoeXYQGGetNXHbXVZUy69tn58iIP2JS1olOpcLTCDK5CU+SyFx0d1XVv HASQ== X-Gm-Message-State: AOJu0YxmEhzCiV+StP8prCCuz5VTYnye3SC+Xay54RZqXXv2Mm7J0lbM tqfftmoYunducRzs1V1AqeVRAvvQ6dk5Fqa0+kIF9qzoRxZmEOByBi5TlbbWDSk= X-Gm-Gg: ASbGncsCLOyn8bfvBsRIQSHnwRzVrJ3lJCvRxp3FtxkNgW0NR+uu0jZV2wk71+PQT3G TWNaO6e3kbY7jVhAoE7NewHEi0yMJF1liK5a22cMYua79HWc2GrObHx+zr9+eCplJkGhANTtl5P Ts8SYysKGj/7A1vc4jrkv59uax6dR/Kq1d15unjLspM0wui9fjZgKOk7buGfNv0vLlPMtSL++jz 6BNl/7jZ3sfziwvJC+jV8NdjurU668s5ss2U7gCKHKdB3r0MjXI/vk= X-Received: by 2002:a05:6402:84c:b0:5d0:d818:559d with SMTP id 4fb4d7f45d1cf-5db7d2f5e2amr6655809a12.11.1737121385613; Fri, 17 Jan 2025 05:43:05 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384f8624fsm171047866b.150.2025.01.17.05.43.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:43:02 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 26A9F60898; Fri, 17 Jan 2025 13:42:58 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Alexandre Iooss , Mahmoud Mandour Subject: [PULL 13/37] tests/tcg/plugins/syscall: fix 32-bit build Date: Fri, 17 Jan 2025 13:42:32 +0000 Message-Id: <20250117134256.2079356-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x634.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-4-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-14-alex.bennee@linaro.org> 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 Fri Jan 17 13:42: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: 858182 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp705094wrb; Fri, 17 Jan 2025 05:45:08 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUMFol7PNsJ6qpzH8Tl4YwgxDhZazlyDumyIKRjs7OJLAa6d88ohPPIke0a5dS9UWYY2qp+ew==@linaro.org X-Google-Smtp-Source: AGHT+IEs7hPJl4X12Yq6b1BIQqOccOyen+KMatlBy5GNndJQsoARiKI5S0moCkRSdMTOFv4mzuEI X-Received: by 2002:a05:6214:765:b0:6e1:afcf:8710 with SMTP id 6a1803df08f44-6e1b2167b8emr52584736d6.8.1737121507708; Fri, 17 Jan 2025 05:45:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121507; cv=none; d=google.com; s=arc-20240605; b=R7BqdMvEr/ZMqj7GRbZb+I419BIKcV1K2MYCxkVCJUWl3mhbHO8B7CpNZSvMFSisot 4EZry6OcqIypNEpeJQHTL81OMJN3M18p/XcFuJtdSoRzrmPvlSKH4kVkQV95KTHXvm7t zG7pzwxBSPL3FjoN1mwW9LwyLbymGRxRq88s6u2i0svtDgcfLB6dcd36Gk8EMat4gc0M hhgd9P6Hys/UeUyW5Mdu0fvFvAc9JAiZ4dXhylnAAfUDKz6JKL3I0i0YskFmFeHRndt6 gBMUXaKrkdqXtg+CU7j2mRQdfIQrvO1L7GODcObhYtNwEsiSPrCPBxOAnmK9KjSUy0GY EAmg== 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=rb1csLfisilYlMMpbSH0eapexTVsqPhs+4Rx9cZ9jUA=; fh=yu0InTeBwSZcLajIY49SmB6DXvx9wTO9ThO8p5pbR7k=; b=dQRH1Sxi3MtBl17qrt/Alxi3lXLriwSZAsvz2l27wfR7jZsDgR4RombaV0kWasaI6G rt3QxSSKOwIgK2n9yhNHkrQZduIWE4WWxpMWzmBcBZQDggshbkC7D4YhQUhDEQ0Ix3pI x6VnMV3CWYDXbKwBS/dvbCPJV4Pzo/gixf7xLysaY0OxHTzRq+lAR5/Gfk04fWb9wWNb zCaxw8ApS0Yq+vPtYKbw7Vw9xEhE7ucRTgk7ogXI0yJu/MMr4jLhL3lxEau6F+st5Kt1 BdnUgrKWLPDjvogoxaOu9sXXzZ0rc1dHeEhNh9AnmGfgx1kzpoMZWJxgy8UmXYXUsWwV cbMQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dnMYejfM; 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-6e1afc006a5si26904056d6.55.2025.01.17.05.45.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:45: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=dnMYejfM; 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 1tYmdW-0001Qj-Hn; Fri, 17 Jan 2025 08:43:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tYmcx-00010f-Vj for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:12 -0500 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmcu-0002DZ-8u for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:11 -0500 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5d3ecae02beso2971924a12.0 for ; Fri, 17 Jan 2025 05:43:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121383; x=1737726183; 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=rb1csLfisilYlMMpbSH0eapexTVsqPhs+4Rx9cZ9jUA=; b=dnMYejfMVR0ckOSJZ1rNCRwJvRiJL0ojjUEt561/Sj1I6tAg1+JgX93ydWy5Z0Oy7+ NJjAD9XA20duIP3goV0ykr6C5aKksj85jP1LXh9msseboAJXDo3cugohFYwJDUPfRlmI ncA03WZh3n2ACTk+/x2lFSV5xbXYJJP5X7dVZoc2r6l6PoJqS2OMEBPMDnY5dxX+m1tG JMzGZ3vM3JtBcbolvYvsnSPwSNBp4OsRn8VCIGakCp+a5qdO1aDjKIrBn33xVsMUPud5 rWAYtUpy6aHfTn5X1VUSmsAYhzKiYnLyTqa3w3RklykgmWOhJOr4kQqFQOWtI2vGq6Gb ISeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121383; x=1737726183; 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=rb1csLfisilYlMMpbSH0eapexTVsqPhs+4Rx9cZ9jUA=; b=AZCr5G/kNzW8xJS+HEIOf/una13V3KWn1nz4vlxiujFGQZHUErNtkhVc3RtRh0v6rA RpyFbgzri00Uy7eKPdZdtazfOsYuvHU2utlguEXzoi1T0iulLkscw+BHJ9Lk4JZhsRnS I1l3Vb+G4wgCYJ8ksoJgqKktKa7dgKPRZAggARzaUA8NRtB2VBWtRZoxre3cl4kptdwO 8oKMHil61Xusf0V/WzqGc/N6Rx2WZikFbQj4/c7nbE3ZCdbSeQ3S5Xo4h8rtR5UsvzmI DmuSYPEf1GAH8iya93pyhW/s0mypZFfPFP+EI6vZxTAsFIwGWBoTApu03qS8DeN9km96 uigQ== X-Gm-Message-State: AOJu0Yw7fU8IVMK6nOFZ88uKOLt+5S0XYUCv0hhgJs04ArFh3igVFmsl chRiMWuQfe7rIsP2zOdJMk5jqVhZcOSptFEbQtFmFrwsQnYDapJDlnfZq0YYc40= X-Gm-Gg: ASbGncuIdFuPWG2Hap3MPfRgv46gZ11VZhGN4RAQx9+ZJfmTQ+fbi4DwHZNuYCNMpfQ 0zu5OwA7ozDn9476EiMGfzLYN6fn5eZNZDqkt2E1bw7Fxzuj7MZ56IQWbwpZ+n9iXlWruClOFtM D/ARoPOdwBpmSFTjxcpQzL/MC9/bnrvfMRRIlY29+nOMIdoeRza+HDfRnIhvWKaqfhX759FUBV6 mRE+lf2lgq9Tz83QedkqFivLbSg6WTDVI08J9uUm38LoS20lR/+nKg= X-Received: by 2002:a05:6402:50d0:b0:5d0:cfad:f6b with SMTP id 4fb4d7f45d1cf-5db7d2f80c8mr2590100a12.11.1737121383613; Fri, 17 Jan 2025 05:43:03 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5db73edc85fsm1517141a12.74.2025.01.17.05.43.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:43:02 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 3F179608A9; Fri, 17 Jan 2025 13:42:58 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Alexandre Iooss , Mahmoud Mandour Subject: [PULL 14/37] tests/tcg/plugins/mem: fix 32-bit build Date: Fri, 17 Jan 2025 13:42:33 +0000 Message-Id: <20250117134256.2079356-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x533.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-5-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-15-alex.bennee@linaro.org> 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 Fri Jan 17 13:42: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: 858195 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp706213wrb; Fri, 17 Jan 2025 05:47:51 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV7RLRypX1CoUClhOko8LdpcKOrJHZa3Jnuf9d0meeWZEY/ZSi88sO3YC6NJ5Q/cIBMctqiCQ==@linaro.org X-Google-Smtp-Source: AGHT+IFTOWOiz4QZtCYlAJu8jCU/RntMOBgZDZZXwOBJoB5ZNAUnlL3HrpFnMJ0hxIgL+SQFZzF/ X-Received: by 2002:a05:620a:8112:b0:7b7:e5b:3b24 with SMTP id af79cd13be357-7be63253ee5mr371040685a.50.1737121671408; Fri, 17 Jan 2025 05:47:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121671; cv=none; d=google.com; s=arc-20240605; b=Jypz3NWHKUlhgVgf3/wDQXUakJ2CSnhR/iDJN90nBkUHOXs8BAhqf8mHlhde3DAkIB SX9trHxZS2LShnR8oZG6I62YEaYGdcgwPFIu7Yd9lRV+VVo2gKzb+0i4LQQ+zW+0Cpim lzyJK8K9Wa6Uu7P878Dp2R+msNC8L8C46yGsmSkh9K2vx48MuM24a6H9KAXTfot1Vqf4 xFkXFSrht9NOyklzs+6DaSsqSlXSkf0H0oWReYwq3ccTxjvsS4Lznh7AsJU94tqeyNUQ 1qLK6JojRybBEs6EDo1a4tkGTNqj36fAHFgjG3RXLkoERD/YFsiP6gpMzPGvJhzYadAu QmUw== 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=aBv2PMpv7wLfaY8LQVmtPxp8duzrePMVvgjGXUc6BNI=; fh=yu0InTeBwSZcLajIY49SmB6DXvx9wTO9ThO8p5pbR7k=; b=BBT/yb2+c4jDZgdqE91+usmO51FDP4B+uNDwowNxmaAuwKh7HkH+E7fmLs78qZAd3x yRvNsWo5Z2JsdLSgares2S0lzlvqKxmOffWIq12ZKpcaFyLB5CZ/MyvIE4q++srR2QvB Wiyd0dMiUmdjhwGv9As8gmMP16wN72EbSqMjKtX7cvy3dDdYlUZPwJVYxoglPxWZh7T+ zSvR7J98X/XLCiTNpPypjzUYdfefTPe8EvsCmICKOBYISg/GA1HSNpBWCNhguxPxwp+8 3LVWk3YJq5fYv1ZqX4Uso/K++p/jwtxanYyrMcbn34Jh7Klc2ht5geTKC3EfEWYpitQQ 7krg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gLZlRaGJ; 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-7be614bff53si269407685a.284.2025.01.17.05.47.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:47:51 -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=gLZlRaGJ; 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 1tYmdP-0001Kq-7W; Fri, 17 Jan 2025 08:43:39 -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 1tYmcy-00010v-8A for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:12 -0500 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmcu-0002E6-8t for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:12 -0500 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5db6921ad3dso3267259a12.2 for ; Fri, 17 Jan 2025 05:43:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121386; x=1737726186; 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=aBv2PMpv7wLfaY8LQVmtPxp8duzrePMVvgjGXUc6BNI=; b=gLZlRaGJIsFYmAeg5HQCy/jm5netThD/fy4jGsGYl2tnZbl9GvBuvXOtodWVRbotOV X5wausohTMsLTSy3969SrkyvwkSdj27oEIBy1CSp0eqnrH9+JrXfb7MZ0w6x+4xyvuwL 7jGKvn2MAllMaysNcV7LcjFNFoZx3Ru4/0DSPKV3K7DFrI8tCPCW3Fk0uUTIJg35ughi 0SKYlPP71ALpDpruZ8xjbu0gnjwEz8wRHJBOKdzPHw9WbPdTpD6NpVDB4qUcSRfuns50 /76aJcxK8TXsPBeciRDmMyuuahtsmxW5etSn9hfSJoR2g1d+4gY3M48MSeedoXFNQWAw q5/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121386; x=1737726186; 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=aBv2PMpv7wLfaY8LQVmtPxp8duzrePMVvgjGXUc6BNI=; b=TFBnBo3taG/+jtxeYbDB+cbCVwB6XUehRonOYCWgTAp0uYZr80nDQa//fXM8YVomMc rLXt8zurE7m/q8Ow8Mkl1n26Kb9+DPrHTT9zbEkz2tJs3Nq1+UhGfsAmjzWh0jnQuzh1 aZN5PwKyvXzfxZPwHCh+HFwgMcvKlupmSo/SLtsH9EqYwaRMPD2q2QRHnAMbAsyxSl/P ahHMUnn58W6xYPioY6AU3SR9L/Q3i4MC3nvzr/E3Omg9lnkzig+oEMA0MwdmSfWARXHD KOJcRHtl1Qi1X0vc4QQ1YLNU0tGmhhhMjMI0nd4Dt8B7eTSWh4bidCt3hvta+cxvygH4 I/+Q== X-Gm-Message-State: AOJu0YxMcxRD0pZeMl6F1xAsQ8Nbg9dXJkIIlBTxr304UPaq2WWNdh66 Pyvsuuj0nriGHcRx6SaSbmquLuZ4B+MF9H9nV45zAPAS/5RtDyrQu0t5yZCUIPo= X-Gm-Gg: ASbGncsc7lIant2y4AI6q+ZEmcZNbZeyqluUTQc6ojLoH9TGo/e9ri5Cbd2zAKQ05LH rLQiDR9C7/yY0AI+KQcW7k+j7cHNXdWK+9cqYF2YVsxFR05HAGMxW7bhc8TCzbycpcJdULkl22C CyhWTOlHa6Ilyj2IlgpNivCOlIhpiYf7XkRgQERyi4iBDTK8YA1M6sY06uuYIbtENvOEe4j9pYR Q4xTSAtjC7XUAUx+zoGBGHYMuJ12JpLTD54Oa3htTORUQN3n6JJ4Io= X-Received: by 2002:a17:907:7e92:b0:ab3:3b81:876f with SMTP id a640c23a62f3a-ab38b1b17dfmr274869766b.4.1737121385967; Fri, 17 Jan 2025 05:43:05 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384c74cd8sm173350166b.3.2025.01.17.05.43.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:43:03 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 531DD6084C; Fri, 17 Jan 2025 13:42:58 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Alexandre Iooss , Mahmoud Mandour Subject: [PULL 15/37] contrib/plugins/stoptrigger: fix 32-bit build Date: Fri, 17 Jan 2025 13:42:34 +0000 Message-Id: <20250117134256.2079356-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52a.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-6-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-16-alex.bennee@linaro.org> 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 Fri Jan 17 13:42: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: 858173 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp704594wrb; Fri, 17 Jan 2025 05:44:01 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX0oQTLECjJrrbQoYy3mLoJgxW+1ODAKr6KgvNsM5tskfR3Z9kSex2KTCvf0Di1gJ4d8mqVFw==@linaro.org X-Google-Smtp-Source: AGHT+IH+B3e+NcPkc/+hogDjfcCqoL9Oeb4zlcD9TtLDzAUf5TzF//LSOfQtzt2XSXYNAyIBPWWq X-Received: by 2002:a05:6102:e0f:b0:4b2:5d10:58f2 with SMTP id ada2fe7eead31-4b690c22632mr1966497137.14.1737121440923; Fri, 17 Jan 2025 05:44:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121440; cv=none; d=google.com; s=arc-20240605; b=FhemT483Oak3ziJ67wlPM4B1kYgTGIe2t0//GeWBDVx7mv/MMdppsqwVUqSpzVJwlU +3GPTuNNwMj3J00IUk/qyKKfHBiFmwfuwcdjBwlwm1wrryRyRM/A9Xtop4TyWf+CQies w6Sx0ClHICJznCtVSFPZYNOxNox4HLZyp4Tdz3monV4suXAC0GD5o0FfHYnDbQAtOgXe jzAJhIJbvSJMtBq+lNYX0DTs81y4CTewKRDgiEIpYQrtT+YYyfpuL0Desn9FEV2bvrDC n2vZfZADANfgGiSZ9mvuZUTxTkqmKa4BDwZNdUgk+HC/9uipU5bdJQlrc7+lk2VfWFzY qrew== 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=wtbti+nfIC33MIZ1eYW+qTFtToL57v/F5KN9R+uVCLw=; fh=yu0InTeBwSZcLajIY49SmB6DXvx9wTO9ThO8p5pbR7k=; b=km+hwaugVbpBwVcZ8YgT/oDzoY+YkJgph0POkuePhWdAdlRDK0gV+hBB6GsN1m0D0k cv8Im4lMwuwW/lu2o63KjHR3zyByJ40KNrl0gWLhslus6VRn5jrE/kvs2YDXaaKCHTw9 53hbFYNmVTGweCMcRMlVltWxNJzdhDW1cszO6ScWaD+06VAI+i2wyzw5S+5NbFxnsvYX bLu+90sanokmEtQC1Qn7JrdzTVHFsg7raF5qGDorBqzMcqqrboruV87IWFe/PpnMvfIM u0yJDCc6RlXih8oO7olwNjBbC9lNwO6RbPB7t4jC5s5TCZTOM/Ew4kJz4YB/fCsB3+qV lPHw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vu0SOSet; 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-4b68a3260eesi786805137.451.2025.01.17.05.44.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:44: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=vu0SOSet; 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 1tYmdN-0001JR-Rf; Fri, 17 Jan 2025 08:43:37 -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 1tYmcy-00010u-7d for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:12 -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 1tYmcu-0002ES-TC for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:11 -0500 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-ab34a170526so292284866b.0 for ; Fri, 17 Jan 2025 05:43:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121387; x=1737726187; 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=wtbti+nfIC33MIZ1eYW+qTFtToL57v/F5KN9R+uVCLw=; b=vu0SOSet9ldPkOTJU6GXws1FUpz0D37fktPafwMKpnqIxM7xyMtqTqzS8NSm4n/ObW +bQSSmC4+y3IJGYEXMNPNMeq/GKv05zaYv6iS+8IFxz+tdyda4RmpUj+22yyM6XjFa5v x/2qrBNsOSCTRX9hL7XACCoE8+fHvxq+3cs4GQ6o5fbkGxSYkU79JPTGd0I8yDCOrMxp BZhJ5u/tQCVSuXRT7zNrMoinlcCeVQ9/kZGGrMC49/26afoypj5KqiCNI0F1dB4Sig+8 +H86Hrj/oXfc2n54NjMMRAh/UWDbjHpmsGOIBGIFaFT4bzbqwKrpAgEdK1YEZZhFBq1s IwQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121387; x=1737726187; 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=wtbti+nfIC33MIZ1eYW+qTFtToL57v/F5KN9R+uVCLw=; b=SC2Gw6r4zh2uYMiZkw3cnVHrztQrRRGkI0yeLfzmZepSYcPTEQ7s4W+Jy75acsT3ww 9HVzG2wIENP3/cApwI1EFOJDq4NUZ6RbfCQtTs7JTQu6vrCICAkhhPpTImecLDCuUa/r MszH6IMCpm/4hGiLq8Jp+M7fSjgEh6lfjPCCodjB3F74ue7PK+uiW67AgIfiuzTN9S0M 9KytZMQ0Xts5sBkEL9s2wOMdaIkdvxMdJ22VwGDd5QZefyU/ggXQ3pAsF0997vmA/LYe lHYxOPZM78BtTFnjNpLTulLAVLNs5yv8Qs6jrSQzmCPZA8s1xEWxfiWLDJ477fJj4vOS bHng== X-Gm-Message-State: AOJu0YzjoVeMcYJzQOxrS3ND1vTYNQ9vxkXHtOAkNITbZQsormoF7w3N JUzGw5hfnd2r+7CI5/LRNuVP0UtPKvPnRQ0l+m+bG01EOKzIf+pYcM8Tk9WU0c0= X-Gm-Gg: ASbGncvgI/Hj6kwF0D0RttlI4K4vcGtQpOm23hpwDlAHjfXgZ19vcJn6gQxWlqR4MXK LA3vh2L1CzwQssRF2tja6YeLrvvfv2vyYuxvJaQFkrE5JvCRwfVS8pk4IuNCWmXZrxOT0irabmc k7ghfHOW9Tx8X+RAI0f1goIlvgpa2YlxoBxJZTFCkR/D+qktItbdEwaYA2SpifitiSNk2pnXVft gKjRNvhJpV6fh8A8d+q8uc4LJHSGL70AmkEyxtpmCutdx1tJIqNh1Y= X-Received: by 2002:a17:907:96a5:b0:ab3:6734:99da with SMTP id a640c23a62f3a-ab38b3841d7mr255257566b.37.1737121387499; Fri, 17 Jan 2025 05:43:07 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384ce2295sm175622866b.64.2025.01.17.05.43.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:43:03 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 69A34608B4; Fri, 17 Jan 2025 13:42:58 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Alexandre Iooss , Mahmoud Mandour Subject: [PULL 16/37] contrib/plugins/cache: fix 32-bit build Date: Fri, 17 Jan 2025 13:42:35 +0000 Message-Id: <20250117134256.2079356-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-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: -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-7-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-17-alex.bennee@linaro.org> 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 Fri Jan 17 13:42: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: 858178 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp704868wrb; Fri, 17 Jan 2025 05:44:37 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUWwPX9UQOsXGRq/psw+lg71Z8DdBuUyJsEiRY5JxPFq+kJHyyOp7BZSn/feJWqP4Q42QHXOw==@linaro.org X-Google-Smtp-Source: AGHT+IEwCvm4hRtlTaidEYCGmT7pG80T63+PhzwOMerH3BBi3wCtYGbHGkRq8G9yer+XN1D2uf4I X-Received: by 2002:a05:6214:4b0f:b0:6e1:a36b:3445 with SMTP id 6a1803df08f44-6e1b21857c6mr52450466d6.19.1737121477759; Fri, 17 Jan 2025 05:44:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121477; cv=none; d=google.com; s=arc-20240605; b=RJezN8OI/LhFVSUTbJi2pBPsdSUYvBorOjx0tTkP2VYPSoKV7++TZdHoa2iz3AM1Fv o4c/ZiMXiKtWtuYooV3MnPZvkaeGox770a9sMoB6XhTQplt06RLscH7rOswXRi4V4/fu h5saZ5RCgWmRyHO3T3FZFnQ7/JiZVKhACCwRNl4+csZQvPRzeBiXQ9sgAW7IT+pgkbsD FP+Kh5THPRsROd4tTgJPxGUKTeOAQwgBaumIHF14BW44XD4dY9NlzCXTl9SOIkzdYa/R v496gZhZHXu1CIpu225D+40fJlJaC6RPFjabahbZBHHgi6vFVbFOVJ041Ce7/M/bLNL+ e3FQ== 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=zp1WT9YSEVD+JiobR2XNVwHS259ESWVfvYJkMEpr24k=; fh=yu0InTeBwSZcLajIY49SmB6DXvx9wTO9ThO8p5pbR7k=; b=AAhB8+ElZEil1ylVEZPqj0FXLVH3C8a0SeXm646WJXpra9Sob4aZSxaCmDrdGCO9s+ UZaiF5K1cY7mbMZgOJSZHqXLk7GTnjetbYVmtUIscn9byyFLh95cTxLc48zpGBPcjDnM NRyzbhol55C4VDJjHkgEK42L1Ljb7ZEh2OxKk4elRSV7Kb4QTAGvfFl6U4p2DQIFXhct I029RVBr+9JUj8Vy5zOB5bLHdbRzt8/1kwpte1o6fMQJ+1teORzQUvH+ygCh+/NiVUA+ 0+a1a4f1CSvy1YiXPXk9R5CE6634/iHjiaGIa3H34yUrXURZyH3mGjiMVGT84yZfgUdO 2Z2Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tiMTOEca; 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-6e1afbfad0fsi25415286d6.92.2025.01.17.05.44.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:44:37 -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=tiMTOEca; 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 1tYmdM-0001Gy-Ap; Fri, 17 Jan 2025 08:43: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 1tYmcw-0000zm-Tg for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:11 -0500 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmcu-0002Dy-81 for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:10 -0500 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-5d3dce16a3dso1065104a12.1 for ; Fri, 17 Jan 2025 05:43:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121385; x=1737726185; 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=zp1WT9YSEVD+JiobR2XNVwHS259ESWVfvYJkMEpr24k=; b=tiMTOEcaNlqmjOTANFWEHUpKWBRw5+j2mIwQmF0WYgH4G4Sat5hI2qQ+E1j8gko/cw FL2c5c5Kt4qudVkPejUSN7VKQmhA7Gm45JejIwIm+qJIdmxxQfM43Z2W/o3lhTwqbmEE TXF8T22zTKoorXiQ9KB8CFSi7n/rzGlMyTAP3zIuqjqmVC5A0ZyMBKu9WQIi/WsBA5bM Dx9IEgN1pFtM95q8zkHcYIvosgVaeZlyJGdB1jarLRLPeidGqdkCPgE2YXKOHVz1yfT0 O4PtubUE6oXNJUzv2wSpz3zR9hLzjyWQxSa7sUbsEArB4itiDyZTcI7ulinkf3jdtgZ/ BdEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121385; x=1737726185; 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=zp1WT9YSEVD+JiobR2XNVwHS259ESWVfvYJkMEpr24k=; b=Ocxpy5kc7jHVz7lcbsoh4gRqs3eZhoSRXn3SfI/TCnYEBJyEKE6QvQ6UBwDvp4+Rp8 896S4+W7gHf5MltKDKS3T5Bth7+GO+8Fgzq9Cym506tziIH+5b5o1TwWTNl+dGsW+qQM v+uiYhI/sIGN8ngKBllej+rqmB97UFf+7+SLiy2IicUEcG8biuXg8XbYd1lD2RxpVJnV h5tU4eI7c/In5g1azm3dGEAkcMVxaZcxIYVMYl9TW3W3LSf8FL6wGz5iAKjGNn23wZFh uRZbUxFFEgI4GWABYFquIYcdEgPHA5ElpqsQ1u7fwhrhGa3m76TOBb6vhl7RknaciqVu tLsA== X-Gm-Message-State: AOJu0Yz0vwlof1/yCgcm6iTFlSmudlbqpbgbcg6Y/MoAkFtE0zZlL6H0 YcewtwrfoCLGBNLoZ58j9ZnfNKWaJeL0kbr4csf5cU09MZ7vNIXFghranakCgW0= X-Gm-Gg: ASbGncuSTAqjiPkir8Sr/Lx8z8mGnlb3eAL+YgrSC7ndXc+V/eQYYQkg9/2ZgocsoFX eABxiI7V/ZZS7N/BHh1RrXYdc+XQz+n1cOTZ5ptKNUsDh/5Tsgnxn7UUr0hzFgn+Cxn4c539Ai/ BrNXut1S5c3uN+mjtY+Aw0RyXXArvXiO//emutxvLuK3bxeR88NAqcC0Wa/ggqd6VjXCjSs5XU2 49Ve8uJWOYzDn4XWUmHybBcPo5UVT30MTcmOg18xv45U91ZvdL4kWRcNuWoA5lKzw+R X-Received: by 2002:a05:6402:5188:b0:5d0:d06b:cdc4 with SMTP id 4fb4d7f45d1cf-5db7dd0c8f6mr2075132a12.15.1737121385256; Fri, 17 Jan 2025 05:43:05 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5db73642c1asm1487113a12.5.2025.01.17.05.43.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:43:04 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 80FD3608B7; Fri, 17 Jan 2025 13:42:58 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Alexandre Iooss , Mahmoud Mandour Subject: [PULL 17/37] contrib/plugins/hotblocks: fix 32-bit build Date: Fri, 17 Jan 2025 13:42:36 +0000 Message-Id: <20250117134256.2079356-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x535.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 Message-Id: <20250116160306.1709518-18-alex.bennee@linaro.org> 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 Fri Jan 17 13:42: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: 858189 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp705687wrb; Fri, 17 Jan 2025 05:46:28 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWADIGpmVFaQyIfxtrkOHsL/zWFKvc5QPZSCnYZuY2WsbGk4teIvaX1qG/2WWdSTl2iJBl9CA==@linaro.org X-Google-Smtp-Source: AGHT+IGKR23QGo2xUAejXoUirBziFyg4qWbzXCkRxmZnaI4/ts2aP1bm1uEOSEwyFZ+Y8F0SaGf/ X-Received: by 2002:a05:6102:50a5:b0:4a3:ab95:9637 with SMTP id ada2fe7eead31-4b690bf62ecmr1884660137.12.1737121588240; Fri, 17 Jan 2025 05:46:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121588; cv=none; d=google.com; s=arc-20240605; b=Seo2N8HN44s+v0RTYPyNdhMersFNrLgN7syaln3k40VBRu3sPkSNSFRpcGfBkW4cSc yXuvP6l02s4BTnl9cQMpchVP06rsC6v9yZvYM5iEdMhJ1F7zHOQvgAg6rAdiKsw06U+Z NHoSRcgnvsA1iVfBZE5mfKKshanPQeWn1r48vXj66LtOKqetWzIvLoK/xykk/YoiWjUe Dxa+oTBIErSl8SCMVognt0bkhSqm9GrjD7iiLsYNw5WTs926tKCgcan4kop7D+FJDyrg P+2eV+D/mWtBQsxuFsp3XI3+qGYwkytAFi7tlz5LoBhXTSEE7r1gMlyk6KYH4xgs3YCa 2tSg== 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=LiXe8STMjZ/F+kxQHLyLYOsg7/4BbTiTdjsaFjR8pnU=; fh=yu0InTeBwSZcLajIY49SmB6DXvx9wTO9ThO8p5pbR7k=; b=SMN/L5UmGJWe6ds5llacDOhjweQEyu8AS12DZ0zwGgEVBHNMUyuTHNtkQSNu7dzMrv C7vbC3vpMlkOUukahv20DHj+1bWKOdsbPTLcaxAZCdeIrYUC5BUHK8808WwH+mXZp+EH SMfiHAgmv6KUiCdJPusaKq3kIsEJN5Is8sWK1wJjEqyunhawKUBRk2bBoZ9p3Bzk0CyX jgF0pNg4dX2C7EJgTgzMa9aVzBtsf5UKlW3EtyKpAmoz/R4a5rQKmUi5AT3v5k5r75e9 5ZUONvjQwSUsYmVAcL/TM7Ugou8K46W0ohGbxLLnUbt+2kO5NBTMl8MD+zu9oUGRz4XK OBEQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J4+PKZNr; 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-4b68a3232e3si949681137.444.2025.01.17.05.46.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:46: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=J4+PKZNr; 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 1tYmdO-0001KC-A1; Fri, 17 Jan 2025 08:43:38 -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 1tYmcy-00010x-Gz for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:13 -0500 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmcv-0002Ev-NY for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:12 -0500 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-ab39f84cbf1so8394666b.3 for ; Fri, 17 Jan 2025 05:43:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121388; x=1737726188; 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=LiXe8STMjZ/F+kxQHLyLYOsg7/4BbTiTdjsaFjR8pnU=; b=J4+PKZNrBMkMZKJdWqT+lRuU7hKImRtkkAfJ2J4v20tnA2knEYHUWoAUXQB72l42yt v+ilVvRziKNi7A+vh+ke5RDpHzDHxRWLgdLCzzjkxn1L8wfITBidTns/5k645+6UOScd vU/T9jlT3WWqug7k0U33EAxcKmvEKQLXjhRO+NrsUmhV/FomggXcKEzJIgVcfy4UZdEi kPlvqw1+lV+9vjRwdIBPOnHxlmWxZ3p7fljGgnlGPjPKGk5zT0H/A4GtGfjPQ6RxT/jB cVKxobhbCMEuZiVMWJJLWupSXGDBzfueJJsYf4fVrnuOs7FOmxd2tAPOwxj3sJS6uYes C+IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121388; x=1737726188; 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=LiXe8STMjZ/F+kxQHLyLYOsg7/4BbTiTdjsaFjR8pnU=; b=ZcFM9yzQ+x4n75HjnU8D0KgAp8XyoBlPn2zaXNvbA80lmydAsQYDzBzKyFrYytgte2 HIfAjYNNITwdUn/O+/qYYdcztJEdRB27nJlvZlqfO3cg+DwUYjEtH5soTZeuHNcKSl2E enBsIzAhFpOmWIiU8hY0eeu5jMHhvlASokp1Djtnlhf25HAOe36Z3An+g9gSmGvWzKLs DyhNSuhuDtKOzwMJ5VBj/7Xs/Mp/JekiTQrBd+Mf4XKMHnD3qi4yxciM2onyqaG3aSuC oMSgfNOUoKNYNCsJNo86fOaVnAEtOxPAVYu1NIUm6yh8J+yAmd14+oncg7aa2SrV3d48 FBFw== X-Gm-Message-State: AOJu0YzakgO4Ay7tSIaNIDOKkBRLbSPmD32AG25RGLwfKmZyoDhSmegb NVUdMhfkA+1d1fWdqP/lJRq7Sh4ElxR5ngz/G3kocZNaUbaAHSBDKLi5DLUcvkQ= X-Gm-Gg: ASbGncuyTR3Elm8jOcmvD+MBS0vTf7fI7jNXnTFo0v0Hb64dOqi9eY9lMSMGLE0AYML BHt3q4hNVgWrq8dSYGb1x+vpwa41haFppfZtILHT9DAxG/SXGeHyPOZ3etWIMD+q9iAatEvU7WO DnnQ8jufg/iBudBaMpCmCvijCiJKPMdXMtMetxuAsQC3twBJArjBRWJ554VGZwZZv8lJtghEGai 7yW85PFHubzlh++Dpy10aCxMLxP8dObSW3xd/FtASLVpZ9XRzCk/9g= X-Received: by 2002:a17:907:c0d:b0:ab2:f5e9:9a39 with SMTP id a640c23a62f3a-ab38b15d2camr244111866b.23.1737121387859; Fri, 17 Jan 2025 05:43:07 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab39aa6a7besm38099866b.68.2025.01.17.05.43.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:43:04 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 96939608C2; Fri, 17 Jan 2025 13:42:58 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Alexandre Iooss , Mahmoud Mandour Subject: [PULL 18/37] contrib/plugins/cflow: fix 32-bit build Date: Fri, 17 Jan 2025 13:42:37 +0000 Message-Id: <20250117134256.2079356-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62f.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-9-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-19-alex.bennee@linaro.org> 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 Fri Jan 17 13:42: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: 858201 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp708433wrb; Fri, 17 Jan 2025 05:53:43 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVR+BFWYTl1/c58POwkzkNkubUxb7QKgjlUTegfVtm3hxarZYTO0cMpbkDrmDNInNPRipQhSg==@linaro.org X-Google-Smtp-Source: AGHT+IHzNyxyE5URrV9FpOMVyewuju6KukcLxv3yGO8lxYG0xd2znIpt6Q2oZtB4hUR6/y7yNN3N X-Received: by 2002:a05:622a:1817:b0:467:b1b4:2b6 with SMTP id d75a77b69052e-46e12b7bf21mr42392661cf.38.1737122023175; Fri, 17 Jan 2025 05:53:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737122023; cv=none; d=google.com; s=arc-20240605; b=X5BiiYsZLHZH4n4x4esEW8JNOdPFMIw0sOwvG4nUwu3AN+cSdFpwdv2DuY/vcS4rAa LZE6XqQBHtfenIsW7ZpWDqL2+fZOG0XksWMF0nprf8CRCgPKZglMM5DF5c2L2c+5+q7N vW8h933JNVqCM52EZf4/VPOLnES7Aq6+46CQC5nxcD8kjyLcUiRXOpzHphMjqQnlI+Ym PEAWlqycfeLdauPCojsNXxitOIxOALTgGKIvNGNRWkUpot+wmi6z1WrQEMXhYVW+ifTK 6wkJ4D9yti8mgJKHX9/P9GfMb6LXGR+PR6ik/p4MKyTdpMGIBH3JTCLu07VCejduKilS R/Wg== 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=JBfBDXCVyBtlkqh3uo0WHdnPDpdgRN/7dgUNkr6m4ig=; fh=yu0InTeBwSZcLajIY49SmB6DXvx9wTO9ThO8p5pbR7k=; b=AjiMEQE6oqnHUw5PDbGp1ckhHZy80FrqKA7EhliQtPd5FgzMUnP2RjbXiV+nl7+5J/ 7jnr/1hQFc4nBfjPY7BwE+wxVvytzxsPVe++mWAvkF8vZiOWxxg2oTXEB9meEqW8/NiU YNGeEwLVblPnfQlUq+7hzGL56aKW06sDOieEVf0/5J1EdK7nbv7b5YtyyXolRYWo3CIs NdecxUeDF+6glCWPJ0B6Kc/KJPk4k+f0NntBd0YwiibR68KAaiokC6Jo3G882Jsz/0QL c08KMD6dr+SaxunvxosNxDmeQDPpyMemDF4v7rwanYfoezL30k6FXOOePF/xqrKG4+5X 0C8w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oYdEr0tL; 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-46e102f2a8bsi25984611cf.135.2025.01.17.05.53.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:53:43 -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=oYdEr0tL; 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 1tYmm1-0002Vn-05; Fri, 17 Jan 2025 08:52:33 -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 1tYmlw-0002Uw-9w for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:52:29 -0500 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmls-0003lO-Ip for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:52:28 -0500 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5d3cf094768so3717321a12.0 for ; Fri, 17 Jan 2025 05:52:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121942; x=1737726742; 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=JBfBDXCVyBtlkqh3uo0WHdnPDpdgRN/7dgUNkr6m4ig=; b=oYdEr0tLeIXa35+ulMDHAwtOtYBuxz7WiPOoENlZgAARDbkyQ9mhCcLvKVq+D4NNcA /VSFbYKrV20DLqr7pov4e4n8hRcaqnVz9VtnY9fWU7OeFp5hZfot0mNKkKDALFFLAkig 302H4JK6nJMfuETnnJ/IVKVT719SEM/BKxIrkB0FRLV7zJeDLyjPkXlwAxpyH0tJ6o3e HQiFG8oKBJ1gstEHNhPLwyAd5jFzdAV6ZnKbVq0xGM+3Itb/oT/RFAW/Klt5GcBODpq/ SNONLIqebBq2fTz+A74cZmg/lXyKu5Ds+IS1R7yADdulGPpuNR5GrlR9jssx7XH2QmdT 29LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121942; x=1737726742; 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=JBfBDXCVyBtlkqh3uo0WHdnPDpdgRN/7dgUNkr6m4ig=; b=Zy6BywZ4dCgdTq9/Xh7qaYYLRlDYOYqFMaBFk57mkQZuDUmxGm0SNL8iBMLKfCj8FQ SwGZPKcyroJr0dVV1aF0RDJoCVaYs6Vt66ucJ5tXyhbJkjstWf54nUMKsQBqjt+B/pYF FcGA4U+NzdLJR3ND2S8cgj1FBB234RQKWk6SbD+RhrC59S7ObSol++FVOVehb05t76r8 FyYuAy79cXcbq8gWe8sUU1UMQ1qEBuLE4tBx0CmRNtwoeNfw808clU9iRA3cPxCPTFX9 QSXrC9QeQcEScqAoSWUhQsB5AuedWtClSVPnPDzFeCFgKCngs5S0pEPT3GMMDlcE3eoE AkFg== X-Gm-Message-State: AOJu0YzC9hUFPW+zEaREaEKmUwc0fh7ibBeHgpFxLgsZCnmqJSOag22v UH2Lw282Aq8rf3+jkFV1amg6oxo4U6hx6ZhEzHhRw0T6MKbaRM5sCFKtfBhOY/E= X-Gm-Gg: ASbGnct9e/IsrzyEOxDM5VSA50cxD4s2gTwz0tI7y59uWGtS2eXUoewMtZJN1b/pAAK Ii3YFH57UxediMVG8FUxesih+GjZlMFHwyyrJTzccCymWE/nhe90RMhkQRzlQ9XOGpvJQ3f3e/g v324tyvk6oDUeQMAkKwM6y0CYJlPv7WCz1Se3RZoDv/km1dFYoLNDZqacAVgQXYsmSwWJUgoyE+ 0ULuvKVkRI2xgdyoxXS7hOkYr+wbUwBz3yArZXa8qOT5SNUDpmhXtA= X-Received: by 2002:a05:6402:2695:b0:5da:d16:7378 with SMTP id 4fb4d7f45d1cf-5db7d8271b8mr2176781a12.21.1737121942008; Fri, 17 Jan 2025 05:52:22 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5db7364272esm1484346a12.12.2025.01.17.05.52.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:52:19 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id AFCA1608C3; Fri, 17 Jan 2025 13:42:58 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Alexandre Iooss , Mahmoud Mandour Subject: [PULL 19/37] contrib/plugins/hwprofile: fix 32-bit build Date: Fri, 17 Jan 2025 13:42:38 +0000 Message-Id: <20250117134256.2079356-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52f.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 Message-Id: <20250116160306.1709518-20-alex.bennee@linaro.org> 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 Fri Jan 17 13:42: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: 858206 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp708567wrb; Fri, 17 Jan 2025 05:54:07 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUIwz1vS7B/N1l01T/qCRc7PafP6FCPQSGtfnA43LPM+1QhHs5Ek4/nlA4dVAXu1HlKyAgimw==@linaro.org X-Google-Smtp-Source: AGHT+IH2ouBDO20lcJmUeRvuD7C6AmEBpmXdVYdr7Ajz0p4a2WVJqe6Js714idqBGJEVtip5kvv2 X-Received: by 2002:a05:6214:2c08:b0:6e1:e90:b777 with SMTP id 6a1803df08f44-6e1b271c2e3mr38051156d6.3.1737122047745; Fri, 17 Jan 2025 05:54:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737122047; cv=none; d=google.com; s=arc-20240605; b=AfUVi5b8K8C4/R8FnZpF0/BNiMmBADuPTof+IGVwpewCT2xkTb6jr37E27z8OwUV85 pghbRbTarP45W5e3KU4bqlzccFTJCchgLMpTpouJF9SSD7R2SoGq3+0KEi21ZW7oOVbq kvyMaMvygoq/MANNdI3HDB9fgnYkuOCMRJia5AcSw/4w6yufDM3RG24bqzfa8yLeS4IZ 50eG3Fd/24blSjNxhwBakQxDq7FEIwCQ10UwuIcpiE0A0Z0+mZ+/Yr9aXf1jXBqxlxax pEs+Kph0wogc2m8F3AehX+H08I0UiIXiHU3jrLVFU46BosJTxNng5nWUjP0ztGrEh5WP zPTQ== 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=HRiHhaLYBl4Bm0h1nKMlemFfl5RZURyn+9H5B+rbcjY=; fh=yu0InTeBwSZcLajIY49SmB6DXvx9wTO9ThO8p5pbR7k=; b=YgsnXcVNZW7KiPV4U2BUySPRynZ5WSNZu4j8cGxoJD5cwJzyvFitLTkB3O/3refIoQ PSUpAJqrV9zy6cgx3no9SMefrRoSDz26Bj10KIKxuyJhtF8ct+z6Z5BchVsA6LWejrQe cQ35hRAG5Rxc+c6BTpG3WDyI16HwWVGyzGpkSUmPo9vClBvW9N0eRpfTt85OqjJ7fLGR ZcyKnyy3TxaHXJJqzsMz6ReYXROmhHnIbaIQO4IYYJLYQzHnCmrdZHnJBpZ8dpfGxtwN kAA7XIvNN7HHKRnA1PX1saKgj/ow+y24qC0LUbqc9ApSRv20GQtwE4lOqjpEiSveL5cd K10g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dR1vsnJk; 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-6e1afd11644si26321676d6.408.2025.01.17.05.54.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:54: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=dR1vsnJk; 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 1tYmm7-0002Xp-KA; Fri, 17 Jan 2025 08:52:39 -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 1tYmlu-0002U3-3W for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:52:26 -0500 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmlr-0003l9-63 for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:52:25 -0500 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-aafc9d75f8bso358460566b.2 for ; Fri, 17 Jan 2025 05:52:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121941; x=1737726741; 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=HRiHhaLYBl4Bm0h1nKMlemFfl5RZURyn+9H5B+rbcjY=; b=dR1vsnJksfrQFFEocKj3D7Lge1afFj46fFtF4NaPbRLOuIdghv+a/mMEwOYpeGTGfs +UArTt7EHBNFAPGLOkk7B8joC4b/wsjA89xU5OJZaoKDvEUtqkI+upkbwag35s+TQK6B mSKtv8GDDZH+iQXGV6IG9mPgXoCfjRb5B2BThVtNfpD+j47s32khYa5GTObtz4n1KpGH ULcxyg8cQ+0XR2EXau1SFij5blM/q0Rq6yTEW/8HhTJ0kJdvh9wH9nzTKoZAF14OAoK6 nQyRGUHk39qceknFAPoY8J4FHoWpGEgf+9PBaxtqImaxnuvcinjUF7ne1O7QFqnvvl2X /QCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121941; x=1737726741; 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=HRiHhaLYBl4Bm0h1nKMlemFfl5RZURyn+9H5B+rbcjY=; b=Or4imgKsp2K8bGgCabnXe5JW5H/9GJOsiP0JS+vmP5Y2jzChS5WUhiHDnIqgtgI/8L LVvNT4gXmhdZHj06FUtfn+FekzKUgV8ptcxUGbFBpujMwAhsCq/dhGjMMyk2Yieq3EzI uPmBzBdlpM7tQl22FeS0IySrHc0Q8k81vhgJJzNljmkp7oV+irbtDcrncR9DCNtMnDVO mjgJRhge1trmTxtUWUM9gdTcnnpH+qPYMWVf72iVWhv0VWd27EWDgI9+7GZMgucDiRl9 PcoFYtL8TvXzqaYYOuEI+712Y3ZsWuau4O8MX7snan2PWYRyHsiejOiVeb2c8dp9ImTM aq+Q== X-Gm-Message-State: AOJu0YxG+eO/Qs1sWVtglK+mHzr6YQ5JJufC6vhx5C+glnY1mrU2R7xy REbMzfQNhYr5iE+KNwDWVS9cOeVmzf9ndCN7oz/mjN97hVrtfcRTYtmIAo8kWcQ= X-Gm-Gg: ASbGncuKWB914mTQh8E3GdRIzHYNtiXNZElvqyGJZu2oY0NCwDer53lv95bNdxUHPdw ewl7NOq359Hy39OhzYNw7W3Du4pNb3ZyagsSWdredxp5S2PUCWH6F8CUgRI+Ru/r2HbP/cgZmul YoLV7brA+ILxXMTH76KOL/UtRxFHEWXVEYmGzwssGl9cFDra+1BHgXZxVOWvWTySDreGrUDNBzs AwyUvxAWwVOepXavWP+xBpjeCdJqXDiP+HU3+T7aL59cHNwsE8WKQ8= X-Received: by 2002:a17:907:9408:b0:aa6:a87e:f2e1 with SMTP id a640c23a62f3a-ab38b4b96d0mr265629666b.56.1737121940714; Fri, 17 Jan 2025 05:52:20 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384f8afddsm172613766b.156.2025.01.17.05.52.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:52:19 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id C78AB60853; Fri, 17 Jan 2025 13:42:58 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Alexandre Iooss , Mahmoud Mandour Subject: [PULL 20/37] contrib/plugins/hotpages: fix 32-bit build Date: Fri, 17 Jan 2025 13:42:39 +0000 Message-Id: <20250117134256.2079356-21-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x631.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-11-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-21-alex.bennee@linaro.org> 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 Fri Jan 17 13:42: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: 858191 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp705740wrb; Fri, 17 Jan 2025 05:46:38 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWYeW0UxIKZicy7YSZ9urhRm/EbGGFsX1lc0dsV7Y7Vlx0RVZ3cmLhvBYHYs5WgpXhQq5Ioiw==@linaro.org X-Google-Smtp-Source: AGHT+IGgu3DicdFFMk9yRhman8SxI/KIJG0GnJART92Rd4ni8QqXJ81Dizjky3+QkK+/qz3+lUe8 X-Received: by 2002:a05:6102:4a97:b0:4af:fa1b:d8e0 with SMTP id ada2fe7eead31-4b690be8fe8mr2431300137.15.1737121597953; Fri, 17 Jan 2025 05:46:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121597; cv=none; d=google.com; s=arc-20240605; b=cZrguFG0XV7/zJ8FtQWOSEKfdyxJf5vfHL+pF3Tu5VkgvCpqKxtynGu7PpDGxFKHnK 2O1todVD1yo+k1Slm53K3auEIDIZXztEZuhKpwJ9/IFmITUDwZj24aRqdve3QRBsvMAc fHtSDcsThjsvTOI+knXumnRFOdgyBVoJM5/rywvPkPjtkwaRsBC+U3+au8P9SMVbKqAJ Ep/XQEAvr/HbOvxQL8db9Si89gxnSXuRzykuh0FQTWJRI3S6UQMgDT0cH2C7n7BLkJar f0hoEMVd9vM2uEdnUgFyBzqYKdZ2SDgcQOY3RVmrsRhWls1K+7kLo8hbk7EoLOWzRR1B T5mQ== 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=Gjr3Ms2PP/dAfR8/IA8j7EUzgU3XB+6Gxoy5+eUAxmk=; fh=d3blOkHk7nm+GBf+hCzP8nX0NrySXh8s5nRQ/zn16YI=; b=Qtuf24eooQbTZ7THnt6fvbM8H5LaqLnnrXRMCIumdx0u01D5Kv/3uzg7RBJT7svRds LGfmg1YGwwPFr3AnIzUiXH6EGWPnTLZIb4C8N0ZRWXVWrF2sbN3XuaQyLZnd2bdAijvD lhzyHK/UrLAs1bDMblsckLJN8pdSVesA0vP58Ep7iLlC2X86sTWP8NtTupp/vRHy8sp7 a8dRkD9Y982O82+ywyQO7XJ55QJ5A+7YdrYvScHkNEfI9KdfBHhfuAKs6W0GLc+EF0u5 9fNWnmLCubb2WzlQhlrVpuZIBGv8apdiSHXswqksfrA1Gfi59KfGZRkqO6hmsNsUGCsT 8JRA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K86Q94B8; 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-4b68a34a7ccsi809709137.499.2025.01.17.05.46.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:46:37 -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=K86Q94B8; 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 1tYmdI-0001CB-25; Fri, 17 Jan 2025 08:43:32 -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 1tYmcz-00011R-Fq for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:13 -0500 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmcx-0002G0-9N for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:13 -0500 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-aaee2c5ee6eso372172966b.1 for ; Fri, 17 Jan 2025 05:43:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121390; x=1737726190; 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=Gjr3Ms2PP/dAfR8/IA8j7EUzgU3XB+6Gxoy5+eUAxmk=; b=K86Q94B8yXzrZsUNrYh0pJfwzEo+56/B1QLiR1c3CIgqtnuplJ8NXHtVp0JZfxczmh q+gYVDtVe6Xj4ak9fLu2gzB2ChR9aKP6pjY6p5cOx0xmnDkJWmUrE2s5mFqeTLWRp5Wb +jumwiUfzot87f9aemM9mcq4Bo8maQQedKRnh2+StBm9BEE38BvTEYuGp31mG6voHfwV ayOcs9EZyHqQlHS7FuOafeqONCNXlfswN+P///d80lCIahqOuCxkK5VY/lp9lph1f1w4 ioYPcKCPtP3slJ0+q3lGQsqyfe8QxYXIEw+FmBD5os+UyGWYcNM0P33iZ77ssTxZrWdo +wIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121390; x=1737726190; 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=Gjr3Ms2PP/dAfR8/IA8j7EUzgU3XB+6Gxoy5+eUAxmk=; b=sH9nrPyh00y43LxvImlT3nfV+CiJUh3Rr3C7AgAlMfgIXE8X7UL3teWUfrF3bqJpsl ayMoCSbUrhuEyEGrDeb9qiApEXiJu1fNaulq6VGpojyuqRyhrbubGBNgyDao8X2vqA2D h5rNzXtiG+FvQSpWve9iPv2lwACBbKnthal7+FU0LLml3aUXHny3+x6oJaty2hw1XSZB ruerj8m0cMhKvmvpFb3rd9eKblUlp8lldDwqlfWdL2JmA9Mj8H6Xb8f0o3t7Au/BWz9u 2g9gs4q3haU8DLsLGUPcJRKACsJvS8vhsyE5G2RHJW0Wa41CtijVk71R0ZgSYbblG3YG +1gg== X-Gm-Message-State: AOJu0YwAWWghd1sW2ZQUsIlYVqyJYl2Oa2FAnPHVM3V9Zy2hsGuDq8cA zv4o64+oj8QOVHJeqHpBApyNPDSGdCmwo0bBSlQxNQE4nNVOacIhLb+UE2PMMnY= X-Gm-Gg: ASbGncvNRBz+dkBDHStH0D8r9P8b1819f9C0c+7GlrTstkLKUZtjEZoYmhFLXAZYxSh GyIXI4yvI3M0+HcB9CB0FGdz7WegrF+sl4/ZkNAjxaoxP5+Ptij1fjiPG8/ych04oUHXO7HDLdJ ByKv0MdDhIy4hHE+v+kxfbEaczBMXsCKhNPu7tvgkKxfHLBd9QagrGPcw+ED4oScn3HGu4On162 q2xsrY+vn5FIFyw9+QkV2z+Y+fd8/ukGGwspvBkY22gRAYEHOxwmLQ= X-Received: by 2002:a17:907:706:b0:aa6:5201:7ae3 with SMTP id a640c23a62f3a-ab38b3b23e1mr291248366b.40.1737121389795; Fri, 17 Jan 2025 05:43:09 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384ce20fasm174368966b.66.2025.01.17.05.43.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:43:07 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id DC2FD608D2; Fri, 17 Jan 2025 13:42:58 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Paolo Bonzini , Thomas Huth Subject: [PULL 21/37] configure: reenable plugins by default for 32-bit hosts Date: Fri, 17 Jan 2025 13:42:40 +0000 Message-Id: <20250117134256.2079356-22-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62c.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-12-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-22-alex.bennee@linaro.org> 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: 858179 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp704881wrb; Fri, 17 Jan 2025 05:44:39 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXQhbQ6DwgFe5IYfng+yZUnSOIrGklozN+gC/TFpuI924RR0OW4IuCtb471IULeWqJ/zrdSFA==@linaro.org X-Google-Smtp-Source: AGHT+IGl51O2L9foTmlDALXdn5qENdDxV3LLtElOqebfRphfxMZicHcUWyg8JJ+01ejrYZphVXZo X-Received: by 2002:ac8:5f95:0:b0:46c:82dd:9a69 with SMTP id d75a77b69052e-46df578de9amr180123181cf.19.1737121479124; Fri, 17 Jan 2025 05:44:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121479; cv=none; d=google.com; s=arc-20240605; b=QLyINBLwG/nkj8l100M4kFmMVNSTmADo+9avpm7WdflfS1mQtasyGJAvniw8drRhvQ NKh3QDfimbapkw8B6oZTCsKL2J7bpHhCx3NYQPuV+HAx6mb9sg0DvTH7tpPQTCUJ41YJ XNQnQk/35UGZ+FC5gtlJ3AMtZPYniLtZmdQIzl2rxsKouSB/KFuGBtfimlatdWU6HIWo xiINlNlS5TRcWODJx3kG0A2siANs7CSGB7kJ/Yca6AneJw7IGB4wmM8ZCh1ZeJAlDSzU tEnTqOqjkG/qt9jJAQrOYwocFH1GBoxnjoHktwW0hEaT9itUiN84dZP4cv5y6UyiWtT1 KTzw== 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=z0X1Y4uYNu2Kk1P4je8Zch9rD7a4QSWs3eQqhNJ9Els=; fh=epVqkck4K3VtXGxLmKtXp5iIhVlI3Qxrt9/7kn/nd7g=; b=e4QyR5fbnTyUyFCxpbxXstvKjwe4ic+/TRmaZqiYZ3x3MzMvPsCrmoCQdpXOZhuIfU COEXkhq1Lwjat3ComT0Vn3ZZP/DGrcQrZOiYXZ4whOweJJ4m0jtIwvAq9M9hppNfXSXu FEVFh1Dzpg+YV1pX5UrEcQSWUlYrtJxB+pFB5oVWZgPEA4XRwZ2mGq4zw8hzS4c1YWJi HWkskdqKvl1NLbxERpW3UL2oS1B1phS5WmOByxXe9d6GIIw1hd20hmqwAD+UYzJgu9J7 HLY5dVgu4sHHaUDfKiZd47MY0p9ssEEiIO9F/qDFIX9sEu8UY3Cz5Ni99/GV75dqPvbA 7hKQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WSXGy6rK; 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-46e104bca5bsi23608511cf.662.2025.01.17.05.44.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:44:39 -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=WSXGy6rK; 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 1tYmdq-0001lV-FM; Fri, 17 Jan 2025 08:44: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 1tYmcz-00011Q-Fv for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:14 -0500 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmcw-0002Fk-MS for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:13 -0500 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-aab6fa3e20eso399602966b.2 for ; Fri, 17 Jan 2025 05:43:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121389; x=1737726189; 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=z0X1Y4uYNu2Kk1P4je8Zch9rD7a4QSWs3eQqhNJ9Els=; b=WSXGy6rKTuQg8jBOZr8u4xFDqX/sr8RI77MdPZAS1jJ+FH0i6SVeWRXAj04fn6CO9o QHCI7JXskUKqmjwQVNfbKIHCAr5KPOZfbtAClIRXaUOJKs7cAOe15lPGgeQ/yfJF0aGy sghKEXHk/i20y2T8kaqiOh7VGC2NRDxAsiui+sZNflLfRZykVny4QRPkydSAgE1FGjXI rpVKjN31MZe58hg7sUt6WnESMcG+CUVEfYnIDP38UuDauvFONZkuufN9FZIGZJM0ES4h LJQzrJ71beoHDze1aBB4jySEHO2DYnbF4FG/5+UsfwIwZjNhkwNNp87yWu/JzTCInFhD oBbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121389; x=1737726189; 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=z0X1Y4uYNu2Kk1P4je8Zch9rD7a4QSWs3eQqhNJ9Els=; b=IfflOKRSqEncFolydzx54hPG176sik/SX2mCLNV2WEyzpisA7sSwIOynnUYnVnQxzM b1yLJucMLICZr06Tmxrfd45P3PJd39m2j4tK7tD+/ar3ScY5Ft5J1mQgxo8W2NcrB0Aa yAGu7euSLJ2AndPVwep41UiXgA9pDpbghbBkAVSVoHkeW3tCxjHQUZyG3msxlK05Dv2N SsK4lpdZdW3u0WKZ/j1lgUJwy3fJmRTda6oc7aUNzwcz6DeRO5WqGiLIOWQApcgyphgm DYFFmTG6k3A5vPhT/9akt+UFi32bNMSrXIkIEWp00fICo0ECp4RaLWfp9kRobMZrjiwC LTAA== X-Gm-Message-State: AOJu0YyC+udU8hliViC0EM6oNv0JLxqIeEJlDUvChr+uq4YKEnCqSQjx x1HT0mV+Esrv9a8S5OsYSRhel70tvoYK94Y/aWm8wAFX+ojllZPxb/TV/GACfoI= X-Gm-Gg: ASbGncsBFKlJk9Z6JqSCvTTyyCPzvsDkHmHrrcjGAI8YMMDJ7YZwDV9bdJMR+ZQRaAF xuRd8kQcpeCZ+2o0C7Oc733BrqrC4DtaOUmCeAw8m0H/+CzSzanRg7Z6Sd7n7gzsnsA536fsMp0 i/11wQeZ5soCdcoFXGcC5hQaOS5BGsJQKfas+fLGIgYe0IRbnMRgcDK9ZBVcXPdeg0h5J/JsYJa Ku5Q5vcQy7SFolF9l/aXeMeOEsxAPo7IF7+ONnK2B7kN+3tECYgoJk= X-Received: by 2002:a17:907:86a3:b0:ab2:db7b:5db3 with SMTP id a640c23a62f3a-ab38b4c8520mr323435866b.54.1737121389093; Fri, 17 Jan 2025 05:43:09 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384c75283sm173209666b.8.2025.01.17.05.43.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:43:07 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id F114660858; Fri, 17 Jan 2025 13:42:58 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier , Julian Ganz , Richard Henderson , Paolo Bonzini Subject: [PULL 22/37] accel/tcg: also suppress asynchronous IRQs for cpu_io_recompile Date: Fri, 17 Jan 2025 13:42:41 +0000 Message-Id: <20250117134256.2079356-23-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x634.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 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. Reviewed-by: Pierrick Bouvier Reviewed-by: Julian Ganz Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-23-alex.bennee@linaro.org> 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 Fri Jan 17 13:42: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: 858177 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp704783wrb; Fri, 17 Jan 2025 05:44:23 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWpL8Unm+GLeglLuCTUnxAyzKOwkR7TuTu+Yrt/5Auar5qCE5zGqH81hofw8ROIaIw/MDT0NQ==@linaro.org X-Google-Smtp-Source: AGHT+IF0aPdy0EPKJZbgQCjyK5ZeEUJPVgf7PfQY2oz5Dlk5MXDXRaJeYhuiIQyuBeCdQphMRUOa X-Received: by 2002:a05:6214:d67:b0:6d8:a5f7:f116 with SMTP id 6a1803df08f44-6e1b22353a4mr40936956d6.42.1737121463723; Fri, 17 Jan 2025 05:44:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121463; cv=none; d=google.com; s=arc-20240605; b=HHY3OyyWw0CyBxiTSnQAyBZmkBdCbUME/+YFUZQMYD+KWaXfzZiJ3/cHFoFX0LLQuI eKJ8XuWHscPF+oAmlQQgGoYHLi2segRmsJt/OPQAetSH7xPrtv9m1Cd9TUzeKUh5DiKG KRYFNO9sLEXWY0ehpIlkd3/2JWkKBvnunQXFCx6KIfgBfkN3R3vEFFDr9rYYk8Ufh2In 2MW/XshnL18Mxs+fk8/8HXnyHNl51vGnPh+Ek4+jvPz8+oSBgblGm4vbUgiWV0hUbGt7 7p56tCvXZXSfm+Xhnf8LdGpW7tbF5wdN4VC1Og82my/KvLHfGojk5bYxnS+80S9dB6hR Byrg== 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=O5nQGY+sbeCS5yMC9j5SrutOVhuXnWOJMgjZQS915h0=; fh=H0GvRgWRe5gabUgJclC6CTOYA4ABMQHySneh+oak7V0=; b=ashaZlLbJHfoCfbGPoomk9e0lF8xsgQoP6Zt1B5TWr2dPqke32yD0+jUbz7Sg1ckcp b2HT1s8XN3Yo5R0Rf+BX8UFZsuKw+e9GF3huy8+BIp7HtXjfhTJ6/ysbwJ1GEAuoOH0V 32GBPOq4B68n7DfdGyiVa2bi3NOTGGKhx1tQKsR8NugV/79X3VbWAE9qbx+Mbm27Vmbw 97euU0WPLcW8xjmkw17ILHiO/1hYuBwGvqKE+N0cwNS7zwepNpJLKh4oWEbEN7S+pbyi brtrcOzsbf19u2CzseWfdMmCtCjiE28CfJkaZsJfr8zn8m3TNQZunUd4Fd2TzqTgFPDu OllQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QZajQNUQ; 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-6e1afd0944fsi25082096d6.387.2025.01.17.05.44.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:44:23 -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=QZajQNUQ; 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 1tYmdU-0001Mi-69; Fri, 17 Jan 2025 08:43: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 1tYmd1-00012Y-33 for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:15 -0500 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmcz-0002Gz-2d for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:14 -0500 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-aa6a92f863cso398624366b.1 for ; Fri, 17 Jan 2025 05:43:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121391; x=1737726191; 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=O5nQGY+sbeCS5yMC9j5SrutOVhuXnWOJMgjZQS915h0=; b=QZajQNUQ+DnTg/Zp/11okea2Mjcx9WgWrEzyzWRxZEeyGdiCMwlmUhC5wV7s0ki8Qp WL965c8BERXupc0t5LCjxcVeHg8EISZgJ/vOizAgcOPvdjZeI6RoD/ZXXGCeCA3Qn1OZ tEIoyjs1aGUZ7iWjWwKNRrryi/xkvn4sg6VWqHI0Oex8fHBh/574Dk32ppX9ZSVZqeGV oKfcQJB9QZ3omNO4ZUVLav4Zs6EANogc4VN5p8CDlbdTpyvyGYeMmHsiVzxh4WbUZVDr 9Liq6TOvIK/6rjxuy76bquqQbY46iiLWIArRZdoQM25OaIM4hm7BEY1qbqwryzw0WU3R PUAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121391; x=1737726191; 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=O5nQGY+sbeCS5yMC9j5SrutOVhuXnWOJMgjZQS915h0=; b=o9oVH7IpCjWgbEDSVX/UOtiMyWbHpRTPvLYyCDjvUt5UT3JAXN31wsbGIeaa/umso/ NzvxP/WSGEMTzWhIuEVvXgaX5WdveUOln3WZFZGmCziGSaCfxaHQK9PzJyKOo/2V5Ut8 FV1iNO5+ddbV6Rwc5X9GYgZKdukZIv/UkZ/kmycsqsmTfwvorhIOU2Sjb9qDljC1hD4L 4d/XIWgIw5PtvZuAy2KFhnyJRDvhqgb93F/XrpM9nbIyDTxZqywYXO/EacK04cGiH2Zq kT1Ihri03BLJE0jX0xlGjtY92oOPWxsEU/9h4Ha35BFQY9dWbh3YdyFibFnVwJ8Zzp97 Yv6A== X-Gm-Message-State: AOJu0YxEIwWUMVp8IaIU+kE1Yn9iU6utEAbJsM8xDMw70ecIge9R2CyH Kpi8hFNNE5lk9bci63WK3FocxvcU6EZgdcCTvo/Hki1pV3iF2Eeyzq4LqqjPHiM= X-Gm-Gg: ASbGncv6m9CMUwEKGzIkexYha50OBuUg52lPE8zRpkYiGbwtXrEU4C6DSsfM6nWApMw kSsF4IrtIbN+MdX9PkSff/sfQoAsD9JReLrpewjpsjocsmdQtb4UnXciWHjN7le1gdMO7mhiNIi MVLkQAYko+LFM6nzBBtkV4H1ENR25n82BhLpaij4Xp3uWadhHQbA8IX5yP4toODS4cy3kekLuyL avhuPj0ItWffoGiTj5+WazfsvcXGonZs5APLA/9X7Bbgb2VUhc7eHk= X-Received: by 2002:a17:907:969f:b0:ab2:d721:ed8e with SMTP id a640c23a62f3a-ab38b42e688mr319241966b.39.1737121391459; Fri, 17 Jan 2025 05:43:11 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384c743e9sm174955466b.10.2025.01.17.05.43.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:43:07 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 18222608D4; Fri, 17 Jan 2025 13:42:59 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Thomas Huth , Richard Henderson , Stefano Garzarella , "Michael S . Tsirkin" , Stefan Weil , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= Subject: [PULL 23/37] win32: remove usage of attribute gcc_struct Date: Fri, 17 Jan 2025 13:42:42 +0000 Message-Id: <20250117134256.2079356-24-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x632.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 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 Message-Id: <20250116160306.1709518-24-alex.bennee@linaro.org> 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 Fri Jan 17 13:42: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: 858207 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp708576wrb; Fri, 17 Jan 2025 05:54:09 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUVW3xSiQX1uV5aJ51fIqrspkA1WxwqHbfOs7zEZJxCh0aXaihbMbkRJ9gV1YruD3UVYegFjg==@linaro.org X-Google-Smtp-Source: AGHT+IE9ZiEqbXNnsEbST0ab7lTfG/C731iG+Ke51ecot5YWTOXfuGMjlk8jJNbqnQpGxlFeAYwq X-Received: by 2002:a05:620a:472b:b0:7b6:dc4f:8879 with SMTP id af79cd13be357-7be6328792fmr564855485a.47.1737122049725; Fri, 17 Jan 2025 05:54:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737122049; cv=none; d=google.com; s=arc-20240605; b=XGmboousADlCb6i2CHz4nw1JdQVJolms0KcXkzdqK+qzODC5U4va5nAinZI6s5ztdD yyyje55MK0vunyg75uJdYj7/xL1bBl/nv+ka1DczdNm+giOm7e74FttAP9DFb9K4bY7O A2Mxe4H5hpPHAtig84qnhoFT35+M3LoCKZ5uVxoEd5tbPgY/VT6GtU8Xk8fcN9gygdOT wDu4fmLAXYByJKPsRLE+kJQqFK6CitOJTymJdOGStpKSE9ONaxeaM0U72MgDk/r5Y8Hf cE2Q9RdghPNSin1RlHBS/8isOoq3sFW0Z0nah+6X+ugL1UmkA5HQh2wWGu2/QQQfMswZ Qmcg== 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=0BAoeWKkDj1LhcqXrH6NGonyyn5Hcg/wwizoEUTfNUY=; fh=IFqLZv+/rwfo/Izegl/hVOZpSEvYLmMEfJXU6SjvcaE=; b=ZgnmcRllPL6XoTVdkR8B72yzLGAnano3+0eQbNFRt+ZQd6GyDwsduiRbxUCQbc+atr judOxqi0mrbcwv69SmhaRukeEg7/eUjpGr9NkDY8sAxqI1KDQwCf/as0CnmKkkZVf0dy +6/wjo6LrNLq30FtddffjROODVhrME+zSKXU+i45ekmHehjAG/CZYwnHIGQaUfYv2RKR e12Z4g6oQMIGtRGF8dWRqhqGUsZABenDxVtiJCWfRoYP8gAyH4PFcLtKMqtWOiti5b00 y4oW3f/U1a8byXOKwmK+K6r9S19CQEt996HIpT/q1FzVoDdGPq+cjSEGxHmAdig3rNs+ SdwQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tpD7VoG4; 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-7be614bee0dsi278148385a.218.2025.01.17.05.54.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:54:09 -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=tpD7VoG4; 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 1tYmm8-0002Yi-TH; Fri, 17 Jan 2025 08:52:40 -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 1tYmls-0002Tk-Os for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:52:25 -0500 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmlp-0003ki-Vl for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:52:24 -0500 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-aaee0b309adso345331466b.3 for ; Fri, 17 Jan 2025 05:52:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121937; x=1737726737; 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=0BAoeWKkDj1LhcqXrH6NGonyyn5Hcg/wwizoEUTfNUY=; b=tpD7VoG4mWWiqyc9zLH8mNOMQ9t+q4HD0cdPwbqdcYlTXD87noAP6kNUHB3wn1CyT7 M484bwGJWEC4+6n8Txt/mzEvZWaNhO9cUjofbdFmg/Id9eKoG1h5AyWVnkd0pusmAcN5 hPrVT5in7uN4dsLoPlmZA6lKFLN4V3Lkq8CheiQICqWQN1T9EeMYRQH6UKpRmOtlDf8A Tg/GZb8//sQrVxLBdfYavcvx8LLSQWLGz9lRgZpE3rB60L9PzmQs49PD/9HcyjzaQSo8 ZKYmF5ZjA2nPrN/WxayurK5y7elHDJdc7pslCaHxpYkNJPtpP4WRvfYuWpOA54+Ujfte er2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121937; x=1737726737; 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=0BAoeWKkDj1LhcqXrH6NGonyyn5Hcg/wwizoEUTfNUY=; b=ktUlHrCuJAa/AT3yUUH8lWmcZ6fecUlfvDky+24WJbdFmRQEJHahd7Qd5H5TjR7+FK oVq8uQueyOPhBCMAwgusr/FaWJoDYp9LL9GrUYik86HZRhbb0Y/hbz8g/dJB16BTSR+2 7ndtS9hrPrvtlKQFQ+YMUrRhp7sjS+sZOM+0HsqVXbimNu7JfAyY21aPdZRaisLqICcj zDW7GqpY69B3puU3RmBkrSz/aC2bLM5dsE2WQgc196XCVW/PjJeBAMJXyZK71MtG3hlL XiZeu8JrqQUOJSRueJB5ZZRc87vmqb2Ufp9qJP1a9kH0L/PHooTKt6DdA78xYlklzKrA VmZg== X-Gm-Message-State: AOJu0YxP8OoHG51uRfJpoeL1Qk4Hw/jx6bsanF67j4qGol+40L93nip3 zV2TIDH5HfOjhGbXxnNxI9ioahkbczuQf8k60gMstWC8jDuTV8CRVQG7SkrI1Ao= X-Gm-Gg: ASbGncvGiYdb1t3GNDKQAcH9lDyBc+7ZTjhF671fj8N2AS/M5QntITZj9lEA7x14Bho wpc4TR+4rU0JF/O+HKzfCisxi0sQqy+zOw3EPquKts4dQWXbG5xaha5w0coNMnYdIyCFdZdkmSR xllXVmpRwuFwKOOFGIQEZgWDV44MzVfaQ0bAR7ApKLLzSw0Gz/n+8MlG89guf14pnxlcVJ2CTrN P/Pg5nyI2im2kq7PlZN6yqoI12Np6GGFK6TfyHII2fCXX4UIMEdElA= X-Received: by 2002:a17:906:4783:b0:aa6:7662:c56d with SMTP id a640c23a62f3a-ab38b167b33mr273208066b.30.1737121937391; Fri, 17 Jan 2025 05:52:17 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab3999638f8sm44617666b.9.2025.01.17.05.52.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:52:16 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2F965608D6; Fri, 17 Jan 2025 13:42:59 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Richard Henderson , Stefan Weil , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Daniel_P?= =?utf-8?q?=2E_Berrang=C3=A9?= , Thomas Huth , Markus Armbruster Subject: [PULL 24/37] docs/devel/style: add a section about bitfield, and disallow them for packed structures Date: Fri, 17 Jan 2025 13:42:43 +0000 Message-Id: <20250117134256.2079356-25-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x631.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: 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 Message-Id: <20250116160306.1709518-25-alex.bennee@linaro.org> 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 Fri Jan 17 13:42: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: 858200 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp708346wrb; Fri, 17 Jan 2025 05:53:26 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVUZT02Aw+bLPW3plHQB8QYa68us/gfNp3t670qr+TQr29vFVBkH61tZku0ZC9YLacExUMgTw==@linaro.org X-Google-Smtp-Source: AGHT+IHPhkUM2irxFOkcg9/hx6ser026WdwYDuo6jF27SKraV0JkgXFQE51mvryS7QWZlcoKnxLz X-Received: by 2002:a05:620a:2547:b0:7b9:a387:3cd8 with SMTP id af79cd13be357-7be6327905dmr402407485a.42.1737122005810; Fri, 17 Jan 2025 05:53:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737122005; cv=none; d=google.com; s=arc-20240605; b=leTPJK5ctRMYoWfzfi/FrrekK7H3xq6wAx7ntaZadZRSSj4d8Gjej0IW0H4fRtJgSS XZfPyvC3viQsqeX9CAzFPuzIm3ZcpWMUI5KeUycfWEfRTPo43oMX6BF2+nLenVsocIOL v6ag0tot5UVnnqK+ugpcBs2cz0pW+YCcU5UN+kdX+jXyFkMyBNsg6SMYyKMM/5o1Lu8T haZGFD15X7Zcm6wuZKun4oYOWVXpbusm7lRRoJxp9TgnFfBfF7iaU+RCivcGVtlVOCAL tn3GldKHOT5sRss8dBrgFa38TLdCM3b1QFUOPlseyh3/pcc5VCdJjXsuWMX3YP+UkZtl LxSg== 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=+DsD0KNZtCjKGcEGcvgtBm3TE+kh+pIdctH3xrF6qRk=; fh=Y1Yb4IVqdhF7MyHwHB3TF2hTTqe0wP759mSStyiTTHU=; b=P37jZDMzvxGjwWSnHRfu9lgVP4AFx9Wv+sHMqFyXh71wWU8ho9dKOBIptvjLvc9kX5 SvNHC11UZ1X49yxcb0/pC1IsSWLOyFiFvKNi0gZTJWgxE4y7YkwSLlQ65cA2ErrK7E57 XZ25d3Zsn6rn/Bqv2vQHSMCOzwj/+PXs6izL+nlaSi4WYWsZDU1Em3NwtDpMf9mFAE4x WHP3lG24LPrKYoZjN0s8ifDb1i5MKyjUIp15od1ovSSWx4p7fMx8277PPBzVFSE8X2a0 KqFEl1HqnryaVydX/Rxgqhi3WaCe+xnrWjpO6I3SSqci4UOfLknainUrTAGjEYlbFlLU clWQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="fy662R/v"; 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-7be6146ca00si273169985a.89.2025.01.17.05.53.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:53:25 -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="fy662R/v"; 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 1tYmm3-0002WK-Re; Fri, 17 Jan 2025 08:52: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 1tYmlv-0002UV-B6 for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:52:27 -0500 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmlr-0003kz-2z for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:52:27 -0500 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-ab2c9b8aecaso330535066b.0 for ; Fri, 17 Jan 2025 05:52:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121939; x=1737726739; 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=+DsD0KNZtCjKGcEGcvgtBm3TE+kh+pIdctH3xrF6qRk=; b=fy662R/vjX5rwXPgvCPjKyCvfYby9SmriIUm/DHPb4c9/8tVxa3wUWwLJ6aSFUnNhz aPKl1CIrIvpSBTpoobRBHmadEFhq2eX/r47R7JU6KoClHS3lbFomlFXYZXgGUpNE7Qhu ualMixRx4FUbV80bOOqu9Vfnp3EJnQYBcgNRTMair4NITrQlyyr8rKHI92VhktNX0bpW /EPngm6zhvCoTAdpyiqbk4k3KZNDizwT8T/Vg3d54kYdruuWjA+iECO4j9ERnpQkYSKf gphjpPqHB9qZRBHtjqtYi6rO4S+0K26URpqzMW6uDzrKNLfKokcXSczdj9S9vDdFJ6y5 px1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121939; x=1737726739; 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=+DsD0KNZtCjKGcEGcvgtBm3TE+kh+pIdctH3xrF6qRk=; b=VHKA/OqawLRtZy438kW+BrCN96DtJEgSyqwpHVOUPcH5ofciyiu79ahXLWXt3RFa2+ Ju8e9iIjOFBwRhskGSaQOHhYuRgxHQfJhGRUGGodEfQT9Hlid6Hc+Xd6xBjkV/6XYpMg ZmVq7Fasqqmt03XWPC1PT1vXVdF4pUCVqDkdJ22NqzYSS2mmSEjpefpSsmZH/fLDqMFb y4KgvPbhaZNZinJz1uVgjxIzOFWvtIgYgilLjAd9AVRrYRXdsBXSoFoAY92QmajSZdn6 FWLXSn7BXFj9bAvEHgjRyfL1N2Y85bbzo1iNGP6lo89ZZOq6vaMt+Va1bAZSqOVTOZ2n 967A== X-Gm-Message-State: AOJu0YyZM/ttI/LdQIbv2cwVpsrGHoR4egwF9uNX80s6bgleBKCprI/i gS0PMlDmbD4oTd0gaV8MJJgjlrgp91JqS0U7pjLSASuCYqmq6gDGRJvVgpZCU4k= X-Gm-Gg: ASbGnctRQMr+y7z9DvTRsNwwQ///mDMbpI+vwgij2r/VmK44neRHlN7DIYh22zIqfdi B5UHfEq6bs7vbUDW7XnOoTkOM54KiM0gve2xZvN2qXNBBuTlQJR+Gsx6I4rbI55P/Gsuba+gdwx z2hqWcPRTgqpohrD13E9xYqwER6jBB8X90Y0dkl7Vm7Gt9cHhwGRV4p1IGfRYDGtrhE5afP7DcC /NMG2Lt969Euy7nkFQTH6Aamfgltkqmcyk/jIRvzBq1NvYRkuVXYMY= X-Received: by 2002:a17:907:72c1:b0:ab3:61e8:aa16 with SMTP id a640c23a62f3a-ab38b38134amr322541466b.43.1737121939347; Fri, 17 Jan 2025 05:52:19 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5db73eb59c6sm1482637a12.62.2025.01.17.05.52.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:52:16 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 4C1FF608D9; Fri, 17 Jan 2025 13:42:59 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Stefan Weil , =?utf-8?q?Alex_Benn=C3=A9e?= , Alexandre Iooss , Mahmoud Mandour , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= Subject: [PULL 25/37] plugins: enable linking with clang/lld Date: Fri, 17 Jan 2025 13:42:44 +0000 Message-Id: <20250117134256.2079356-26-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62b.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 Message-Id: <20250116160306.1709518-26-alex.bennee@linaro.org> 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 Fri Jan 17 13:42: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: 858204 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp708554wrb; Fri, 17 Jan 2025 05:54:04 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVgowN7PdZAylN9jr35pOX/xkBOwsK60NoowK+OEdqLgbXdvrPKrfKBiKqIHxE3Ilv4+RCSrg==@linaro.org X-Google-Smtp-Source: AGHT+IEyKyWyKci4IbaZEr8tBT/gSbMbbaHRocJTMKhv74z33EHB4p8IQC3g4+4PgfwW5JmbcKhj X-Received: by 2002:a05:620a:2687:b0:7b6:e8d4:9b82 with SMTP id af79cd13be357-7be6320c3fcmr410842185a.33.1737122044398; Fri, 17 Jan 2025 05:54:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737122044; cv=none; d=google.com; s=arc-20240605; b=gmyAd2iJ/EXT2VDfrNyRYdI071cis2MgQ86YdNK9mTJmqMEi/yDCza2LT/ehBwbYGe f0eLc1QTxkpsNzHUQMPIDFVcBCDXRwMxA66rhoxAy7TqlImpaRVl/DBxWTqbvyGnJsm/ 6Shwf/JVCRSDVyixWenr1Om1ur3BMN/NHZKiEXKVNfSs7N+LT6Ieu2cXEJzf+/ZEl1dH fUkiXpOJFsLit6zxXCUgzm8n9G5UBiqQ84YQGkjeRFLrsf8/rfWEhrM2WZMCYVeH7JVO jOSnQ0fbnOt9Z+QDItG4v0MKYFsIoSJb8qZzpw53gc/yFgz7O4LGyd4xlWzyxvCe3AKH Sfwg== 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=HtCDv3d7Fj7JdhWS0o/IEH/Zvi/ajW/ZDQ9T4eeCRh8=; fh=Gx9DtyNvQGBGx72Z12no3KggLYwBGD0Je53Cblw8uQs=; b=Xg61nxxtCK8XQta3KSnlvfcBsoHf6D/7tFk8hqfY9gC40kmir0AI0j9vMjFWCJkrf8 iKifW5v9pdROdn5mB1oR6ND+wxGOCWRjWBeQIHSwAV5j1QFPHee881qJU/Mhk5NlTl7L yBA94rvROKhzauB2OTxyzvAKvuDw3Q7otftTfl2jH2Uh+qwCxGMWJSgUv3H0WET1+Vzj /hKo+yNuElFY7VF2FP9tfaM6eQb0Bljp5SJDHlErzR33J7xQDpF9iKnzqMPsVzOLlOdF aFekirMANEtl6cEp5wLbYOSxN2MI72zIb3Uj39gswRKw4az/ZYhT5VZPTzrqQkrEd5DW YIRQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ijbLpktO; 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-7be614cbf1asi277917285a.441.2025.01.17.05.54.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:54:04 -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=ijbLpktO; 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 1tYmm0-0002Vf-BR; Fri, 17 Jan 2025 08:52:32 -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 1tYmlu-0002U5-Bn for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:52:26 -0500 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmlr-0003l6-6c for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:52:26 -0500 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-aab6fa3e20eso401427666b.2 for ; Fri, 17 Jan 2025 05:52:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121940; x=1737726740; 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=HtCDv3d7Fj7JdhWS0o/IEH/Zvi/ajW/ZDQ9T4eeCRh8=; b=ijbLpktOx3ZPF0CEinUFtewiSich2KRhHN3ayksE7Gm05I3ZvR+wkX3sZ9eL/2a+pp A8UIfuABoyLqnWag8sC69SNwPjEBAF8x37uiVKRqQ8CBSPnp4ORs3RbnJ5VBwaoT33qF 8RdnZGtvt7Bgs/9GALivxL5sT45Epo1nEmdEWSfCNIId4wcAPtWreLQcjGd7W3V2Rm8K BN1OwC8cPRQJFTbnXe6tjYvWZXp/KBKciFu12zKmsRHdO3FEua546TSRDTlIUGc9NzB6 J13gpy3c5hphRM9vLWdHkhOb+XpqFzAivPo9dC7RswSWxeP6L3jZIaHN9QhM0Ph+XvQU iXKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121940; x=1737726740; 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=HtCDv3d7Fj7JdhWS0o/IEH/Zvi/ajW/ZDQ9T4eeCRh8=; b=VhmicbRf98enW1OqU3S/vRl5mGse5fGCB3Z9TLrbX6UjxaSiV6Wk2+ZgCHo4EJh+/R lq4LmYzBOtFFy3Z+FVhJmwb+sqqAYr8IAlWUzrMVWH3YyXKkssnKmqTTWAmrmdpHzX7w uBp4OBTTWDZBvBBuIvak5gTNOYKMNAOPhWAq+FOr5FW6hKKQToH8nHkzH1+cYAY1fhZo 8U91QNr6sZnNIYH2wyOnEq9Y4UI6SCtDeFD38/kq8NFn8xULY/BYv7wM8+0N/V6pqrus jsXe2+drvYNC2ErddpbP79o5p/uLpRpjj2wodJxcMw2VZeSzRIL6+BdKItwPyNmXQ0ZX nWIQ== X-Gm-Message-State: AOJu0YxrYdv9ipw6EYh3cIX/dwwrGc+EG1mhKSqPs/9CbOp8UtvI0tmy 4SPxEtZVFDWWmY/zBzGKKIsEjs/M30KUv8wKHE0OqMDKh14vRBILNNHSDcj+ojI= X-Gm-Gg: ASbGncvGnscNBBHl5UAs58zZNfIcJDJ4PJ4gdLjqmLXcfOrACA2JwPKSeb5zF+Dj0wy sKlrfN5j44W2M/tK7xlXZv3p0S89Q3I/aje6VAxggn2GHyXjbmtd6rcib8MdBoAxzA4ATSyitSj MIXiZaEuNoBML9ay9Rp4G61L91HywLmiIsiJsx8oSEfAw1YS6XHvmGWBwjIGlQxW4iRjhxc3Wn7 2mQ1h/JkGrsmfb+Fc0DxDtTt2UjxNPYNDXVk4RYDycUu5QZRRcVEDE= X-Received: by 2002:a17:907:60d2:b0:aac:43e:ffa5 with SMTP id a640c23a62f3a-ab38b1ff088mr231210666b.15.1737121940138; Fri, 17 Jan 2025 05:52:20 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384f86fa4sm174040666b.143.2025.01.17.05.52.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:52:19 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 66A1E608DD; Fri, 17 Jan 2025 13:42:59 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier Subject: [PULL 26/37] plugins: fix kdoc annotation Date: Fri, 17 Jan 2025 13:42:45 +0000 Message-Id: <20250117134256.2079356-27-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62d.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 The function is qemu_plugin_mem_get_value() Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-27-alex.bennee@linaro.org> 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 Fri Jan 17 13:42: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: 858193 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp705955wrb; Fri, 17 Jan 2025 05:47:13 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWV7WsreCRglr6syYnYhQJvdB6VMapxFKgdmVQ8IrmHG6g1Tp96PvS4SEcZhNnQKIUwY+m8dA==@linaro.org X-Google-Smtp-Source: AGHT+IFTQk0OOtZgQWU5M57BFX9mXkwTqcudiD+00eQGcAkq2kcdtZJ1IpHiMB0nVR9WK8/CCErx X-Received: by 2002:a05:620a:2484:b0:7b6:d799:1f84 with SMTP id af79cd13be357-7be631f5c52mr424952485a.15.1737121633670; Fri, 17 Jan 2025 05:47:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121633; cv=none; d=google.com; s=arc-20240605; b=EB5fiqcCQj+HOfBzXws9OyZKoyeMExZXAk2LuqdkccCzD/0clZ9btdexpW5JvtOAl+ iirBkO9mlNDElBdrDqESTc/IO5h1ejEI48EDt+zRlM0jU7M+VBQe4fdvt7USV+8MHEeo wWcsbwunCI+CpNl5YtXqnssST9WahKwtF77MXVWG9NE7uz+CK5esKE0GPCrtmHfcEQsp PnJU6pLyJUI3Nb5vKKWABKQGF5wn1My8L0O2/bAUdOhiMW2U4C1sIzwnj4B8M0sNWQD7 4xW2MA7ecnnFkgGN5wwri4qRH5ZHsqKEKfxMzOPOI+//qlV9naub9Bt+HYrtgKQyOfuC c8Kw== 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=4xuiCI7PA8RfyoMtUNzdFe3eSRNq2phrVz5fhVl8TLw=; fh=Gx9DtyNvQGBGx72Z12no3KggLYwBGD0Je53Cblw8uQs=; b=VwBnioAxuIOyA2U9BzU6+snQlPAWvOZoNob9j6YA0WAWvuKW5mAg94KFcsf6I3Qfgg YRg5GY6LSTipz/0H1REhS+QOTu77fTOYb+jkw1i3CjwicbUytPeyO45IcIV3BPdoCq8D 3wV79KYknSFwq1UMjk/c5UtMMzupXS+TOB2qA9Mjkx9P944oSWtvy/Z2FLI6bYE2+z1b FIWvlMSLTS2BQnjJmXrqp9ceZOIlSTu3MsCAAI5pyV0AsPPAmcopsVbhIfzAdUYCxC2B 9wI38LxQIthVnvLNwh/nCSJq4Fac5TTM7Cs3QEwGIIESVVgAMgrIzb8yLZ/ploCHKJCW Ov1A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d7qzB0Dg; 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-7be6146caf3si271495985a.118.2025.01.17.05.47.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:47: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=d7qzB0Dg; 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 1tYmdy-0002GX-EB; Fri, 17 Jan 2025 08:44:14 -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 1tYmd1-00012Z-3i for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:15 -0500 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmcz-0002HD-H3 for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:14 -0500 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-5d3cf094768so3703051a12.0 for ; Fri, 17 Jan 2025 05:43:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121392; x=1737726192; 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=4xuiCI7PA8RfyoMtUNzdFe3eSRNq2phrVz5fhVl8TLw=; b=d7qzB0Dg+c5stXWn2L321nKNY0XRVaQwlEJj7bHChaS6YvvIV2dh/bGRBM0AtsPi1n VVMyonDB20skRHdrwTeKvniHjGV9VQ082ZFJr0WHnSYhRiFBY7IPku/7ka7Q+MNh/BiG EakPDG7WsxbWW/fH2Hk+wokLTMEd8d7ODhlwijPJ5CAn4VW2vGdcKfh8nDZTugVV3eDs cHALDCdgJ8EfGjDTNHp3hkIec5fAiH+UlAZ/YnumfuRINxpNjLTBiW44/xsqNL2XCHm8 1v0ojXQ5SvNP7Ckl2UdJGLK5HgP7NZJMnaH8hH4xJzKauh5bstafW4W5MR/+3n2tgA7+ UOsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121392; x=1737726192; 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=4xuiCI7PA8RfyoMtUNzdFe3eSRNq2phrVz5fhVl8TLw=; b=athHIcwTjT4tbChum8oqEHlmQSlb8rJaSPDRtYuBufRqZb+l5zQZhuP9pV8dsHkbrP FBK4h/llPCvMgsDwF3/OGpDB33lvzUWT/TlNJyRxsbij3ihRcgiFfevNktZH9qgs6986 mBmE3w9T6dwY2Qmcb0WTXIfiz3CxcOlFKc5XcsHeQr00rtmZfAmDZvUwbQe/H8O2PhwU 5UY5JvNVyrP+tbuXPkLr6xLdLfrHYjfWoCNovR+i24zk8aTi4P/DsCgAUaPYLMKw1wHb MdROzHqPCe6ELXdi5xwpXRR09F+mGDRsymhf3gSN/sC1RG1GNAXfHop/+XtU36z2ZN5a bbDw== X-Gm-Message-State: AOJu0Yya0m8MVw7TSFphfbLyOwvaT9OE1v/0vQiNZeQjnCcUBlCnJABS lTFhAs8oaXQIypo+SSYMZi9Zbe9GhJxxBV8cWeMW6t6jnkPwsS9XEDUJW9YCBgw= X-Gm-Gg: ASbGncvqErAAD/uhj04SeEBjtUpLlH1b4z2idFV/Ze40xGw8ta1udTjZ+Ap2QRUmCZ3 oaFy2RBjCRcICCIWZk5I0lz81LrqQM736HZIK0lv8FSJPL+Djk5KeuqSLH+1OlEmOBZwQLq0G/B Fsico2itVtjSv9KZ9b6Tgd1exoOkBQG6DRxvAZHHKrJdGNKsI1sqUjCSvNfjW27aix/eH04d3xc U4gzaM6NFjEfZii5VSQEoKN5HWcPYwovr82zElFKH3ZGPDhEFRnOHA= X-Received: by 2002:a17:907:3e1d:b0:ab3:974:3d45 with SMTP id a640c23a62f3a-ab38b0a186cmr298609666b.1.1737121392001; Fri, 17 Jan 2025 05:43:12 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384ce0f58sm172496766b.48.2025.01.17.05.43.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:43:07 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 7E7E26083E; Fri, 17 Jan 2025 13:42:59 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier Subject: [PULL 27/37] editorconfig: update for perl scripts Date: Fri, 17 Jan 2025 13:42:46 +0000 Message-Id: <20250117134256.2079356-28-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x530.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 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 Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-28-alex.bennee@linaro.org> 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 Fri Jan 17 13:42: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: 858175 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp704664wrb; Fri, 17 Jan 2025 05:44:10 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVlZnbd5eHbZ3PVhGKp8eyzzS0oeE5wH1hU8HXrqwc1rT7s8n51Cl5AFkk3GNgIJRIV5wirlQ==@linaro.org X-Google-Smtp-Source: AGHT+IHu30TgO/2PQIMQzYWuqR6gT/7Lu0ELt5hfZut0J8f0Ba1HhiUfyzs8d0m2YKG+Khu43fGG X-Received: by 2002:a05:6122:1906:b0:515:4ff6:10c1 with SMTP id 71dfb90a1353d-51d51a732b2mr1626293e0c.0.1737121450596; Fri, 17 Jan 2025 05:44:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121450; cv=none; d=google.com; s=arc-20240605; b=Lx70c9ZsC889r2q14B/FPFrRSKnpHzwKwyPLsQ3cJUErR05TaluLCSzNid1oft+mWP WoWQHqbbvNcd5jnfxqpoPt8MqWZueF6J2PwZlLK2meDSPV5r4gWdMsoDNfQcfaSIB3sO yA5C7CHb/uMRXUX6k0cWmJ6vUf3NX1ATVfqvUkPkVCmc3PSY4St7eWHUHWCGZ+HCSKvY nrtEjfGrPfKzrGM4buZ+pjfHBz25ShC+OoLxgVft0ZaDEDBgXtDryG1IUNIz4/K7f2Dh l1q2ft4vdQQNlqkg04lmF7cc4+KDPayFaPPEf9Kx8TDegMVfA4mxp7rbKQ5QT2sdxcmM E2qg== 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=BweiGGrjQIGk1dVGD1ZKLAbH1Kswi6PYCPMuHmp0Q1k=; fh=KRv3llJpvPMVyQETk41EM6QUndAZ5XtW+LcD0aq+M/Y=; b=JILufpZrl7RRN+jNiG+sH2/mhLVuwJoj2FqEjJv2JblHOC0rYMiKXoXJ8GV7qiHpFR FQ4xetkkLxTlyCua5/VY4ea1QGkGWXFJpSdjCPI98pMunwJWXABLoQ98kt00su9rUJf8 5aWHj+jk2YGqK3Rb+E8uGhLZZEq3ksF/cpAal7mUaX4UiBAUhAfm0T+RKbN1fL5nppJI EX8XVPnCKGOYRW2k0E/GFCsCcLxVzGVkq3rHaXCthDoPwP3d3OucwaLFYkzqQMpRxWA0 w6vOikHwBWfFxAfe3IHyiOgVyTBHdL06GnOS8JIjo80pd9rHaGpSWv5tG2T5UGumbFcQ 9ksg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DDqAtGK7; 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 71dfb90a1353d-51cf571d480si782108e0c.114.2025.01.17.05.44.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:44: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=DDqAtGK7; 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 1tYmdq-0001lB-6R; Fri, 17 Jan 2025 08:44: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 1tYmd0-00012G-8g for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:14 -0500 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmcw-0002FN-31 for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:14 -0500 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5d3e9a88793so3563345a12.1 for ; Fri, 17 Jan 2025 05:43:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121389; x=1737726189; 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=BweiGGrjQIGk1dVGD1ZKLAbH1Kswi6PYCPMuHmp0Q1k=; b=DDqAtGK7KP4hQCqPwlp85M/5Y+UYFxyz1aXhlkvYOks30v0xGzFOXt+4T9WxMltBAs OW0qNr9dsfwvl/mw2xfzW1M8QyJygLY1KFUaJ7aAWZtjTsa7JnsvxnL3ckM4VKN1Q1/J 4hyDgfJx/ElkwuzVhIhhKGVpEsl1t0I7lzsDIYEnwQCLuxD1j0UOiTKZfIdI/+jMWo6G /Mk4CA2w8jqfTCdQFDBCB2tMS8TAWvrqoj04fd0ss/tpbwzrxZQ/vCSf78i81H83YB5c PIej6c23Di/I7HCScjm/8YNY4Fz0m80OYSmOzKn3/H9/R2g5Q9cFV6bextrmZxcnoyyP 7dIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121389; x=1737726189; 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=BweiGGrjQIGk1dVGD1ZKLAbH1Kswi6PYCPMuHmp0Q1k=; b=tV38+GA+XOWc3cu2fUJPX4a67VrAs/Gczed76jHhbUgHa5YZ0/hk/FJsOS8vHuqsAy DZMhsPTYehem5KBH4ulbaerrDZ5+fcRZUTwinobLlz0JPJ2n/vEPJKr0x++jVz6gaAEu 1KvUHc+PXKOcTtz43KrsxkK/j4LyUY9KoX3+hW7+jiSWQWnwV1GsShlRz5LFUy7fcVNF ma0J/udXvuM54OT0AkpCepSa3P2NLmdVwKvXgyzIBvrObQipjEY3IPp/vRtXIp+NQlN8 +e71MPFvKxsq+wJemgLcblMWy7D6A5rpGv4FACJuwepQaAmlWfcvM/m00Xb6xG73ZVoY dRoA== X-Gm-Message-State: AOJu0YzmB+HxZQhdGKdNH8S1LtBMpV8APhN6nt+mHamiaO3RY+QwQheH 8Q6nS7H/SK7op1x6UC5pwdXoucL0lF5M5na/NUyw6Kw5ibzrg4TWxmNtc00YVU8= X-Gm-Gg: ASbGncvADERGFklDzaPQv/dzyYCv9vTrwTVTl/8WXvzJWMB9QNgcNMiJBWD6ry5TUgh sjHD2uC7Vz6fNsnX598QaCwnSTYD86twJD8sBFsWSxcfg/MfBAROHPe0/dZDCSv8hkb0QPvNlt2 iAhQhDSh21+vA4H6I4uBOficVnalZYrqNFNo+Ftdi2OV8rqZg0r3pPVmBs7pMo7e1Fuv1yQsoQ4 eKe5MLEa5nRvdTYqsLWwd5IM1RANc7bhI2o+UyeSs4oCu3npwzus3A= X-Received: by 2002:a17:907:9450:b0:aa6:9198:75a2 with SMTP id a640c23a62f3a-ab38b3787ecmr244697766b.44.1737121388587; Fri, 17 Jan 2025 05:43:08 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384fcc926sm170193766b.164.2025.01.17.05.43.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:43:07 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 982D5608DF; Fri, 17 Jan 2025 13:42:59 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier , Fabiano Rosas , Laurent Vivier , Paolo Bonzini Subject: [PULL 28/37] tests/qtest: fix some copy and paste errors in kdoc Date: Fri, 17 Jan 2025 13:42:47 +0000 Message-Id: <20250117134256.2079356-29-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52b.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. Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-29-alex.bennee@linaro.org> 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 Fri Jan 17 13:42: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: 858192 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp705954wrb; Fri, 17 Jan 2025 05:47:13 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUK5xMehpFUyMUa67dTGiJBF7SCpiwvFIFMwWlku9spxPOPplytQlYebzSx5fJTphVU1P+RpQ==@linaro.org X-Google-Smtp-Source: AGHT+IGD3uStRhAaTO0hFJWCuUXo5IKUDTccMcqf3/GpIM3mlJRLRhiWwbsM/9dP5W3NUGhPwBan X-Received: by 2002:a05:620a:2485:b0:7bc:db11:495b with SMTP id af79cd13be357-7be6328819emr535992885a.50.1737121633239; Fri, 17 Jan 2025 05:47:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121633; cv=none; d=google.com; s=arc-20240605; b=EwkZbLup8ibsiSxUObgMb6poqXnSp8Yw40nruAeEvLBZ2DfQDNrLVz5FuL13MFTZ1o Kh7BZ00Gio1vGQx2ic3hY/kBvdU5ZEl5eWzXKKXQGfS2F12rfcoc3y5xw9+22//8wBMw V1zLKJ2TFie1+HGODz4xEMjnmuTmhGdFicPcRQPvVOQSUIrq+W5KMSZPyf5iMnqAGHpC 3wew272WQPQwHacY9nwiH9qkqrpTVflEA5YnpPiYFAbQxTdK/RtIbI9NDC3ElUiBEi1w BYdwYqbVo/0jdHiCzcnzyjWD7Nhw2Rd9a9E7be2/e56DaCaxT8v64faamkoiWbzMzBPc 0BjQ== 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=jqP9s6i1XKCADbEJhUROhCpIYtt+5Tsr7aRO+xN3Yg4=; fh=3BeFfQ2A9tCIMh7wuvJyqhm+/gIWvrFxdFaBTUAESMk=; b=L+4i2NIB4TZXgH2VR3UHwfiYb7CdiFPbaoRWUaGM5tvEenZUlEQtZWZiLLfs0yVAIR ZouABsyWbNYZEShOq+YeahpUHlKaGlsc2Gd1KKFnLbVNBecSGPgtMi/64Hl9rUCWgdxh IOgcTD9BBC50I21QzEA04GV+kFuB6EWotswpdbIm2G2m7QErGN4Nhr+UmaWnjpSpajKi UKf/I1KCZDDB0QeiRU8WVbkYNHs85+LryqXTGs3ER1N3+dQjC5RNqLy8dnuHHZwE6Guv 4BoYAw+kXG0HnBOTwVMj3Y+tJKFZCrF973/QXEqU9emNrFclgwD0zt+tD8LyFB6LDqdj 5W2A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bykIVamn; 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-7be614eed3fsi261089185a.574.2025.01.17.05.47.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:47: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=bykIVamn; 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 1tYmdz-0002Nv-Si; Fri, 17 Jan 2025 08:44:16 -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 1tYmd1-00012b-6J for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:15 -0500 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmcz-0002Gd-Jn for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:14 -0500 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-aafc9d75f8bso357074966b.2 for ; Fri, 17 Jan 2025 05:43:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121391; x=1737726191; 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=jqP9s6i1XKCADbEJhUROhCpIYtt+5Tsr7aRO+xN3Yg4=; b=bykIVamnXCh7A2va4nJ1jzc00WssVmFkPAa1WM5pNFZ0+AwT8ikXp3lKf1NxIRERuU 4Ikmbx1l7kNDi4SiSilx0DTuhV8DifKwnLbK29hO4HZgDvNRChGaZkCiHhArweRQoXxL kONvV8EB62ju1ZHurCJ65W2t267fGca0OpSVsnEH9QCJ/xHqgq4z53aiYP9d4SS4jbc/ Cwlp4BIGmGQxGRROhx9flfLznfqXFDtYGC0eF6fGCG08wopYZbmZ9ayY4rTfnApzaQ/B QYhu+1c8uVCAJ7n0obcHeIvDuS32/zKzRK2/dRyXyvtqE3Q38QfasyETuj+9HChmPWSa 7zwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121391; x=1737726191; 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=jqP9s6i1XKCADbEJhUROhCpIYtt+5Tsr7aRO+xN3Yg4=; b=GVw2Gvrj/m00cHa/uEXSZjNHVwUCjELDXNvkQPc8vxeJCT/TixgCPQKEZbHpxNL63h JMiT9lmf1tH8BJHJEsbNqhotivm+3fsbsqMBVPexZ4XBAdtdd30yg+TKZ+S6D7OvOwQQ yW5yvyp1oGJ9YT/qP8gJ9MIYnTUwxsQKH30oIZtGqqjbYxBQ54P/o1ArO6pNENwj+pjd 7T31x/kMcWZrFfZ2ISXI/kwIbXws6V5T2v8FGQZTbwpJ1MAGqmqVM+XUbgNkLRGo+CCp Haq5PUrftNZLZLT9J7NtVfmVI4tVc4lSqlvVS/oEQ7PZ6cM+0GhrcFlFpNsUelNpXwG/ m90g== X-Gm-Message-State: AOJu0YyHMZ6sEyeCvCQWJMSlbfoGT4sHOCP3Y42l5xSrEUC0b0jKH4ZH zsCoM4a/n78Jf54RNNoFqQES4C1HLjqaWdcC53COrvIJ6ZTl3xEdL8QP4oxbpSo= X-Gm-Gg: ASbGncsrFvfEeVhP+6FJrHxGciB9El1QdoFbwgzPiXrnUEw3TL4qOq7IRT1p+nOE9gM hzpSgoH9sSKvfvVX2nDblbxl36vJbP5Xh95KGsRlk+aj3ExkENsQ2KMNU6951fbdYkGO6qGxar5 aWugXpyj/0M5CCkSKM5hfJJoEhmJSEOjR+H5IW4ZQJdI+sfH68mK8KgCbvBfOTDpJ/zu+y7lYis 4EkY5s7AKFguMnFC4muGnqewvktmou5YqBHf7OzG4FQFI8TBkxMMTc= X-Received: by 2002:a17:906:c107:b0:aac:29a:2817 with SMTP id a640c23a62f3a-ab38b2e4528mr224538566b.26.1737121390831; Fri, 17 Jan 2025 05:43:10 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384c639easm171521166b.22.2025.01.17.05.43.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:43:07 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id AB960608E1; Fri, 17 Jan 2025 13:42:59 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier , Paolo Bonzini , Peter Xu , David Hildenbrand , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 29/37] include/exec: fix some copy and paste errors in kdoc Date: Fri, 17 Jan 2025 13:42:48 +0000 Message-Id: <20250117134256.2079356-30-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62d.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. Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-30-alex.bennee@linaro.org> 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 Fri Jan 17 13:42: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: 858184 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp705396wrb; Fri, 17 Jan 2025 05:45:45 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUrQ/WfyZ5yMZgtzGGd7JJGREiSLzy+eS7W7nKWqhtPfdsrFUdfWUTYifW9vBZ8awTB6TGycQ==@linaro.org X-Google-Smtp-Source: AGHT+IHVuIQYjElgEM4fAL/o89q4lolLq4pPbv/Xu0jmkR2BjmTsh1jURaT/ydtmpwnsgK6pHOdr X-Received: by 2002:a05:6102:c51:b0:4b6:15fa:565e with SMTP id ada2fe7eead31-4b690be6ec5mr1975694137.11.1737121545110; Fri, 17 Jan 2025 05:45:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121545; cv=none; d=google.com; s=arc-20240605; b=LbpujHQjhyOMc5bcD80tomaJOh51LqMPmRUF+cb2orKzjXUPVu7k/bIZ9hTbvoX0ze VEN6L2DpGeQHguGBTRxX7EP2yfmoXYSU19QbHKhgmV+wVZCy8GVYufMoYLVnnJKVfIe8 1Ll5aUIVOYA4MGtF1h9pUEZNv3lX4kn8gBqcHkl/veIFPOh/oP/5IKLAEmXIksuyBEXL ZatuRWu9fGNOTbX1Zpn78XOUHlP6f1kNSQaHWHIyDW4CWZ7P0j9Gwp2nQhpqD7e0i5w3 XRZAnYOC+Kq7MC7hOyWQ2GYz8+x7nW9GsemhB81/3JyIRuegziFR6Yqbf5iXr52izRlk LH0w== 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=Id2YhFWnCyQzMpp3/7mwnf47rokh9cmGN9I+7TPRgK8=; fh=h7dadBuH7G0kJi5IqzFkGFHnkHnojGUdRU6ScNnac0M=; b=jogav6b/LsfAid8VxPT4h5IfiwqLKmHPQrfq36ejq/UIwYKA1gforWIq28WsQ6hwMy cw4dEnP+510LXrRQd0o2dM4+6Q8Z+ag7eOh/oo5h72SkkryJm8b8VbVNfzVn0TqeZRcL 7F82OXvBNCy8UgqcHNN7kVewou7p5e51bvyiWd3cD8BePJMvh5jUiBCO2am4cxQJKXsO uAvAP7ihwD5313ZF0D/E/q6jJdlDLermMYxT1sH53mB3v6iYxsP3RsjDK7ZDmOBKBlMT 6pwiryOSJv7BwbNKaRSDuD7KTe2ioPDfzeP93FazNRosKgqEO7Z0smJG/0E7tVjLBACQ CRRQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DmjWh9nU; 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-4b68a32349csi991307137.468.2025.01.17.05.45.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:45:45 -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=DmjWh9nU; 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 1tYmdi-0001da-7g; Fri, 17 Jan 2025 08:43:59 -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 1tYmcz-00011m-Lc for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:14 -0500 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmcx-0002GN-OF for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:13 -0500 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-5d3e6f6cf69so3390692a12.1 for ; Fri, 17 Jan 2025 05:43:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121390; x=1737726190; 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=Id2YhFWnCyQzMpp3/7mwnf47rokh9cmGN9I+7TPRgK8=; b=DmjWh9nUkk4nwTWoB1GyfB3jY9O9pAGmtm9f7hUsNcc5KRrfIxuN9SE0TK8m53E3gz PWFZjAag5/60sRKESENJbpquA0NJ7byVsc062bCfDjRibzQmyJqD97xAFgwzenO/QJEh ffd9tWe7zJyhVxpTY72JCpuvKlVAfzfevRCRT0Uyf9WJ00SUxokUligGk/yxoLRBwbqR VNs/LbxmDm5mN8PksXY8UJONacOyO+NGRe21w+WrfrHWcVocAdm4HbZRqtgARLBkKpKw vtkkM/DyLr01g24tG4+dOJ7/D/RSoq/PCBfbdeGyswIm3M1h06wmcekLzDXGa3Ao5rRK 698A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121390; x=1737726190; 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=Id2YhFWnCyQzMpp3/7mwnf47rokh9cmGN9I+7TPRgK8=; b=vQii0KeTKDu/tYsjOYBh2cP7vEfgEOJ5mZ2lybk4GvP6dNaF8WX3J9pAcB3IjYv1Je OF8ayDqqjyKaAu6EGgLbhMPcZXY1LV4tjw9lXzch+DeYhkpQuSy7IDYIaw6CHSYkv96G 9vYkZsjQXvqSB1ajtc2KUFn/tzSKfVc4Fixu4j66ZKsTgHygfH4Xop5tNHXJntDAyEvn 4TymNQaTB8Ni+ffRFrzzUsa915POyR0aZ3qc8yrbUqIbr8zi+YBdIBLdD0W+csxaDUnR 8IQ3afsjKt4tVDe9i1cgQ1PAgL4mDW+mOTyjA73sbjIKDNCwxUKE7w1X4ijZPBpRwJv6 /xLg== X-Gm-Message-State: AOJu0YwFkDPz41dxdA+bWD+D7X/9zu1l+OGof1ASrhZ0oescVPDwFWQk 7Cxwbn7vydv44cZHPtsJou5tDOtblCWzS7sPftkkMBggwlv/P36bGVEZJhj3Hoo= X-Gm-Gg: ASbGncveZVwdn6ZWnfkcM9Bq1H0ti12091YWG7XLY4yQvzgIeWjxiJXR4b0kzDDqr7U yqLyuLz6zDW/NaoLNlIWwXeoyZ0wuLfOlfApPNnqIaPW5U/RJJNdHwgbuktnJg7t9P7q7EeIFMs gCuw/er1Jir97Z/oYGRaK6TDSg0SO4+oSOCpyaOI9C/VubKAQ1pZER3PSv34tamnRw7A9SW9ceI 9AmRmPnBIcybKjkaKAYwyxeu+flI5+zHmLxuJyvk7NCXLqCIPAcH8E= X-Received: by 2002:a05:6402:35d3:b0:5d0:feec:e15d with SMTP id 4fb4d7f45d1cf-5db7d2f9af6mr2005904a12.8.1737121390315; Fri, 17 Jan 2025 05:43:10 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5db73edcd89sm1504127a12.79.2025.01.17.05.43.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:43:07 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id C31F3608E2; Fri, 17 Jan 2025 13:42:59 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Peter Xu , Paolo Bonzini , David Hildenbrand Subject: [PULL 30/37] include/exec: remove warning_printed from MemoryRegion Date: Fri, 17 Jan 2025 13:42:49 +0000 Message-Id: <20250117134256.2079356-31-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x530.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. Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-31-alex.bennee@linaro.org> 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 Fri Jan 17 13:42: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: 858202 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp708508wrb; Fri, 17 Jan 2025 05:53:57 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWqUdtnhvlEb1EILb47ZZcBLrr6nLjg5j+aWgIPV4ddjMyr3tqt/mSq5+HqzoL08CVaVBiEjA==@linaro.org X-Google-Smtp-Source: AGHT+IFoEM1TLaxQ14vbwBdK0xW8MqdTGCVAhMIdQ+YU5cuoa2/WW4I1JY3hxXGF1LoJxRv4dDIr X-Received: by 2002:ad4:5ced:0:b0:6d4:1e43:f395 with SMTP id 6a1803df08f44-6e1b218a25bmr33465076d6.24.1737122037712; Fri, 17 Jan 2025 05:53:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737122037; cv=none; d=google.com; s=arc-20240605; b=UyjAHTAzqTv4mPSEGDgoqkVrbOMjsfrn00+ACsDBdUfFaGDawi77Ijtsf0ChnTwIWc Y6l+Lmm6r+5VmZ7jzvLcGQ0ailH07oz4zM8ULYf1zUhyeN29ETq4JYw+4g63Qit+L3k2 ea3ROks948tDdwWuMqGwOxQsgFFhoPTxWxX90P/Q6WO523L6OPcde9a7lKG8Lw/7EXNZ 69Hb8UU9SmGR1Hqh/yQsrtkzozRPmeJIs7Xuqfvwl9mtfcshkD9Ncss0fQb8zVfFcjKN +isuweG5JOdrp7MWcO2to9yClPAlWJgzp2vcwZPz6J2FBu4LV+RgA1zVdw3Yj7Cy9NG4 8oBg== 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=zi1VkFTI50wNhaF65yTFWx7N5fJKMyRmjD/Fawk5sw0=; fh=ea6M/q2V5Fhrr/KE+lX4XznozrtP7MNYCmKzB/dWD40=; b=et/qbgg6keGkVAf1xjclGDYsSCx2QNy4zzVcXHQnyBKFFd18s+4Hg46YjIRVvNMp09 0yW9j7mrJdWFR+cSsKyRYO/vqpm1KWnkbHOdompzufnzxbdAlQBsO1FbmeyRsfDoOaD3 SZuDdwnke5XQ5Rh4e19hzLX8760XQCl3FN904GhWrYAlRxCeawebzlplydfs5zDucfHD BG8isnqoA3Q7Wb0oSyw1i8TUTtJZFMmTXsrmZZxQg1nc52a6lnwxJVmEsxH/Jd9gDSyA VbFN+rM4BMqkaXwnIpAiYAuO+NTb27isI3xe2GfIrTI1zBZdvKUt/f8+Vntw/Tlcx17c 2QsQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pxKpUO38; 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-6e1afd1952bsi25033116d6.461.2025.01.17.05.53.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:53:57 -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=pxKpUO38; 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 1tYmm3-0002WW-Ti; Fri, 17 Jan 2025 08:52: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 1tYmlv-0002UP-8H for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:52:27 -0500 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmlr-0003lD-BH for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:52:27 -0500 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-aaec61d0f65so457112566b.1 for ; Fri, 17 Jan 2025 05:52:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121941; x=1737726741; 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=zi1VkFTI50wNhaF65yTFWx7N5fJKMyRmjD/Fawk5sw0=; b=pxKpUO38wSVTrkw45sZyasy0WEVfSYAV+hkw+7UlYmyrjdii4E6SH59dnDOP1r80Uq bhD58vis1G0PzRfiIjfl4xdyaM6HAVgh9iJZT+V797s9qOgtVmBg+Omp8GFPwkVpXfOD tqlvjEucKgdllnksOXABeGof5INmAlyK3Wu5ACKNo2utWL5V/iiR7UrHxKNmzNLB4GAI yC+wMCWOEgvNcoVdOU4hIPHw5+Nik+hEzkD4jMuIspqMrRN/ETzVN30bCDjb2lzDSE6S HKtpOHelwbAXabwsIAeLxFUB8oX19bDHzjL5YP0sj6RA/p3MqUgbYCM1TT9Ezqd0Da4V QtLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121941; x=1737726741; 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=zi1VkFTI50wNhaF65yTFWx7N5fJKMyRmjD/Fawk5sw0=; b=EaJ415YIf4ucrqFc8V5iWBa8Z9oHvHU1aJmRbvjAr2h+rQasS5sXi1y6Avjg1wrcJP j06WRvhEAO1d10ZL5lJdW+ZC6JzHTYRtcRt2CQCAMANGScghVKGg/ie9mvfpeRlLOhZv 7HDFKNjL5z28KkyxsZGdcXvKbQU5voL3epl5LfJk0+isvrR4wmXXw8fBVh1KW36934lM Z8pzmM/NbV6/WDHh90jcBpOg1VsUWqO1QNsHTjTAjLCsu1ilPZWf6ro1+WbYRuntSUVH 3BonZuBTV2OtG4u6hmLrYZo8pH29Gp/eqAoY7gGI9Nrbdd2wnIiNKh3d6bHxPRusZMLp HoeA== X-Gm-Message-State: AOJu0YwY2ttu05EgWTd+XwLSjcpv4ZamM8B0rD5bX28yoMI8ksKcDzyq 9aNM9TEVig8wbPi+2iJQCN9sRjKIu7bU8IOWftj/8dVGpUuxLaEse0ZcBsS7DEg= X-Gm-Gg: ASbGncvLwTXg32b57lGcISx2+QxpHesJcFoPwA7BIZp55c9Yx/Y9MQ0dNIZiHQUvXfl bGhcmsGzRdI1fBPiOGVpL3w5M3fa6MP/saX9XDUm4nu68kJOnfYPJlSxY9G6/bZKlt2YAtJgz7B 7ypK3jdCqy01ONuXOtaNeufpeFpMBOJkbXPPIwJdOt4F9Ru/hkKk147jtIP3QdDpFbB6dfR/jyr r+xcqCRtod/ZJwW8ve6PEMzRZIUV6UCDC1MMe6DQld/E3ZIpLrhsyA= X-Received: by 2002:a17:906:478f:b0:aa6:acbb:3653 with SMTP id a640c23a62f3a-ab38b0a6059mr256769966b.12.1737121941383; Fri, 17 Jan 2025 05:52:21 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384f29031sm173241866b.97.2025.01.17.05.52.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:52:19 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id DA0A4608E4; Fri, 17 Jan 2025 13:42:59 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier , Peter Maydell Subject: [PULL 31/37] docs/sphinx: include kernel-doc script as a dependency Date: Fri, 17 Jan 2025 13:42:50 +0000 Message-Id: <20250117134256.2079356-32-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62d.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 When we update the script we should rebuild the docs. Otherwise breaking changes made to the kdoc script don't become apparent until later. Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-32-alex.bennee@linaro.org> 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 Fri Jan 17 13:42:51 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: 858203 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp708522wrb; Fri, 17 Jan 2025 05:54:00 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUEW3S91wEe2yVyZZY8kfkhwtLNN4H4+rOVU36fMiKFTp0FsawNPUs2GzVW1xdnEM9+thTk4A==@linaro.org X-Google-Smtp-Source: AGHT+IFgeFwV2kAdIJWO438UyUgPyGTiYfJB7pQyC0KewVcTtZyqN+Xb6U+ZSRp36kd0/4zGq0i0 X-Received: by 2002:a05:620a:44c4:b0:7b1:52a9:ae1d with SMTP id af79cd13be357-7be631e5789mr521865985a.6.1737122039810; Fri, 17 Jan 2025 05:53:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737122039; cv=none; d=google.com; s=arc-20240605; b=RIcD7CYhcvIQYyLYBdg4dVvvbuqniAlZre1zMPZTpxTxEUtCiS3ZhfNEre/48kgGKo A+pLA7mG3eaLBUXyaix0rNt7aj8XANYCIikR+rJtnBNrH8jRzRga6k+ZZrv/kE6kn7UN Y4Rl41K9VXw+6SA8qVTRX1ng+j22/pKGwn5eKDa8hcm9HR3iL0ItDjcR8E24l0Quqm2P Z1+7e2PgME9VpTcv6qIws6v5ss1HTYj2Uqgt0X0l+z/oMf4fYbBEHmv5afSXPN/YI5sZ 93aVKFwTyDnMP/5GWyoNXgBgdUOTyrRFng8+h6osXKD1VbV1HiXpAhMOOiiPhPuBUqT9 E2FA== 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=ryjDq6SVbM3rFJynOdzdzyOyu6l/v62KzXYJQB4a/Jc=; fh=EVepg/+y2j57BxoINa4PhDvl3dx/FyOmfepJZaxwIHc=; b=gTN+Si2fL1GRdOVFIAHsSyWSiGt8zWX9QglY0hP5pStuNhmz593Pc/io9qpkU2OqKM T4uWsRKvXYOKIiK6OP5/Sv3d11nBBv4DaAW8UhEfvgUF9W2LozESmYtuNpwzE9j6Q6GZ 9AeNtzqpY9ofl44B8e+fC5I3Uld1aqYBNO/QlGyklUFS2YKcL/9IWvGE9o6RRxUolhBl 87lz71jWBLyfO/6zQYaDUebd+CKxICy80KHP3stiXrgkYER3QPGrg91vtxVUdcT6vB3G /yNwrnvS7xNQEPC4/iR5e7aRoxe23U1Kq2IibD/0wfZvttZFkhu6DPoTeGEcGVkjOY1d /+bA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nOipSmuN; 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-7be61475a2fsi269206485a.151.2025.01.17.05.53.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:53:59 -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=nOipSmuN; 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 1tYmm7-0002Xg-AM; Fri, 17 Jan 2025 08:52:39 -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 1tYmlv-0002Uq-Lr for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:52:29 -0500 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmlr-0003kf-Bp for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:52:27 -0500 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-aaf57c2e0beso433348266b.3 for ; Fri, 17 Jan 2025 05:52:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121937; x=1737726737; 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=ryjDq6SVbM3rFJynOdzdzyOyu6l/v62KzXYJQB4a/Jc=; b=nOipSmuNGruHMzjrAW3L1DjxFQRGZpLDnZG1XX4h6xmPErNfcihZz+JzuZB2Dy8U44 bX2aNgMBaJ4iGaVSOiMxS16PnL8JlWmA7BsvqzF0ttwwvWKA9A7iG7M1y6ofpaQQd0qk 9PolqW7f8X4hESvhjouhidD3CUJEHkK+btXW6zvi6Sx4UgBVd21tj+lzzIZELdSV+lNh Oi3iiID0rGg/IiFJXOsuLqeF3C0qXa3EUaeG0QCUA3LSU6Yi6WK3fDC4siFAxUodBM3E pjWm8FdNAmnalDKE9xLNrb47JCiKiOBchrGdXUmraUQ8EcFP+vTcVLr7UR3rL1l2QLIx Lm9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121937; x=1737726737; 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=ryjDq6SVbM3rFJynOdzdzyOyu6l/v62KzXYJQB4a/Jc=; b=n6nTD0ZPhRavHxGCVFVkX0rQ3hq0KUWN1i2uaJG88D1GhdP8pU9YPdLYMwvOaP8rv8 nKrrMeR6EJq6cKzII9QARGopth40jnoF4ThkQrttDJtvK9UwR7VcgIlqoYHQUzCUOCp+ 16a+1HHyAOIvoaT/JM/2K0STiwA5RxvJMXhmGgdN1PMYfrzusMFQkFakL3s0g15CX9kk mXO8pGd74G1AzDqHG7icWvBI90LW5ht+YtexSRvUGjW4HyyE1HaNVFAIKnRYCO4Nhn0M KVKExZ4F108JMX2DSwi6/e732FWYoe5ZPQIV4U0v5Ramg7D40s4/u/LB2pFHBT4/8mj4 sO4w== X-Gm-Message-State: AOJu0YxIpzuZjDwrrdfCuKKmSbV3svXsJhVU57Ynom+4+MQk4HMKDQ9/ i+PIU4Qm/OR+chyuVHjBQepeCxmHeyZTAam+Bh7I/KXDGECfuqIfSmBopYTkwU0= X-Gm-Gg: ASbGncv3vnzxOYSHGoOhZgMmukaskklVddbFwwVo47nMqz4lQ1JXu4FbfQx84j7l23u ObHzWfXQzIbT0tDA/naf5SH7fpTmwqxwlQJ4i7ByF+lc8o6EsBjmK6WlbXADUPcsG0PlF4AgCdX uEUl8Hkf3GmUYb1D44biQ4+/zm8SU8zQnyhDZQppNxEGyYDSuVKG7DEjNYW8uqc85ZJ++w/fGiL vjebQRXFgk/c4z7o/Jgs6qlO5wE0OVG8LdjKs3SsRoeRA22dUvhDoc= X-Received: by 2002:a17:907:2cc2:b0:aab:e07c:78b7 with SMTP id a640c23a62f3a-ab38b27a5dcmr267547566b.23.1737121937122; Fri, 17 Jan 2025 05:52:17 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384fcec76sm170997366b.184.2025.01.17.05.52.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:52:16 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id F0FCD608E6; Fri, 17 Jan 2025 13:42:59 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 32/37] docs/devel: add git-publish for patch submitting Date: Fri, 17 Jan 2025 13:42:51 +0000 Message-Id: <20250117134256.2079356-33-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x632.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 Message-Id: <20250116160306.1709518-33-alex.bennee@linaro.org> 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 Fri Jan 17 13:42: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: 858198 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp706500wrb; Fri, 17 Jan 2025 05:48:39 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXw8zcQ4HAP33BTekjnFCO26Z/XylwERvloAJL6B68PUCQ6Y/wmrMHDgWYKP3UPXQ6GLWHv3Q==@linaro.org X-Google-Smtp-Source: AGHT+IHhBEHwCRGSxnCQFhehq5tLmUQZ7WRldmo2Uz7OFiOPIC5Gu390t2rMsuNE2ivatjCcMraM X-Received: by 2002:a05:6122:2109:b0:51c:c23e:8cd6 with SMTP id 71dfb90a1353d-51d5b2c345dmr2133162e0c.6.1737121719547; Fri, 17 Jan 2025 05:48:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121719; cv=none; d=google.com; s=arc-20240605; b=XbUZkJp5HuWAyEMRWk+8/vxU+ChyHaQXRa9n6me7SJUOlPsH9ku/Kg1w7nxmVWvCZB se3VUoVYLhYpP5kT7sJBLy5JvvCqhDlfZs/pJWJDaPjfR5dzzgPin5xe9Frj62z5+LRA 0KtOMYp9uF8OI5wVhp5YuGYNK44u+hvIuq2tcnXlXv4MgHXbQmm2aVcnb8TY+SCdtW7h db0biz0p4iKpDf4hm+2O75sfaK6i+qKz8PdzsMBdU79L8h8kJ2YE4YWa9adDL6bvfsQv pusUhCV7PKpoL7pBznVJCrgfJyXW59MIzCPm9HlNJer1WAAUalnwvU7sHpbnAYhsGRQ4 xvcw== 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=V25rdshuWsL/Iwjc7wONea+6ItK7iYQ49yGh8fic0Lw=; fh=EVepg/+y2j57BxoINa4PhDvl3dx/FyOmfepJZaxwIHc=; b=TY4fKDRuUmWw/K361woXPCjTpj3QhxVc8XRKpvzn1/tOmJZmw0khZd7ip3LoeMoGf/ cBf4cr171JQoDIdijK/9lGg6Jd+3uT1efRGGuePCGDHsy8XTHbZyk9I88lMiWhC8un0O OKi4U6He7BZBNRWwYFrDJL4OL7bWwh1xDtBlesQKW8Ji3Uu43gWEj5zBte63p1I16pwA MaQGHCgYL9qK4N9N3I7fN08St+f2ZL0MOJiol8rPr/QNpMalMbdc3IqyiEpVDZNaATQ7 hyTHMzl6jIXwraes4EHdAGrR7TYNfS2PRMAEbWI52jj96/jeulp+XgBvmdaSWwX+E3rf +z5g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LYjr1+Kb; 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 71dfb90a1353d-51cf579ee95si780051e0c.203.2025.01.17.05.48.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:48:39 -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=LYjr1+Kb; 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 1tYmdt-00021T-SZ; Fri, 17 Jan 2025 08:44:10 -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 1tYmd2-000142-AH for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:16 -0500 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmd0-0002HZ-DM for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:16 -0500 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-aaf57c2e0beso431614766b.3 for ; Fri, 17 Jan 2025 05:43:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121393; x=1737726193; 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=V25rdshuWsL/Iwjc7wONea+6ItK7iYQ49yGh8fic0Lw=; b=LYjr1+Kb4Pj++4sILjbE2aZzGOT4VZQ8doWxoQS4Jhi9HaEXFlsYf+NRtW2FX1qKyP B3k2melCiR8lBRlzCfdzR/xdVTLZ8EuHq3osr9VK1rgY8e5R2/2YSQxxyHcubTXbLJSF LuLsVn+10csz4MarnPWkRGPJYq+QhW30/CCPruyYBb+EemiaM5eSFyggGY+6yMIBFTkE SdW2qpKWXPUbUdeKEOicmfjEFFwLfEIkyZShpi/45fObFMQaX8tHKqZEUee+R5K0zzh9 JXN7+0E94/pDUV/KgQtlYshdi85L56HQTncI8E/fGDjnrjKxmRNNuMYjhtQz01BoZVx3 0pXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121393; x=1737726193; 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=V25rdshuWsL/Iwjc7wONea+6ItK7iYQ49yGh8fic0Lw=; b=bJAD26sGQxHDs5NufPuegY5WaOfLRD27zNziBaQCXRb6CIeBPGYQJH968UXxDl70mH SqX2x1Eu1uYtIys/+ZzUNhwAwfN9GP5zWbfHwoavhp4zn7gOdZZdfT+bRF/Mxal2Jl/P DlVYHMzA7arQcX41LiEWOQHcQnWHkIfPEmxQF22shUP4meFhEpazqZdsUsyqEFdgc6BM 7OjflLWU4E7enmDhosCM0h+EO5GJkCGmFjABEWhF3C0XUnhQlMtzoBGlYsHqPsXa21TU edKRUnYPAJPz9ItU4MmjDhhlVEDXDscg9dGIkTXMdJHg6lO68aWNSwwgzM7QaTOMXFtR B0Fw== X-Gm-Message-State: AOJu0YzGzlXE1O1hBLscpgPkrBzz77ZTCDP6g1aF8H7QFSMBoOUvv2Iv MZnJR2dmSfjgJm9P4E+QFXOp813j+RCC7oL/xJL6IXnvYEUMnfNVN57j+gOXkus= X-Gm-Gg: ASbGnct1FV7ig5b9ZVbX/yXjU3UCldyghEHIfFz7qB9PhvZB7ol0RfwPZMeNhsIl6+s F0r0URttLqI/jwUyA4iLa0dZ4q9J6HuvfYPI1dUqV3aZspUzkyXALOadt8iti7KRo5x26tG9HU7 7ocIWb2R/aKn1bgT/jaDbnYScMonXnl902m//KzsOD65mTTLzli/buwLG9OHJkAFVrwQ1gUYjfP W5cVIjT9AJUhlSmSnlkhM7XU31bMnzsyCr2SSiDq8O0Ae08/gtL0gA= X-Received: by 2002:a17:907:1c19:b0:aa6:acd6:b30d with SMTP id a640c23a62f3a-ab38b4c63f2mr249497966b.48.1737121392679; Fri, 17 Jan 2025 05:43:12 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384ce20fasm174375166b.66.2025.01.17.05.43.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:43:11 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 1005A608EF; Fri, 17 Jan 2025 13:43:00 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 33/37] docs/devel: add b4 for patch retrieval Date: Fri, 17 Jan 2025 13:42:52 +0000 Message-Id: <20250117134256.2079356-34-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x629.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-4-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-34-alex.bennee@linaro.org> 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 Fri Jan 17 13:42: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: 858199 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp708289wrb; Fri, 17 Jan 2025 05:53:18 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU0jgqwBOvIN+dnv8ynYJ0uhjwyDpmF51zP4rK2TyvJ2MuvDpsUfwo8yR/y//d/1UEd9rOToA==@linaro.org X-Google-Smtp-Source: AGHT+IGeY8CQaspZaavwSoxkOOusk+Cwfxm0sDkZC7FJf1BxTxFt2ma5J1eT18kOxHzKQ6RT4ht8 X-Received: by 2002:ac8:5949:0:b0:463:5eb4:6f with SMTP id d75a77b69052e-46e12b96b2emr48433731cf.47.1737121998693; Fri, 17 Jan 2025 05:53:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121998; cv=none; d=google.com; s=arc-20240605; b=c2rwOXAFoQtejgLULilrm2wxx/vhsrN5Q1anPEgwhOk3eKp8qBRCEAI1ZN14Yl2nYE LdZg/uMqRb/OI+j7LFhWfP5A8kuEP4Mzga7XMZNpKDpar2jD5kvKh9g/yT2U7dhjZ/RV 5paPxiMaqxbX5lf+76QFOt2GU35Hb6Z7pxCe7rcgeAg9d6TjcLc2AJ14GjpSC7dTQmvu 8dez8kFjUzJMo9pXgum/KbJxv5TsKwR1OZ9hauaDI//jZiWr7qF0IIAXPCEoPYjQUjO+ seKdOj73FcsRrHFWCsdbt3KBeB/W0c3wCTOEvHnECcQg8NnJUDdbCXypLOpFhsmp9Gly 1Cew== 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=xom9M1/hHRIoa6wXqP36+GbithL64UKHkweB7SQXlLs=; fh=EVepg/+y2j57BxoINa4PhDvl3dx/FyOmfepJZaxwIHc=; b=hHribOQ6icJZvkuimVMRxUOuJ1Bawz28O7h5eU0qqYtqwFYUhVjvofEP3nyVZ78mr/ K4NDJcMXgTFNqZBA7x8H1xvAkxTVdvCo3ICQ8m4y+q+VqJexXXV3pE1oisJh6hL+BK9u M2ezZIkHHh9Z2XdPtehtCb76cDEU8o5KHZvAQMfAhC86UuEDHyNp/T7eiOssMvZ+dt5P j0gqwiwOnK4fhMQJT9odH8tsAgiGvqf8PflugzqZ5258+x1DWayEyMZNyPvcH5mUg7Nt NGp03Gkr4oiz3idYb6hZ+fRtBuI90KPB/63bRO7ZKgwORoNMpdCjKRRYVnlbwizJEcP/ LZAw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ArOEyUJc; 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-46e1048e44csi23973341cf.574.2025.01.17.05.53.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:53:18 -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=ArOEyUJc; 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 1tYmlz-0002Ur-7E; Fri, 17 Jan 2025 08:52: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 1tYmlt-0002Tl-6f for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:52:25 -0500 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmlp-0003kk-Vh for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:52:24 -0500 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-ab2bb0822a4so408956566b.3 for ; Fri, 17 Jan 2025 05:52:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121938; x=1737726738; 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=xom9M1/hHRIoa6wXqP36+GbithL64UKHkweB7SQXlLs=; b=ArOEyUJc6/fw0QJJOPLSb0Hg05+rfE8APGA+igs6N9O7SCI3/gGpcoE+NU3nV1jV7w swgleVhsgBg1E73eTH2p3iFjLOqrnmw/wnV8CFC8brbhIChuOrx/cdjiSJZ79QWvFxyV zAN9S2U9DGCO/piXUl5OHcmXf69n63J/aN07S/K46/cIwj9PhfrGBGjaN4aifwGC1vlz hD1pCk4I8izV2cHnTah974iMxilnHlB3dHCOvEfmQx6gn38eKBJ9H9oRYnuGzVlF0spk cBSzMndD9Uvl4InswKbFU8zIpw8g/Zli47XOcgYB8PRel1eIZ097DBe5Qj8/fBV2HAM5 uvoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121938; x=1737726738; 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=xom9M1/hHRIoa6wXqP36+GbithL64UKHkweB7SQXlLs=; b=KsqBZ+1ATHma42fP1MtgLhnsJO1KtJfy/8njByLA9Wn7BsDWk1RQzaEi5LZ0g0UXFd dNGm30z3bKtFmG4l9lwBURUEj2y3ci1RPABscJg7zq2LSe61Cib4OiBxTHtbElSNsRMQ xbxmVygtMOtz0/p4zbbKEQl84tU7HbSeF3wM5CiVDBBqnyrf99+1Tgf7h8pMLXHohph5 +WROlDy6Y3AjzjeBnv7yyUavJ+tcJtTAAA0W+k1/WzI9eu5/QMo/s1sPdPfZV51J+8jj GIFmpM5JE8zHZx5syB5O7gnVgFTT7OQ46QgtNBF01FA5bnCbG4ZJi6O4wegJ7QiqUG8n vBQA== X-Gm-Message-State: AOJu0YyR5mMMm+JvFZxhN8HdQ1SmTG1NUkXzh6iOZ42FpxGuMR7KilDL mTkawsTkyJS2C7DnxPqSmJz9xmEXhy6iBt9AgxtHGknCF/Tt6vuYcE9Qa0XEDrs= X-Gm-Gg: ASbGnct5ZUiXnlyk4n+tgMLfvK+UsDmxx5C98kVUWOzJS7eZym96TCybfLu2hdnWYLk 9O4uyTxRHXwFfEXZ7CgQAQv5ofuZZj1u7x1AbfGi66gTku3FB2+gonMWl8GMzBhtB6qg/ThDYvY UmDwwVwYYgibdfGy9px8K4OwRPYk1bbH9gchPbOC+WhfqjB6xzE3Kjv9DLRALPUvlxsYq4G/wh8 LLbOTtVdT38R82dq+8OWsA4tav1155CN8SPIszOrIK/cdUW8QWH2T4= X-Received: by 2002:a17:907:7ba2:b0:aa6:b63a:4521 with SMTP id a640c23a62f3a-ab38b1100cemr255520966b.15.1737121937716; Fri, 17 Jan 2025 05:52:17 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384fcd5e2sm174983766b.170.2025.01.17.05.52.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:52:16 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2D4AD608F4; Fri, 17 Jan 2025 13:43:00 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 34/37] docs/devel: add information on how to setup build environments Date: Fri, 17 Jan 2025 13:42:53 +0000 Message-Id: <20250117134256.2079356-35-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x634.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=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 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 Message-Id: <20250116160306.1709518-35-alex.bennee@linaro.org> diff --git a/MAINTAINERS b/MAINTAINERS index a928ce3e41..f744896f89 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 Fri Jan 17 13:42: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: 858196 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp706294wrb; Fri, 17 Jan 2025 05:48:05 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUvDJ4miViUbBEDe79Q1KZl3oSK7pvO/cD+Fb4AX3n0z2iNXmaSV8DaAz9RPVkCDrKPPb9Xjg==@linaro.org X-Google-Smtp-Source: AGHT+IHDEHpw2xZrqirszhMZYf0Q/j+o+rvnmab1MDqDCIhMN6Q+FIUwF+1/jQsS0TJ9lInz8Qam X-Received: by 2002:a05:622a:1882:b0:467:5e69:2e1e with SMTP id d75a77b69052e-46df57fdf67mr191871371cf.26.1737121685136; Fri, 17 Jan 2025 05:48:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121685; cv=none; d=google.com; s=arc-20240605; b=AIm0EkfI228bhZ+cOPzfJiG/UgG3yudi1c1y1pRW4m7Qtkx6FWQlMA6T5jKdymqpTc EhreUenXU8V6BUWISaiAEHFD+HAvJEwuKt5L0tgSxf4qLKeRM/xsL+RExXv0BB1SUscp Rw6TaLhrmtPGUT6y9wNDpP3eul2LZFAIIiSPaifcCZAccflmwNd6SmABU6HtoriNgf1k hl0DdxJoisjzZW27a3e9qfphR+0gu0RxFOPl5JY0bf3Msv+Mds+xd9oRORA1zKthORWc Ds1WOEkBRhodDfg/bAM4A+qht8iFhfMJeZrhVn3mC6OBpJl0Tq5YOWOhcXHA5NBThQDn VAQQ== 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=LZVXQImgyXuNo9dYY7O4wSXJ8MQi5BChBt6FVzYz5Oo=; fh=UvUTQ/QB3EV/hYoBw5Rhw6NN03aaeNDpEALGZQ3VqXQ=; b=DT/K5C38qfA0FVsbPg8f4YGU0jmBhIGSMeIoufaaMURNSKnGu9hJu9f7Lf6Dg5c0x3 392P23qIhs0YkIqq2rGJNmBInDJt4u4XWyrAU8mDR07R818DkrioaLG352eArK/ZUJOe FHBwU5DmRdAPys5MHZmALBQJKb537+clABPRjMB3aS1KZqKJjoN3ghml1a4FZlYjqaWJ eN8i9mjYIHAm271noczpNV0YvPwxiUBR8aW99fb16W148Ox8PNPcsQ0Ri7jN/naNRb/r HeKz91kzCHYbVHTJb4lucwBfk4BehrQMn6XvAzpz3ZoqDPq7h8HzFbNDTcCc8Tdt30yO eCsQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MejmGd8G; 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-46e104b5d17si27021091cf.610.2025.01.17.05.48.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:48: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=MejmGd8G; 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 1tYmdz-0002K4-AP; Fri, 17 Jan 2025 08:44:15 -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 1tYmd6-00016U-7h for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:20 -0500 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmd3-0002IR-13 for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:20 -0500 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5d9f06f8cf2so4008645a12.3 for ; Fri, 17 Jan 2025 05:43:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121395; x=1737726195; 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=LZVXQImgyXuNo9dYY7O4wSXJ8MQi5BChBt6FVzYz5Oo=; b=MejmGd8GHyRF+rgGJzVVRMMc+qaNYj7/4RihyRuX4lIk4/TL8fqVn42vwpmQV70bC0 eH+KXV80xOBGW4UWDOXIB6g02H0sw4P0MtxmSq3kEYxt0V8/aVgZE4PVbMPQayFDBXa3 o7CrkUh8fZZtSTRlxw1kncKXTQNj1w2z1lmqN5frpl2Qrin+PZpJc8RqxBFwS3aWhrta 1MmaaBabALCl5e9267q5jiE7Uhma72+Sb7k8FBT3f6rjrH4fsUkfQei5cdIf3LAn+OTS 21D+xejJoZYgSL3WD0gCM3EEv7wCeiDyGH/NBgAUqHPnOeWjtGIIqF0hf3NfJDAiez9x lPhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121395; x=1737726195; 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=LZVXQImgyXuNo9dYY7O4wSXJ8MQi5BChBt6FVzYz5Oo=; b=f/Ma0zH+AAB1iTANmKktsk/OhT5Ky3FoM1U3sLLuYIn/JokEg54ep59VAsnkqF31XB M4w/4BYS5P0l7flBKMPHrBt1deXQ9Q/BHjey7UYQlw5/ZDPxR/8Nqq/TlWbPiyUjiHHz ctFGxt0Rkl5YH0TSyZMwF0QPpLtY5kQf6ISlrzWAv/+gak4MYH9Ck446uZvk7YnQG4fu 26XnK8J9jln/5ctZL6ZHF5BLPsn8q3BXyULMnyrYLHMy+BtET8f76V7aNWIuQazpwkhL 1rfOIDA9IcRAMKZ+/LCaKrqs90cjPUOU1Hnf7RmSoIGIhdGFvNJKU60xPaPqlNzwxk0U kKwA== X-Gm-Message-State: AOJu0YzddvwcjMa/oz7B2lsmpVgdqwk9pBT+c6bhuh+oGbGSWgv/ayYx Z4upbUlCI/ZHLT0Vn7zgW/G/bOznhwFplSpX+ClQok5bUSIM4qlDrkpRMUDost0= X-Gm-Gg: ASbGnct4Pn0Efyrx9hjjr2vR8HtT/y+2VzEThYak45aOXZHQMjDz+dBTz8o9X/TZKm8 sURsqoQdLjknKHLoc+d/h+a4KPBFZYlDNj68kHEhbZE68nGZ3HpzEIo1cUKjuJiBmsGslMBWawm J3Rs6lDprhdT0nKd/JalBBBmwcEVoH0OZ2tnzucSp9lmRh13YlyB+E4bxV+/4AFLL6xxJ5uek5x rBR+J2UNkGb5cpkj2j+wnlCyVhcZJ/3BqZvqv7lnZcffP4sHooHLVQ= X-Received: by 2002:a05:6402:13d2:b0:5da:d76:7b3f with SMTP id 4fb4d7f45d1cf-5db7d0f8663mr2430050a12.0.1737121393671; Fri, 17 Jan 2025 05:43:13 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5db73eb5b64sm1474330a12.57.2025.01.17.05.43.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:43:12 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 57F4060866; Fri, 17 Jan 2025 13:43:00 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Jason Wang , Andrew Melnychenko , Yuri Benditovich , Peter Xu , Fabiano Rosas , Michael Roth , Konstantin Kostiuk , Kevin Wolf , qemu-block@nongnu.org (open list:Storage daemon) Subject: [PULL 35/37] docs/devel: add a codebase section Date: Fri, 17 Jan 2025 13:42:54 +0000 Message-Id: <20250117134256.2079356-36-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52a.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 Message-Id: <20250116160306.1709518-36-alex.bennee@linaro.org> diff --git a/MAINTAINERS b/MAINTAINERS index f744896f89..4c86c81f08 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 Fri Jan 17 13:42: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: 858194 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp706068wrb; Fri, 17 Jan 2025 05:47:28 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVavi1gFmxDy+kZf7DIaFESv7oQq8RXjCXPKThmZlGdjTDTyDMXMa+yp+x6kA2fsUigO84mrg==@linaro.org X-Google-Smtp-Source: AGHT+IGhHd6SzQEXca9YgAT5bJnpFdV8E5Jq4bpZCeadb7JTd+zrifQOLU3xMaeEX9GsLkLkvbxt X-Received: by 2002:a05:6214:5342:b0:6d8:98a0:23b6 with SMTP id 6a1803df08f44-6e1b271c2eemr38213386d6.4.1737121648625; Fri, 17 Jan 2025 05:47:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121648; cv=none; d=google.com; s=arc-20240605; b=H2VBI7n6NFjbjy6BNVCQizLBwzmLjxzwaAeokpHF3CLkvxWsXxU54LZZDe8xCaa3DH KJWcghdMSnxPQ2+PRuhc/45+n7JLpJnlwPlYtsJZeW4s8AXmvalSlXk59faCHEc31MFG dRE4WU2ZTjH22MyrYRGTcyRe9hPobPaqKzA4HxqJQFUPZdw9eXfm7GdyVf2ljT/aFRK9 eSMCrimbL0TeZyjUVac+Bud15zanP9U0PN9VkXmqYd5N2rQndQnrM6s9wB34zIrcAxcR J7xLYiS86LIJZa8KiXno4l+CIet8UCLJg94wbvpWGmrhLPsSovK8liAogAiBXcGjNcx2 WxNA== 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=+YCgy9C2hNrU+KGc5S0g5k7dDwcxdEEI9FnlcD1Fi8Y=; fh=yfovjAFb5XMiLBt/ZZVXIMpcNKP9AGpYgJh1yPzwZqk=; b=ML/UECaLXpOrS5s+h58Tm7BbG0EWkPeSKwsTwHq7Y5xlzRr4bz4BrM1uCck3yjN+NJ /4t9AdMdBBy4PKvZLLn/eNtrnoqDqTSidkTC0AOQdJ3s/68Gf+fUQPo++XSKINx5Olbl 3/y7yaNqtAU/DeNM/EYH9kWNJhnT9OPTmlarjPrzaAieHniqq3ZfJ4TAjZPFeTzMmwLS Zw3sDC6Z+8TqgbHeEcfxIfuxzGrR4DZ/9jG6cgtYfvEJJHVz0m+kK5tHPqggL627AJdt XKCfqHvb1XoWc5eQP7YiOoP3ZLmsxlXNAG9jrhyGxp0HQB3/TzLqXBLKElV1woR5BeB+ LKNw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Ia/Qu6AD"; 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-6e1afcd9600si26365386d6.208.2025.01.17.05.47.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:47: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="Ia/Qu6AD"; 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 1tYmdo-0001js-NP; Fri, 17 Jan 2025 08:44: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 1tYmd3-00014g-LW for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:18 -0500 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmd0-0002Hk-R7 for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:17 -0500 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5db6890b64eso3415253a12.3 for ; Fri, 17 Jan 2025 05:43:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121393; x=1737726193; 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=+YCgy9C2hNrU+KGc5S0g5k7dDwcxdEEI9FnlcD1Fi8Y=; b=Ia/Qu6ADkmtp3fFLNDC++Esln/72DrBTnErq8+fkV7xRdKnDI5H8Jv73NpZfnzlSe7 wIZVvpe8AZ7ByzWO0kbdNtIktYFHozzxgLdtKksvX89VJPUYacmqIOfFJrxmvDQ4KHYV gnOxVwHJEbe3uqydp9dsAk+yM5D5vCf9n5yLil7dpYPScotdKsj+EmBYvyYFCnBnklRg ICqmvkAKEr94O9cDY3nokQ7Z0SSdhel1Rj8YZv4lfW00ozN7aMKy1d6U0VssHp2yq0x8 xzgMuCSNeO8v+YC+A5IWNH+pJSu0AtS2eyYnI3jhmdBWkTf7utUPrfyGA2BH4s4YABmO 6rcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121393; x=1737726193; 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=+YCgy9C2hNrU+KGc5S0g5k7dDwcxdEEI9FnlcD1Fi8Y=; b=MlrQE9bwgf1iS1Jhpp7GxgX6sKQas14HOneO2UU+/4sNCWZzcepxtzX2dx1g0n2d9K tbQnc25wEQjMsGmvkRSr6QFaxPHm2+MIrvImkXKSXpGIQjUj7Sj6K0Stl2hSWfl3NZ0n YgY0Qdpnt/hDnUrtBrPQKVSQBK92HZ7iRcPa0Og62amkqMcjjGboz3bsBqdzXtQJs+Qq 8KAvJjdIOGOlTnfG4iUNFn5aj5QLvmy2wv4gpRsmeFrTrZhuw96lyGrTPYcxMW7pa0mC 1lOg098C6FxGtW95RNFzGnOCRpt++cPPH4YL2T5hWcM3M7/ur9lwSDe5TWTisHFqpeKI mbGg== X-Gm-Message-State: AOJu0Yx482wCKKvncv2eG8fDG3XkiW85RfDIoGfpCJiaCHVzA2cl4Vgw 5R4iG/gJon9SB7NyKJW/A2RUo9L0Ugwi0RDMw3Gi931RV+9EQVHf2YrLjg2tTuI= X-Gm-Gg: ASbGncufjYH7VjnXS9bFoTFhixiuAphSWcgY4Axv52gSo7B6Zd4k7ZRmWxLLbt8h1r2 6Xa4h5zl3qdW0gu9Cp3uH7EuAhf9txjm8EPMtri+R2WoTzHCSQUWsdURBZOxiQ/lwJ5vypaZ519 qnh/r+KBcUDJoIPdLwgCSglMUlAyA09Wml6m9QqHG2S+dLM7T3drcV3MN7kJ/uWWlm9Tbeum/Mw 9R0F+gqF2HOPCeYOZK6cz3alRNlNgK8B/WEX3x986Qgd8GLUjXOfcc= X-Received: by 2002:a05:6402:3489:b0:5d0:e826:f0dc with SMTP id 4fb4d7f45d1cf-5db7d2f9c54mr2301349a12.12.1737121393228; Fri, 17 Jan 2025 05:43:13 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5db73eb5976sm1511563a12.53.2025.01.17.05.43.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:43:12 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 7B3F5608F5; Fri, 17 Jan 2025 13:43:00 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , Eric Blake , Vladimir Sementsov-Ogievskiy , qemu-arm@nongnu.org (open list:Virt), qemu-block@nongnu.org (open list:Network Block Dev...) Subject: [PULL 36/37] docs: add a glossary Date: Fri, 17 Jan 2025 13:42:55 +0000 Message-Id: <20250117134256.2079356-37-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52f.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 Message-Id: <20250116160306.1709518-37-alex.bennee@linaro.org> diff --git a/MAINTAINERS b/MAINTAINERS index 4c86c81f08..846b81e3ec 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 Fri Jan 17 13:42: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: 858205 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp708548wrb; Fri, 17 Jan 2025 05:54:04 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVNBQyvysH1JzG3u/4xJe8441T4GBhmHHSekxzvzShBvT4B+6mSc/hY6p/Iivw93gzSaJC1Qw==@linaro.org X-Google-Smtp-Source: AGHT+IGhsT4MRA19DU1FwRe/oypvzXt4eCbHSpI3ctxQDrVVNKfMRKSSfZfUe3eB4C5MThtFfpS1 X-Received: by 2002:ad4:5bc1:0:b0:6d8:99cf:d2db with SMTP id 6a1803df08f44-6e1b21da05fmr47965956d6.38.1737122043916; Fri, 17 Jan 2025 05:54:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737122043; cv=none; d=google.com; s=arc-20240605; b=hwWcX7QRUCHbTfwsQl0Qh9lE6yZvxGFrJJG9eoQP8FLXfYFiCpvKi7sYJBSGgAri4O m7nTP0c41krK8TlBZILVp+xQVh0teL+k3erVffi4HJRzQNv0wEFNxR3J3iMmseYW54Z8 3nyblaodPMfFU05NN++240CsN0mwd8aRSCt49f5Ia9F6EiW5cQceEPAZBgWga2qm/Ost 3eM8rxf9oWy9RVy9oG6iwxT0HYXnlH7QQ0lqlN8JixSkMhcmNYZ6rYnuyj0c8kFq+Yh7 lU1LFWqLEjeLrNbREzkuNyC8NBDzfJdjGv8gIaozTDcz4AUx0JmTUf49YO59mOAu7nXs DgbQ== 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=O9E60eH4NFvltUAEYDSdM5V//h4nzKoVHstzvrxeFhY=; fh=Z1vMzM2Q9Qmw1NWI8OGOeAmXKHZM5fhIxnfXd/H7YGA=; b=U3fv3sc4FD+alyoklGjlq9KOhEwmo/N4HKiHlGtOgbVUs967RjHwPU0lJJ79OL+mES 6wI+B7oWbE5+GURuJkdqBgjxtxLqe5Be8oG2u5PyP4lweNCIIs9xQsHPrJ8YbSngtrtk 6gFLMMZhFdtVfkO2bWp9CLYdpKP/dtKVAExHmliGI5TAw9Z5q2AVxjkkvqK4rEL5+iEx 9dhehr6ysz3qS1wKIrJsQ7TGg7C+vS+MIANF3xI0r3oFagDgtP5UXA4ZMOEc0K1HcAg/ OQif+UtnEUcUk1Bhk3oQftxYCS0APX46bBssO9CDvqNgt2S4WW8bCZp3xwIUjb9OMdf2 EVvQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eEpiqNoq; 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-6e1afd2484bsi26481866d6.495.2025.01.17.05.54.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:54:03 -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=eEpiqNoq; 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 1tYmm2-0002WH-Fu; Fri, 17 Jan 2025 08:52:34 -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 1tYmlu-0002U4-8y for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:52:26 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmlr-0003kv-6M for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:52:26 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-436341f575fso22323415e9.1 for ; Fri, 17 Jan 2025 05:52:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121939; x=1737726739; 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=O9E60eH4NFvltUAEYDSdM5V//h4nzKoVHstzvrxeFhY=; b=eEpiqNoqza0cU6LkqIbyfHOsBNyFUu6u+6vma9YecLDLmT0GVoG2okc1xivodJbnx5 EoHJfln8xRYAtP2JLwO2c12Znt2jzehMm2+/FtPbzKumbhDqPX6aolsmfqN2f+T7JJSY 2Mrc0Y6wCamXD1XnNXMRy59bjJXbBds2gKg4pmf8KDyrDIk8bR79WmSK+5LW5Hld1R8u 1+9RUBHpnxgCt0woEO0PwXaCZLHuLjPnar0C04yNm3S5nIuGLo+alF7e+NeKDmNXqdXw 032VrRqDh639pl2pQpF+25O8InTijGDpTNdtdR9DKBIxfg4OyKx4esjLy97/+ihWKkH2 ByyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121939; x=1737726739; 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=O9E60eH4NFvltUAEYDSdM5V//h4nzKoVHstzvrxeFhY=; b=pAm9KHee8Y/fFKmW3QrdICanyf7Ri22rgtHyGBe3G+1fcU4BpngdttSWz8g+K+TBHO dnaV0NI7H0siWzIZq7b4K+vGf17suf2vDeugRbUiX6TZVu/4CNWPFS7ojSZNr1sU0Tin CHQZqbrHYMBscSsHlm+jdAFZw5ILXVzXmDH19/U4t3DDmD018Dz9h9QzL5uvTk1Fsx2o cSd2FK5m9DVEIhb9UZGClpZ1tMZdCd2PVtsmX3+B2FNc438Qhf3JWoslHUwdXTIQwEOz UiPQDGemEHKGiwMo4nGtd282XKB8s1nqyLvjF/y+PkAzvt15lxysqKdwqcJpKwBKIIRm 107Q== X-Gm-Message-State: AOJu0YwNqTpw285sEMDMBQ/eJ39Qoo/vCR7aRHWVa5MdbSy/zbUT9qFl VeeIMIWtbT6hJB/a8AAVWorgZikevgpRcF83u94RA6EI6RYmvfuuQo9aU9UEQv8= X-Gm-Gg: ASbGncvevLJKegkcA2m74jdeCq1BglGhHaFpknYQJEmaNPlay12kzHayXZwRpjzwbde LBm6nPKyayp6oCK+wogztNE+0wXFVFs7J9Nsgfh/brXilsLufUUxISyFlTJ4T9Ov1DJDnT4QBJs ceKmsbjjur3eGSvwd5Q0afljX16rfj8A7vIExJBTRsRUW7GLK58Lc81eKgVL70REI165TDlNW8H W1YNNZtGbVnC4gsod+fmAdmccXUE769+QplRJj+g/vj0lf87aBWEYg= X-Received: by 2002:a5d:6d86:0:b0:385:fc00:f5e1 with SMTP id ffacd0b85a97d-38bf5649261mr2859093f8f.9.1737121939007; Fri, 17 Jan 2025 05:52:19 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384cea151sm173570766b.74.2025.01.17.05.52.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:52:16 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 960BD608F7; Fri, 17 Jan 2025 13:43:00 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Stefan Weil , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , John Snow , Cleber Rosa Subject: [PULL 37/37] scripts/nsis.py: Run dependency check for each DLL file only once Date: Fri, 17 Jan 2025 13:42:56 +0000 Message-Id: <20250117134256.2079356-38-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.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: 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 Message-Id: <20250116160306.1709518-38-alex.bennee@linaro.org> 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)