From patchwork Wed Oct 11 10:33:05 2023 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: 731936 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp326136wrv; Wed, 11 Oct 2023 03:35:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGBDtpKyoV9alWWEZTKErnz+7bEM/cTxAtIQoXHKHSpkSWKJlOuvm1Seq7aWUBSMgiAS2MN X-Received: by 2002:a05:6214:328b:b0:658:2857:ed6a with SMTP id mu11-20020a056214328b00b006582857ed6amr22621094qvb.43.1697020530699; Wed, 11 Oct 2023 03:35:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697020530; cv=none; d=google.com; s=arc-20160816; b=rVW+sYjcVufTJHIc5PQnywv67Rg5ZGTOU9ZIEjTXFOtHKtKDNYNjiSy6sx8OqWQmiF 0CknpbdCjznrgGk8BJTxGXZtleiWobL4ozGWFnj5r9FDSZKfZKcK0Ig2h4eqYdwKgFx1 C4/mz9zEPSIFb4uzwGCuPaGlGPqqMnms87MI+wxPRJtRw5SP0lite6q9pKx8MdArT6sL zJFAqei9BFZFH+mRAwSZeswBkZCtwJfIoZ5cbDti5+/KjkMFrLFp/XAM2z1DwSeOi+bc 2kHraFseVNyF4VqHuabfC7YWZ+ziF5nlwjr3BHctgsTW+d57ZfDpV9ePQC+yFNpUcTqu U27Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=nNLSv//wR6uRCDovOJDJ5d1PCh7jcwjttvZeRMsQErI=; fh=wuHpxm6/5YXoSYINoD76iswBoa4Aw4454Tvf5aJEZq8=; b=oUpJOsKBNfmnATyrzACPmm2d1VIIRpIcRrvjYdk3WMaI+0UWlrhGIJ1LFZPzBUfZnJ i7a3qW10EH+PbcOazGTEFvvS6AyjEujc1pAfZQOsaLFrtUT2vDlI4ZX//eoOTY26f/9Y gn+hdYwJm36aubQBMYwhZRolrw1YtsYrX3L7GlW94qQSJC6GuwUt2QkxQXsQpx4CPNzC CsXv0XltQ5CXbjsiYXxhhWrbvczDF5Mu2sMEQgqNKJFN8ogfTN+EmUY/SEJkZ65Vo21f m2rhKAUFYop/uw/dEl/cI2ZYKjQeVT9sVVHDiAAd2IuIO9z/+rMOyJMQZrVdj5/4aGvU HmRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="fou8euu/"; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c16-20020a37e110000000b0077573d5c255si9018792qkm.607.2023.10.11.03.35.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:35:30 -0700 (PDT) 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="fou8euu/"; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWXE-0001UC-Ob; Wed, 11 Oct 2023 06:33:48 -0400 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 1qqWX4-0001IF-L4 for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:38 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWX0-0005AD-IB for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:37 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-32799639a2aso6389339f8f.3 for ; Wed, 11 Oct 2023 03:33:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697020411; x=1697625211; 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=nNLSv//wR6uRCDovOJDJ5d1PCh7jcwjttvZeRMsQErI=; b=fou8euu/hWCUrenPxikhQbXrfaEHl7cdfOImoO0llOeY2iy83TLdoxDITcMldlVdTj xGE8aPKRPd0rH8mteEq+73iJ8KaPenshhNt2iYQUVLR6Va4fw7WTZv8EH9tqE+ZMNdET rqdt4DrBpw1OwarRe7dGN/78ijoH4QIyw4gwiMyHvYPPhA9aQcW9/eRP1Nc1ZAt1w4j5 bKQ7oiA5fY2Hx5UDrQITZIOYWq8wm8JmbpSZzqGbz+L2XtM2z5+5mI+Yct7/q0hfERsX 2UQN6UzKYu/74G6RO5un5WcsDCp68tRwFkNEjaCYRKsZTD1x8UIF1Yhr67OHTdAXKGJY A/zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697020411; x=1697625211; 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=nNLSv//wR6uRCDovOJDJ5d1PCh7jcwjttvZeRMsQErI=; b=jq90kBSmX8gS3P9dt6IXh+qMFXNv4SqIa2VpU++b8mOcgw4I5rNWXpplYDZaHf3hMv 1NJHJlikG5EdJNNgJjpR8xJWt/jtE3quUtdat2P0Gj5j7IaK0JEGF3fNSr/PvFHTBWCv Zp6Js4CLdEoJbPb4q8IU8u9HDEnU8CbOJmJvxaGo8Xm1jiWg0eJ9hLHfQ+/Pa5+OlV9k 8yI+4UUZLbqVkYEeDqqPi/Ea3a0QOJ5RlntK9udQIN81fuqqDeUaLNt4wvKjnbnIG8OP DDEP0KoybLUEEmV0Q/tEnaV5J3lTFwWEbPxN3Se/XyXQbgOUv3NN1PcB/rg2A9ohNP/V 5iLQ== X-Gm-Message-State: AOJu0YzsTCkiZteIhy1pkQ/RD77Eh2v8kXA7xSjTbvqzK9C7/AZP4RJg j0/YG0NwllQTmpXJL3Iz97oz8w== X-Received: by 2002:a5d:5c0e:0:b0:32c:c35c:2eea with SMTP id cc14-20020a5d5c0e000000b0032cc35c2eeamr4243920wrb.6.1697020410899; Wed, 11 Oct 2023 03:33:30 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id m12-20020a056000024c00b0032d88e370basm950574wrz.34.2023.10.11.03.33.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:33:30 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 346BB1FFBC; Wed, 11 Oct 2023 11:33:30 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Marcin Juszkiewicz , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Radoslaw Biernacki , Peter Maydell , Leif Lindholm , Cleber Rosa , Wainer dos Santos Moschetta , Beraldo Leal , Brad Smith , qemu-arm@nongnu.org (open list:SBSA-REF) Subject: [PULL 01/25] tests/avocado: update firmware to enable OpenBSD test on sbsa-ref Date: Wed, 11 Oct 2023 11:33:05 +0100 Message-Id: <20231011103329.670525-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Marcin Juszkiewicz Update prebuilt firmware images: - Neoverse V1/N2 cpu support - non-secure EL2 virtual timer - XHCI controller in DSDT With those changes we can now run OpenBSD as part of sbsa-ref tests. Signed-off-by: Marcin Juszkiewicz Message-Id: <20230927120050.210187-2-marcin.juszkiewicz@linaro.org> [AJB: fix whitespace and longline] Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-2-alex.bennee@linaro.org> diff --git a/tests/avocado/machine_aarch64_sbsaref.py b/tests/avocado/machine_aarch64_sbsaref.py index a794245e7e..b272053eaf 100644 --- a/tests/avocado/machine_aarch64_sbsaref.py +++ b/tests/avocado/machine_aarch64_sbsaref.py @@ -28,33 +28,33 @@ def fetch_firmware(self): """ Flash volumes generated using: - - Fedora GNU Toolchain version 13.1.1 20230511 (Red Hat 13.1.1-2) + - Fedora GNU Toolchain version 13.2.1 20230728 (Red Hat 13.2.1-1) - Trusted Firmware-A - https://github.com/ARM-software/arm-trusted-firmware/tree/c0d8ee38 + https://github.com/ARM-software/arm-trusted-firmware/tree/7c3ff62d - Tianocore EDK II https://github.com/tianocore/edk2/tree/0f9283429dd4 - https://github.com/tianocore/edk2-non-osi/tree/f0bb00937ad6 - https://github.com/tianocore/edk2-platforms/tree/7880b92e2a04 + https://github.com/tianocore/edk2/tree/ad1c0394b177 + https://github.com/tianocore/edk2-platforms/tree/d03a60523a60 """ # Secure BootRom (TF-A code) fs0_xz_url = ( - "https://fileserver.linaro.org/s/HrYMCjP7MEccjRP/" + "https://fileserver.linaro.org/s/rE43RJyTfxPtBkc/" "download/SBSA_FLASH0.fd.xz" ) - fs0_xz_hash = "447eff64a90b84ce47703c6ec41fbfc25befaaea" + fs0_xz_hash = "cdb8e4ffdaaa79292b7b465693f9e5fae6b7062d" tar_xz_path = self.fetch_asset(fs0_xz_url, asset_hash=fs0_xz_hash) archive.extract(tar_xz_path, self.workdir) fs0_path = os.path.join(self.workdir, "SBSA_FLASH0.fd") # Non-secure rom (UEFI and EFI variables) fs1_xz_url = ( - "https://fileserver.linaro.org/s/t8foNnMPz74DZZy/" + "https://fileserver.linaro.org/s/AGWPDXbcqJTKS4R/" "download/SBSA_FLASH1.fd.xz" ) - fs1_xz_hash = "13a9a262953787c7fc5a9155dfaa26e703631e02" + fs1_xz_hash = "411155ae6984334714dff08d5d628178e790c875" tar_xz_path = self.fetch_asset(fs1_xz_url, asset_hash=fs1_xz_hash) archive.extract(tar_xz_path, self.workdir) fs1_path = os.path.join(self.workdir, "SBSA_FLASH1.fd") @@ -144,7 +144,7 @@ def test_sbsaref_alpine_linux_cortex_a57(self): def test_sbsaref_alpine_linux_neoverse_n1(self): """ - :avocado: tags=cpu:max + :avocado: tags=cpu:neoverse-n1 """ self.boot_alpine_linux("neoverse-n1") @@ -152,4 +152,54 @@ def test_sbsaref_alpine_linux_max(self): """ :avocado: tags=cpu:max """ - self.boot_alpine_linux("max,pauth-impdef=on") + self.boot_alpine_linux("max") + + + # This tests the whole boot chain from EFI to Userspace + # We only boot a whole OS for the current top level CPU and GIC + # Other test profiles should use more minimal boots + def boot_openbsd73(self, cpu): + self.fetch_firmware() + + img_url = ( + "https://cdn.openbsd.org/pub/OpenBSD/7.3/arm64/miniroot73.img" + ) + + img_hash = "7fc2c75401d6f01fbfa25f4953f72ad7d7c18650056d30755c44b9c129b707e5" + img_path = self.fetch_asset(img_url, algorithm="sha256", asset_hash=img_hash) + + self.vm.set_console() + self.vm.add_args( + "-cpu", + cpu, + "-drive", + f"file={img_path},format=raw", + "-device", + "virtio-rng-pci,rng=rng0", + "-object", + "rng-random,id=rng0,filename=/dev/urandom", + ) + + self.vm.launch() + wait_for_console_pattern(self, + "Welcome to the OpenBSD/arm64" + " 7.3 installation program.") + + def test_sbsaref_openbsd73_cortex_a57(self): + """ + :avocado: tags=cpu:cortex-a57 + """ + self.boot_openbsd73("cortex-a57") + + def test_sbsaref_openbsd73_neoverse_n1(self): + """ + :avocado: tags=cpu:neoverse-n1 + """ + self.boot_openbsd73("neoverse-n1") + + def test_sbsaref_openbsd73_max(self): + """ + :avocado: tags=cpu:max + """ + self.boot_openbsd73("max") + From patchwork Wed Oct 11 10:33:06 2023 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: 731945 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp326409wrv; Wed, 11 Oct 2023 03:36:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH4+Cv0pgMudAmQMehfFYIqlYzp6+PPFMOdsm3BL/W3UC0GFEJfmFepigOkAeQJknZbvIME X-Received: by 2002:a05:620a:21da:b0:76e:f320:9b52 with SMTP id h26-20020a05620a21da00b0076ef3209b52mr20436817qka.73.1697020570136; Wed, 11 Oct 2023 03:36:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697020570; cv=none; d=google.com; s=arc-20160816; b=jy0LGoseyFJsW6o+5FW68TBNEOs9rcL10Tdx75lksOBcD571o4Ku/YPqKzea/uW1nK nxqVHBXUUs0IlHjOoBEhSZU4LPFdLqKeAIFw0MUp1HCCTy/xq9UTrh9TG2ze9YFVYAn4 2UzMRgBm71LJ8RsrsqHu6dppA0Fz9PQ29uJKdrCjb0M5a+CXYoYQ0CSkUlTOAG0rzqr0 FcJBuZWFsUMsEs0s1CX8XiSS1UW4B45753tI4F1XEoGU+Hi2mcfs6y0uvvRn2xMxGEKW JkmjNYhXHIXSViA+DmiwZ8MOkWgWaRnki7BPTAe6HCfkLOIQViD26LqY9xvMllnkj0im n8Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=PYNRmoxNI53oOIjLqN4U1LCzFirqfr049WCu+bQeo6Q=; fh=o03WIQKgoAznpZ8P8nyjYAl6Zdkt3YR+NCSNDo0M1Tg=; b=TGb3MR08XVOih1/IW5ViusKpknT4X59Yc3V/ERqCwPrBOzZw+Fv3dtK6Um9z4UPkDI ApHyoZ7aA18Fj5VjDBVsO3QHO2lHIOGDnue6R/9VX8Ix9soP9gCNvA3clyDjL1iaTvxP fV/0hSUGBAEfdvrN6zV8Evbgjv8GAY6EFTGM66vatdvAGmpeaK9VIpDOtB3QRYEywaTm Dou85QLLsE9+eO5VZpILXoRS6V3Ta4GZxNXfLMAdFmQF5boYoQupv/C3rbOYyljJBd7E RjlWjXiLU3ihY/Kc6CpWZQvTKwPUU+aslzJ8RuV1VCAfkSlofuQnulJsEW4m2l3c571a 6YXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ErkbigTC; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f19-20020a05620a20d300b0076cb04a68ddsi9035630qka.609.2023.10.11.03.36.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:36:10 -0700 (PDT) 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=ErkbigTC; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWXE-0001Tz-Lz; Wed, 11 Oct 2023 06:33:48 -0400 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 1qqWX4-0001IU-MX for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:38 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWX0-0005AS-Iw for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:36 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-405524e6769so4807975e9.1 for ; Wed, 11 Oct 2023 03:33:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697020411; x=1697625211; 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=PYNRmoxNI53oOIjLqN4U1LCzFirqfr049WCu+bQeo6Q=; b=ErkbigTCTo/1gZ7vUGft2RWzZJa5lEheVzkp3zoN16RmMIiaWCcz5vMFZc9O+7362O gDlgBzetu8bBxFnbvT4k98ObHkSljGVF+1w+TRyHlh5Pu22DTNd8e3npQxKjr4owSelj Ht2Lpjg79kJfe3Ap0mwUD1RnQSyAuT6U2/japPTL1bkgVB0XcET0TADfJRrgxiJxJ/yL rSjbwXyQUN1URqkq2ISEJt6pwHFB3hwbpCCQ0GmvQIqzSKEQT1tbFEM+2mFG7vHwXGOo 30YNAuHGwpL0UQdTuHOMD/W9PUblk6+rpG69Q4c57A1K82Aj6fawJU6LwYH8BkbYIhIf 93Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697020411; x=1697625211; 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=PYNRmoxNI53oOIjLqN4U1LCzFirqfr049WCu+bQeo6Q=; b=oVST2TSsSo2pgteLvjKk6UIs/EU/BBtuRLhDLJxXeW366CFtBsWfptSOkOD4exRjbg EIUx4RAG6t+RaSo+RfOif1hB5zXynypZZXq8OC5MI/6TzDP89j/f+4p8tpY7bJEJzVKq Nh1hmhbbtuJm2AMlRUmEQZIOiGp5UL+XFZ7k/vkwkuaXnkPe3dcQ6rDKLRZNiP3RDVmn 9SPaubGbB3OBC8kFwLfPjy90RqMftGhIlPVdcVgtkGSKZpqm9lgm2fV+19J7PbwjL/yt 465xpLxMS7KYCRTVz4XmVQmCVfYeb+PIXORuDakHcWsI6jyubbu5OAcqcMaXeLzbt6et oTCw== X-Gm-Message-State: AOJu0YyjPrCTs7v7mSzVMUxrdgGn2NC+IjonDoViUWcALbzIVkjwz2+G +aDDsaVe/zMeRm8+RyVndHMvgQ== X-Received: by 2002:a05:600c:220a:b0:405:251f:8455 with SMTP id z10-20020a05600c220a00b00405251f8455mr13973069wml.7.1697020411322; Wed, 11 Oct 2023 03:33:31 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id y8-20020a7bcd88000000b00406447b798bsm18773359wmj.37.2023.10.11.03.33.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:33:31 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4BB7D1FFBD; Wed, 11 Oct 2023 11:33:30 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Radoslaw Biernacki , Peter Maydell , Leif Lindholm , Marcin Juszkiewicz , Cleber Rosa , Wainer dos Santos Moschetta , Beraldo Leal , qemu-arm@nongnu.org (open list:SBSA-REF) Subject: [PULL 02/25] tests/avocado: remove flaky test marking for test_sbsaref_edk2_firmware Date: Wed, 11 Oct 2023 11:33:06 +0100 Message-Id: <20231011103329.670525-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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 After testing locally I decided to revert a5754847e0 (tests/avocado: Disable the test_sbsaref_edk2_firmware by default) as the test seems pretty stable: env QEMU_TEST_FLAKY_TESTS=1 retry.py -n 50 -c -- \ ./tests/venv/bin/avocado run \ ./tests/avocado/machine_aarch64_sbsaref.py:Aarch64SbsarefMachine.test_sbsaref_edk2_firmware yields: Results summary: 0: 50 times (100.00%), avg time 2.064 (0.04 varience/0.19 deviation) Ran command 50 times, 50 passes Maybe f0ec14c78c (tests/avocado: Fix console data loss) has made it more reliable? Cc: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-3-alex.bennee@linaro.org> diff --git a/tests/avocado/machine_aarch64_sbsaref.py b/tests/avocado/machine_aarch64_sbsaref.py index b272053eaf..bdd1efc768 100644 --- a/tests/avocado/machine_aarch64_sbsaref.py +++ b/tests/avocado/machine_aarch64_sbsaref.py @@ -75,7 +75,6 @@ def fetch_firmware(self): "sbsa-ref", ) - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is not reliable') def test_sbsaref_edk2_firmware(self): """ :avocado: tags=cpu:cortex-a57 From patchwork Wed Oct 11 10:33:07 2023 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: 731939 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp326205wrv; Wed, 11 Oct 2023 03:35:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGTBjIyf2J9ChGBWZ2DNMOmE4uQw0WwaGlRXAXVntLrePoe4dB3toCL+FWP2VW1r2gHTpwf X-Received: by 2002:a05:6214:5853:b0:65b:1468:8210 with SMTP id ml19-20020a056214585300b0065b14688210mr21849847qvb.23.1697020541334; Wed, 11 Oct 2023 03:35:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697020541; cv=none; d=google.com; s=arc-20160816; b=vXtZd/0joAJn44qEh3CSbXe6HApWr83GkEQMyldx+tUql3Me3B3sRw5PFRbnTcazIW p2u6mqm2vVMoPxlSR968lhEl4KLV5Zm5RPr0Is0noRLXaA+orD2gqUnYHF9k05e3scML mx3uT6XthtiZaIaFJBc4M9GC/PCRcRnsMI4gXRG8kRbbu79IfpxotRwDOBeNCwwJ9Iqx WhAA29bBuElWPqTlBDma31M5EQHhyHdIMDLkE//dWXA0yVXDQ5Aql9QZg2sBWqrPgcHk fw/HsrTsRrsxTAmgJ7Cspx5J33iHDYYVK75mPJdOI0gk0O/TqBb8czKuUM4y8GGXPnIc 0AdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=dCeiBmwJ0znzL5+0oomSpJsnl+/in8TKJzyri18rbQw=; fh=qxYx++lBDK7CsO36uKTDLQvsgR9Kz85wtidoABphgjE=; b=K4zmooeGNtLCimnLEjj1DJ+ZEs5QfnY/T1gEQMRHXDUiLuvlenAtfH9LnyUVcR8iy/ ubHObYNddbYi/K1KEX9L3miqJMpCP/308Lwdvvo7noAK6RcwreXlhssK7HIqPW8ukZon kVRsT0FtiQdpRBfykGj7R6LycsZwaDpYew/8COkHAYJQW+Dy7q+idKsIpccfufc8+9sA 23w6t8Reo90NmZ8X7Z2QjM1ltGcdXY1ZhqzE07LBRtDbhiPj+JJ1vFG35glkmRQoPACx boEiTfAdZAiwOOsSq1UmGJORAy+9/yaEhNKIilCXUlh0dG5pyj+riQ2kVepWgvT7HcZp lCbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z7nQaGm2; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c12-20020a0cf2cc000000b0065b15f43702si8912427qvm.473.2023.10.11.03.35.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:35:41 -0700 (PDT) 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=Z7nQaGm2; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWXM-0001e1-6F; Wed, 11 Oct 2023 06:33:56 -0400 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 1qqWX5-0001Kt-9u for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:41 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWX0-0005Ad-IM for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:38 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-32483535e51so6415818f8f.0 for ; Wed, 11 Oct 2023 03:33:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697020412; x=1697625212; 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=dCeiBmwJ0znzL5+0oomSpJsnl+/in8TKJzyri18rbQw=; b=Z7nQaGm23GamYfklZv5XadE+73j9I8LQ7Um4ANb9KLi0vXw4sdcm7iDxhua/cooJOs 8mnAjfFRaeN0rRD8E2aU6845aqzuHhzle2g2QBg0KkRroouVC/vGMdFPHrvUGujSlTtW xmERIrlqSdZ+WaZIpBJr/2VZ9YGl4mMWW0smp7/fPXrb6PoOcxpofiAzhLrEfghVDBdn 494UA1p605SF3/ewaiEeUBAyzVTcycYnTsSJe68PpWUAgyIDZUV9h9g+91vnbzZxrt+l QWYtUOeywR0fWuWuMzEDJQyQxm+dw0uL4wyhXiAWFpBSpLLUPcIWsVLNtAO2xYr/khwA TAzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697020412; x=1697625212; 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=dCeiBmwJ0znzL5+0oomSpJsnl+/in8TKJzyri18rbQw=; b=jmn6DUT0FWuPB8zPOiRVhXY18wQAeJpni3eUdsjxk8hb27ihsL7cR4H6pHcPN4YFT7 /eonUFDHN2U8cV2jC5UyRscovUcUYmK5g2XFlhZgzdyu/tqvOgogPiOLipKeIgl+wUw8 ztMrxheE1kluCUrrZHWBi/LOrCUhaFv7C4lV5x+f6AG+bfOtOvDCkMy4+X++Nk/VRLDo /ouQbxb5snRii2FK99W+KVPvgYv5QB2Hjc9Tov2XzqlXwV68HjXzVEO+4mf/JM5on+RW IvnwT/x+MNaapHnYyHU/77Rqp/MErBBXYgh+YcZsiAAbzmm55EFdyxmBLq/Xdud14Ngl AFtQ== X-Gm-Message-State: AOJu0Yw+BHEXnI1F5nDgU66OXy4jRFGwmOaQoH2VZvnz4Gsi36slOcIR C/LSGT53acK59/Bv5eax4k7+1myD3xcUXR6UNrA= X-Received: by 2002:adf:fa12:0:b0:321:685f:e0a7 with SMTP id m18-20020adffa12000000b00321685fe0a7mr17950491wrr.3.1697020412516; Wed, 11 Oct 2023 03:33:32 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id t4-20020a5d6904000000b0032710f5584fsm14989523wru.25.2023.10.11.03.33.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:33:31 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 873121FFBE; Wed, 11 Oct 2023 11:33:30 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Daniel_?= =?utf-8?q?P=2E_Berrang=C3=A9?= , =?utf-8?q?Philippe_Ma?= =?utf-8?q?thieu-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 03/25] tests/lcitool: add swtpm to the package list Date: Wed, 11 Oct 2023 11:33:07 +0100 Message-Id: <20231011103329.670525-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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 need this to test some TPM stuff. Reviewed-by: "Daniel P. Berrangé" Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-4-alex.bennee@linaro.org> diff --git a/.gitlab-ci.d/cirrus/macos-12.vars b/.gitlab-ci.d/cirrus/macos-12.vars index 80eadaab29..5f3fb346d1 100644 --- a/.gitlab-ci.d/cirrus/macos-12.vars +++ b/.gitlab-ci.d/cirrus/macos-12.vars @@ -11,6 +11,6 @@ MAKE='/opt/homebrew/bin/gmake' NINJA='/opt/homebrew/bin/ninja' PACKAGING_COMMAND='brew' PIP3='/opt/homebrew/bin/pip3' -PKGS='bash bc bison bzip2 capstone ccache cmocka ctags curl dbus diffutils dtc flex gcovr gettext git glib gnu-sed gnutls gtk+3 jemalloc jpeg-turbo json-c libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb llvm lzo make meson mtools ncurses nettle ninja pixman pkg-config python3 rpm2cpio sdl2 sdl2_image snappy socat sparse spice-protocol tesseract usbredir vde vte3 xorriso zlib zstd' +PKGS='bash bc bison bzip2 capstone ccache cmocka ctags curl dbus diffutils dtc flex gcovr gettext git glib gnu-sed gnutls gtk+3 jemalloc jpeg-turbo json-c libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb llvm lzo make meson mtools ncurses nettle ninja pixman pkg-config python3 rpm2cpio sdl2 sdl2_image snappy socat sparse spice-protocol swtpm tesseract usbredir vde vte3 xorriso zlib zstd' PYPI_PKGS='PyYAML numpy pillow sphinx sphinx-rtd-theme tomli' PYTHON='/opt/homebrew/bin/python3' diff --git a/tests/docker/dockerfiles/alpine.docker b/tests/docker/dockerfiles/alpine.docker index d25649cb4f..42f6928627 100644 --- a/tests/docker/dockerfiles/alpine.docker +++ b/tests/docker/dockerfiles/alpine.docker @@ -100,6 +100,7 @@ RUN apk update && \ sparse \ spice-dev \ spice-protocol \ + swtpm \ tar \ tesseract-ocr \ usbredir-dev \ diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker index 68bfe606f5..d97c30e96a 100644 --- a/tests/docker/dockerfiles/centos8.docker +++ b/tests/docker/dockerfiles/centos8.docker @@ -107,6 +107,7 @@ RUN dnf distro-sync -y && \ socat \ spice-protocol \ spice-server-devel \ + swtpm \ systemd-devel \ systemtap-sdt-devel \ tar \ diff --git a/tests/docker/dockerfiles/debian-amd64-cross.docker b/tests/docker/dockerfiles/debian-amd64-cross.docker index 0991938595..00bdc06021 100644 --- a/tests/docker/dockerfiles/debian-amd64-cross.docker +++ b/tests/docker/dockerfiles/debian-amd64-cross.docker @@ -55,6 +55,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ sed \ socat \ sparse \ + swtpm \ tar \ tesseract-ocr \ tesseract-ocr-eng \ diff --git a/tests/docker/dockerfiles/debian-amd64.docker b/tests/docker/dockerfiles/debian-amd64.docker index 61dbc3ff24..9b50fb2f63 100644 --- a/tests/docker/dockerfiles/debian-amd64.docker +++ b/tests/docker/dockerfiles/debian-amd64.docker @@ -124,6 +124,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ sed \ socat \ sparse \ + swtpm \ systemtap-sdt-dev \ tar \ tesseract-ocr \ diff --git a/tests/docker/dockerfiles/debian-arm64-cross.docker b/tests/docker/dockerfiles/debian-arm64-cross.docker index 74eabb274e..2dae3777f7 100644 --- a/tests/docker/dockerfiles/debian-arm64-cross.docker +++ b/tests/docker/dockerfiles/debian-arm64-cross.docker @@ -55,6 +55,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ sed \ socat \ sparse \ + swtpm \ tar \ tesseract-ocr \ tesseract-ocr-eng \ diff --git a/tests/docker/dockerfiles/debian-armhf-cross.docker b/tests/docker/dockerfiles/debian-armhf-cross.docker index 1ebd6ebd00..180ed836e6 100644 --- a/tests/docker/dockerfiles/debian-armhf-cross.docker +++ b/tests/docker/dockerfiles/debian-armhf-cross.docker @@ -55,6 +55,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ sed \ socat \ sparse \ + swtpm \ tar \ tesseract-ocr \ tesseract-ocr-eng \ diff --git a/tests/docker/dockerfiles/debian-ppc64el-cross.docker b/tests/docker/dockerfiles/debian-ppc64el-cross.docker index 59091fed02..d6be2f0cc5 100644 --- a/tests/docker/dockerfiles/debian-ppc64el-cross.docker +++ b/tests/docker/dockerfiles/debian-ppc64el-cross.docker @@ -55,6 +55,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ sed \ socat \ sparse \ + swtpm \ tar \ tesseract-ocr \ tesseract-ocr-eng \ diff --git a/tests/docker/dockerfiles/debian-s390x-cross.docker b/tests/docker/dockerfiles/debian-s390x-cross.docker index 48b2f28310..ec0041d6aa 100644 --- a/tests/docker/dockerfiles/debian-s390x-cross.docker +++ b/tests/docker/dockerfiles/debian-s390x-cross.docker @@ -55,6 +55,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ sed \ socat \ sparse \ + swtpm \ tar \ tesseract-ocr \ tesseract-ocr-eng \ diff --git a/tests/docker/dockerfiles/fedora-win32-cross.docker b/tests/docker/dockerfiles/fedora-win32-cross.docker index afa988574f..08799219f9 100644 --- a/tests/docker/dockerfiles/fedora-win32-cross.docker +++ b/tests/docker/dockerfiles/fedora-win32-cross.docker @@ -55,6 +55,7 @@ exec "$@"\n' > /usr/bin/nosync && \ socat \ sparse \ spice-protocol \ + swtpm \ tar \ tesseract \ tesseract-langpack-eng \ diff --git a/tests/docker/dockerfiles/fedora-win64-cross.docker b/tests/docker/dockerfiles/fedora-win64-cross.docker index cf93a0ca60..f8e4cb70d3 100644 --- a/tests/docker/dockerfiles/fedora-win64-cross.docker +++ b/tests/docker/dockerfiles/fedora-win64-cross.docker @@ -55,6 +55,7 @@ exec "$@"\n' > /usr/bin/nosync && \ socat \ sparse \ spice-protocol \ + swtpm \ tar \ tesseract \ tesseract-langpack-eng \ diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker index f00e9e267c..9e9c71fa94 100644 --- a/tests/docker/dockerfiles/fedora.docker +++ b/tests/docker/dockerfiles/fedora.docker @@ -118,6 +118,7 @@ exec "$@"\n' > /usr/bin/nosync && \ sparse \ spice-protocol \ spice-server-devel \ + swtpm \ systemd-devel \ systemtap-sdt-devel \ tar \ diff --git a/tests/docker/dockerfiles/opensuse-leap.docker b/tests/docker/dockerfiles/opensuse-leap.docker index ed04b4d6da..dc0e36ce48 100644 --- a/tests/docker/dockerfiles/opensuse-leap.docker +++ b/tests/docker/dockerfiles/opensuse-leap.docker @@ -100,6 +100,7 @@ RUN zypper update -y && \ socat \ sparse \ spice-protocol-devel \ + swtpm \ systemd-devel \ systemtap-sdt-devel \ tar \ diff --git a/tests/docker/dockerfiles/ubuntu2204.docker b/tests/docker/dockerfiles/ubuntu2204.docker index 94c2c16118..2ca9cff79c 100644 --- a/tests/docker/dockerfiles/ubuntu2204.docker +++ b/tests/docker/dockerfiles/ubuntu2204.docker @@ -124,6 +124,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ sed \ socat \ sparse \ + swtpm \ systemtap-sdt-dev \ tar \ tesseract-ocr \ diff --git a/tests/lcitool/libvirt-ci b/tests/lcitool/libvirt-ci index e3ed1e5da1..36bc517161 160000 --- a/tests/lcitool/libvirt-ci +++ b/tests/lcitool/libvirt-ci @@ -1 +1 @@ -Subproject commit e3ed1e5da101943e53d8d89424e17b22120743f5 +Subproject commit 36bc517161c45ead20224d47f2dc4fa428af6724 diff --git a/tests/lcitool/projects/qemu.yml b/tests/lcitool/projects/qemu.yml index 6f0885170d..82092c9f17 100644 --- a/tests/lcitool/projects/qemu.yml +++ b/tests/lcitool/projects/qemu.yml @@ -110,6 +110,7 @@ packages: - spice-protocol - spice-server - ssh-client + - swtpm - systemd - tar - tesseract From patchwork Wed Oct 11 10:33:08 2023 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: 731938 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp326171wrv; Wed, 11 Oct 2023 03:35:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IErSNn1S7QWDFU56a+SHgMF5rNtUe8UldFcVnnFKGVrwa5l/DUqiYImKZQlWxAJaHNGl7TQ X-Received: by 2002:a0c:da12:0:b0:66d:9b6:c115 with SMTP id x18-20020a0cda12000000b0066d09b6c115mr714051qvj.7.1697020535792; Wed, 11 Oct 2023 03:35:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697020535; cv=none; d=google.com; s=arc-20160816; b=lnFC3wq5NU0cnwFcSRGvMR1kHAABAMpgsySQQw947maqs+SCzR5zmNKrCtrgTAl/qg 3blKZC/V36KcXE7l2BinSfR4Rr4k/8dv4yBbKYY+8S5RRbWuBTOsNEQ69ZYbKxSxlu9z mWFgt2rjRoztlFwEitzSjGRKLNUS5rj4TMBUBTAJ60WeqtXHCo8xRJJL++bonmt8nCyM TfmYQauj76hhG3haK/FWKizA5CtiWHmBy46rzMX1a5w+at7T17e8XsQ2i/mK6fFdBGYa YRn8x/A10PgLefQg7VC5b/yg9mYVmHivIOnKOKSP+hIBn7Jp6lvKG6tFNK5KgyW/XdS2 pQ+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=0IiuNKmaTaknn72sH80/PHMGMfdmM3U9tgv9losOud8=; fh=jUpKE2xnxMsyN0/pv376xeAx2+NoX7ZpLKTmYHVHrxk=; b=nVjr4QWIE94ecq6/bp4MzEGOsU1CJxWaACI0eL/v7GLaZMXJ6P6dFVwcnOqZTj8lhK 55dnl0aYKezZ2fN79eh1sXAz8ag4dNL93LWlnV2nyMJ6io41BrR0k2bdLdNfeTfzP/e0 fXZD/AIAoQtCp2Ir/UTGyBJkItgqK1+MG6kH0cq3X0iRdLiaBKzOeL9zS8sab890oj5Q NYULdMANjjOIyuZ/pVHNfXvFdeX+Z9DkduWlKFKWpLekc10FkYttrPgkGdndz2B5qj+H xsh7JcS5wbaHeq/bI8wYo4s/f1Cun4W2U3KcxwfxOcOMnt3iro12bYqwp3sBwR9RO5ml g5KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tmbs707B; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id fh9-20020a0562141a0900b0066d08ac0ba0si455365qvb.230.2023.10.11.03.35.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:35:35 -0700 (PDT) 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=tmbs707B; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWXG-0001YB-Oe; Wed, 11 Oct 2023 06:33:50 -0400 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 1qqWX5-0001Ks-8i for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:41 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWX1-0005Ag-KB for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:38 -0400 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-3231dff4343so484182f8f.0 for ; Wed, 11 Oct 2023 03:33:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697020412; x=1697625212; 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=0IiuNKmaTaknn72sH80/PHMGMfdmM3U9tgv9losOud8=; b=tmbs707BcfDlan8qEGXnxUYye6R3lkpLbrN5Jyrl2PCtuRrpfmWmlqjuxYB7leIC/Q 69hTXLpRLV22VZiVml/MH1DI5q4REBZWIsdbi5pXOMTjCDI5MtLIG9jfpnUxkouUR8v6 dly+jYocZmEL+hPCSaNJcbD5/sD+LubxYyFkz9mfFurXY+vZjdWumfduNMa2fHZ1t4bM gAOCrvN1IobJ+oDJTX1qHWNWMILjj0OsY7b+lIWWSRhm/LIjNJTjUqeSR9HXdt75Swnh F1oJaSlGGLJ6leIiwWrnPsmerkLW614diPoI5ODkb5+hrqX6oqa2NK9gNaOHwx+dykFu zvYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697020412; x=1697625212; 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=0IiuNKmaTaknn72sH80/PHMGMfdmM3U9tgv9losOud8=; b=Irei3R8Qf/p2acvwR6Imxhms+E61uNAtM8DYecR3uUp66RFAWeoh2gdH3TJcGqD91W 1GrEaSWX1RDbaypYM5tHap2eCwElLhE1HCiZg+GaVNgTyWRRgjoPb3xjudiKoVpnMx0s cXYGiFgo9UBuYZjB2u+KrNwG7/n2aWSacClIlkYLjM+xqgF0V7HbbfCdC9/8J9/DLE45 ptl2XhUAqyrrSj7kahCLD18TZCFtlBvUYQiCoZRKH+OFzomVKbH6An6I3P6EnJ6nNhPD +ggrdzURwd7m8bj+WOuxRfmlXAq9HSJ92AzIA4kR+r++y+7p9tYFJOvISl+ggWDk6FMJ 0ZgQ== X-Gm-Message-State: AOJu0YzlMxAFQqEY/vHZzLzaTzAL5G5fAidwjwx/W7kAkJ+PGlWEqEOt AUQLIOX2WFMywNbXVgBI8QgXgg== X-Received: by 2002:a5d:5c07:0:b0:31f:d50e:a14f with SMTP id cc7-20020a5d5c07000000b0031fd50ea14fmr20100519wrb.10.1697020412747; Wed, 11 Oct 2023 03:33:32 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id f15-20020a5d50cf000000b00323330edbc7sm15124930wrt.20.2023.10.11.03.33.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:33:31 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9F5671FFBF; Wed, 11 Oct 2023 11:33:30 +0100 (BST) 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?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 04/25] gitlab: shuffle some targets and reduce avocado noise Date: Wed, 11 Oct 2023 11:33:08 +0100 Message-Id: <20231011103329.670525-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.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 move a couple of targets out of the avocado runs because there are no tests to run. Tricore already has some coverage. The cris target only really has check-tcg tests but its getting harder to find anything that packages the compiler. To reduce the noise of CANCEL messages we also set AVOCADO_TAGS appropriately so we filter down the number of tests we attempt. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-5-alex.bennee@linaro.org> diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index aee9101507..25af1bc41e 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -30,6 +30,7 @@ avocado-system-alpine: variables: IMAGE: alpine MAKE_CHECK_ARGS: check-avocado + AVOCADO_TAGS: arch:avr arch:loongarch64 arch:mips64 arch:mipsel build-system-ubuntu: extends: @@ -40,8 +41,7 @@ build-system-ubuntu: variables: IMAGE: ubuntu2204 CONFIGURE_ARGS: --enable-docs - TARGETS: alpha-softmmu cris-softmmu hppa-softmmu - microblazeel-softmmu mips64el-softmmu + TARGETS: alpha-softmmu microblazeel-softmmu mips64el-softmmu MAKE_CHECK_ARGS: check-build check-system-ubuntu: @@ -61,6 +61,7 @@ avocado-system-ubuntu: variables: IMAGE: ubuntu2204 MAKE_CHECK_ARGS: check-avocado + AVOCADO_TAGS: arch:alpha arch:microblaze arch:mips64el build-system-debian: extends: @@ -72,7 +73,7 @@ build-system-debian: IMAGE: debian-amd64 CONFIGURE_ARGS: --with-coroutine=sigaltstack TARGETS: arm-softmmu i386-softmmu riscv64-softmmu sh4eb-softmmu - sparc-softmmu xtensaeb-softmmu + sparc-softmmu xtensa-softmmu MAKE_CHECK_ARGS: check-build check-system-debian: @@ -92,6 +93,7 @@ avocado-system-debian: variables: IMAGE: debian-amd64 MAKE_CHECK_ARGS: check-avocado + AVOCADO_TAGS: arch:arm arch:i386 arch:riscv64 arch:sh4 arch:sparc arch:xtensa crash-test-debian: extends: .native_test_job_template @@ -114,7 +116,7 @@ build-system-fedora: variables: IMAGE: fedora CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs - TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu + TARGETS: microblaze-softmmu mips-softmmu xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu MAKE_CHECK_ARGS: check-build @@ -135,6 +137,8 @@ avocado-system-fedora: variables: IMAGE: fedora MAKE_CHECK_ARGS: check-avocado + AVOCADO_TAGS: arch:microblaze arch:mips arch:xtensa arch:m68k + arch:riscv32 arch:ppc arch:sparc64 crash-test-fedora: extends: .native_test_job_template @@ -180,6 +184,8 @@ avocado-system-centos: variables: IMAGE: centos8 MAKE_CHECK_ARGS: check-avocado + AVOCADO_TAGS: arch:ppc64 arch:or1k arch:390x arch:x86_64 arch:rx + arch:sh4 arch:nios2 build-system-opensuse: extends: @@ -209,6 +215,7 @@ avocado-system-opensuse: variables: IMAGE: opensuse-leap MAKE_CHECK_ARGS: check-avocado + AVOCADO_TAGS: arch:s390x arch:x86_64 arch:aarch64 # This jobs explicitly disable TCG (--disable-tcg), KVM is detected by From patchwork Wed Oct 11 10:33:09 2023 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: 731946 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp326456wrv; Wed, 11 Oct 2023 03:36:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHJT9eowYoA4AyHQMjh3OUSNE8uFbzlnjxqZu3PLSCTdz76Jl8lpgGyg3Csgb6QZoitk4Vn X-Received: by 2002:a05:6214:c49:b0:64a:3e9b:fa0a with SMTP id r9-20020a0562140c4900b0064a3e9bfa0amr20229035qvj.11.1697020576541; Wed, 11 Oct 2023 03:36:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697020576; cv=none; d=google.com; s=arc-20160816; b=IOzHtn2ZfJikHvnHRZZkOF0ULeshGua+EOEwdMDyL94Wzdpqg98VJTql3tv1lYZob0 mfK3f93wj4HYbqEbK09fp5Cwwlp5ybbswWRyzkYubu01WreYZnh0L4ahaSSnIImeUfQm 63wEooxIQ623RaTYv2Gnf6On9YMDfXtRxQt775CCNRH+yb6+3YO8nuTZaxMRdX/+6f3Z 5JgS3Vr00NADNVR+IFTUbCRmEwKnNWAu0gb6z+xlX5ANs5S87Hi978/JEZlBUvo31Hbk hbpVXTMg0pdqFBWIccuzrFxaxyYkNSJUXmy/Y74LmaixtyR9KxWeW/oXJbKOq9WcZk/I Cgng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=gONP7pJxs9GGiNZgo4EWoYPfXNPiQDYcL6QIKvi4tFo=; fh=QXSxuQjYZYj5OU18RIuPQozZqX65sNPG/5xSONxf+DQ=; b=ZMR+EJl6C7SXgTj9NNwmcG80QP9BKeDKjF/TCEUGhTGdFkrcTkYE1+paRexYPFKlrB P6QRoB2J47xeskpoVg/0aHouiSzX0e96DlM+x4df8gLAppYEtJoeroRjHV7OCbCTtCfm 9diuxjGAWW1jXH2BkIzFJWmU9b63vHf2kHBNZAlISHChg0UVcLtHlCND7Qa2acnlTNWx yddv+43zp9yrtF+U0lo0USND9LFR4krunvbq9xvtQV8Q27+S/4rbOuCMkgwjSzEvso6+ s6J2cUGbntpIFYWSDWmWdtwiN2Sdri05C/4UW8qR14rLolhdT7OsH++pQZTuE5ro8qMX Se/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Oz5XCvd4; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u4-20020a0cb404000000b0065cffde415bsi8948559qve.542.2023.10.11.03.36.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:36:16 -0700 (PDT) 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=Oz5XCvd4; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWXG-0001Wm-0Q; Wed, 11 Oct 2023 06:33:50 -0400 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 1qqWX5-0001KQ-1t for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:41 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWX0-0005Ak-IX for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:38 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-406618d0992so64284585e9.0 for ; Wed, 11 Oct 2023 03:33:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697020413; x=1697625213; 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=gONP7pJxs9GGiNZgo4EWoYPfXNPiQDYcL6QIKvi4tFo=; b=Oz5XCvd4GLEFMxSYySdfnY8/RcZ+BerRGkvInGqcraJDGDfWiwaAWG1AyaxsBauAp+ cIVd5liYKwEsRNjRQFwROHG8i0MK62rrRrcA9ObLHVoVta46lsNBqWlz5xSOEOsptKAc 0JTfK8RFv8UYj7l6OQoObtnpj7jBk+Rnb//IdLhoDBVL9JiVh8NxI8/yzi5w3nsuQDhI JmiFLqAXGP9XjP+6uKrOQaEWf3EwS4LQZ/E0D1IXJjIRtM3M4wZzvoMS6HskYDCuxu+m CsNeEgoPcsqQ8EmisEQbyyiwIWej/l45dfBkj1oxrFYKQvcVYv21sxHLLSSATYYo59YA E/HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697020413; x=1697625213; 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=gONP7pJxs9GGiNZgo4EWoYPfXNPiQDYcL6QIKvi4tFo=; b=f/zXJ/vhxGLrkF/c3XhyM6GFcA06IlLcIi2nq313axnk+E+QuH9OsPUqipdTUxddF+ oOsipVmY/JK6RDNb+OJqE2mXlBri2j/Xvl+od37ycNY+p1oNawUDHB4lYD7Qzl72JQ6X aBK5IIPw1OZFM7vXRjOTIR4uIAIDo8gTnFfzLMz/TtynQzog8bVJVkJqDsEU/j1v/v1+ lM8A7b20oz+I62aTtl9DnsBCx+W3EeksGE7maLSHCQIEx71AI8Rjt2au/DvF6je94lTE MwwMfWPltYDg/1j2Hv9e+JCb3ZhU4JWuARp+cyWjSyiVsCHvtFCKQ3etm+acx8EGYKXC 428A== X-Gm-Message-State: AOJu0YyFSMfL8H8siCSBEWPYOHlZPipVInt1bBPvuwJquMApnaP1WBUT hWYVFcg644p2BVY5mjyhKZ9bYA== X-Received: by 2002:a05:6000:114d:b0:323:37a8:d085 with SMTP id d13-20020a056000114d00b0032337a8d085mr17367577wrx.58.1697020412974; Wed, 11 Oct 2023 03:33:32 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id v11-20020a5d6b0b000000b00324853fc8adsm14993219wrw.104.2023.10.11.03.33.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:33:32 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B95601FFC0; Wed, 11 Oct 2023 11:33:30 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Alistair Francis , Paolo Bonzini , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 05/25] tests/docker: make docker engine choice entirely configure driven Date: Wed, 11 Oct 2023 11:33:09 +0100 Message-Id: <20231011103329.670525-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Since 0b1a649047 (tests/docker: use direct RUNC call to build containers) we ended up with the potential for the remaining docker.py script calls to deviate from the direct RUNC calls. Fix this by dropping the use of ENGINE in the makefile and rely entirely on what we detect at configure time. We also tweak the RUNC detection so podman users can still run things from the source tree. Signed-off-by: Alex Bennée Reviewed-by: Alistair Francis Message-Id: <20231009164104.369749-6-alex.bennee@linaro.org> diff --git a/configure b/configure index 97a5e8de49..1f26639e4f 100755 --- a/configure +++ b/configure @@ -1694,7 +1694,6 @@ if test -n "$gdb_bin"; then fi if test "$container" != no; then - echo "ENGINE=$container" >> $config_host_mak echo "RUNC=$runc" >> $config_host_mak fi echo "SUBDIRS=$subdirs" >> $config_host_mak diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index dfabafab92..ab68b2dbad 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -16,9 +16,8 @@ DOCKER_DEFAULT_REGISTRY := registry.gitlab.com/qemu-project/qemu endif DOCKER_REGISTRY := $(if $(REGISTRY),$(REGISTRY),$(DOCKER_DEFAULT_REGISTRY)) -RUNC ?= docker -ENGINE ?= auto -DOCKER_SCRIPT=$(SRC_PATH)/tests/docker/docker.py --engine $(ENGINE) +RUNC ?= $(if $(shell command -v docker), docker, podman) +DOCKER_SCRIPT=$(SRC_PATH)/tests/docker/docker.py --engine $(RUNC) CUR_TIME := $(shell date +%Y-%m-%d-%H.%M.%S.$$$$) DOCKER_SRC_COPY := $(BUILD_DIR)/docker-src.$(CUR_TIME) @@ -158,7 +157,7 @@ $(foreach i,$(filter-out $(DOCKER_PARTIAL_IMAGES),$(DOCKER_IMAGES)), \ ) docker: - @echo 'Build QEMU and run tests inside Docker or Podman containers' + @echo 'Build QEMU and run tests inside $(RUNC) containers' @echo @echo 'Available targets:' @echo @@ -198,8 +197,6 @@ docker: @echo ' EXECUTABLE= Include executable in image.' @echo ' EXTRA_FILES=" [... ]"' @echo ' Include extra files in image.' - @echo ' ENGINE=auto/docker/podman' - @echo ' Specify which container engine to run.' @echo ' REGISTRY=url Cache builds from registry (default:$(DOCKER_REGISTRY))' docker-help: docker From patchwork Wed Oct 11 10:33:10 2023 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: 731941 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp326239wrv; Wed, 11 Oct 2023 03:35:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGVWg/oLm9FmWFUo3uRjWfSxaf3V/z91WE/++KamussoHzvMdhCb5MIDeKsk7GC0Hq9lFyI X-Received: by 2002:a81:a18f:0:b0:5a7:be33:8bd4 with SMTP id y137-20020a81a18f000000b005a7be338bd4mr4874985ywg.2.1697020545676; Wed, 11 Oct 2023 03:35:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697020545; cv=none; d=google.com; s=arc-20160816; b=PPfnTbaQ2iX1t3XBX9nveZpXeMhqtzu//xsddH3zqWA5Peu0nj4mhp4X8GisA93UNx XPp3knO8P6dD14CpMG8xzjnFyVxF73RygqytfEhhzLmJrzO5BFB8wGVLFfs3k0hv5oo5 TufO0tPVvpfntxOe/GD6TueyH64cUu5uUCp1ndhnRopWg3uXT8nRr/VzQzINvzLhMq68 D3aW86GJW62ss0CdN8px2AGrBrr6QP6DLheWkBGhR6grx76R6xCc8xPWFNsjzNloFMNr rbiqrQtJ5pM+U7xMPzf3DJvpjEcu88KvB4TTYrzptY3t5N+07zt0HRFDtaNvSCsC5NTz cBnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=knFp3LFINV+DnPYFBJemRPHvlmKP+IRj/bDUqX8B+FM=; fh=vLHU1RusEU3PWAC9vw8vMYh8GT0Awk+LVYkfidAkLlM=; b=cOqxjg1pIhcpFgejtIFjc/q56GxzL20ptD+Pncg+DWI1jobYk6ZI4FJ3lbMM6GS6dd Tbq/Cz47nLtKFWHLAl9zJPxAFHkO+DSlWzcRGQVLLVEBobKS6mwqdL7l4JXKKKwBoaYI /U7XRK5RANyEim8Nsd0SL4dlhXArW1D4R93k5QR0Dq3uEPym4Sxzz8gsJoOAuKklp5J2 6x8SpqHNXhI0ppSarB5qsxRaNvOGgw3uq77xlNA7jawPvsOv1AxVcsbt6DBAeimu8eua LHD40OC4hC4o1/yWtMm3l+8no1bn78QMWdEuJCncdTt9EYae9kfo7rdcCcr+ZD2U6GEI zylQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j7NCSXda; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s4-20020a05620a030400b007758878b8edsi8621193qkm.557.2023.10.11.03.35.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:35:45 -0700 (PDT) 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=j7NCSXda; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWXJ-0001ZQ-E5; Wed, 11 Oct 2023 06:33:53 -0400 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 1qqWX6-0001Kx-IE for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:41 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWX4-0005DA-BS for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:40 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-40651a72807so64230715e9.1 for ; Wed, 11 Oct 2023 03:33:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697020415; x=1697625215; 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=knFp3LFINV+DnPYFBJemRPHvlmKP+IRj/bDUqX8B+FM=; b=j7NCSXdaSX33SewiQGSxXHf3gH1iK9b5xmsmluSswS2zUz5dSd/jAXZkxqThG0KLZ4 2UK3pbisK8h19F/0QVJlJkCaLlbRR0u3ADBJkg/e7AV1a1oyIntXp/0aIeiqLW1TFJyt y9hYul4rTMk7XSAtIqwX+sCBGa6ZOPBrC2yeOJvGDNgNwLPAEgsuKNQ0Fm0APeKOIP/e mjbX5iZe48SevJqTz70YoOLp3zmTnSmVTrAH1IEM0wR8ca8PIKMidk4bSqeVoYX6ZpFe aLrjZXtV2fb2Z5Vv4mWItbdy1wWPvmFehzfaENRMIyZqw/iHSzMCxYXUzUChOAkaivum FOjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697020415; x=1697625215; 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=knFp3LFINV+DnPYFBJemRPHvlmKP+IRj/bDUqX8B+FM=; b=AecgAML/ox5H8dVpzdR8hJR5jrIN+CYYGjgLIRfazmL1oNDgF6LgkHQ3D2ka9ujyQC +svARSaO9yrN7JpWav4/cnji1gBcjZpQTDJAhDa0CuDA2r9amdLtz+5NVDLTPp6TUkE7 VYh3Q9xMJ9XmWUQGCZyaqu7oIufLHlNLu+3h4bSjLRjKRFzCLgsA8c2EkRQvhQI1H3ko KBeAOcYRT8HVE9afTDUWiAqucftfnzf1hsmpNBhzGkoTOrDVW97vRrOD1z3hYb5wJsHl T2A6os9R9kk1lZwnK2pN+RyPbSJbfRwXZsWDht3wehF07bxz8JPumewRm3FG/zSznCrT fj5g== X-Gm-Message-State: AOJu0Yz7Uoq9WbfkiqrxYVEF0G6MXdLXFyFO2W0D5PQ9Fl4Nry/ityo0 XwBvLR08rMZAGT5yvDnTucEX6A== X-Received: by 2002:a05:600c:214f:b0:405:4002:825a with SMTP id v15-20020a05600c214f00b004054002825amr17839437wml.13.1697020415526; Wed, 11 Oct 2023 03:33:35 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id x2-20020a1c7c02000000b003fe23b10fdfsm18592230wmc.36.2023.10.11.03.33.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:33:32 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D05511FFC1; Wed, 11 Oct 2023 11:33:30 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Alistair Francis , Paolo Bonzini , Thomas Huth Subject: [PULL 06/25] configure: allow user to override docker engine Date: Wed, 11 Oct 2023 11:33:10 +0100 Message-Id: <20231011103329.670525-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32f.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 If you have both engines installed but one is broken you are stuck with the automagic. Allow the user to override the engine for this case. Signed-off-by: Alex Bennée Reviewed-by: Alistair Francis Message-Id: <20231009164104.369749-7-alex.bennee@linaro.org> diff --git a/configure b/configure index 1f26639e4f..5c04e63bab 100755 --- a/configure +++ b/configure @@ -180,6 +180,7 @@ fi # some defaults, based on the host environment # default parameters +container_engine="auto" cpu="" cross_compile="no" cross_prefix="" @@ -787,6 +788,8 @@ for opt do ;; --disable-containers) use_containers="no" ;; + --container-engine=*) container_engine="$optarg" + ;; --gdb=*) gdb_bin="$optarg" ;; # everything else has the same name in configure and meson @@ -921,6 +924,7 @@ Advanced options (experts only): --enable-plugins enable plugins via shared library loading --disable-containers don't use containers for cross-building + --container-engine=TYPE which container engine to use [$container_engine] --gdb=GDB-path gdb to use for gdbstub tests [$gdb_bin] EOF meson_options_help @@ -1195,14 +1199,14 @@ fi container="no" runc="" if test $use_containers = "yes" && (has "docker" || has "podman"); then - case $($python "$source_path"/tests/docker/docker.py probe) in + case $($python "$source_path"/tests/docker/docker.py --engine "$container_engine" probe) in *docker) container=docker ;; podman) container=podman ;; no) container=no ;; esac if test "$container" != "no"; then docker_py="$python $source_path/tests/docker/docker.py --engine $container" - runc=$($python "$source_path"/tests/docker/docker.py probe) + runc=$container fi fi From patchwork Wed Oct 11 10:33:11 2023 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: 731937 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp326148wrv; Wed, 11 Oct 2023 03:35:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEWxT2COSdtgkWPdownB0rBjNzuDJRO+t52kYI4nW0lSTlVdwvSkLtxo5llW/pD+lgx2lwr X-Received: by 2002:ac8:5b49:0:b0:418:bd5:f682 with SMTP id n9-20020ac85b49000000b004180bd5f682mr29874479qtw.33.1697020532117; Wed, 11 Oct 2023 03:35:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697020532; cv=none; d=google.com; s=arc-20160816; b=zbgZ2pIf/7rh0oiYnVhzgz/NyAT7r7BktiEVO4QicfxuxicXz8300dFlBvTQhJOEOq FVr1IL9T0oLyjNkdGQ4IYXQoSqpO941pJV+pZMvfsz/JTZlS6FlI2XiNn9nk+8XPUmuI ZcZlfi7LZlsKGHQPQvLFlw41cMd7bwYodK4pP/HINBqL2geiXA+0qM1N+SGiOW3F5Y4W xHFSv8QI2aDs2CqFWt7a3PiZVUCxfVQtmXY3Upe/nnFeaGc3uyZ9A1p6otM3FlL10DEF ZrJnvifdsrFB90uQOtAMwf1B+fuVgMIvVB/mPM6PyfSZWPg77n8y6VDumnB54BhKU/nd JeXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=f1zLuzNXUek9chAtmqkdvsAg9LAFRcVol3Mr0VZBUJ0=; fh=e1rAdy1e4hj9hgJGfsKF9qfgLP2EWp9RIxVfPRIDbTU=; b=Ygp4uuW9+udCpFybP3z+O2QovYziG2KlfmZ9LsAMCIJ+nDie4g5PAGYBe32Ot1GAgI PTCziw+UIS3/1ERY3GCMrZZ3jRSl63O7cYbSKT338VhdqeoP7ji2LKfmnfVXU2C8iXJF jPPxeuGbzMZ6egy8JN8847qn8mlCoUBiPU5itB7/tijCV/5Gn+VfjehoOljSu6mkUiOq xLL+Zwfq+/nYnbiiy1frG+5ki/iq9I0S8kwYW/EywYv6uB1rZQscFCn4maKuIvNfpewa KBsc8+fTivjoDomLMEyJEUfUU/D/USKRvv4WE8uK93ycEwoqHi5HKDcpJph6ZKV8sCeR Wwug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="x4df//Z+"; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g15-20020ac87d0f000000b004181e1d50f9si8918355qtb.549.2023.10.11.03.35.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:35:32 -0700 (PDT) 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="x4df//Z+"; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWXM-0001e4-OY; Wed, 11 Oct 2023 06:33:56 -0400 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 1qqWX6-0001Kw-9m for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:41 -0400 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWX2-0005BC-F9 for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:40 -0400 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-504a7f9204eso8164887e87.3 for ; Wed, 11 Oct 2023 03:33:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697020414; x=1697625214; 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=f1zLuzNXUek9chAtmqkdvsAg9LAFRcVol3Mr0VZBUJ0=; b=x4df//Z+dtzd7uRjkYsHs+6L4pv7gefJIo6KyuvWbYKD9HbnPYPWciddmNHVV+5ucM dIg9URoVtNLH3c6J2QgOOQyiZM9dLgnEL4g+pOH0PFQkiZRysHqaqJkOfX0tV8UXJ4sh A9Yrg8fi6nRrwr6Bg+j7CNzwxXZij+GT/oLIszr2AglHSFY1pyd2LCzinvb/hzSz79pq vJ3wVvkgEToaSFHPcFCnH3Po0PEnUp8jhgGP+a65n39xnrW62zI0NmTfkE+Hlv0xwKz/ ndeJcm9W4k2/PnsTWPREoEs+IEWVHDgL6W2fQY6bll3ztFz8MJxAobrNMeeoiQoTmYLe xT3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697020414; x=1697625214; 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=f1zLuzNXUek9chAtmqkdvsAg9LAFRcVol3Mr0VZBUJ0=; b=aHTt1pSe9snH6507sjZ0t6MLALVgT514Ash5BgSPf9Lbb/Ey632kxNItAm3P2Zg20y ByQY4b3SoPiL7Ut2PmR6DyVhg7spcq2BsAlHt159HIdM/GiByDC7n9Iii4i0Pz1+WmPJ a3D7JZBP4L6MIZfdMM3FbO9KYI9sABpVnWjCN34q5begnXJHFNXXU0DVFe1UTbCVwuYx ge5fEkclI5yasDsUoWzrRACQRO1vu4BKv/N7tgKePBmfNRm+wQyfU8kCV9At4TtzaA8d CGUlejVszqX9OBBcodQsSrWsziF3l2KCqmimswzo/LCqyg5Mq0fO1p86d9KVdqpCwBAc MT3A== X-Gm-Message-State: AOJu0YzLdHA91ec8zDMkjmXwji/k8fB98IdGqkTc4A4qvibhwA+2yQpq rp4raXoVCtdERLj/Xx60M9PlCNy9hbnNmEUqGnU= X-Received: by 2002:a05:6512:718:b0:503:5e1:9b6e with SMTP id b24-20020a056512071800b0050305e19b6emr15315676lfs.10.1697020413893; Wed, 11 Oct 2023 03:33:33 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id y19-20020a05600c20d300b004075b3ce03asm2945219wmm.6.2023.10.11.03.33.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:33:32 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E687D1FFC2; Wed, 11 Oct 2023 11:33:30 +0100 (BST) 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 , Thomas Huth Subject: [PULL 07/25] configure: remove gcc version suffixes Date: Wed, 11 Oct 2023 11:33:11 +0100 Message-Id: <20231011103329.670525-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12f; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x12f.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 modern packaging of cross GCC's doesn't need the explicit version number at the end. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-8-alex.bennee@linaro.org> diff --git a/configure b/configure index 5c04e63bab..8fada85a71 100755 --- a/configure +++ b/configure @@ -1334,7 +1334,7 @@ probe_target_compiler() { # We don't have any bigendian build tools so we only use this for AArch64 container_image=debian-arm64-cross container_cross_prefix=aarch64-linux-gnu- - container_cross_cc=${container_cross_prefix}gcc-10 + container_cross_cc=${container_cross_prefix}gcc ;; alpha) container_image=debian-alpha-cross @@ -1397,7 +1397,7 @@ probe_target_compiler() { ppc) container_image=debian-powerpc-test-cross container_cross_prefix=powerpc-linux-gnu- - container_cross_cc=${container_cross_prefix}gcc-10 + container_cross_cc=${container_cross_prefix}gcc ;; ppc64|ppc64le) container_image=debian-powerpc-test-cross From patchwork Wed Oct 11 10:33:12 2023 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: 731933 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp325911wrv; Wed, 11 Oct 2023 03:34:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGFfpkmkTjBZdCO8IopUgeGoebw5FFwMYfIwfYFz2eVjjrbjlh0O7CerIY/V9aTAKrGqgNZ X-Received: by 2002:ac8:5946:0:b0:412:1fd7:dfa1 with SMTP id 6-20020ac85946000000b004121fd7dfa1mr24734295qtz.8.1697020493510; Wed, 11 Oct 2023 03:34:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697020493; cv=none; d=google.com; s=arc-20160816; b=DvUsc/r1rpSq6UMuGT8jLdh2k7FrUWG9n9zDZLpNt+3Kffmn1vmsz8WTh+R782ytn3 R7XETmBURR2moiZNNLri/Bia7e0vua2SzE4epyOkhzwkn41unWPkoiGRT7f4DLAHnnDq 093rdlRJ4RtCNPZzsrRnzPYDz9maWNI5Gh796FTepNkfMnIBKHoglSQ6zQqFOIaSPk+a H0qSGzBu0Xys05uTtK0P3ELFlJzVsbg3fwZ27N6LSRqnCWisdfKBK+qvtCZdWxkmb4Zl e7N2ZE6f/t7lwBTWG1OdmjlNpXI7RD4P84qVRH2A1bK29KUEJ5fUswUtymZdtV/1UI+g GXwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=djhZEY3GVFJ70rgdAPOhClTGynl2JirWDslytlqGvz0=; fh=MW6l1BSnrE03j9Z33NHWjHK4jK8hVQ/qMERqzHDHvIE=; b=g6oFkW6yX/xSZzcRhZDrFWV3pHoaHukx4+0dtGewK+pMhUi1Ef2azKR6pVRwSo+BBY AzV2prLBrpQsWII1Hd6iPd/9dYF4clPU7FjOeAkYlxyPb2WLcP1cxM6e/+HnP4Vzq70W j6Y3esZ7WmEvmodyImUqaQSnF53VK/BKIFGJpYc0a05/jCYUqjpogcrd7+SZGWyCg/xM eLcWStqMwQ0oEoUqgWTSgmGGcl2zZPcp77Oqow6G55hCqVDTBvw7f8TP8F8K2w3rntp+ Q+jvabIhA+0J6nxz/PSh07EzX0Uxd0nLBEikDkZpwRb5kQhpsA/vVs6ix4KXF63BqPy9 QxBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IPl3LF5i; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z9-20020a05622a060900b0041959d7951fsi8975392qta.581.2023.10.11.03.34.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:34:53 -0700 (PDT) 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=IPl3LF5i; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWXF-0001WC-JF; Wed, 11 Oct 2023 06:33:49 -0400 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 1qqWX7-0001L9-CD for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:41 -0400 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWX4-0005CX-Bt for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:41 -0400 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-50435a9f800so8699173e87.2 for ; Wed, 11 Oct 2023 03:33:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697020415; x=1697625215; 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=djhZEY3GVFJ70rgdAPOhClTGynl2JirWDslytlqGvz0=; b=IPl3LF5imUJsZNRn2Ma50Jg4pGQ7CeDHIeBpik8ZOapCJsz/dVtpnRx4h26s0tdQ/n aUr8xI1981WTFEL41uYGWxABpRw4E8qyMzmpvuoNtAVI0i3Opk+aue451OEynA33kLnJ reFPQ9VGgqKHJysszapfcPEhjqS1tywDzRvN6G9NHp6R4KfCm+W0Oo9OMXSuLvzSLPV2 X6yPqPpp88FxzpQmUiC3k/JkiIuKz0yOnWY9udGSwKOfs6R+lvFEe+ecEz/sRtFp9YBB ZB/J+2y8E/sA2eUGXGEnoqsxL50Nml4Hbk3UUk6O9/Sz7FKeIcmTOepMW/mm7ekF26L/ /bfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697020415; x=1697625215; 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=djhZEY3GVFJ70rgdAPOhClTGynl2JirWDslytlqGvz0=; b=oy/fA39E5IltSRTC8xqqoMUMztRMBq209V85hNQ0NqExQBIrc1ORUYMfT6gcsWUuCr oB5e3Ddz86xAal3FKubPKJKglzJQkosGc5SDr7m+yzwYMdGnodtKI/Tqr3+97oa+1LVk 0EgB3swbO7c++sysTqb2VHEDYQG9TBhPjE6B8LdVBv9HxK2GtKywts2fmpALFuAgjyxO +8p5TWpdclRvFJGoFqk1ZMyBk4bUq29U87tVgTmiJuy1qn4bO9lFdjFZKSGeAnE/XdsT aHiBBVuF89QUUgIe/UES19R8ZWnXH7IuMOEUpIJuiEo/W2mxVHiEpZi6eQfVy7GLsxBC 1B3A== X-Gm-Message-State: AOJu0YxdXq35o6IxNUtkU1IQxmNKjfD8eMYSvUb+HTU5Uda0B9X6A4z8 l3tXwG6mWkVo8DXEULlGVlHNjA== X-Received: by 2002:a05:6512:2811:b0:503:257a:7f5d with SMTP id cf17-20020a056512281100b00503257a7f5dmr23356290lfb.31.1697020415348; Wed, 11 Oct 2023 03:33:35 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id l9-20020a1c7909000000b00401b242e2e6sm18678477wme.47.2023.10.11.03.33.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:33:32 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 09FA31FFBC; Wed, 11 Oct 2023 11:33:31 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Alistair Francis , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PULL 08/25] gdbstub: Fix target_xml initialization Date: Wed, 11 Oct 2023 11:33:12 +0100 Message-Id: <20231011103329.670525-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x12e.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: Akihiko Odaki target_xml is no longer a fixed-length array but a pointer to a variable-length memory. Fixes: 56e534bd11 ("gdbstub: refactor get_feature_xml") Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Message-Id: <20230912224107.29669-2-akihiko.odaki@daynix.com> Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-9-alex.bennee@linaro.org> diff --git a/gdbstub/system.c b/gdbstub/system.c index 189975b1d6..48976873d2 100644 --- a/gdbstub/system.c +++ b/gdbstub/system.c @@ -292,7 +292,7 @@ static int find_cpu_clusters(Object *child, void *opaque) assert(cluster->cluster_id != UINT32_MAX); process->pid = cluster->cluster_id + 1; process->attached = false; - process->target_xml[0] = '\0'; + process->target_xml = NULL; return 0; } From patchwork Wed Oct 11 10:33:13 2023 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: 731943 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp326261wrv; Wed, 11 Oct 2023 03:35:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEYMY7B5MXcG9MHqg812SRcUnXEwCrH1ZX8lu46ubRT9I/ugyQPksYWkbnZEaN1TDuPxXuZ X-Received: by 2002:ac8:5916:0:b0:417:9fd6:d498 with SMTP id 22-20020ac85916000000b004179fd6d498mr25077455qty.51.1697020550031; Wed, 11 Oct 2023 03:35:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697020550; cv=none; d=google.com; s=arc-20160816; b=jF0+Tn8DFGGykuCrpuFFFcVTZgoIulI6fQ37bkoblk37PakgKTEfWn89im24fGanRY ZQWUuAx4HfLd9dcZcOGk49dP6uMzSkMMaU8FClIyW9Xq8EE00eeOGIgbAPsPELLrMi/c 2m2aNvjgf+QvyWkc8M3Di7br95lmZs0kRKGuftuSMNE0Y9L4Aw5tJSfEwuqqVO+ib6Rj tC8Wa6yxuLw2bZK2lNiqFHGkwlXFFCEpfyBsrFOsa86ETm37sGTsyFt8EfZLxJXi/u5f WH5a2imSuyAEY+Z4kOQbdbt+Z+DDauK4ECunnnBQyxv/LT0cKdPAgKSwF9aNIQLFWs8V OzfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=CEso1qQHTLbjmT+JXyeDiL7UkgO6kpzpKkYLgvNLU18=; fh=h9eGh9LdnczKeJ5s9ZJz3SDfuNraEHiWEOL+l5dy014=; b=bUMWljNQ2RsL8nosiRrKfM6H9mfpaWfKqKtxMiXaA3POPVL4I1NqZ6iqh8Pb/RUoQz 9UtCCKf9D23tr/E9VwWkd2R9yDxHo798279R9raJajWnlHEqi9Gjus3WWfHKwy3dZ0kn z8dFz4Z6aK24CVmR5i5CuCvdiJQ9GnIDnozuXmEAsS0RG22MG7lDhgPJmL6AT0JEpVdi wbFXORCLkIpGO16HJQEOs9wn/IrE7+dxs5xcQErJqqVwP2IfG1UdNjpdPG3/kWW7Q91o 8Lz85nh6kD/zlh3GMD/OqyX/yCnoN2nuLwuhAkwjSjHdtVS8mdoHoWSuybw1t+EwdO6e xIVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AqqODY49; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d15-20020a05622a100f00b0041893ae942asi9096302qte.730.2023.10.11.03.35.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:35:50 -0700 (PDT) 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=AqqODY49; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWXG-0001Wo-19; Wed, 11 Oct 2023 06:33:50 -0400 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 1qqWX6-0001Kv-3W for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:41 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWX2-0005BB-En for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:39 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40675f06f1fso4533005e9.1 for ; Wed, 11 Oct 2023 03:33:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697020414; x=1697625214; 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=CEso1qQHTLbjmT+JXyeDiL7UkgO6kpzpKkYLgvNLU18=; b=AqqODY49Eh6wrPt5NNSd/6eHGcVqqw0hitGUwge3jvSpBRE3tXMFI2gx2D0mVag1EX m89A9CyZtucNCTACfN0Ubh3mIhFy9mre2NlbyrhwZYdlTY4wwDBpEPQ2UMf57VewDFDZ T5erT1Hq4lBAH2e1DsgYrAJp9t+CzJfXFqrLU++hoje/TvqKExCJDD0mR5tLWQa6TqiC 0llv4qdtjsfIV5RMUu8Hj6l1rGLVLhiaUMsJfci+DpjQJ/OzViFaOfwaX0arARSQsB8S N0BE5Zkucfcx1/mAzpOJJGUrGzQ6LWmU6zALfrD6vqIQChbegW8Z5l4Ub9EORwtQjCoX oAQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697020414; x=1697625214; 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=CEso1qQHTLbjmT+JXyeDiL7UkgO6kpzpKkYLgvNLU18=; b=tlfUxj6V1yYTkI3Us+o3bxzVnJaCuIisn0D4O5FlWxfgP4Z0SD1M8S1kJ5AIXFAmw6 MNMTHFlEtVE54D70hWktKl1JD6O7Bh0WFyf/YNCLuiWk8g3uskoqJR9hsVLxnki0w/TT LnAWKDnvD19IZgGn4QraaWq5qUoj3Sp5GEeIY7VzsCJITwWV7qAQjUCmU/iBh4mw7GHF HUPOcGx8jhNnrggwwJsN1OjJlY4w1n6i0lkgz7AUZkFa8m/PR0XsSdZQ1HOwJlc4jk+/ o1cWQ+abfSZTOJEwgptOTcsPwFOVGXXkx+sLgBVtMBvzh20W2HfDiR/mboG5o6GnTcwN Sycw== X-Gm-Message-State: AOJu0YyL9wgiG8eGEqQf9VhPUeGyQOsulsdGfUAgZ3JYg2r9OepBZBBn tlPQGdHWztFUunp9BdwE45T0RQ== X-Received: by 2002:a05:6000:3c3:b0:32c:d29c:2f77 with SMTP id b3-20020a05600003c300b0032cd29c2f77mr4520292wrg.1.1697020414092; Wed, 11 Oct 2023 03:33:34 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id s11-20020a5d424b000000b003248a490e3asm15135027wrr.39.2023.10.11.03.33.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:33:32 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 2062D1FFC3; Wed, 11 Oct 2023 11:33:31 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PULL 09/25] gdbstub: Fix target.xml response Date: Wed, 11 Oct 2023 11:33:13 +0100 Message-Id: <20231011103329.670525-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Akihiko Odaki It was failing to return target.xml after the first request. Fixes: 56e534bd11 ("gdbstub: refactor get_feature_xml") Signed-off-by: Akihiko Odaki Message-Id: <20230912224107.29669-3-akihiko.odaki@daynix.com> Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-10-alex.bennee@linaro.org> diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index 8eea21450c..4f3762fccf 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -396,8 +396,8 @@ static const char *get_feature_xml(const char *p, const char **newp, g_string_append(xml, ""); process->target_xml = g_string_free(xml, false); - return process->target_xml; } + return process->target_xml; } /* Is it dynamically generated by the target? */ if (cc->gdb_get_dynamic_xml) { From patchwork Wed Oct 11 10:33:14 2023 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: 731944 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp326274wrv; Wed, 11 Oct 2023 03:35:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IErLllThhk9ymbklpDkImpa9m0uuKxCYmH8N9Yy+4GoWuqlie4Uir+OXOeukFxjLBJjBGF1 X-Received: by 2002:ac8:7d0b:0:b0:418:737:87fc with SMTP id g11-20020ac87d0b000000b00418073787fcmr25811331qtb.18.1697020551546; Wed, 11 Oct 2023 03:35:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697020551; cv=none; d=google.com; s=arc-20160816; b=qA3mKK1zp407YhkJUZ3ERbCEpW3c5URr10B45FAjxFaLBVxO35+qZG2I1b2sQo1cCU 4Bh7yhSVKTBrasXLMWQNt4XjhWSIoTEbpOGSaTNrplrJt5EClaozgg8nQj2XHNA5U0oM TnZVdLZN0X9/vCs+Xp/dY43D2K5GQaIeLer5WjdLUWS3CKLdKAR0F9N//0swiLEqi3P4 YEG5kJv4EQQ623w87vVTpzx25lORmw52sCSF6VFaMniJwG2cWFJcnUd4bABm1f5NZt/X xqAkTxja8FEX0PgbsQc20oSVV2r8V25c4jDhB8QKKRWIWqTrz2jhyb5GiqeZLg7abKPc 2aEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=tXtc55X9ZMWnLYaJ7rtH4hZORRpdhmNZnt+nFsO0Mb4=; fh=0krr7TACl5TzF2Q+IYI3uEo233L4eFHoGi0NC6HgaMw=; b=ms5UBD5uOxXbJexwk9ma9+p1rv7BXix0ZqACJn1Cjc5dekf4ULROh/j2fmshJZ/lxJ 4CZ+U/zn386uWbmFNvePqGfi0NZjw1t/nr3MsQaGeTpEfYyXJyYDMjYAoQVr9YCuIVDI wkj1F7T/Cm1Sm1m0l3VDS/WX3T2RBt+ad+DnQQP6t3V7ttrX88Fv3xNd85ZSSLSLsYpc MXHXlhlLW76pDB8HgnSlj/JIPLlBAgwL2zvVTp4N0LLl8lDg182/9LrdUSJPVJ3ErM3c ET3Z2NjF96Te4bBvxmZ1l7CHwwUhxiejMXDwHp/qH2Lkw+HdECQdO4AmZDU+VWql+TL5 FRpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OwSNGSro; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g12-20020ac8580c000000b00417ced9f09asi9070259qtg.735.2023.10.11.03.35.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:35:51 -0700 (PDT) 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=OwSNGSro; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWXG-0001Xm-El; Wed, 11 Oct 2023 06:33:50 -0400 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 1qqWX5-0001Ku-MQ for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:41 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWX2-0005BM-8w for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:39 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4066692ad35so62488245e9.1 for ; Wed, 11 Oct 2023 03:33:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697020414; x=1697625214; 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=tXtc55X9ZMWnLYaJ7rtH4hZORRpdhmNZnt+nFsO0Mb4=; b=OwSNGSroQ/SYg4FQJi0KsND0GwFE3rVu00zA3JPaM4h28oKvsO578klV8VMyEAgF6y bmosV9vyXMSoJZ5cn68DkJq3OYf194UlzdESClr3c1N338/jECa2eexDcU+tQXFFF2s7 JcQk781bbIjqQgQmcRZ24iUTRXCn2ZmsHP0v5DBJdIr4kGqg9U++vsrpb0aeL6IIate7 v08dBOzt/wamyFON4vSpgVKzUsjFLlzAAZwwU8Szi9zXu6JwFtTx2tf9DjRpL0qSqnYV W3Ai7DZyFrR6YdNF+oMMCSPGk/6lz5ltyedctFkBq7Jm87G8eCPA9V/vzfZNXTmWDDx/ mdMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697020414; x=1697625214; 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=tXtc55X9ZMWnLYaJ7rtH4hZORRpdhmNZnt+nFsO0Mb4=; b=e2eLKPqtK05a0UubmwNOWk3w6l3CiKUdWoFehXkXbyeXjzIBIc/xOJwE2JDu/0Jits 90jzpPX2r1I/uSAb5q/Nd9uykJ472jF8T1Wxl5+bFZgVcR/uGR1w2Iloq2bCTnhfdd7G kJsfrB91aLZeiwFeG6GXhDbPomeuH/AXDcyGxL/aRWYkpfEOp8H7e8vqRKUxermz18Vf zt4O3kRM9VdyU7G+fB9jk5RCibRtDUH5oYwYajxnt43bZ4tUMvLrFTRvZmfnSc9a/Bpj iVVSlR/ckqys7YoB7I0ldxF+os0tgV3bWng2+OIGglQ5ulBcr/ALpj2JPuJwFfcq8Lb8 +JeA== X-Gm-Message-State: AOJu0YzeyOZhmRcH9B/u7EwU97f2MxxH8l0rnXpwib5RQYTqTVOSthAt i1cgEAv0QOkxsA3qiv6OxR626g== X-Received: by 2002:a05:6000:24d:b0:32d:84a3:f3fe with SMTP id m13-20020a056000024d00b0032d84a3f3femr1147488wrz.41.1697020414270; Wed, 11 Oct 2023 03:33:34 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id s13-20020adfeccd000000b003198a9d758dsm15094918wro.78.2023.10.11.03.33.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:33:32 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 367431FFBB; Wed, 11 Oct 2023 11:33:31 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , =?utf-8?q?Alex_Benn=C3=A9e?= , Alexandre Iooss , Mahmoud Mandour Subject: [PULL 10/25] plugins: Check if vCPU is realized Date: Wed, 11 Oct 2023 11:33:14 +0100 Message-Id: <20231011103329.670525-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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: Akihiko Odaki The created member of CPUState tells if the vCPU thread is started, and will be always false for the user space emulation that manages threads independently. Use the realized member of DeviceState, which is valid for both of the system and user space emulation. Fixes: 54cb65d858 ("plugin: add core code") Signed-off-by: Akihiko Odaki Message-Id: <20230912224107.29669-4-akihiko.odaki@daynix.com> Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-11-alex.bennee@linaro.org> diff --git a/plugins/core.c b/plugins/core.c index 3c4e26c7ed..fcd33a2bff 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -64,7 +64,7 @@ static void plugin_cpu_update__locked(gpointer k, gpointer v, gpointer udata) CPUState *cpu = container_of(k, CPUState, cpu_index); run_on_cpu_data mask = RUN_ON_CPU_HOST_ULONG(*plugin.mask); - if (cpu->created) { + if (DEVICE(cpu)->realized) { async_run_on_cpu(cpu, plugin_cpu_update__async, mask); } else { plugin_cpu_update__async(cpu, mask); From patchwork Wed Oct 11 10:33:15 2023 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: 731947 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp326570wrv; Wed, 11 Oct 2023 03:36:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFM0Atj08te5oCD11w31a1JNPdFAneMKfKDZVJXzUSQ3raeXCOtZ80Cl+ihqlJ+Cn/jc0wS X-Received: by 2002:a67:f541:0:b0:452:dae8:df07 with SMTP id z1-20020a67f541000000b00452dae8df07mr18483745vsn.8.1697020592047; Wed, 11 Oct 2023 03:36:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697020592; cv=none; d=google.com; s=arc-20160816; b=IKUbQtcfo7DL8WvKCxVIQTYRvrsmdtFP+WfylQ4ut9CLOSs5drBwVpld4RQZLjPq7A 7+JKhX4JSV2lxvbzk9Vsc0B3ZnK3eTzbJB7M4T6LbTv1UE935tFWl8hohQJYhC4Xoqw7 0aiObdLvB+U0sKyy+ofgLDxrUCa4jBUf4ikVClE65/XAZJTj8RaIjmno3XmbES40VsIX vgxsJ9VapuOfu6QAp1jihAredNvcRot/FEZTOhYvla4xULca9D/A8+N/AKkB49Av1xOh CMKni8rPxzXPdVITU7o+/v4qxYvDG/r4BN4Qkczh8fNIqDMLT/d0rp769N89HJtRpfTA 6agg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=IOZHj2WDZdrEovxhRhKdAFEERTpyPMh/xQMpzlYqBTI=; fh=0krr7TACl5TzF2Q+IYI3uEo233L4eFHoGi0NC6HgaMw=; b=jDPfjSpL/F/oCLp9fkl58iibrDTO/Tx2V5J4l6ETw68tEnUkPsIsou/5s+qjAj3Y1G fhzYRrV+Fjv5KpCNjBNTdFgfFX7m73Wg5aKeQ9rgkGy3v3FQomXhC3tu8KwzOu3Ud9M4 Y1WZajzhm39EAkvo3tErGoB/wXwaqxZwACrlmSFRVmkS+eUbySpdC0lv37sTPuUyfgJb SbhYlbzjeMLi1rL/2tlzINCiqsPyvF1bcs3tocXOZMzc6CtJG6grj14FXm+tujajubWE z6pq1qpI4773pow977azKS1yb5Jh4wIOBs9U0V8Qj5uQf6JDLTL42dsFBT5/odhECpXv bGBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zTffMfkY; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 2-20020ac85742000000b00418142e802dsi9268266qtx.417.2023.10.11.03.36.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:36:32 -0700 (PDT) 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=zTffMfkY; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWXN-0001eG-IA; Wed, 11 Oct 2023 06:33:57 -0400 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 1qqWX6-0001Ky-Mi for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:41 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWX4-0005FM-Bz for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:40 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-405524e6769so4808975e9.1 for ; Wed, 11 Oct 2023 03:33:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697020416; x=1697625216; 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=IOZHj2WDZdrEovxhRhKdAFEERTpyPMh/xQMpzlYqBTI=; b=zTffMfkYEWsiryCv23xGmYen7FK462DMrXCtUUv886xYqsQhFi2j2EiUP8txYU6i47 1y1nLEpRAdjSmDayJtkikQe4W7ELcQLBWty90xiHa27h6oFjcwBrsjRlkln/8ru+eadC ccUZPEVvstGme921XVVuvLynoYz2axWEDMcb+uYNNexnPGzeFkiKtTjNE/WIWdjTztYJ b1MERWCxk8OXVt72gyXLaFuUgF/+EBCSjfxrRNpuftEedZP5WkqKU+rZM+WEalQPN0Bd pmvjKUwpLBnGN7bf0X0slAMEhm68Jk94xSN7WeF624nkrMSdUPaYdaLOWv125KxBtBlh l2hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697020416; x=1697625216; 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=IOZHj2WDZdrEovxhRhKdAFEERTpyPMh/xQMpzlYqBTI=; b=mhvxjesjWmHaAT0JacG+z9CosoeZwtNmgjhT5RoNa3iB6mrexuqWoqDUVAr6KmWjNU Com/5d5XmKYqoI+Tjy3hUtvwOReVs8K02ZzxVg5jH94hjei2x5Opr5b8TNyP+IMynicm crfkzpX4mK5FVxvS6+/6VVQgpW2HHz5rEIjdAjXCUXPuDZsls6CRniF4PP1uRHFraYe4 QQUK7oquOkt2zlBy5nB8ZQ5JnqvDle9UwDoaWusfZP0RJWSeTrKIw/kN4W1JOKyfv6Mn 7tyBg47Q0or5qfXLziaMIBGchm3awbghkks36dY39Cin1fUikyGbiher+qBtpTSZZr/9 orDg== X-Gm-Message-State: AOJu0YxwBBWcleDMXnuEjT5VpzmhGuspXyx2e6jQYTsIW4z63Vm97Cqw mCVK0SPt/9lWrZQEy5vdrNAL1A== X-Received: by 2002:a7b:c044:0:b0:3fb:c075:b308 with SMTP id u4-20020a7bc044000000b003fbc075b308mr16426874wmc.12.1697020416294; Wed, 11 Oct 2023 03:33:36 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ay20-20020a05600c1e1400b0040640073d25sm16646526wmb.16.2023.10.11.03.33.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:33:35 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4D7821FFC4; Wed, 11 Oct 2023 11:33:31 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , =?utf-8?q?Alex_Benn=C3=A9e?= , Alexandre Iooss , Mahmoud Mandour Subject: [PULL 11/25] contrib/plugins: Use GRWLock in execlog Date: Wed, 11 Oct 2023 11:33:15 +0100 Message-Id: <20231011103329.670525-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32f.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: Akihiko Odaki execlog had the following comment: > As we could have multiple threads trying to do this we need to > serialise the expansion under a lock. Threads accessing already > created entries can continue without issue even if the ptr array > gets reallocated during resize. However, when the ptr array gets reallocated, the other threads may have a stale reference to the old buffer. This results in use-after-free. Use GRWLock to properly fix this issue. Fixes: 3d7caf145e ("contrib/plugins: add execlog to log instruction execution and memory access") Signed-off-by: Akihiko Odaki Reviewed-by: Alex Bennée Message-Id: <20230912224107.29669-5-akihiko.odaki@daynix.com> Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-12-alex.bennee@linaro.org> diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c index 7129d526f8..82dc2f584e 100644 --- a/contrib/plugins/execlog.c +++ b/contrib/plugins/execlog.c @@ -19,7 +19,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION; /* Store last executed instruction on each vCPU as a GString */ static GPtrArray *last_exec; -static GMutex expand_array_lock; +static GRWLock expand_array_lock; static GPtrArray *imatches; static GArray *amatches; @@ -28,18 +28,16 @@ static GArray *amatches; * Expand last_exec array. * * As we could have multiple threads trying to do this we need to - * serialise the expansion under a lock. Threads accessing already - * created entries can continue without issue even if the ptr array - * gets reallocated during resize. + * serialise the expansion under a lock. */ static void expand_last_exec(int cpu_index) { - g_mutex_lock(&expand_array_lock); + g_rw_lock_writer_lock(&expand_array_lock); while (cpu_index >= last_exec->len) { GString *s = g_string_new(NULL); g_ptr_array_add(last_exec, s); } - g_mutex_unlock(&expand_array_lock); + g_rw_lock_writer_unlock(&expand_array_lock); } /** @@ -51,8 +49,10 @@ static void vcpu_mem(unsigned int cpu_index, qemu_plugin_meminfo_t info, GString *s; /* Find vCPU in array */ + g_rw_lock_reader_lock(&expand_array_lock); g_assert(cpu_index < last_exec->len); s = g_ptr_array_index(last_exec, cpu_index); + g_rw_lock_reader_unlock(&expand_array_lock); /* Indicate type of memory access */ if (qemu_plugin_mem_is_store(info)) { @@ -80,10 +80,14 @@ static void vcpu_insn_exec(unsigned int cpu_index, void *udata) GString *s; /* Find or create vCPU in array */ + g_rw_lock_reader_lock(&expand_array_lock); if (cpu_index >= last_exec->len) { + g_rw_lock_reader_unlock(&expand_array_lock); expand_last_exec(cpu_index); + g_rw_lock_reader_lock(&expand_array_lock); } s = g_ptr_array_index(last_exec, cpu_index); + g_rw_lock_reader_unlock(&expand_array_lock); /* Print previous instruction in cache */ if (s->len) { From patchwork Wed Oct 11 10:33:16 2023 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: 731934 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp325932wrv; Wed, 11 Oct 2023 03:34:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE2koslyPcm2sk7+HJtIgLvXxU2G6WbGsISHHA8TGsqGJQ3c3JcqBd8onpDLfqeGLA0CNHy X-Received: by 2002:ac8:5d01:0:b0:419:58da:5d54 with SMTP id f1-20020ac85d01000000b0041958da5d54mr20652782qtx.35.1697020498031; Wed, 11 Oct 2023 03:34:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697020498; cv=none; d=google.com; s=arc-20160816; b=YpJHcvMaZ23Ts0gGWdzLth51Wik2XvqG7ZyyGRylT0UmdaA3x/M/YhZXAoDkQ66rTX 3r7NjQ3BADaeqmM5P2Kf3ta3QLYXIkzvXgm6azmnj/R4qXQORtRydnSMT4cKU0c3ZGpb JT7cW78EkVjb34Reho9v0+NQDGHc1v71w62zxAHaecOAFpx3wABkPYU999kLWcvrU8Dh YseR+mo3E7p4VQQ1GM8F8KBYXpuJcdzx1P/Nasg3z6wgAJcu/nEaesDs15x1IzxyKmac HIXzyq/aFAzDv9qaKeNWBCKKCl8hRUMLSmczOo+fpg4N3kbwoFhrO/RziYgF5EhSh0VT 0jHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=gP/AsfqCLVva1mwRREqIfk6mLOF5khzgzINRxX/XF8k=; fh=xGQcDbrNpUC8dY60m/QdHi3+c/IFjDoE2jCl41sMX90=; b=uUBoW2mTWUGNpOXeWMWKWLfhwADb9kNJ1eNPd5tQ+1eEEhK7MBJx4+NBdDjUjAMS47 JmQXI6By9UYvPIWlQCqEJUl/fZ144/ebEGNNr8CYbeyiI5pFXR6ZBcM2Hp4qCJMJ0x9x dQc/uWVEg+A/crLU5bkcet7OkOFDy7AuCwYcBnAcOSB6xFxSSvNBprf3WlhzfC3WZsUh dvEnZK8x6s4SLCiu7+7mgDCKL/AgVdcaiuXPBiAZ+q8/GXHfv69P6KN28tJ6EJ+7Jcal LtAP0FevLmpSWYykm4odL51a8dZCCu3vBrhmf0mEdFS8wV7h+4CZbsftjdDS2G2pEy0T RUOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Lm24iaex; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u20-20020a05622a011400b004109856317bsi9189629qtw.778.2023.10.11.03.34.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:34:58 -0700 (PDT) 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=Lm24iaex; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWXL-0001d9-Dp; Wed, 11 Oct 2023 06:33:55 -0400 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 1qqWX7-0001LA-Ee for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:41 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWX4-0005FS-Bs for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:41 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4056ce55e7eso62298165e9.2 for ; Wed, 11 Oct 2023 03:33:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697020416; x=1697625216; 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=gP/AsfqCLVva1mwRREqIfk6mLOF5khzgzINRxX/XF8k=; b=Lm24iaexqTaa1zLyDJzCYnQUSTEfhnUcopvw3VZyQsVNyknp+RnCzxx2ZJpqzBXsSF arY3lj3BktNUNO1mQv1jgv0SDYHvsDTwtzNSrpNHu0c6uRLL85Q5hBQLyhNrCClCbdNi jAaTsJ1GNmnpcLRFyC9xA0HfBDplw/9T3xN3gUrGfwNCn+oggGGWBpo3YoFhbyMZ6ybx 3XyL1ntzXxAR1b4jKT0XzAjk/LxUacgFrRLsY+wt2FxUxk8RJl7izKS/JoHca5Swdo2U ILMSXR6M6iq2+MPgvvusyDciof6teptBjXMJXDbufoePQ48WH2jo5hG18uKUo17pC244 wKUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697020416; x=1697625216; 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=gP/AsfqCLVva1mwRREqIfk6mLOF5khzgzINRxX/XF8k=; b=J+nE6FKpmDqey5a471U7VvZeDzQ9nVq0LqSghOySXPHe3FJVqvCc+o3OxhmUlzSKRE q5ngdGYzLLvU0+jEXuQ/9zvEsDbAHJ5KPrEOrgnSi/PG1RSuwE7s1Ira0l7QfvRjiWvM RybHCbkNdpWNm5UIRFd1VY1gdnRrsxy47i/KMB9AgLUxwGQUSUnyr2r8WTlQInQ/sTVK iq12tV6URiy7GVeWZvLsf8KN1Ey+ZYviXM9AxtkV1MZIclMnoJ9qMr1sGBNm1F2hUD9y TINfNlHJ35HR7ZeuZluqsqcphLKEJP6kSH8QsuwnEW12/DcbZ1LpJbs5ZmYJLz8QLF+1 /v3g== X-Gm-Message-State: AOJu0YzsY1MjwghU/iI1i/+7YM7NkbKgQBuN2JpUq+MVjluHyWLx+RgT 9ggHcgVo3UQNyFguLLVXQynTgw== X-Received: by 2002:a05:600c:d1:b0:405:3a3d:6f42 with SMTP id u17-20020a05600c00d100b004053a3d6f42mr18160916wmm.39.1697020416542; Wed, 11 Oct 2023 03:33:36 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id y11-20020a05600c364b00b004063977eccesm18794448wmq.42.2023.10.11.03.33.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:33:35 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 746A61FFBD; Wed, 11 Oct 2023 11:33:31 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , John Snow , Cleber Rosa Subject: [PULL 12/25] gdbstub: Introduce GDBFeature structure Date: Wed, 11 Oct 2023 11:33:16 +0100 Message-Id: <20231011103329.670525-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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: Akihiko Odaki Before this change, the information from a XML file was stored in an array that is not descriptive. Introduce a dedicated structure type to make it easier to understand and to extend with more fields. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20230912224107.29669-6-akihiko.odaki@daynix.com> Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-13-alex.bennee@linaro.org> diff --git a/MAINTAINERS b/MAINTAINERS index 9e7dec4a58..c3cc12dc29 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2842,7 +2842,7 @@ F: include/exec/gdbstub.h F: include/gdbstub/* F: gdb-xml/ F: tests/tcg/multiarch/gdbstub/ -F: scripts/feature_to_c.sh +F: scripts/feature_to_c.py F: scripts/probe-gdb-support.py Memory API diff --git a/meson.build b/meson.build index 79aef19bdc..bd65a111aa 100644 --- a/meson.build +++ b/meson.build @@ -3693,7 +3693,7 @@ common_all = static_library('common', dependencies: common_all.dependencies(), name_suffix: 'fa') -feature_to_c = find_program('scripts/feature_to_c.sh') +feature_to_c = find_program('scripts/feature_to_c.py') if targetos == 'darwin' entitlement = find_program('scripts/entitlement.sh') diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index 16a139043f..705be2c5d7 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -10,6 +10,11 @@ #define GDB_WATCHPOINT_READ 3 #define GDB_WATCHPOINT_ACCESS 4 +typedef struct GDBFeature { + const char *xmlname; + const char *xml; +} GDBFeature; + /* Get or set a register. Returns the size of the register. */ typedef int (*gdb_get_reg_cb)(CPUArchState *env, GByteArray *buf, int reg); @@ -48,7 +53,7 @@ void gdb_set_stop_cpu(CPUState *cpu); */ bool gdb_has_xml(void); -/* in gdbstub-xml.c, generated by scripts/feature_to_c.sh */ -extern const char *const xml_builtin[][2]; +/* in gdbstub-xml.c, generated by scripts/feature_to_c.py */ +extern const GDBFeature gdb_static_features[]; #endif diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index 4f3762fccf..bba2640293 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -408,11 +408,11 @@ static const char *get_feature_xml(const char *p, const char **newp, } } /* Is it one of the encoded gdb-xml/ files? */ - for (int i = 0; xml_builtin[i][0]; i++) { - const char *name = xml_builtin[i][0]; + for (int i = 0; gdb_static_features[i].xmlname; i++) { + const char *name = gdb_static_features[i].xmlname; if ((strncmp(name, p, len) == 0) && strlen(name) == len) { - return xml_builtin[i][1]; + return gdb_static_features[i].xml; } } diff --git a/stubs/gdbstub.c b/stubs/gdbstub.c index 2b7aee50d3..580e20702b 100644 --- a/stubs/gdbstub.c +++ b/stubs/gdbstub.c @@ -1,6 +1,6 @@ #include "qemu/osdep.h" -#include "exec/gdbstub.h" /* xml_builtin */ +#include "exec/gdbstub.h" /* gdb_static_features */ -const char *const xml_builtin[][2] = { - { NULL, NULL } +const GDBFeature gdb_static_features[] = { + { NULL } }; diff --git a/scripts/feature_to_c.py b/scripts/feature_to_c.py new file mode 100755 index 0000000000..bcbcb83beb --- /dev/null +++ b/scripts/feature_to_c.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: GPL-2.0-or-later + +import os, sys + +def writeliteral(indent, bytes): + sys.stdout.write(' ' * indent) + sys.stdout.write('"') + quoted = True + + for c in bytes: + if not quoted: + sys.stdout.write('\n') + sys.stdout.write(' ' * indent) + sys.stdout.write('"') + quoted = True + + if c == b'"'[0]: + sys.stdout.write('\\"') + elif c == b'\\'[0]: + sys.stdout.write('\\\\') + elif c == b'\n'[0]: + sys.stdout.write('\\n"') + quoted = False + elif c >= 32 and c < 127: + sys.stdout.write(c.to_bytes(1, 'big').decode()) + else: + sys.stdout.write(f'\{c:03o}') + + if quoted: + sys.stdout.write('"') + +sys.stdout.write('#include "qemu/osdep.h"\n' \ + '#include "exec/gdbstub.h"\n' \ + '\n' + 'const GDBFeature gdb_static_features[] = {\n') + +for input in sys.argv[1:]: + with open(input, 'rb') as file: + read = file.read() + + sys.stdout.write(' {\n') + writeliteral(8, bytes(os.path.basename(input), 'utf-8')) + sys.stdout.write(',\n') + writeliteral(8, read) + sys.stdout.write('\n },\n') + +sys.stdout.write(' { NULL }\n};\n') diff --git a/scripts/feature_to_c.sh b/scripts/feature_to_c.sh deleted file mode 100644 index c1f67c8f6a..0000000000 --- a/scripts/feature_to_c.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/sh - -# Convert text files to compilable C arrays. -# -# Copyright (C) 2007 Free Software Foundation, Inc. -# -# This file is part of GDB. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . - -if test -z "$1"; then - echo "Usage: $0 INPUTFILE..." - exit 1 -fi - -for input; do - arrayname=xml_feature_$(echo $input | sed 's,.*/,,; s/[-.]/_/g') - - ${AWK:-awk} 'BEGIN { n = 0 - printf "#include \"qemu/osdep.h\"\n" - print "static const char '$arrayname'[] = {" - for (i = 0; i < 255; i++) - _ord_[sprintf("%c", i)] = i - } { - split($0, line, ""); - printf " " - for (i = 1; i <= length($0); i++) { - c = line[i] - if (c == "'\''") { - printf "'\''\\'\'''\'', " - } else if (c == "\\") { - printf "'\''\\\\'\'', " - } else if (_ord_[c] >= 32 && _ord_[c] < 127) { - printf "'\''%s'\'', ", c - } else { - printf "'\''\\%03o'\'', ", _ord_[c] - } - if (i % 10 == 0) - printf "\n " - } - printf "'\''\\n'\'', \n" - } END { - print " 0 };" - }' < $input -done - -echo -echo '#include "exec/gdbstub.h"' -echo "const char *const xml_builtin[][2] = {" - -for input; do - basename=$(echo $input | sed 's,.*/,,') - arrayname=xml_feature_$(echo $input | sed 's,.*/,,; s/[-.]/_/g') - echo " { \"$basename\", $arrayname }," -done - -echo " { (char *)0, (char *)0 }" -echo "};" From patchwork Wed Oct 11 10:33:17 2023 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: 731932 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp325841wrv; Wed, 11 Oct 2023 03:34:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGUSlvVny+ZmNN0PEMRvNltcsH29rsuND0gZbhqMDU9gYiX/25XQZTYm96JzbMD6mpenqUt X-Received: by 2002:a67:e959:0:b0:452:6451:5e16 with SMTP id p25-20020a67e959000000b0045264515e16mr19169730vso.31.1697020480519; Wed, 11 Oct 2023 03:34:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697020480; cv=none; d=google.com; s=arc-20160816; b=TV3RSNN26KWYcNc/b8LR/VYq1uEEiU+RAhYsdmSwcO73OgltpDmWzdtwkLxlgS5hzP hYyU4xvl9jtafDUKrDm440K+a9AIGKsUOADwIdXMSSq1kv8hGDwIiBqyAao4V3vHwKCT n59HR2yB0iNIMoLflUhEiw6IpE3pRgAMb1cLCnm8GXyzzpkUy3uLtGBdls8HEU/7mwrQ d0aud/jY/DcZzCDuYFbjxZ7pyHxUvJf7ZnYksE0seQloQUTTY3cAbZv2UcIGFG7ykSL/ JVf21RBxwvvVoKNhBonvhb8WTAaja8Cmbgkd7LJGcqlLyOMbvf003JCqVlTWA4O9J2ks kmyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=tXzt6XTvV2zpelaBYxfVQmisWGRyjvu/qrEXej/hrKQ=; fh=ciSoQgqucu/oEfZlaB6nZdSrNnqkgtVavnibiIeOass=; b=fchM1ggSOiuOxcT2tf9764UvduIOXDc5bE0Ybcq+g3F6DiiAtzSC6eGoci3yZGMsdM T/0heaxcnbZqFpPLKBMJSYBHZHW/mStfDx/VHGS3c4OjUek4zJvvNW4yKezBL213UjuX PWBs2pR38GL8HUNNtZuvlE2lIJmzeaG+ajBSjrhm+udGVhvfJ4iK1F70G+q7ESTqaf/1 q3Nb4DUzXLgvTAMQG4WWgZhg6gNnGIM5vfzwIJuyPwTKAwESFNuOXWRfiHO6FhmbqgLa b1jIsb6zCqksOtwUkuHq/JxpNzrXDjce3t5vDTWy/UGYKlJA9PQFAOo4kxTR/pDbpF23 nbcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zbVG5kHG; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g15-20020a0cf08f000000b0065b0d44b579si8966285qvk.297.2023.10.11.03.34.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:34:40 -0700 (PDT) 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=zbVG5kHG; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWXL-0001dG-FS; Wed, 11 Oct 2023 06:33:55 -0400 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 1qqWXA-0001MY-0s for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:45 -0400 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 1qqWX5-0005GC-VA for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:43 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4054f790190so65569015e9.2 for ; Wed, 11 Oct 2023 03:33:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697020418; x=1697625218; 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=tXzt6XTvV2zpelaBYxfVQmisWGRyjvu/qrEXej/hrKQ=; b=zbVG5kHGdfSek5yoWVOYYwRrrWl9fMYexV9XCZrpRSXSZEpmjms14VqwlX8KRUCKMz BLZ7uHA9468GPEUpv2tAfwKk/nDgINEKY750O7uaz5y7KbBq211ZlpiyYKbXV5YENcuP mv5axBxAFg0rLqIbeE5Vrqe1CLdeEf9B5PhAzBaK8BrcSfAS8+RsxbLo4k5xJ/uORhwG TDOPIaxID0tfmhVnwWxkLWehCTeDAZnz49IURSB7vUi+84w4c64gRiunKfkiEaRCpw5U Fm+Zi7GO8dAw8pdhp7aswhmfPh4LFducAGzKR9toKlja6iwl5IuMhvDwHHHiMrAP1zUQ 1Wfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697020418; x=1697625218; 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=tXzt6XTvV2zpelaBYxfVQmisWGRyjvu/qrEXej/hrKQ=; b=R4Kl9AxE/8Lr7J0Dms1HRaGvS2AFzH6ozemB/aM+v642/AMO96/3uIR9Ys9aSShVgA m2oCkRac/pO0m+69LVzO3tPFUh1W1niuv4XaKC/nnMYPFQ9o4IE+wewA8oG4HphlWzLY IWkNEzZEemA0OUyiwOK0cReysPY7zTA+H1DXrlTpJOxunUuVHaOx3wsM9aBL/fZ454QO n50h8hB3dcHj4uqSuzpvwwlQIzzNlVW8ns8OQ4HC+CzA19bsoauICfwfs4Gqux2EWxGG URQbQoxVkBcp9ZBXJZafPIL8aNfNNAOromfVhPUtmOEj4LJCnT/2mFY3q0Wcsfkwxtn5 h+Qw== X-Gm-Message-State: AOJu0Yyx1GXpAkYGfYSpN/zgqvyh0BI6Uh8X2hZa1R9WpbTxI+wXNBBm Sd+AvexE6lfksuycILHUPNgWag== X-Received: by 2002:a05:600c:2211:b0:402:fec4:fddc with SMTP id z17-20020a05600c221100b00402fec4fddcmr18291721wml.17.1697020418034; Wed, 11 Oct 2023 03:33:38 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id i2-20020a05600c290200b004063d8b43e7sm18722043wmd.48.2023.10.11.03.33.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:33:35 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8B65A1FFC5; Wed, 11 Oct 2023 11:33:31 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 13/25] target/arm: Move the reference to arm-core.xml Date: Wed, 11 Oct 2023 11:33:17 +0100 Message-Id: <20231011103329.670525-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-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=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: Akihiko Odaki Some subclasses overwrite gdb_core_xml_file member but others don't. Always initialize the member in the subclasses for consistency. This especially helps for AArch64; in a following change, the file specified by gdb_core_xml_file is always looked up even if it's going to be overwritten later. Looking up arm-core.xml results in an error as it will not be embedded in the AArch64 build. Signed-off-by: Akihiko Odaki Reviewed-by: Richard Henderson Message-Id: <20230912224107.29669-7-akihiko.odaki@daynix.com> Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-14-alex.bennee@linaro.org> diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 831295d7cd..b65e8cfea3 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -2392,7 +2392,6 @@ static void arm_cpu_class_init(ObjectClass *oc, void *data) cc->sysemu_ops = &arm_sysemu_ops; #endif cc->gdb_num_core_regs = 26; - cc->gdb_core_xml_file = "arm-core.xml"; cc->gdb_arch_name = arm_gdb_arch_name; cc->gdb_get_dynamic_xml = arm_gdb_get_dynamic_xml; cc->gdb_stop_before_watchpoint = true; @@ -2414,8 +2413,10 @@ static void arm_cpu_instance_init(Object *obj) static void cpu_register_class_init(ObjectClass *oc, void *data) { ARMCPUClass *acc = ARM_CPU_CLASS(oc); + CPUClass *cc = CPU_CLASS(acc); acc->info = data; + cc->gdb_core_xml_file = "arm-core.xml"; } void arm_cpu_register(const ARMCPUInfo *info) From patchwork Wed Oct 11 10:33:18 2023 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: 731942 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp326249wrv; Wed, 11 Oct 2023 03:35:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGIGCqZKvseseboXDLDD8qlW2LXGAocPHYdE9T1EGlGR5G+SQ/AHhWx3XMgRKyO9J3UaoX5 X-Received: by 2002:a81:4854:0:b0:5a7:bf2b:dc27 with SMTP id v81-20020a814854000000b005a7bf2bdc27mr4708309ywa.14.1697020547975; Wed, 11 Oct 2023 03:35:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697020547; cv=none; d=google.com; s=arc-20160816; b=rOHu23Yq+pGjihVtAM+rWAkjZUVyrAUkoIR3TnYvrqBUcZf/BA6mnm/BAXue6pH7O3 nei8A++fG+jlM5nBHLUv4+/Hr1fOdZv8mAbx9Y1Sx5FjN5KX4yYHrb58x9jbh/68eHC5 2qFCcmTdCSGv5rKBQ6hqVNYt/m5L/KkPQa/JZyO9rIKlT60g5M23eh0AMN3T/7zMGLmp sAZMereiyjel3y2hHJNkyVJGOd8wWoIKnBtwf1qPN6wtcwH/0srtCbbdNSe6GKeyL8w2 BZSBPKx6xL1gt1U3rZ3pDHzhz1mwmR0lTqF93OK09mB/nXANzjJoiJ01nCfshFETIhKq LMdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=Jt1UXVJ9g1e9zBvoXUT5QK8FO+jhEnDupj0uz8RWS3E=; fh=IbUqTVN6VYwKhToyTxhvsHddAIdqCrQdQpZv42YoYsY=; b=z21ZHoDC+0uKs4yGBKQPBazd0wS3JVFV87A297LKm8tu+OvO8yuUkW37DOnBRZpDz9 rNtik6rDnCshY57j6NeaYUElOYi19no02cSCam4PyWJS2USlonCqXHqLIJ06LDk9KvlJ 6t0u6Hn/TweBi5QuYjrHtpxMEyYm4b+RiAg2MW1J47J7fdDRYdUB0X15F5z2VGiIgXpW Oik3PS+yhct8ziABERDG22gIQIZllYLms3vc2qrpoPPzynFDtduWHBHaYL2swK4KkGuZ HvL0pGH7ihimPsqh6I2iJdFJu1mKU6qAzR7c1uF0hG+QMgT0qrvJl92yVjsAt2/9E+Da GiIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JZCFaGk8; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j19-20020a37ef13000000b0076daeaded07si8696903qkk.74.2023.10.11.03.35.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:35:47 -0700 (PDT) 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=JZCFaGk8; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWXJ-0001ac-Gr; Wed, 11 Oct 2023 06:33:53 -0400 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 1qqWX8-0001LU-Ag for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:42 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWX5-0005Fp-DO for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:42 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40651a726acso61653875e9.1 for ; Wed, 11 Oct 2023 03:33:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697020418; x=1697625218; 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=Jt1UXVJ9g1e9zBvoXUT5QK8FO+jhEnDupj0uz8RWS3E=; b=JZCFaGk8yhL81twwBfn0bod0eTaQcY6OFU2NcfFEDQLMYKcTp6Du8x+Q7qWFtjAJNk QJMAwUVaXnw4mjln6FZZF5C5Q5FMYeC9siyJbid0KLM5Rou5AuvJFv3QI1R3bHArx8UF k8AEHhTDiy1nr3iNFbki6CBeyAD4miw6+i+MfbAVJeiLFl4lfiOyzFW/HKkvgUpNv79G EgEwJV6I7Y/aH5jNdMYW6dwJxhI4NZVTpLItbcivkKL70Lv7ePJePFtI/a9OtjarjgzR dkfu/tz7/XzweabqAbSLTg/zLS6rhJcGsrjgLzxQyvnI6rDNV/aUd5vKvkfTL0OZp5ck otsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697020418; x=1697625218; 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=Jt1UXVJ9g1e9zBvoXUT5QK8FO+jhEnDupj0uz8RWS3E=; b=YZ/gxwQOsMZGUDEJk+7eFAOQbIIeuI3q4zlfBdUCkAuaa23nUMCQR7OAPMm3oykzcX WpsRp9zmr3f8y5bDWBj6d2BmPujwxm1juYqFAEnvATQmXrrpZdHd7UNma5rEYhYotG9l 7ZIebeEkueOTD+WLiP86Mjm9RjH4onxDutgsru7QN8NhuF1Qkrn0WGZb8TsOU6kSW8/j PJ1gR/vDXjtIQQpoYFTWGhaUdjJWCVpzGYHLmqx26YqaJjjI0c8jYSBJ8FBotvL9AKPi 4vDIujj2jdxnibcgfarEOneUwjMqB7a9BcOrktLtnrO8SdpAWKEOCoCPTaweUX5pYjFq v66A== X-Gm-Message-State: AOJu0YzalFwNLaTEq6a+7xsu8hgpNuZRJ9jr5DekiLY3KpnObZI1b/ai 4udWIbQ20wLioDSXYHk1A+1tmg== X-Received: by 2002:adf:edc3:0:b0:321:56af:5ef9 with SMTP id v3-20020adfedc3000000b0032156af5ef9mr15095927wro.70.1697020417859; Wed, 11 Oct 2023 03:33:37 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id t11-20020a5d534b000000b003232380ffd5sm15085477wrv.106.2023.10.11.03.33.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:33:35 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id BC4111FFC6; Wed, 11 Oct 2023 11:33:31 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , =?utf-8?q?Alex_Benn=C3=A9e?= , Alistair Francis , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Eduardo Habkost , Marcel Apfelbaum , Yanan Wang , Peter Maydell , Song Gao , Xiaojuan Yang , Nicholas Piggin , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , Palmer Dabbelt , Bin Meng , Weiwei Li , Liu Zhiwei , Thomas Huth , Richard Henderson , David Hildenbrand , Ilya Leoshkevich , Bastian Koppelmann , qemu-arm@nongnu.org (open list:ARM TCG CPUs), qemu-ppc@nongnu.org (open list:PowerPC TCG CPUs), qemu-riscv@nongnu.org (open list:RISC-V TCG CPUs), qemu-s390x@nongnu.org (open list:S390 general arch...) Subject: [PULL 14/25] hw/core/cpu: Return static value with gdb_arch_name() Date: Wed, 11 Oct 2023 11:33:18 +0100 Message-Id: <20231011103329.670525-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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: Akihiko Odaki All implementations of gdb_arch_name() returns dynamic duplicates of static strings. It's also unlikely that there will be an implementation of gdb_arch_name() that returns a truly dynamic value due to the nature of the function returning a well-known identifiers. Qualify the value gdb_arch_name() with const and make all of its implementations return static strings. Signed-off-by: Akihiko Odaki Reviewed-by: Alex Bennée Reviewed-by: Alistair Francis Message-Id: <20230912224107.29669-8-akihiko.odaki@daynix.com> Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-15-alex.bennee@linaro.org> diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index e02bc5980f..7b8347ed5a 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -165,7 +165,7 @@ struct CPUClass { vaddr (*gdb_adjust_breakpoint)(CPUState *cpu, vaddr addr); const char *gdb_core_xml_file; - gchar * (*gdb_arch_name)(CPUState *cpu); + const gchar * (*gdb_arch_name)(CPUState *cpu); const char * (*gdb_get_dynamic_xml)(CPUState *cpu, const char *xmlname); void (*disas_set_info)(CPUState *cpu, disassemble_info *info); diff --git a/target/ppc/internal.h b/target/ppc/internal.h index 15803bc313..c881c67a8b 100644 --- a/target/ppc/internal.h +++ b/target/ppc/internal.h @@ -221,7 +221,7 @@ void destroy_ppc_opcodes(PowerPCCPU *cpu); /* gdbstub.c */ void ppc_gdb_init(CPUState *cs, PowerPCCPUClass *ppc); -gchar *ppc_gdb_arch_name(CPUState *cs); +const gchar *ppc_gdb_arch_name(CPUState *cs); /** * prot_for_access_type: diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index bba2640293..a20169c27b 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -380,10 +380,9 @@ static const char *get_feature_xml(const char *p, const char **newp, ""); if (cc->gdb_arch_name) { - g_autofree gchar *arch = cc->gdb_arch_name(cpu); g_string_append_printf(xml, "%s", - arch); + cc->gdb_arch_name(cpu)); } g_string_append(xml, "gdb_core_xml_file); diff --git a/target/arm/cpu.c b/target/arm/cpu.c index b65e8cfea3..6c6c551573 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -2319,15 +2319,15 @@ static Property arm_cpu_properties[] = { DEFINE_PROP_END_OF_LIST() }; -static gchar *arm_gdb_arch_name(CPUState *cs) +static const gchar *arm_gdb_arch_name(CPUState *cs) { ARMCPU *cpu = ARM_CPU(cs); CPUARMState *env = &cpu->env; if (arm_feature(env, ARM_FEATURE_IWMMXT)) { - return g_strdup("iwmmxt"); + return "iwmmxt"; } - return g_strdup("arm"); + return "arm"; } #ifndef CONFIG_USER_ONLY diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c index 811f3b38c2..1cb9d5b81a 100644 --- a/target/arm/cpu64.c +++ b/target/arm/cpu64.c @@ -781,9 +781,9 @@ static void aarch64_cpu_finalizefn(Object *obj) { } -static gchar *aarch64_gdb_arch_name(CPUState *cs) +static const gchar *aarch64_gdb_arch_name(CPUState *cs) { - return g_strdup("aarch64"); + return "aarch64"; } static void aarch64_cpu_class_init(ObjectClass *oc, void *data) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index cec5d2b7b6..3aab05ddad 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -5916,12 +5916,12 @@ static void x86_cpu_load_model(X86CPU *cpu, X86CPUModel *model) memset(&env->user_features, 0, sizeof(env->user_features)); } -static gchar *x86_gdb_arch_name(CPUState *cs) +static const gchar *x86_gdb_arch_name(CPUState *cs) { #ifdef TARGET_X86_64 - return g_strdup("i386:x86-64"); + return "i386:x86-64"; #else - return g_strdup("i386"); + return "i386"; #endif } diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index 2bea7ca5d5..ef1bf89dac 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -766,9 +766,9 @@ static void loongarch_cpu_class_init(ObjectClass *c, void *data) #endif } -static gchar *loongarch32_gdb_arch_name(CPUState *cs) +static const gchar *loongarch32_gdb_arch_name(CPUState *cs) { - return g_strdup("loongarch32"); + return "loongarch32"; } static void loongarch32_cpu_class_init(ObjectClass *c, void *data) @@ -780,9 +780,9 @@ static void loongarch32_cpu_class_init(ObjectClass *c, void *data) cc->gdb_arch_name = loongarch32_gdb_arch_name; } -static gchar *loongarch64_gdb_arch_name(CPUState *cs) +static const gchar *loongarch64_gdb_arch_name(CPUState *cs) { - return g_strdup("loongarch64"); + return "loongarch64"; } static void loongarch64_cpu_class_init(ObjectClass *c, void *data) diff --git a/target/ppc/gdbstub.c b/target/ppc/gdbstub.c index 2ad11510bf..778ef73bd7 100644 --- a/target/ppc/gdbstub.c +++ b/target/ppc/gdbstub.c @@ -589,12 +589,12 @@ static int gdb_set_vsx_reg(CPUPPCState *env, uint8_t *mem_buf, int n) return 0; } -gchar *ppc_gdb_arch_name(CPUState *cs) +const gchar *ppc_gdb_arch_name(CPUState *cs) { #if defined(TARGET_PPC64) - return g_strdup("powerpc:common64"); + return "powerpc:common64"; #else - return g_strdup("powerpc:common"); + return "powerpc:common"; #endif } diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index ac2b94b6a6..f5572704de 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -2004,17 +2004,17 @@ static Property riscv_cpu_properties[] = { DEFINE_PROP_END_OF_LIST(), }; -static gchar *riscv_gdb_arch_name(CPUState *cs) +static const gchar *riscv_gdb_arch_name(CPUState *cs) { RISCVCPU *cpu = RISCV_CPU(cs); CPURISCVState *env = &cpu->env; switch (riscv_cpu_mxl(env)) { case MXL_RV32: - return g_strdup("riscv:rv32"); + return "riscv:rv32"; case MXL_RV64: case MXL_RV128: - return g_strdup("riscv:rv64"); + return "riscv:rv64"; default: g_assert_not_reached(); } diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 4f7599d72c..6093ab0a12 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -282,9 +282,9 @@ static void s390_cpu_initfn(Object *obj) #endif } -static gchar *s390_gdb_arch_name(CPUState *cs) +static const gchar *s390_gdb_arch_name(CPUState *cs) { - return g_strdup("s390:64-bit"); + return "s390:64-bit"; } static Property s390x_cpu_properties[] = { diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c index d1477622e6..5ca666ee12 100644 --- a/target/tricore/cpu.c +++ b/target/tricore/cpu.c @@ -29,9 +29,9 @@ static inline void set_feature(CPUTriCoreState *env, int feature) env->features |= 1ULL << feature; } -static gchar *tricore_gdb_arch_name(CPUState *cs) +static const gchar *tricore_gdb_arch_name(CPUState *cs) { - return g_strdup("tricore"); + return "tricore"; } static void tricore_cpu_set_pc(CPUState *cs, vaddr value) From patchwork Wed Oct 11 10:33:19 2023 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: 731948 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp326575wrv; Wed, 11 Oct 2023 03:36:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFP9rfwll4HZqlauH/U5H3RDp8cibgeauDSnwZ26c1bVZZA2yomZ8M87x2traiYZpkXrL/m X-Received: by 2002:a05:6902:251:b0:d86:5844:a897 with SMTP id k17-20020a056902025100b00d865844a897mr18293464ybs.5.1697020592489; Wed, 11 Oct 2023 03:36:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697020592; cv=none; d=google.com; s=arc-20160816; b=RXlqEt4ByGdqdqvJZ6dKxmsAEsmxC4V1AsRK3Heg/1DGBK1rwWlFY3YprIvXrLz1lF 8ZInXhXnGaPpU966w2k4MLuk2NGYEi2bbrV9HNY/wVBdc/Ciiqw3h5dtWjVgSDiwxQRm WhgVWiGxYwrSgZPLcw8EvWNZPIFhStX+AMq45Waf8BoQU81H8cDppDz9b/2Hn09VZg/M WwSMKw0DWvbx5LziHlQvaVLzKobIiQhzOiyvyi7Cx2mvCCwJBqG4WNZf3dOV1P+Iyjit 7ie6UHx9cCsPEHXiXNDvuVm7hxMP8fN0VnibL1JqDZKeH5oxloYEp9t8xADR+RjsWpX/ XnaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=0GGDMjiObwuIV+sEPGodU7jxWDpthevn5Vhw1E3Gt5g=; fh=h9eGh9LdnczKeJ5s9ZJz3SDfuNraEHiWEOL+l5dy014=; b=S4uRQ7YThNxEoUbPYKNW+/3eKFLwiZYoay8DPZQtYJPt8UFu97aEYLnLsxkkZDv2Zi DuA0rcAoKlu+K7xBMb7cHDUQTyosV53E/wkT9Hq6Hm/kx5rlb6YweMJ83GtXPNZNRosZ DgtuwcICrNHLcW2lRsE+IfjMdf5AjShQ3LmCzGlTA6i6Ga+Zxpi56zlk8m60hmKThH4c AbMhy0f6XvyOaVLbKXpID3YHpaVsBNtoBfGETj2pKYdbsykcP3PiWmhx0J+ZFVkaxuEl pYY5q6tjtizCTIVdSJdXUZHMcQvMY7hc1xumU9xnvb/eWNWcT2RlOYIAcZBLHktcCVQ9 p46A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kEDeUdYL; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n3-20020a0c8c03000000b006472f570d00si9100377qvb.181.2023.10.11.03.36.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:36:32 -0700 (PDT) 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=kEDeUdYL; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWXL-0001cD-3T; Wed, 11 Oct 2023 06:33:55 -0400 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 1qqWX9-0001MW-LT for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:45 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWX5-0005Fn-R5 for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:43 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-405361bba99so61509515e9.2 for ; Wed, 11 Oct 2023 03:33:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697020417; x=1697625217; 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=0GGDMjiObwuIV+sEPGodU7jxWDpthevn5Vhw1E3Gt5g=; b=kEDeUdYLFo13z/NWmn6GI8mwLxYmhMsTn/E8ORFEp4qdii2aDeOz8H7YiuE52XXqIa o+EQ58/l9V5ijsJNKJ4Do+jHZKHwRM05Gbx+z0+GMrFmbQCGG2/N88gC01FJNDfL28Ab 0OdeYpSvZ5QgcUD+TZ7jV/Ofoy8QeSjKjCj3X+CITFQUKMTptX8JdKN0cC15WY87djV6 fRrFKNuQWYuCfSzPTNhLIDv/MxfJVmApN0TgzFIUr2FueS4FzUsbAwe14y7hIGzcFEye Pr+z/UVAjIG5SJgTIBspu7VMUgHWGoSN4vtvHFT2EC3POAAfbtQ7hW3Lcl412cCiX8p0 hE+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697020417; x=1697625217; 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=0GGDMjiObwuIV+sEPGodU7jxWDpthevn5Vhw1E3Gt5g=; b=MFZvwH54FaoFW28uVz4A9I8k1hqE7lqg0cZuBg8RcloLoRiQ3+T1eNOZ0FN/Kt8ir6 sbt8pCii8Rq1H1bko3ipBnGZd7WxDAsz4c+ah8C54e8DMAtK+bTt4QoKFZWjJiaWLis5 KZeciEo8W3FvNaSB9yEkoT63BldpwZOm+I3wrclwmINbIa5LFDIkQPAYrORbTrVuiLB/ FmOmH6gwHwTqcVVX8FdE6B6hkpyrlbsbvNpLkJLC/bD9hFxf5Q/FovPLeWZ8k+ZuN112 +JME+H9GUYFaNB1CMo3ea9OrBYsAoVr7eFk/NQUH6OufIksvo0IGOGhdfTwMdqucleWI jtEw== X-Gm-Message-State: AOJu0YxK564PJFIeIQLdIDLusvT3F1281tV9isT/jNVzswkxHWhmIWyg Cy2FcIdMwzoDfhvTQBLnhCv6Lw== X-Received: by 2002:a1c:7209:0:b0:405:a30:151e with SMTP id n9-20020a1c7209000000b004050a30151emr18905129wmc.12.1697020417661; Wed, 11 Oct 2023 03:33:37 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id f19-20020a1c6a13000000b00402d34ea099sm18671708wmc.29.2023.10.11.03.33.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:33:35 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D37081FFC7; Wed, 11 Oct 2023 11:33:31 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PULL 15/25] gdbstub: Use g_markup_printf_escaped() Date: Wed, 11 Oct 2023 11:33:19 +0100 Message-Id: <20231011103329.670525-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32b.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: Akihiko Odaki g_markup_printf_escaped() is a safer alternative to simple printf() as it automatically escapes values. Signed-off-by: Akihiko Odaki Message-Id: <20230912224107.29669-9-akihiko.odaki@daynix.com> Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-16-alex.bennee@linaro.org> diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index a20169c27b..3dc847f835 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -373,28 +373,34 @@ static const char *get_feature_xml(const char *p, const char **newp, if (strncmp(p, "target.xml", len) == 0) { if (!process->target_xml) { GDBRegisterState *r; - GString *xml = g_string_new(""); + g_autoptr(GPtrArray) xml = g_ptr_array_new_with_free_func(g_free); - g_string_append(xml, - "" - ""); + g_ptr_array_add( + xml, + g_strdup("" + "" + "")); if (cc->gdb_arch_name) { - g_string_append_printf(xml, - "%s", - cc->gdb_arch_name(cpu)); + g_ptr_array_add( + xml, + g_markup_printf_escaped("%s", + cc->gdb_arch_name(cpu))); } - g_string_append(xml, "gdb_core_xml_file); - g_string_append(xml, "\"/>"); + g_ptr_array_add( + xml, + g_markup_printf_escaped("", + cc->gdb_core_xml_file)); for (r = cpu->gdb_regs; r; r = r->next) { - g_string_append(xml, "xml); - g_string_append(xml, "\"/>"); + g_ptr_array_add( + xml, + g_markup_printf_escaped("", + r->xml)); } - g_string_append(xml, ""); + g_ptr_array_add(xml, g_strdup("")); + g_ptr_array_add(xml, NULL); - process->target_xml = g_string_free(xml, false); + process->target_xml = g_strjoinv(NULL, (void *)xml->pdata); } return process->target_xml; } From patchwork Wed Oct 11 10:33:20 2023 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: 731952 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp329657wrv; Wed, 11 Oct 2023 03:44:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF+0GoV2+IRfgqdWgXcazbYFeLKasJrhx2q5Z65Jfki8wpJNG96w9WvqKR46y87XY2ShkkV X-Received: by 2002:a0c:de0a:0:b0:66d:d3d:aa66 with SMTP id t10-20020a0cde0a000000b0066d0d3daa66mr375865qvk.58.1697021071703; Wed, 11 Oct 2023 03:44:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697021071; cv=none; d=google.com; s=arc-20160816; b=jDh14LNClDV04Zz35JvHKiSbn8TG9MXKN4crHOV3bQ8n8wrkLF8xr2L2nne2GJsJow 2wLM6Qz1k0s7CJdH2ys8/QramkWdBESo0nNxPyh3EF22Ew9RANQX/dfNOEZEfbp4+2xB uTw8epIOca6wW5wZBMzuhFEmtnp8c6uQ9/rlR+/I8qxm0VBWsMrNA1764K3dEENqUg7l N1n0ujIlEF1MYGKlhRSC8CbLrU6G6ysw7XU1g7+FXpjMWrHYyDZ4BJkFeSNc3ldpW9HU Dr8+sMUTXxNUovXZO9nWsJArKJKIGAvx/3LuGpfsyInAuVIUxiSx5J0C4xE1fWuc46D1 HHLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=GPaasftMrVbbA875970yr+KsXKzf7HZNoY4yrQwF8Og=; fh=14Et6+aoIqq9hTmjkJ3aRzbOpUTckSmem5lrycrk3AM=; b=anYKXbhUNeCeh8g1Njmx38RXlIy6BdQaAybd/rOG7iB+evMdU2S53DtojdEvBeDv6z c6oCgeuHQZPHIrQ62loj75uulRQHThNqf5Cxatfp5DfFynW5zv+own3tY26cLW7cOzjN nvhgfJIETgN0afK60WX2txNEmjZJmOB2ZKXkJVHY4m2qy6Nh4q8TRYM8kGv3pBUWew59 IM/XFM2M2UWZmGsLpJtfDu7KlcqLaz/hy/JID0E6dW0LzxkaP9mIScSUiS4SYpRg4h4g G2AItBjQS+hikoqUmd/+ei0Ldwc28tF1xq+mwnQH1XrfVDRehrhrlxAzgZoNwAYVsrZi mJ2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ay3YH6wv; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t15-20020a0cb38f000000b0065af551572bsi8802669qve.495.2023.10.11.03.44.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:44:31 -0700 (PDT) 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=Ay3YH6wv; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWgl-0008D2-SG; Wed, 11 Oct 2023 06:43:39 -0400 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 1qqWgj-0008At-PG for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:43:37 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWgh-0007fB-3b for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:43:37 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-406650da82bso61643145e9.3 for ; Wed, 11 Oct 2023 03:43:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697021012; x=1697625812; 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=GPaasftMrVbbA875970yr+KsXKzf7HZNoY4yrQwF8Og=; b=Ay3YH6wvFeInz/4JZVMAYNkuLzH6bzNgOd+eBH9rmyPGqoJGhVjp9jXsEMJUwBUmW8 LKJm0Se4cY96r3YrHeDRZ4uWnf3nzBjNhbN9yBbgutjdqoozCoi/JsFoUwrbDU0dHr6A iYaPM+WWNutqLdebVQCAUWSMcCKUwZNJksssGfbFlNQo6AaRXUeuryrOvUQ0VwE0cIHq S2Pfde4D0tUDzeGANEpCtE0tStmkT/PwWbilDEE00f5pHbS2wmaJnFITFGsP8HthR9UW NLQPgG8s438ELw6S1foamXnCpR5xj2pNmFk4l7CL3gJvlAYDOwAZkzv7ga3vexmWt2ZT /n5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697021012; x=1697625812; 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=GPaasftMrVbbA875970yr+KsXKzf7HZNoY4yrQwF8Og=; b=wG5KPtv0z471zAdeCfZVlOnExIxvKQLcdLg2U0k/Tjl1mlFxZ5Cr5caZa17tHsZ/dD y+FheStELMBJIr1ojIzK4/aYlFwGdPmG/it5lUTgp9oZocoDIv2mYTfBV6+BkwttbnhV asHme11OtCAC2KngahlFCoRAqQb0NSMirobXMeYE08jcaCkgdWXvbpJLNV/NwLkg/wi+ JJeXv7qkV4oWmjqPnk2SNie1juMQ22MYTUCEC+8KurPwlWuQrzfjcjiODDzpIFz52wYl 6fD2z/6jHDDcnI5GaZtLSTn4Z+ruNjnNZQO5TLR5E7SC0RUP3wqbfmxXfdSYS1bC+nX/ W8rw== X-Gm-Message-State: AOJu0Yxvy6KbDuHXwwgSTqKNe0k6nReQohs/FnBLsAPX4t9a3p5C5c6z kYlv3csMkie3radBHWOlBybf1Q== X-Received: by 2002:a1c:ed02:0:b0:401:38dc:891c with SMTP id l2-20020a1ced02000000b0040138dc891cmr17641553wmh.5.1697021012597; Wed, 11 Oct 2023 03:43:32 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id p5-20020a1c7405000000b004064e3b94afsm18852827wmc.4.2023.10.11.03.43.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:43:31 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id EAFFC1FFC8; Wed, 11 Oct 2023 11:33:31 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , =?utf-8?q?Alex_Benn=C3=A9e?= , Alistair Francis , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 16/25] target/arm: Remove references to gdb_has_xml Date: Wed, 11 Oct 2023 11:33:20 +0100 Message-Id: <20231011103329.670525-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Akihiko Odaki GDB has XML support since 6.7 which was released in 2007. It's time to remove support for old GDB versions without XML support. Signed-off-by: Akihiko Odaki Acked-by: Alex Bennée Reviewed-by: Alistair Francis Message-Id: <20230912224107.29669-10-akihiko.odaki@daynix.com> Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-17-alex.bennee@linaro.org> diff --git a/target/arm/gdbstub.c b/target/arm/gdbstub.c index 8fc8351df7..b7ace24bfc 100644 --- a/target/arm/gdbstub.c +++ b/target/arm/gdbstub.c @@ -46,21 +46,7 @@ int arm_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n) /* Core integer register. */ return gdb_get_reg32(mem_buf, env->regs[n]); } - if (n < 24) { - /* FPA registers. */ - if (gdb_has_xml()) { - return 0; - } - return gdb_get_zeroes(mem_buf, 12); - } - switch (n) { - case 24: - /* FPA status register. */ - if (gdb_has_xml()) { - return 0; - } - return gdb_get_reg32(mem_buf, 0); - case 25: + if (n == 25) { /* CPSR, or XPSR for M-profile */ if (arm_feature(env, ARM_FEATURE_M)) { return gdb_get_reg32(mem_buf, xpsr_read(env)); @@ -100,21 +86,7 @@ int arm_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) env->regs[n] = tmp; return 4; } - if (n < 24) { /* 16-23 */ - /* FPA registers (ignored). */ - if (gdb_has_xml()) { - return 0; - } - return 12; - } - switch (n) { - case 24: - /* FPA status register (ignored). */ - if (gdb_has_xml()) { - return 0; - } - return 4; - case 25: + if (n == 25) { /* CPSR, or XPSR for M-profile */ if (arm_feature(env, ARM_FEATURE_M)) { /* From patchwork Wed Oct 11 10:33:21 2023 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: 731950 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp329626wrv; Wed, 11 Oct 2023 03:44:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFCU9CnQnKLlmZvZu0Cs0OzI/1byZVxk7xQZ3xyeHOKU3Dt7BEKWFuF0LI3HxDZbp85yxcn X-Received: by 2002:a0c:e78b:0:b0:659:5839:f811 with SMTP id x11-20020a0ce78b000000b006595839f811mr21200907qvn.57.1697021068241; Wed, 11 Oct 2023 03:44:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697021068; cv=none; d=google.com; s=arc-20160816; b=rDLVRyZsCAPNHejZ5U5AbP3vDQvuEZV8GCZlaNm0Qm08kP5NYdvVuO4ZB6/A6o1dBu 20rKaf06lBHqY2mAFbGYJDMO2aAG98tMYDAQeylIpkiLlMth101XnmzyuxWZQ+HSY0b9 XqV8t3Xl+O7N8qjHCdGKgfRyZCkQKUBDm6U2n2QO35KH40XuWvGQBdngEPtOWiKOOT6M i9udyjqHSCn5V7Z65Pl1DNIZzfvaNW2KGhmMGareRdgZQBdBG17uwo0Zj+pWHCPEPHpo qqaH90yk0KHI/QPZT0vXTOG8QKTzE2h2ipUGFgaSXx+KVIbIw4wJTHzRlUw8Lra8TiD2 5CRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=NU8OZESOHGJQIdZ7oiM9dX/SvYUcS2a/CZ+IZrzLAg4=; fh=g8Ecz9rnl5ZSBhyXx+NqpKtcoapWhnC13ddmri3vDxg=; b=CqDJvingiFwZ2ihuqr66buvtqFTbjmO2EZrR10mNccLj0h3Rjru2zLWWESA/nXV3YS 8VLOKC4ymyu7BYGetZiXQL5jn3p6jht2m6M+0oSVkeHqsQkwQPR+pTXkjWjf8rCrTewJ DSpxnti/7yYBSGLMgaQToOUALexrWNbbyZvde3vzOpZX8M3bx1s3QiabSId4OYFfbXkB ztjwgC1oOAnpbXcnsw5zLMBoy6k1dJvPSHxJ36Xk+9kx8kjMbT3Tty5tconLsS2BZpR5 YwLTjuh09JNO9++xmtuJqG6MbHNq/fuHx4C0PS4YqvE22QffGRJVIUxAGshShneQQ9qP kwyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=duwdJd5I; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q9-20020a0c9a49000000b006563bd1457fsi9101830qvd.183.2023.10.11.03.44.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:44:28 -0700 (PDT) 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=duwdJd5I; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWgk-0008Bx-F3; Wed, 11 Oct 2023 06:43:38 -0400 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 1qqWgi-0008AU-Jv for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:43:36 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWgh-0007el-0k for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:43:36 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-405497850dbso61738135e9.0 for ; Wed, 11 Oct 2023 03:43:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697021011; x=1697625811; 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=NU8OZESOHGJQIdZ7oiM9dX/SvYUcS2a/CZ+IZrzLAg4=; b=duwdJd5IGk+YyczDbO8g4yxC01x/9ppHE7Jks5AdH7zA/M8/q7ElswUOeoj6zD1y/4 KvYLdccZ2Uovum+WV/6OhmKliC94pVSdCBm3UvS6dv46yMNKlRejbyHNq2mPppRIzI17 7F4K2gYO8DMlLzTrhPFZmGq51t9DE1Hk4qOpLn1aHFl8kGA7IlMM9/2WRMpjf0SEmdCA ryisZcoYTzygqZTTi3/IUCXHRhAg7D0Od3oFnLVk8d7l6kUvVVbqwgZcryL8diWOAoYd Qbsf5a21keD3d6ek1gMWtxpxwSqYYpC/RaTEo6KMXaxzLrsT4DrSuKREVac1xL8tpXkl asFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697021011; x=1697625811; 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=NU8OZESOHGJQIdZ7oiM9dX/SvYUcS2a/CZ+IZrzLAg4=; b=MagrerC4mcr21SS2NeL4G6AxVHyf8QewYWglwbzzFoFKAhbPw1Rk2VKmFh9simLyoM PDtZTmqpU76pAfnNN/2O+mYPgKAZ9rBwbLpVG9dMzJkue0kXTEnxnEppXFHSBFPWCYUR GG8LUw0IJxkmG4FsfVPE9JnpGwNNodCKzurHYkknHz0Qyjraz1Hmx3FzQn8adob9IIoS xK43B7GaVUbuZpcbHt8zNw0uOJU34zofrsiC2IodZdPJ1FwOriRLAjV/IXGZbGjeJOI7 Va/YfHUla7oQm1ks+frnwgnwIXOSsMPe0Z3dviY3i7IFPETU9708TKjqd63tusD3WrHb BAaw== X-Gm-Message-State: AOJu0Yw8qLrzrNsUKm45/lchr8xqVLx8pBtnUQJwFWLRNJ2akfyx3NlJ H64vVbWW9lvAFjnQ+Z7kp9ngZQnr0jWy4JXmpqk= X-Received: by 2002:a7b:c40a:0:b0:401:23fc:1f92 with SMTP id k10-20020a7bc40a000000b0040123fc1f92mr18871691wmi.25.1697021011267; Wed, 11 Oct 2023 03:43:31 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id s17-20020a1cf211000000b00405623e0186sm18844813wmc.26.2023.10.11.03.43.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:43:30 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0D1121FFC9; Wed, 11 Oct 2023 11:33:32 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , =?utf-8?q?Alex_Benn=C3=A9e?= , Nicholas Piggin , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , qemu-ppc@nongnu.org (open list:PowerPC TCG CPUs) Subject: [PULL 17/25] target/ppc: Remove references to gdb_has_xml Date: Wed, 11 Oct 2023 11:33:21 +0100 Message-Id: <20231011103329.670525-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Akihiko Odaki GDB has XML support since 6.7 which was released in 2007. It's time to remove support for old GDB versions without XML support. Signed-off-by: Akihiko Odaki Message-Id: <20230912224107.29669-11-akihiko.odaki@daynix.com> Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-18-alex.bennee@linaro.org> diff --git a/target/ppc/gdbstub.c b/target/ppc/gdbstub.c index 778ef73bd7..ec5731e5d6 100644 --- a/target/ppc/gdbstub.c +++ b/target/ppc/gdbstub.c @@ -54,12 +54,6 @@ static int ppc_gdb_register_len(int n) case 0 ... 31: /* gprs */ return sizeof(target_ulong); - case 32 ... 63: - /* fprs */ - if (gdb_has_xml()) { - return 0; - } - return 8; case 66: /* cr */ case 69: @@ -74,12 +68,6 @@ static int ppc_gdb_register_len(int n) case 68: /* ctr */ return sizeof(target_ulong); - case 70: - /* fpscr */ - if (gdb_has_xml()) { - return 0; - } - return sizeof(target_ulong); default: return 0; } @@ -132,9 +120,6 @@ int ppc_cpu_gdb_read_register(CPUState *cs, GByteArray *buf, int n) if (n < 32) { /* gprs */ gdb_get_regl(buf, env->gpr[n]); - } else if (n < 64) { - /* fprs */ - gdb_get_reg64(buf, *cpu_fpr_ptr(env, n - 32)); } else { switch (n) { case 64: @@ -158,9 +143,6 @@ int ppc_cpu_gdb_read_register(CPUState *cs, GByteArray *buf, int n) case 69: gdb_get_reg32(buf, cpu_read_xer(env)); break; - case 70: - gdb_get_reg32(buf, env->fpscr); - break; } } mem_buf = buf->data + buf->len - r; From patchwork Wed Oct 11 10:33:22 2023 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: 731956 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp330055wrv; Wed, 11 Oct 2023 03:45:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHekeOIvp+VSPWVYBb1S0rb9xc8mVRmv9c7bGNYtw+vAy/F1rGAQUnLANZJPPmi0bczBIuy X-Received: by 2002:a05:620a:254c:b0:760:7760:fdaa with SMTP id s12-20020a05620a254c00b007607760fdaamr22618603qko.12.1697021128681; Wed, 11 Oct 2023 03:45:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697021128; cv=none; d=google.com; s=arc-20160816; b=jDTCkCheNy3EiUjFJ2Ipx6J2+VpZuNn3MmcbiQLNpB/XO9ye616dgjCqNO45WJACjX ENxnVRjeddhBn3T4vU1ZZig2FTR0grj1Qm3XnIfKHHRYzMMnbPQrLf+aRxEs3SA7Im+J yY4s+K6eFtPbttFgrsDl61LWtuOBla5ZbDUpc5k7DUCn4TGeV18H+1J8/s3c0yByBq4I WD9ujHhGMGbJ6CVOu1fIwmxzBBWIOpgY9/1PuPNeMpLFNo6f43nmuuUm15lbzKyzLP7w axIs2iYYHk2U1ggYornF+tM/21milnInS5Kl2ptAnBvnG9YPg/HZq0nIE1O/C+X0ILUz /IOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=zawTcP6zVPEQ87O8NTB4Qxv3jWF5guFODyudtyjxLaU=; fh=JsA0aLmoO6bKxmAXL8UlyiL4ljIgtOPbAUZPsPWWBFc=; b=sWFW3f63f+VFKIRxaY9S6xjxHhcZEwnosHFC8PINu8genciI2QjjAyIUChS8swweOY li08vPV0DFdrQXbjR1dO4tEO1Hwf4GxIKXZXmwGQPIUhLOiZsC0UZOyKXzW2+4BDLnWr M/rKfjIrmIwJT782gvkA/qoRzItePibNmmr72oNnvj/zqN07UOUgHDZ+hsdyM8xrizOi HwAfgZ4+zB8Pw42gFXd9iIqxCQ9+7ps3wKWCq+9nu3NI87jXS8XI5DmcqMhTrIH0UA75 WamvLr1Yu30XrTyLFzUB2d44EoARpxP8yQ2E8vnzynPn3VPq8O5rIICqun70OZrZhbUg pMiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p26hoboc; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bk19-20020a05620a1a1300b007772aebe1easi2258082qkb.274.2023.10.11.03.45.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:45:28 -0700 (PDT) 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=p26hoboc; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWgm-0008D9-F4; Wed, 11 Oct 2023 06:43:40 -0400 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 1qqWgk-0008BH-00 for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:43:38 -0400 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWgh-0007fR-Je for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:43:37 -0400 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2bffc55af02so79468011fa.2 for ; Wed, 11 Oct 2023 03:43:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697021014; x=1697625814; 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=zawTcP6zVPEQ87O8NTB4Qxv3jWF5guFODyudtyjxLaU=; b=p26hobocXcbl8QWHT/iWXdM4CUAcEz6+5+/gVE06ENLzymsnURHCplHVk8Mi7QtLCz pgvY0M0unJ6jLVDwjsD4/nwfI0f8BRXiuAsUkDqoRRerwvoqfrFOSacrXr3CvfNo56PC MTMwbLjTjT2ECkuQupw/+XOoJ1fW/7QOaOIzc6lzURY4NtglOHSzBuPFk4s7gcCJ9ysW REo4+NYJd5mNbgk24KqiX1Tbbxy2j4/ofwWdbErZTkBS2T/j52XYf9h+kyZmFoUmf3CT HeAe+47I8fy5KyrM+IT1iHeQPP7pv7grpYAYHot4BDnvxc9ef1EEgu9kXl8ocstpRZgP OiIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697021014; x=1697625814; 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=zawTcP6zVPEQ87O8NTB4Qxv3jWF5guFODyudtyjxLaU=; b=DB/WJr1HBc7+YQUPjVJ0J8aSm6gB+JkRkwuHiiN4LT3kt1FxrEZWofmUNdv6/wJi0C QTx3mdN447hXg+6tnfs+lWkHUBdIUpdgX6i74h1jZv7ow7MzvZzNMd8j/Z9xD1D1uKSh 3Zs2AZP2rHpTbs4FMizeFh6plqUTWhWT/DdNkwSyAtGgQ0jk4SQrOU+jFyjEoCKchoBB tTd7yC69BDAZSutN2k1B/KqIx9l4AnSy/O6jWTOuaCv0jZX6EuzJ0/jVuta7ea1ICPVe PbKEPu27VdYJQ2ZHelmqRRAhElsGEovvU3IQf3vp9K1wuM+AGyQN7YVEIphVJ458D3aS 24sg== X-Gm-Message-State: AOJu0YwTZDfOaC22tQVjBuSqE5eC12VIb/3NlUos0yRmG0LX8MO8Dwqe Bj1GTTVKX4jRacpI3ciTqwVA2BWypezbhzuU154= X-Received: by 2002:a2e:2e05:0:b0:2bd:180d:67b1 with SMTP id u5-20020a2e2e05000000b002bd180d67b1mr17655466lju.51.1697021013967; Wed, 11 Oct 2023 03:43:33 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4-20020a05600c248400b004060f0a0fd5sm16443181wms.13.2023.10.11.03.43.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:43:32 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 288981FFCA; Wed, 11 Oct 2023 11:33:32 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , Alistair Francis , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PULL 18/25] gdbstub: Remove gdb_has_xml variable Date: Wed, 11 Oct 2023 11:33:22 +0100 Message-Id: <20231011103329.670525-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::232; envelope-from=alex.bennee@linaro.org; helo=mail-lj1-x232.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: Akihiko Odaki GDB has XML support since 6.7 which was released in 2007. It's time to remove support for old GDB versions without XML support. Signed-off-by: Akihiko Odaki Reviewed-by: Alistair Francis Message-Id: <20230912224107.29669-12-akihiko.odaki@daynix.com> Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-19-alex.bennee@linaro.org> diff --git a/gdbstub/internals.h b/gdbstub/internals.h index f7fd1bede5..465c24b36e 100644 --- a/gdbstub/internals.h +++ b/gdbstub/internals.h @@ -32,8 +32,6 @@ enum { typedef struct GDBProcess { uint32_t pid; bool attached; - - /* If gdb sends qXfer:features:read:target.xml this will be populated */ char *target_xml; } GDBProcess; diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index 705be2c5d7..1a01c35f8e 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -45,14 +45,6 @@ int gdbserver_start(const char *port_or_device); void gdb_set_stop_cpu(CPUState *cpu); -/** - * gdb_has_xml() - report of gdb supports modern target descriptions - * - * This will report true if the gdb negotiated qXfer:features:read - * target descriptions. - */ -bool gdb_has_xml(void); - /* in gdbstub-xml.c, generated by scripts/feature_to_c.py */ extern const GDBFeature gdb_static_features[]; diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index 3dc847f835..62608a5389 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -349,11 +349,6 @@ static CPUState *gdb_get_cpu(uint32_t pid, uint32_t tid) } } -bool gdb_has_xml(void) -{ - return !!gdb_get_cpu_process(gdbserver_state.g_cpu)->target_xml; -} - static const char *get_feature_xml(const char *p, const char **newp, GDBProcess *process) { @@ -1086,11 +1081,6 @@ static void handle_set_reg(GArray *params, void *user_ctx) { int reg_size; - if (!gdb_get_cpu_process(gdbserver_state.g_cpu)->target_xml) { - gdb_put_packet(""); - return; - } - if (params->len != 2) { gdb_put_packet("E22"); return; @@ -1107,11 +1097,6 @@ static void handle_get_reg(GArray *params, void *user_ctx) { int reg_size; - if (!gdb_get_cpu_process(gdbserver_state.g_cpu)->target_xml) { - gdb_put_packet(""); - return; - } - if (!params->len) { gdb_put_packet("E14"); return; From patchwork Wed Oct 11 10:33:23 2023 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: 731935 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp326070wrv; Wed, 11 Oct 2023 03:35:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFqBJ5SCqih1KXORWpItryQ8CJgGA/FaMbLWM5Wyom5kZC52sr+Gd+aqKznb69LIIF7+IeQ X-Received: by 2002:a05:6808:2b0a:b0:3af:e45d:a0ee with SMTP id fe10-20020a0568082b0a00b003afe45da0eemr8499572oib.31.1697020518754; Wed, 11 Oct 2023 03:35:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697020518; cv=none; d=google.com; s=arc-20160816; b=0WHB54+mYtmi3nDmhnhSbi9ZD8rLNFN09TKBuXQx0Jz/fCA+gIXvrb5j7xp1Nfi2ow o7eJ5PSpaUrCaXiqYA/6di+xJABP465kk4kaZuwK1klp3/miPTo+TsQd+PMi6NMldfuR r5y0U8nPW4s5sO/9z8J26kuthN/JeZ3PBlkKHsJd104zYrhxVtJWzSl8tMJ1BySzZZBM HiDC1Z9/AbGGxVMhrfqdniox5cq5fNePZjNwxsc7OJpWgVn7b1+r8HOlAO30EEqeNqKp aSAasDtrMiC7Gjfhq4rW+iUzwrSUB6a8jWNXL8Yl2TTMBqMWj0iDO7tXM0J2emaAQrR/ vXZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Z+7nP3IGdaoip82hIlnEMfS+fdM67SWVcyUnWsux9qo=; fh=w08Nh9X7fSYg7tpzwkfMI5SwivQ42t+PxlOtJWYRP1U=; b=FN2brY0AM34y+sYDkaVRf9w1nUyDnewD5rAohcSVjWqquyKuIRSiEnHgEmHE6cJG4m NRepPHgrrqHOLKAPdlF11YvRbgUsMWVRttEfBNozxrtasfy/iUQIdzaZX78E/GWT69iJ 5dpL7NWAksaqsqC5L8o3YTlbRJwqu7hlpDuImhOfuTnrWSlHCEhyiNLf3aKQASwsUr2B kdrbkZwsfs1gyGKBwJ3tExUM5BUQ8UWWF8SPxm5rIMWy/CDp6WsltErLiVG+taGoz0XX BCSPbai9dc/mTRmL2DaNlYr6nbRpj6UHLJ7MqLSYbYBCBtQvfSAXanLHZjGBOrHbvNyY Xhpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YZE3CG1J; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t2-20020a05622a180200b00419629d080fsi8912146qtc.386.2023.10.11.03.35.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:35:18 -0700 (PDT) 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=YZE3CG1J; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWXG-0001YI-Qw; Wed, 11 Oct 2023 06:33:50 -0400 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 1qqWXB-0001OP-3w for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:47 -0400 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWX7-0005H0-3g for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:44 -0400 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-503397ee920so8441233e87.1 for ; Wed, 11 Oct 2023 03:33:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697020419; x=1697625219; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Z+7nP3IGdaoip82hIlnEMfS+fdM67SWVcyUnWsux9qo=; b=YZE3CG1JnDa3kGpb+AytELYa5LUtwS9AqcFgHVg5CDW8YyRpbjsVeOffb1TgCQ0jw/ 8Mb8HeNpDllPYn6hwRA96Fk5swYzNeA8hDhVmp8VVgqwNhR4KXHnFGKkRfvFBBTj1XuJ FBNlthE704UQ4Wb5sJdyOth+99ljg8aPruVZz3s8SgNIomIBudIDE138NQN19LVEwTtW OkMLVd/DlFQ1mxGT0IiOw/SDIWeBlsVpDLK5XsJJczNv3KPTeiBc1YHNAxPJJMuoBWq9 Hm03JsASGUH7c+mlAspCJcV7JCrtV01+0avntRvfMetMXcok0aXQMsvm4RBqnW86D38L wa2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697020419; x=1697625219; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Z+7nP3IGdaoip82hIlnEMfS+fdM67SWVcyUnWsux9qo=; b=fMmXUemp5Sa+0Wr6ob7HOh/ClD09GVmq+I9Oa2cLNQRsn8Y6vddzA1h6Cj/lyJ7iZP u04WNsCRx4AwEa4yJWy/zmOlk024Z2FxfNIAtRx0aw+8WnyBfOh1T2/dQlINtvNwWEbQ VLJpwpYMfEik7iMArtRZhn4xJKoFtoLSvULnq2+f3xGQA4V/zG57QaAy7aKxRddRK/YP RQCtwXpQkvrKlH6M2c4W9T3GNCDBfjMy9r17Klgv9Wj3Jq/ACqRJuPFkDbn9h0ToE8di C+fwVSUTuObCQBtHcy2bc3HMlEq1/OwD47GXvFQVS3ZDXCx/G48O0+HjimNSugvSBKVc t59w== X-Gm-Message-State: AOJu0YxG18/ya8teRn2Gb950XRoxNg3vfVzoG9mFVR+7FIP/DVL0Vniy tcv7vkjjYN7HYQk0lv49LoKRXw== X-Received: by 2002:a05:6512:ea5:b0:4f8:77db:1d9e with SMTP id bi37-20020a0565120ea500b004f877db1d9emr25721739lfb.12.1697020418927; Wed, 11 Oct 2023 03:33:38 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 12-20020a05600c024c00b0040531f5c51asm16622591wmj.5.2023.10.11.03.33.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:33:35 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 426131FFCB; Wed, 11 Oct 2023 11:33:32 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , Alistair Francis , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Eduardo Habkost , Marcel Apfelbaum , Yanan Wang Subject: [PULL 19/25] gdbstub: Replace gdb_regs with an array Date: Wed, 11 Oct 2023 11:33:23 +0100 Message-Id: <20231011103329.670525-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x131.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: Akihiko Odaki An array is a more appropriate data structure than a list for gdb_regs since it is initialized only with append operation and read-only after initialization. Signed-off-by: Akihiko Odaki Reviewed-by: Alistair Francis Message-Id: <20230912224107.29669-13-akihiko.odaki@daynix.com> [AJB: fixed a checkpatch violation] Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-20-alex.bennee@linaro.org> diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 7b8347ed5a..3968369554 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -502,7 +502,7 @@ struct CPUState { CPUJumpCache *tb_jmp_cache; - struct GDBRegisterState *gdb_regs; + GArray *gdb_regs; int gdb_num_regs; int gdb_num_g_regs; QTAILQ_ENTRY(CPUState) node; diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index 62608a5389..b1532118d1 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -51,7 +51,6 @@ typedef struct GDBRegisterState { gdb_get_reg_cb get_reg; gdb_set_reg_cb set_reg; const char *xml; - struct GDBRegisterState *next; } GDBRegisterState; GDBState gdbserver_state; @@ -386,7 +385,8 @@ static const char *get_feature_xml(const char *p, const char **newp, xml, g_markup_printf_escaped("", cc->gdb_core_xml_file)); - for (r = cpu->gdb_regs; r; r = r->next) { + for (guint i = 0; i < cpu->gdb_regs->len; i++) { + r = &g_array_index(cpu->gdb_regs, GDBRegisterState, i); g_ptr_array_add( xml, g_markup_printf_escaped("", @@ -430,7 +430,8 @@ static int gdb_read_register(CPUState *cpu, GByteArray *buf, int reg) return cc->gdb_read_register(cpu, buf, reg); } - for (r = cpu->gdb_regs; r; r = r->next) { + for (guint i = 0; i < cpu->gdb_regs->len; i++) { + r = &g_array_index(cpu->gdb_regs, GDBRegisterState, i); if (r->base_reg <= reg && reg < r->base_reg + r->num_regs) { return r->get_reg(env, buf, reg - r->base_reg); } @@ -448,7 +449,8 @@ static int gdb_write_register(CPUState *cpu, uint8_t *mem_buf, int reg) return cc->gdb_write_register(cpu, mem_buf, reg); } - for (r = cpu->gdb_regs; r; r = r->next) { + for (guint i = 0; i < cpu->gdb_regs->len; i++) { + r = &g_array_index(cpu->gdb_regs, GDBRegisterState, i); if (r->base_reg <= reg && reg < r->base_reg + r->num_regs) { return r->set_reg(env, mem_buf, reg - r->base_reg); } @@ -461,17 +463,23 @@ void gdb_register_coprocessor(CPUState *cpu, int num_regs, const char *xml, int g_pos) { GDBRegisterState *s; - GDBRegisterState **p; - - p = &cpu->gdb_regs; - while (*p) { - /* Check for duplicates. */ - if (strcmp((*p)->xml, xml) == 0) - return; - p = &(*p)->next; + guint i; + + if (cpu->gdb_regs) { + for (i = 0; i < cpu->gdb_regs->len; i++) { + /* Check for duplicates. */ + s = &g_array_index(cpu->gdb_regs, GDBRegisterState, i); + if (strcmp(s->xml, xml) == 0) { + return; + } + } + } else { + cpu->gdb_regs = g_array_new(false, false, sizeof(GDBRegisterState)); + i = 0; } - s = g_new0(GDBRegisterState, 1); + g_array_set_size(cpu->gdb_regs, i + 1); + s = &g_array_index(cpu->gdb_regs, GDBRegisterState, i); s->base_reg = cpu->gdb_num_regs; s->num_regs = num_regs; s->get_reg = get_reg; @@ -480,7 +488,6 @@ void gdb_register_coprocessor(CPUState *cpu, /* Add to end of list. */ cpu->gdb_num_regs += num_regs; - *p = s; if (g_pos) { if (g_pos != s->base_reg) { error_report("Error: Bad gdb register numbering for '%s', " From patchwork Wed Oct 11 10:33:24 2023 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: 731949 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp326576wrv; Wed, 11 Oct 2023 03:36:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IENkeS1YgwN4uat9N06L21F6vRs4in6wkbvFEjFM9oA01adVyeAWAoEmgnAIkfEAYQJDICA X-Received: by 2002:a0c:db86:0:b0:66d:202:6a2b with SMTP id m6-20020a0cdb86000000b0066d02026a2bmr2624541qvk.14.1697020592669; Wed, 11 Oct 2023 03:36:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697020592; cv=none; d=google.com; s=arc-20160816; b=hjcGhzm12257dneIGVkATpiyLS3UZgAeX1GEb6PC/z6H83tzVvbi/2bdxa2BAAydr+ f8O5Sonc2t48HuVlFP8+jMZj5/LoFNErI9ndMYnuQXEjgsDFf3JWdbS44c6EMApAnmGw znO0eFGxGuB+19W+leo6KjlE60pRzE4N+vlLsgtowIw4EDZXwAvl55sZWU86KRca7b7e 1wTi/gUMwYhzRIkccfTV+Hn/wcapwtLz17XdstRnff8T3jCkjXA2agr3OP/dT2JX97LD Ttg6ZllytYJI3ku98G5EmzacoA0oeBRrAt1kCUQwXZ4hTAf1IyZxpvcp+sV41ipPnaWz lc6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=pu5EXKGxbl4h50PEu15NUratwzwygqcDFyq/bZZGLKA=; fh=kCd5L++PIAXD6gRUdzmHVymGJHMC4SQfxxVGw4LKl5o=; b=iPIFiFwbBPGl5eSKlqpLMewkquTx4dey+3MSMpZyLoV3ARXVkfTgwih1geKoC9Ld3M x1X7q8ZrNy48vGdnSAlEe4RbRIguRY1hRuAzCyJ1T1iKsqaBAdvlumhMwbTmnV5HdNMX ZggrlrAOVdk4r3Hf4P0lsgW2aW0EmZlNzq2TSWtwkIbzApjUwAk8XtW59mbPp4Yz9ksH m73kCQVCRNdUlJbagiWRcwqrlK8DW5NbFPHYLmVY2Ht8d8ha7453bb7nniedsczFZaZF UJzlvNoES0vd/N22naiMylNi3kejNOUg2lIRCY8aGbUGQ3wzhJrumg5VQ/2tCtItY7/N IOIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mryxe3Lx; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v20-20020a0ce1d4000000b0066cee934ae4si1915365qvl.229.2023.10.11.03.36.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:36:32 -0700 (PDT) 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=mryxe3Lx; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWXL-0001dd-Nk; Wed, 11 Oct 2023 06:33:55 -0400 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 1qqWXA-0001MZ-BQ for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:45 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWX6-0005HZ-GJ for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:44 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-406609df1a6so63997545e9.3 for ; Wed, 11 Oct 2023 03:33:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697020419; x=1697625219; 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=pu5EXKGxbl4h50PEu15NUratwzwygqcDFyq/bZZGLKA=; b=mryxe3LxispMPCRD6tywTZJpUNbKmE/6NdvM9e31wJa8AlYA3Wbviqk7K4sI16cB++ h0RrBzHMvS7V/S7cDxrBVDDSRRGfQLi7RG3JJAc2/cN4YNp5GRbG4yLYQpuWclOMWy6q ezEVj4Uea4QknrhIaahzzEt1/bEVOhjHiiHcTu39WUiK8y5HJDO89euBd+98Jsfb3Kiy Ra54dJJT0TKxIm84UHVe2kw6Qqf4vOfH4k+fdQP00NeuoFrW0t1IsazeV2jFIFB0cZLN oGP5XJhskaXOqPYhDz4XrFUNe+ngZzQrcRc3XLDursuEH2peFCyyyQErSNY5j5DijeMK /oYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697020419; x=1697625219; 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=pu5EXKGxbl4h50PEu15NUratwzwygqcDFyq/bZZGLKA=; b=na7YiY8RsLDBC4Ru1uyuiHMlsGQsobtVtzKdwOv5Bds3K/YcY1lpFLScKi43tyWkZt r0wukarOFc7SRkxenO/n6ik+NOwkbLkd84YvlQUYz7W1zXoezJqtPkchD1b9rDv5gZk0 GxwUyl6uux7YYJQLagHM1+08Zo4ftS6EsYROM9w1v99l3GYz84m9iH/8Y2KfHHims2Vm MiycEgHjjwV/+J21zi1CNyLjZRtl5RbBu81xt3wzD10w1nTD7WfneBu1S5r0ErkUlIPS j8XxeHRB+LxzTnvBfWzsHkpit8xQL3zAQfeP9ZX4xZIDaaKq6EmiIX+4b+wxm7HXpFFQ etHA== X-Gm-Message-State: AOJu0YySymGMyBq1SsuIocef1RtH7ndtvTBAvBNfcAWSXYuAV87lLsTk /QuJ7mkBPgvkIA1kMe5/DPJOgLDFoA6ryX5FZAM= X-Received: by 2002:a05:6000:10c2:b0:321:68af:947 with SMTP id b2-20020a05600010c200b0032168af0947mr16601830wrx.8.1697020419204; Wed, 11 Oct 2023 03:33:39 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id bp22-20020a5d5a96000000b0032ce54bacb1sm4599276wrb.0.2023.10.11.03.33.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:33:36 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5B2D21FFCC; Wed, 11 Oct 2023 11:33:32 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Paolo Bonzini Subject: [PULL 20/25] accel/tcg: Add plugin_enabled to DisasContextBase Date: Wed, 11 Oct 2023 11:33:24 +0100 Message-Id: <20231011103329.670525-21-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Richard Henderson Signed-off-by: Richard Henderson Message-Id: <20230824181233.1568795-2-richard.henderson@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-21-alex.bennee@linaro.org> diff --git a/include/exec/translator.h b/include/exec/translator.h index 9d9e980819..6d3f59d095 100644 --- a/include/exec/translator.h +++ b/include/exec/translator.h @@ -73,6 +73,7 @@ typedef enum DisasJumpType { * @max_insns: Maximum number of instructions to be translated in this TB. * @singlestep_enabled: "Hardware" single stepping enabled. * @saved_can_do_io: Known value of cpu->neg.can_do_io, or -1 for unknown. + * @plugin_enabled: TCG plugin enabled in this TB. * * Architecture-agnostic disassembly context. */ @@ -85,6 +86,7 @@ typedef struct DisasContextBase { int max_insns; bool singlestep_enabled; int8_t saved_can_do_io; + bool plugin_enabled; void *host_addr[2]; } DisasContextBase; diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index e7abcd86c1..c5da7b32a5 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@ -158,6 +158,7 @@ void translator_loop(CPUState *cpu, TranslationBlock *tb, int *max_insns, } else { plugin_enabled = plugin_gen_tb_start(cpu, db, false); } + db->plugin_enabled = plugin_enabled; while (true) { *max_insns = ++db->num_insns; From patchwork Wed Oct 11 10:33:25 2023 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: 731954 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp329852wrv; Wed, 11 Oct 2023 03:44:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFc4JyH4zWHbm8MqZYriWf8abdgJ9d3osYrrZ/3pH6/vUT8LzmUCLC1Qulvnl7bc13kKLbw X-Received: by 2002:ac8:5813:0:b0:405:47ef:8164 with SMTP id g19-20020ac85813000000b0040547ef8164mr25011550qtg.39.1697021098736; Wed, 11 Oct 2023 03:44:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697021098; cv=none; d=google.com; s=arc-20160816; b=ia43K1OwFNyrV0fnHPA1cgDrYBjMO5IRkjEgS1fXiZBCLB7PDwrQ5obYwvVouvjE+B VgrHc0GUIivjHGLgbBOTToMXC/J6XvSaEdteyGyGFMjZzGOYfcn1CNF97U06dp8PO9gv igOQxtQmkFle6R5nfY9oibW8zRPYjzm0OstMSIkuCQa7BDHINslBeAsPFDY3PhR59xaM +/chghyBVFwMbwND/o0cY4g0IdnTq/IjMhb4M5HskXvxeKDfixC6Oek4dqeRjTb096qq m9vJF6+DLqISRyeotLqN98QQIV26/af80G0NYFIg/R5nrobEvxFORV7HgQ+Ni/6jLmTz VV3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=n810Flg3eUKPCpIa9Gc8YMsIUEaYzj3LB0YfR/j6wKY=; fh=leyZlo+5VI+K3VUQRunD4SpqEM5GaTQXmMfHWLwhGVs=; b=lZRBLiPrBn3HKfAeVivfG5cNS24GZKwhDorWdXKEfmaQ8rh+DI2kOhC5ZEH5VfoYwc gESe5dVuTnvCYvZlfO2BBkZu3Qso8I+3/qZmmROqt0vcFOevW9GuhlGVxgYET/fnM9+u N60re5pXW/42ogrs+ZqMiIqMFaQKZhj08uTcfpiYyxX/Wa+sUOZKqqH3HkJuMeD8z05g 9jfUuAVwBVYQJ0BCQSAa8QZSiGWNFRlklot5KUL/0zzKk1hESv623cK6uhY4/MYDlE/Q FRZ/p3fnnQVj4fOVhf0LvPD2MTp+UT+mJ8JjN6YWnypoirnQItBmJxTalR0P0bD/mJTS Jp/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LlwfYchK; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 19-20020ac85913000000b00417d39dfc3esi8997420qty.755.2023.10.11.03.44.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:44:58 -0700 (PDT) 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=LlwfYchK; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWgl-0008CY-5R; Wed, 11 Oct 2023 06:43:39 -0400 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 1qqWgj-0008Ax-RS for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:43:37 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWgh-0007fV-Hw for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:43:37 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-32caaa1c493so1477364f8f.3 for ; Wed, 11 Oct 2023 03:43:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697021014; x=1697625814; 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=n810Flg3eUKPCpIa9Gc8YMsIUEaYzj3LB0YfR/j6wKY=; b=LlwfYchKOb0fmhShTiRQMjnhLINsXIc1+vaZ60a+vk8W9Rb0lUXyUftQe7SGHw6i98 uE3dBsR6tDYXccDm1mSw2cUDHt3ko3G4M5xS73dZ6s4Z2ZPFG467NEG9bh1qUafSBFrN RrbZcu5v8k6xPuTmPVEY1lu+MUE8TMXrNONkt0kUqaL7ZyhMjAKLXwTx4bMsCh7sTSB3 4OccV0Fto6pikg3Njj2zZaEH1hfRcQ97V63fRraM1wBAMnHZuK8blwJJgMTC2/co5moX 2f169s6jyijN/NuMHLjFCubAkp2oWDfuI1MA1jAiB7k/+LIMfgPcw+FDDQCIRsHAT8HE 9rCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697021014; x=1697625814; 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=n810Flg3eUKPCpIa9Gc8YMsIUEaYzj3LB0YfR/j6wKY=; b=soqx4EdpcRPCaFC1wc9smpByGgjXYWJriVFYkg/hhDEBt4JmYqqou99MmboR0UcvmP aJHktofL6tQRS77F6ZZH8GQqzNSss5YbDrvLuN7Gcq2xTTANRnAzbwUDvgqCx0YYwmog gZkY7vl+B/KttUwJ5fDzbRbW46b33fexHZOxDWOPfkTnLw6Lixc/dAysSIiJrA8SV77D +pnkfAJVDmQxnx/SWG2EmboA3RaMDQGcPNuNtKXQ0ctU1FKLfyf0p7X8FiIRkQChgwrO 88G1GL64oSMV2/kUJYtaq38LONHALvl7Ow76o4Zx7cKmHqk2vbBlsc+6tyacwxTlj55Z H3SA== X-Gm-Message-State: AOJu0YzBjXs6lBmsGUN9VSlSeXkFO/gpLuoC+b46QIKBHmNlSDEEPPZR B0sACbmLp/FubKvDMikrJVEQPw== X-Received: by 2002:a05:6000:1c02:b0:32d:4545:3832 with SMTP id ba2-20020a0560001c0200b0032d45453832mr3881270wrb.14.1697021014165; Wed, 11 Oct 2023 03:43:34 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id v3-20020adfa1c3000000b0032d8354fb43sm1869446wrv.76.2023.10.11.03.43.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:43:32 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 721FC1FFCD; Wed, 11 Oct 2023 11:33:32 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Yoshinori Sato Subject: [PULL 21/25] target/sh4: Disable decode_gusa when plugins enabled Date: Wed, 11 Oct 2023 11:33:25 +0100 Message-Id: <20231011103329.670525-22-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.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: Richard Henderson Signed-off-by: Richard Henderson Message-Id: <20230824181233.1568795-3-richard.henderson@linaro.org> [AJB: fixed s/cpu_env/tcg_env/ during re-base] Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-22-alex.bennee@linaro.org> diff --git a/target/sh4/translate.c b/target/sh4/translate.c index cbd8dfc02f..220a06bdce 100644 --- a/target/sh4/translate.c +++ b/target/sh4/translate.c @@ -1816,6 +1816,18 @@ static void decode_opc(DisasContext * ctx) } #ifdef CONFIG_USER_ONLY +/* + * Restart with the EXCLUSIVE bit set, within a TB run via + * cpu_exec_step_atomic holding the exclusive lock. + */ +static void gen_restart_exclusive(DisasContext *ctx) +{ + ctx->envflags |= TB_FLAG_GUSA_EXCLUSIVE; + gen_save_cpu_state(ctx, false); + gen_helper_exclusive(tcg_env); + ctx->base.is_jmp = DISAS_NORETURN; +} + /* For uniprocessors, SH4 uses optimistic restartable atomic sequences. Upon an interrupt, a real kernel would simply notice magic values in the registers and reset the PC to the start of the sequence. @@ -2149,12 +2161,7 @@ static void decode_gusa(DisasContext *ctx, CPUSH4State *env) qemu_log_mask(LOG_UNIMP, "Unrecognized gUSA sequence %08x-%08x\n", pc, pc_end); - /* Restart with the EXCLUSIVE bit set, within a TB run via - cpu_exec_step_atomic holding the exclusive lock. */ - ctx->envflags |= TB_FLAG_GUSA_EXCLUSIVE; - gen_save_cpu_state(ctx, false); - gen_helper_exclusive(tcg_env); - ctx->base.is_jmp = DISAS_NORETURN; + gen_restart_exclusive(ctx); /* We're not executing an instruction, but we must report one for the purposes of accounting within the TB. We might as well report the @@ -2242,12 +2249,22 @@ static void sh4_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs) #ifdef CONFIG_USER_ONLY if (unlikely(ctx->envflags & TB_FLAG_GUSA_MASK) && !(ctx->envflags & TB_FLAG_GUSA_EXCLUSIVE)) { - /* We're in an gUSA region, and we have not already fallen - back on using an exclusive region. Attempt to parse the - region into a single supported atomic operation. Failure - is handled within the parser by raising an exception to - retry using an exclusive region. */ - decode_gusa(ctx, env); + /* + * We're in an gUSA region, and we have not already fallen + * back on using an exclusive region. Attempt to parse the + * region into a single supported atomic operation. Failure + * is handled within the parser by raising an exception to + * retry using an exclusive region. + * + * Parsing the region in one block conflicts with plugins, + * so always use exclusive mode if plugins enabled. + */ + if (ctx->base.plugin_enabled) { + gen_restart_exclusive(ctx); + ctx->base.pc_next += 2; + } else { + decode_gusa(ctx, env); + } return; } #endif From patchwork Wed Oct 11 10:33:26 2023 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: 731955 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp329853wrv; Wed, 11 Oct 2023 03:44:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFRBurTiH05I04JX50JCuybEY2aP7l9F3pB+iiOWSRW+YuSo2uxMJoJjcItTKrrKkEnrBGA X-Received: by 2002:ac8:7c53:0:b0:403:fee8:7fdc with SMTP id o19-20020ac87c53000000b00403fee87fdcmr26344816qtv.39.1697021098872; Wed, 11 Oct 2023 03:44:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697021098; cv=none; d=google.com; s=arc-20160816; b=lnIdmQM+FyQ3UUG91anc1vLpbHuK28V6CRE0/f+0063nLxPX+NDW7QHDgff69JAtOi hPTLZhaxaaYC35H9TBL/EP7gwYLnMsAXahrcTaxtPkHoIhsVFdRhWGZr1b/99I1WwbwP Lco387oP4LjgAONMeYCdjx5Njo1L9P+6rpA/oMhhd7YDww3NWv+oUQMwNXVT4Zl/cO8/ aZQDNf47GIVp26uWho4//0PdB/O0XwWuY/BaViZU1imLKFklO11m3SYr8y3DPyIvGBGb 6UMJqDmaecOp/y/NvX/9tmZ2AFuUefeaWHRPON/ari5ETjLfQUagrrbhAa2FOUlToP5Y ONHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=yd35sPPYW+65MfBRsBZG66w/oIpnWjGdXLFZzvofEuI=; fh=s74fqBzzuNYc+FjDENwn0+Vc8bcPvtNA80jYIqfvjvQ=; b=qyOHGyr9NofdanWhVCcw0Ap9M76z6Aw0Sodh4ZqH7cLwhhBCKjgcimO5EbeaT3KEu8 FqaC4Kpw3jB5+bfbdp2mHPLk6EOB0QwTkAVJnueXCRcXgkDSgRp1ZdXl3Rf5M0fLiwWB ttOUGe2LkH3AMwaxlCPMUtfOFKvoYdZx6krAW3kSWz5mD9EJzr6kl1gntztHf9RaH7hv fPllsJIrEFlcZ28twzQuZ5Tnq3nBlLopTotQIWkhkCwAYrLwf2ArCGlrEKSvwmcnYwrp oPRTaH2gYXFfd0d2Wup3sVA6aBH788vU/MYQuKvCR+fgbH4MoNVRD7+cymXWnFnCylHu DlSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sgbPZFBF; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s19-20020a05622a179300b00403a7a5820fsi8853072qtk.142.2023.10.11.03.44.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:44:58 -0700 (PDT) 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=sgbPZFBF; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWgo-0008F5-59; Wed, 11 Oct 2023 06:43:42 -0400 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 1qqWgm-0008Di-Tz for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:43:40 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWgg-0007fI-Ob for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:43:40 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-32d834ec222so675294f8f.0 for ; Wed, 11 Oct 2023 03:43:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697021013; x=1697625813; 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=yd35sPPYW+65MfBRsBZG66w/oIpnWjGdXLFZzvofEuI=; b=sgbPZFBFlybtMB/12dzG4MaqVDuLrNNwStEEwEmseUU0+eFT7JeS6HEYx9ytPPmoB8 Jqc6vkrrWplGfxFqrLB7XjwAM/Ab0UtJxqS9xpfeV7ggTh/xNJyI0VY5YDUQK5BA7vbB mKbnCuJUfnoOoQW8js8GWBWZ+gklTrqrNsWBJVy7whvMsZrRHwnTrOF4nRTgfKf4lwVA 2iWDLm9kujqr5Mp+RHinkr5RcAfuGN9y/czrLANAxNZdF2ESdUrUTUfCxDgRqLqX/9Ws a/F/ADDjUYVqMiPR4qpggsvo7Gk/FTujpjhHArRCkyG+k+k57ZKkFfxiyV8+SWRDl8QS Pzgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697021013; x=1697625813; 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=yd35sPPYW+65MfBRsBZG66w/oIpnWjGdXLFZzvofEuI=; b=wdMVeXtaDa72naXXmke7/hxmQJplMV2lyHZTHbp6Xc7QFRmXZID+Et8BD+St4tD3ld 8NWIUdG7X54Nh3H/Ew8EoOrmM7N6338pOLe6xL/Ac2jylyf4Q915VafR6o51Xjp+gEv0 FN1aF2FpchZzIc++cpmiBWQ+qF2Oly8oEri2jGbqcucC3SqA63SIyjHXEgw/Zu4K/y7Y VSIHWAoSNtHXfNvQs8nOxwCnyNW0G93jkz+WpBnU7kjecD16sUIJz4WshJKqQe2XH1kl v/XEiqFYzAZ1+dOJ+0SJREmzluF2pyJPT1fsPgXCJz8gMuak9FlkykTd9FfITkvQM7mc +2gQ== X-Gm-Message-State: AOJu0YwbR2TZ1IW0dSU9Tw8lQyT7ElGsDV5PEU5dNK8nw2CPoAY7W6Sq TYj4PFXRZpK2Uzr+ZbyxNQiPKbBEXbjoxSGqsds= X-Received: by 2002:a05:6000:180d:b0:32d:88dd:419b with SMTP id m13-20020a056000180d00b0032d88dd419bmr740659wrh.35.1697021013115; Wed, 11 Oct 2023 03:43:33 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id t25-20020adfa2d9000000b0032d8373fbe4sm1804097wra.51.2023.10.11.03.43.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:43:32 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8C9B91FFCE; Wed, 11 Oct 2023 11:33:32 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Matt Borgerson , =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , Paolo Bonzini Subject: [PULL 22/25] plugins: Set final instruction count in plugin_gen_tb_end Date: Wed, 11 Oct 2023 11:33:26 +0100 Message-Id: <20231011103329.670525-23-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: Matt Borgerson Translation logic may partially decode an instruction, then abort and remove the instruction from the TB. This can happen for example when an instruction spans two pages. In this case, plugins may get an incorrect result when calling qemu_plugin_tb_n_insns to query for the number of instructions in the TB. This patch updates plugin_gen_tb_end to set the final instruction count. Signed-off-by: Matt Borgerson [AJB: added g_assert to defed API] Message-Id: Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-23-alex.bennee@linaro.org> diff --git a/include/exec/plugin-gen.h b/include/exec/plugin-gen.h index 52828781bc..c4552b5061 100644 --- a/include/exec/plugin-gen.h +++ b/include/exec/plugin-gen.h @@ -20,7 +20,7 @@ struct DisasContextBase; bool plugin_gen_tb_start(CPUState *cpu, const struct DisasContextBase *db, bool supress); -void plugin_gen_tb_end(CPUState *cpu); +void plugin_gen_tb_end(CPUState *cpu, size_t num_insns); void plugin_gen_insn_start(CPUState *cpu, const struct DisasContextBase *db); void plugin_gen_insn_end(void); @@ -42,7 +42,7 @@ void plugin_gen_insn_start(CPUState *cpu, const struct DisasContextBase *db) static inline void plugin_gen_insn_end(void) { } -static inline void plugin_gen_tb_end(CPUState *cpu) +static inline void plugin_gen_tb_end(CPUState *cpu, size_t num_insns) { } static inline void plugin_gen_disable_mem_helpers(void) diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c index d31c9993ea..39b3c9351f 100644 --- a/accel/tcg/plugin-gen.c +++ b/accel/tcg/plugin-gen.c @@ -866,10 +866,14 @@ void plugin_gen_insn_end(void) * do any clean-up here and make sure things are reset in * plugin_gen_tb_start. */ -void plugin_gen_tb_end(CPUState *cpu) +void plugin_gen_tb_end(CPUState *cpu, size_t num_insns) { struct qemu_plugin_tb *ptb = tcg_ctx->plugin_tb; + /* translator may have removed instructions, update final count */ + g_assert(num_insns <= ptb->n); + ptb->n = num_insns; + /* collect instrumentation requests */ qemu_plugin_tb_trans_cb(cpu, ptb); diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index c5da7b32a5..575b9812ad 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@ -210,7 +210,7 @@ void translator_loop(CPUState *cpu, TranslationBlock *tb, int *max_insns, gen_tb_end(tb, cflags, icount_start_insn, db->num_insns); if (plugin_enabled) { - plugin_gen_tb_end(cpu); + plugin_gen_tb_end(cpu, db->num_insns); } /* The disas_log hook may use these values rather than recompute. */ From patchwork Wed Oct 11 10:33:27 2023 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: 731951 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp329624wrv; Wed, 11 Oct 2023 03:44:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF/0fz0nfqGc/jXMUkBezC0gamruGn8AY+Wsn9eLAO5+cAzpDHen+Vz1H5cYQbTfs7mXvvQ X-Received: by 2002:a05:620a:29c9:b0:777:6d:b877 with SMTP id s9-20020a05620a29c900b00777006db877mr15468068qkp.68.1697021068009; Wed, 11 Oct 2023 03:44:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697021067; cv=none; d=google.com; s=arc-20160816; b=YONlal5zNYSRQqwM0dhHV4VKJOG5n8/LnqBztWIW7ZIe5ce0FAvt0Xlr98hqQN3uTE c3mXRmC99N+ISaKd7yonql0xgxd/G8NYE6L5ZbOukRrBycyZrHfJnXqQY6TW8IRE5fPf 6hi3dZVV6/N/J6nAxSo6EdDoFuf7ievwi2pCPXhKoLVZWO+XqNC55r9hsDcOZfLcC2eE M6yKEw1WvFgHersVuJcQuzLuu2m7s+/o903mv0+6BqdcTnI9cnl4TmC1yh0wqFgi/lSs aEQK8RsC41r0Bq4yqHiNJ3eZD5faN0b55u/4sIrpXjf4dV2mPyDVFn70A6J9B4WMQed4 Vkzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=yf1R+Vby24DYe8++3MpeTUjuX+WlwLu5umzTar0tTFw=; fh=kyaHiEU+lIVT4poymSOoM0p0KZxXkvLW2auuM3J5H08=; b=1KBZe4fYh+d+ml4AXoVQ91SM/xNQdGfo+jzBDjBeLfyktGc/QQ6tuqLDd5bM2R4wRZ 90rGnSswi7GIwhHfVVA/KieFGo8TFBppyFgWP6v5uwHRxYmfJjh8vzanXeAy4k7q1PPs rODsZ8yWEN3WH/GgncKOfUaaEseu4QiRDZ51cMQDpkas4QjJ6bE5ON9zqO0IDPzuD0r5 k0icHs+QeZ2oIQ4aqktJNxClQDaKWqfdwpwm+58UitDXJ8txPAwOBHjvCEu+FL2k/RbB nTHX5wsmWpVSZdnEUR5qhItmTPx2+fvWQ+7kD7RTwn8C8Aa9NHokexuvv5V9Gvpr+Xuk Fs1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YeVqIpef; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id dp7-20020a05620a2b4700b0076eed2a7335si9197348qkb.57.2023.10.11.03.44.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:44:27 -0700 (PDT) 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=YeVqIpef; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWgk-0008BR-4k; Wed, 11 Oct 2023 06:43:38 -0400 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 1qqWgi-00089f-61 for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:43:36 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWgf-0007ep-JM for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:43:35 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-406619b53caso62326275e9.1 for ; Wed, 11 Oct 2023 03:43:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697021011; x=1697625811; 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=yf1R+Vby24DYe8++3MpeTUjuX+WlwLu5umzTar0tTFw=; b=YeVqIpef26BKWs8iXB1Jcni/siKmHcFUidjZE0hzSJtuYE8dwfVW+ZJeaSnO75aSi+ Y96PeHDi0ZhrcZXs0vfVeQvhyA+rIlpRv5g6n2wdY/uqHPYV+BbpJyuJtAcpZndB5b4c /YGCCxA066Zsl4QG8fhQetxUwuzWRm5V54a4nQoIDBphEsi5wKKTKpjZv1qevuEEF2BN FxOYBM3s8yJTsB30kTlHCHBT3kO4PBG4s2qm8YRFZsqQW8FMgeKuO0ApmsFKRDFkMt/s ik+vMARNMB5wgkyVL8V+cnyOLZncYTOPscjt7IUf5qZxNczoTyx46T8QusEGh0zYTBkv IuNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697021011; x=1697625811; 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=yf1R+Vby24DYe8++3MpeTUjuX+WlwLu5umzTar0tTFw=; b=jmZGiA2mkXjxciOfGWbA/EjPTOLSzlSo6NljNN5XHw0CffxUhR4sk4siNaw1Q7ZJBL P6VU2W+G2rl+t9aKWTs8gf2Jtp9/B5VuOVFBTilKUpMKDzIpKAcdBAyejh728sn83Pgj vwtmxNyJx8zP2XuRER3k5jaPg50rHETCFwCgc6PmmErcciAiO60+x2LJX5WYMO++4exw 64sZqvrZojkWuUzdNs9dNv8SSa97IRrUj9Y7HiLfJKpqAb01cX4TnOjlnR6gZOIKVTGi iI+pzgfspcSfLLeKJKjE1x/KlOsniLwyt7g/mexzbmmOXJgwMvfFtk5k2EGdadoJOJRh LSiw== X-Gm-Message-State: AOJu0Yyn6dfO9rqhJoHtx1RMoN6Unjf2H6XqGl+RXH6MjN5y1SA8vniY TA2nHJdnN9vVhrUwzlGjlbw/OLzvHv7Y8P/J16Y= X-Received: by 2002:a05:600c:3546:b0:406:8496:bd8b with SMTP id i6-20020a05600c354600b004068496bd8bmr16283352wmq.9.1697021011485; Wed, 11 Oct 2023 03:43:31 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id s4-20020a5d6a84000000b00327bf4f2f14sm15126848wru.88.2023.10.11.03.43.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:43:31 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A2A8A1FFBE; Wed, 11 Oct 2023 11:33:32 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Alexandre Iooss , Mahmoud Mandour Subject: [PULL 23/25] contrib/plugins: fix coverity warning in cache Date: Wed, 11 Oct 2023 11:33:27 +0100 Message-Id: <20231011103329.670525-24-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Coverity complains that appends_stats_line can be fed a 0 leading to the undefined behaviour of a divide by 0. Fixes: CID 1519044 Fixes: CID 1519047 Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-24-alex.bennee@linaro.org> diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 4fca3edd07..9e7ade3b37 100644 --- a/contrib/plugins/cache.c +++ b/contrib/plugins/cache.c @@ -535,15 +535,13 @@ static void caches_free(Cache **caches) } } -static void append_stats_line(GString *line, uint64_t l1_daccess, - uint64_t l1_dmisses, uint64_t l1_iaccess, - uint64_t l1_imisses, uint64_t l2_access, - uint64_t l2_misses) +static void append_stats_line(GString *line, + uint64_t l1_daccess, uint64_t l1_dmisses, + uint64_t l1_iaccess, uint64_t l1_imisses, + uint64_t l2_access, uint64_t l2_misses) { - double l1_dmiss_rate, l1_imiss_rate, l2_miss_rate; - - l1_dmiss_rate = ((double) l1_dmisses) / (l1_daccess) * 100.0; - l1_imiss_rate = ((double) l1_imisses) / (l1_iaccess) * 100.0; + double l1_dmiss_rate = ((double) l1_dmisses) / (l1_daccess) * 100.0; + double l1_imiss_rate = ((double) l1_imisses) / (l1_iaccess) * 100.0; g_string_append_printf(line, "%-14" PRIu64 " %-12" PRIu64 " %9.4lf%%" " %-14" PRIu64 " %-12" PRIu64 " %9.4lf%%", @@ -554,8 +552,8 @@ static void append_stats_line(GString *line, uint64_t l1_daccess, l1_imisses, l1_iaccess ? l1_imiss_rate : 0.0); - if (use_l2) { - l2_miss_rate = ((double) l2_misses) / (l2_access) * 100.0; + if (l2_access && l2_misses) { + double l2_miss_rate = ((double) l2_misses) / (l2_access) * 100.0; g_string_append_printf(line, " %-12" PRIu64 " %-11" PRIu64 " %10.4lf%%", l2_access, From patchwork Wed Oct 11 10:33:28 2023 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: 731957 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp330103wrv; Wed, 11 Oct 2023 03:45:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEKAGOBbZK2gnRZuRltAdnFbNrjYrGNvFtEBBjhY7Ig9XUcxcea1p5XfvTlIeFP2Mz2XNbf X-Received: by 2002:a05:620a:2847:b0:775:7fee:7913 with SMTP id h7-20020a05620a284700b007757fee7913mr23629148qkp.16.1697021133923; Wed, 11 Oct 2023 03:45:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697021133; cv=none; d=google.com; s=arc-20160816; b=0DatgOXHLa870Bq5w3TnmfF+5vBQFEUQr3fNCrQTofC81ku3LK1nfQ3kONlW0xWXMe BVOCQGMsSPAamngVzMAFN09vVtPnrPTLuaAnwNU8y5Lt7VoM+AX2X9esmaBrLTaGQOEe WaQBPK1q7sThCKOrVTFKogX5nBdoxKmtcGFnOKqlJU0ycZmAJty7sYz1Jt0x+JLMtoh7 ZBpOKTJaPNmsRxgsqYBg/WV+mjaBDl31sivBwXt7nrCKHJSGVt6DrV6OMhbB6DsbO0Ze pfBj7XW+Sm70F7LAntZoKLQHbpD/GxAPpNbHdbnu3zlrwpZq3MwOt8op1TCGfRwxxhHp RWfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=UzxurWFBanGJDGa17SzO9nkXVLYIxRz6NOFY5btFFbY=; fh=kyaHiEU+lIVT4poymSOoM0p0KZxXkvLW2auuM3J5H08=; b=tQ1OgIlktbu6CqqpedsZJx+2aQeMBWHVoKFfJ7N9jxW4dKh+7BEx+0/h+GDVzBl1ZF 1tL0yBEEtP+apFsWiLZB3xBWHAxXGeSCg9NIySoJtOMpBM5U9VLiqdOYruJZ6t91yq65 Au/WZn63fPCEKA9ZKEsJLONJRgmn/kHgLXUkG8NCvPGJa86B4/qvMmblk+m1NPKTMYDK BGQiB617/k824Vdv8wTS8LRVKRXF0Ou9r9sKd4dN1lRHRcU3SZeHuBCMMiRSr7nEvCy0 u1yBitwlKRIDW+hknLvv7FMVG4nLf/Ed6jXU8OsoVN9Ch23silM0EnqR6e3p0NctXgde DhWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YMm7N0b0; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v6-20020a05620a0f0600b007749dc7ce1bsi9222209qkl.752.2023.10.11.03.45.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:45:33 -0700 (PDT) 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=YMm7N0b0; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWgn-0008Ez-JM; Wed, 11 Oct 2023 06:43:41 -0400 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 1qqWgk-0008CS-WD for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:43:39 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWgi-0007fE-8m for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:43:38 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-32483535e51so6424182f8f.0 for ; Wed, 11 Oct 2023 03:43:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697021013; x=1697625813; 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=UzxurWFBanGJDGa17SzO9nkXVLYIxRz6NOFY5btFFbY=; b=YMm7N0b0Y/Wip/32VNVUBE58AJWrlJ8nRx9elgJIqICF/tYRqs4pjWN5aa9O6gDWOn yeGdUdMqt3K51vWvjf88ZAjwTKrXoEqOqHWSsE54BwHBnMiuKd1G/7+bLVLZaSwBVZi5 nrV1EZzdbNkyRfIuEoO5h+1RI8770wivX3vuLcX7AD9IoQ9GGk8MOhd9xiEfcBLErr0R n567WyjCuHf+TpACqQw0tYrHAYc4sRBF0z6IlPizyvNeIkQprgMps+Id3VZOQuJuxTER 6o+Y8d++8MDsLDCdMuS1LJN9XWqAMkdcfSCLGjbjZOl+vyKES9NXapRRCV7e8M6UghQK jk/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697021013; x=1697625813; 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=UzxurWFBanGJDGa17SzO9nkXVLYIxRz6NOFY5btFFbY=; b=qUNVyFxbslaUdbjRCJE2ZAZ83nMFiJrOT86hI1rMaGjfeMt7BddCkzEXtYbFJsT67V g94ExVN4Yd18LJ1UU0Qfj2Tzi6p4DWeculSjfQtZgQRs7EWMeG7SfzyYgY1kGPsfRGxa YqKBdmt15ullUM948IPiKE0810TDbIzOVfotYzeRzz6B41yABAgpxnLY6UeUnrRZs5fy cttdiGFRKBPLIY0lwh2/XlxQLPElsdIlJ0w3Od+n6DDMK0VXeWnXt0pVHcy4zGraiPvG Qpy3i6clEHptzDkPkQZ2B0DqxqhSfGCqfd1sVeiPx4EXSnGz9yUudzlGk2A6QVvF/eqX Eq+A== X-Gm-Message-State: AOJu0Yz4RIZKRH14eIhamKy6v94w3XKUeNfiX4gJukBq5IelJrD0aa2k 9F/DMmcQFCtgBY3LIOWB8py46g== X-Received: by 2002:adf:e607:0:b0:31f:b9ea:76c with SMTP id p7-20020adfe607000000b0031fb9ea076cmr17169987wrm.48.1697021012784; Wed, 11 Oct 2023 03:43:32 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id p4-20020a5d68c4000000b003232f167df5sm15134109wrw.108.2023.10.11.03.43.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:43:31 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B950A1FFCF; Wed, 11 Oct 2023 11:33:32 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Alexandre Iooss , Mahmoud Mandour Subject: [PULL 24/25] contrib/plugins: fix coverity warning in lockstep Date: Wed, 11 Oct 2023 11:33:28 +0100 Message-Id: <20231011103329.670525-25-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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 Coverity complains that e don't check for a truncation when copying in the path. Bail if we can't copy the whole path into sockaddr. Fixes: CID 1519045 Fixes: CID 1519046 Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-25-alex.bennee@linaro.org> diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index 682b11feb2..f0cb8792c6 100644 --- a/contrib/plugins/lockstep.c +++ b/contrib/plugins/lockstep.c @@ -245,6 +245,7 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) static bool setup_socket(const char *path) { struct sockaddr_un sockaddr; + const gsize pathlen = sizeof(sockaddr.sun_path) - 1; int fd; fd = socket(AF_UNIX, SOCK_STREAM, 0); @@ -254,7 +255,11 @@ static bool setup_socket(const char *path) } sockaddr.sun_family = AF_UNIX; - g_strlcpy(sockaddr.sun_path, path, sizeof(sockaddr.sun_path) - 1); + if (g_strlcpy(sockaddr.sun_path, path, pathlen) >= pathlen) { + perror("bad path"); + return false; + } + if (bind(fd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)) < 0) { perror("bind socket"); close(fd); @@ -287,6 +292,7 @@ static bool connect_socket(const char *path) { int fd; struct sockaddr_un sockaddr; + const gsize pathlen = sizeof(sockaddr.sun_path) - 1; fd = socket(AF_UNIX, SOCK_STREAM, 0); if (fd < 0) { @@ -295,7 +301,10 @@ static bool connect_socket(const char *path) } sockaddr.sun_family = AF_UNIX; - g_strlcpy(sockaddr.sun_path, path, sizeof(sockaddr.sun_path) - 1); + if (g_strlcpy(sockaddr.sun_path, path, pathlen) >= pathlen) { + perror("bad path"); + return false; + } if (connect(fd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)) < 0) { perror("failed to connect"); From patchwork Wed Oct 11 10:33:29 2023 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: 731953 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp329762wrv; Wed, 11 Oct 2023 03:44:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEqsL4zGUDk1zMaXM106sCojIRduNoxM/dXaskq1AiJ51dIfa57SCE5I8AxJBUdhaQ31WSR X-Received: by 2002:ac8:5a96:0:b0:419:52a9:9ffb with SMTP id c22-20020ac85a96000000b0041952a99ffbmr26126189qtc.20.1697021087794; Wed, 11 Oct 2023 03:44:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697021087; cv=none; d=google.com; s=arc-20160816; b=tkVBqqyQQPu9cR/DY0aZE9kd8ygbEszD3w8qntETBhpXv5sA8bl/6QXNUl3onkG5sm /2Kr8gbgpuTdV3vaD4GFWUK1xVUZrlTOoNqgPYdbTlDz31vnaxi5MbSXhR31+TAvRwJH eMxJC5qTB6CvV7Y87BkUte9ciw6APYjF2uFMgpTGPp9abIvTgvYAJYSZ4pn+ivrbAGaH jaJDm11ufljdpdaYdOM7pK+nAhwugWgC1jmWvucfMQmyg0hXLwdhrRLn972ITVArazYT DjSWnQBxqU80dyqGogsUhtpf3ldwVMeX8slnK9HGuY8xY533ru1zg8LKOIWBfJP/N7mO H2bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=3iJ/Q4kLUmKoxSHeooZspyIFZM2wlJ6x5Q8adgv7bVI=; fh=MOgXiCNKOFQwr3hqCTX2grTRnIBGvMJ4nhNOMG8D9zI=; b=I6ih92SABqAx5oR0sEem0xr3UHCx4Ler9kqFlQYaUpqweRQJ8q0TSFfSBVlqyevVaW v8iYVNP4Y+Ao73zQLb5ifR7vo5TyJREUekllB6EXZ3G3udK4Kw8oyut80XJXCd2E526/ 9I0HmeV1n1YBVLFttEm6ZL3Pdpr6YZwGnwCK0GNkWXeg5tp/1YB+wlaW3sAI7NIYkPxE aZD9+07HI9vjXyiAB4FxPCTj9wxxjzxVRq796CTyoi8dnNHTtDeAKBfiJvxP3PbnIZpZ h8l2J8jIklVzuwsVLSkrLLq7d/J4G7XTFkTtFodHZ7UIwBKwQMreoOJMTJqZ6cBtd3JS D0rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="KXDO/TWv"; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d22-20020a05622a101600b00410a562b415si9296528qte.529.2023.10.11.03.44.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:44:47 -0700 (PDT) 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="KXDO/TWv"; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWgj-0008Aq-9o; Wed, 11 Oct 2023 06:43:37 -0400 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 1qqWgi-00089h-7U for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:43:36 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWgf-0007ek-EB for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:43:35 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-40572aeb73cso62265705e9.3 for ; Wed, 11 Oct 2023 03:43:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697021011; x=1697625811; 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=3iJ/Q4kLUmKoxSHeooZspyIFZM2wlJ6x5Q8adgv7bVI=; b=KXDO/TWvUMIEJSSVShYe4JA54qR6qOapaJJOHUCaqUzLWXerUNVUPnX6kbC7Q6D9vx RTt1rgEY+vfOhYnjG7quRbs786dccVibEODdbvcB33fFCXuSDu3HKUB16bj3BUv7w7p+ 3/lIsJMcaNxZ/v1PTotyyMnRLEcAbzRM5G0L+iaAebpUOb+gDF8uHm5vdHOxQzIuZIQp H56F0J/9ASQ5gGUDHPLAANbkHpJZOIzhSplVG5M2Rf8Fpc4sxW4jcWXGVilnT3V9+xC9 zff5XAUOvuWgmXGhwEvgMTNNS2amFFdXXrUBVn/w2oWcbZYSkCwTpFjqqDadi/IB5EFt zu7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697021011; x=1697625811; 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=3iJ/Q4kLUmKoxSHeooZspyIFZM2wlJ6x5Q8adgv7bVI=; b=qKUlrKQWxjMo5972E3D0+TlSb7NW+q1pRCJeJ0lX0tkK/IQwfORgKZOYIgx2xXTSnT C+yKpJ1pYU0CoYcnlHAbE6N0a3YUI8zhzZVbiB7KJhrZfB/DdaubVr6fmwaFVX4ocXQB fnK0cQmZqrBK7znexyq7a70eAsuWDrkOwsNY1CAI7a5abJ8o3DHPnCZczH3PEGLHLBo8 LXMmmqlgFjRC9uAFoOsBmmrQV46iZBqyFCeYv2Rm2qOds83sAcScLhzTXJwdGAhkZ7pg HyL2NtjNseV4mxf69FvPUJl9VbysqW+vIjIoMWeYljWC1Z5x2cLFBk0pgn+qnLkjPh+2 SpkA== X-Gm-Message-State: AOJu0YxCPOtoMVWe281Z0tg5Y/PLLr+FDEm1LfW0XV+LDxAab3grybwR NJ9P+GwkgMAKHInOaUf6uFFfdw== X-Received: by 2002:a05:600c:231a:b0:3fe:f667:4e4c with SMTP id 26-20020a05600c231a00b003fef6674e4cmr18428821wmo.12.1697021011102; Wed, 11 Oct 2023 03:43:31 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id q5-20020a7bce85000000b0040596352951sm18871220wmj.5.2023.10.11.03.43.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:43:30 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D06BF1FFBF; Wed, 11 Oct 2023 11:33:32 +0100 (BST) 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?= , Alexandre Iooss , Mahmoud Mandour Subject: [PULL 25/25] contrib/plugins: fix coverity warning in hotblocks Date: Wed, 11 Oct 2023 11:33:29 +0100 Message-Id: <20231011103329.670525-26-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x331.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Coverity complains that we have an unbalance use of mutex leading to potential deadlocks. Fixes: CID 1519048 Fixes: a208ba09bd ("tests/plugin: add a hotblocks plugin") Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-26-alex.bennee@linaro.org> diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 6b74d25fea..4de1b13494 100644 --- a/contrib/plugins/hotblocks.c +++ b/contrib/plugins/hotblocks.c @@ -69,8 +69,8 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) } g_list_free(it); - g_mutex_unlock(&lock); } + g_mutex_unlock(&lock); qemu_plugin_outs(report->str); }