From patchwork Mon Jul 22 11:03:58 2024 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: 813703 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp1810820wro; Mon, 22 Jul 2024 04:04:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW1uXLb+J1J1krbKRbo+6IVvsuX6gAusw8fY/H4i5G1MsLEv/ROcMtc+BcGpSbYaGOWcyYcN3WwzxmM1kffTsk7 X-Google-Smtp-Source: AGHT+IEuQQV2CNtOpulMJs1XKAThkW1EkLBEmPmOi5W/BYYVEpNyTNdZCnViHgJ4Q3tb+zYy26HE X-Received: by 2002:a05:6214:202a:b0:6b2:da3d:999f with SMTP id 6a1803df08f44-6b9610f04aamr116173196d6.41.1721646286285; Mon, 22 Jul 2024 04:04:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721646286; cv=none; d=google.com; s=arc-20160816; b=Oo3sJtpPooqKKWBC3680JDbUybud5YL3Tk7bu9xuTdE5wbzSH1TLQRwwFVul2nQaod 63vWMlnjpKl9rRDFE4HjKqrpj0jFKYJn0/F14Hho7GOiabee6RRAJTRPDzKpoIQdcQe3 R2WcSKUO7r49Vs1i1hK5U2mYzeOomXG4fLIq4bvvoN8EkcmJLrwA+mm8G38bsZs92/4Q pa/w21d4Vrp3YCYGVGvykT2AqFSIrgfS5Qpj/FxxRz9clGqr6AGZeX5E15TJ8rAeDML2 1YNBp5M4T5czHcsL5Mb32NRCLrCU0JZI7OZFHCmWlMIIstamRhNnW77Z2IoUEoA+K2kT oB6A== 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=1UxZeJVXfh506tEb3223GmpHqSZOGPy9dFtloKHCAl0=; fh=+tTXSbSzvJSBfym5G2w1r4usy+PpkPG8H4ybSlmiAaM=; b=MkyAHM65dT75R8u0jOLD6ylaBWm6xzXZ3JjtzC1t8BK9ip3RFarK8mkmkdSIvVBmHb VlnUQRf1SZViKNXbsNDoxKXStibwBD0rCPPl0kZ+DOploAFhh551N4RJaTHEZeM5uMSx PY60xxG/z4yH4yt5iOWTTYdiy7gVy8tET1HIhPaoUcoG/jghAcE0mlSoOivsZqcUHFq5 cKSPuS8HqrAiznNeleIL1nlfKFIgc+IHG1kByZlgJ7HgvLqhvFHlyEDNf8fRPNTk/+Iz 5S9GgYtV0vWDECam+p/eoF1dHGBehfkQZn4C5i0W9Z7Qi5lnhQZIEf5Ico9pGeVeUxDn KpPA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DmUZzPMY; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6b7ac7a24d3si72471816d6.43.2024.07.22.04.04.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jul 2024 04:04:46 -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=DmUZzPMY; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVqq5-0005Uc-Qy; Mon, 22 Jul 2024 07:04:21 -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 1sVqq4-0005T6-0G for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:20 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sVqq2-0002RB-48 for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:19 -0400 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5a15692b6f6so3395112a12.0 for ; Mon, 22 Jul 2024 04:04:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721646256; x=1722251056; 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=1UxZeJVXfh506tEb3223GmpHqSZOGPy9dFtloKHCAl0=; b=DmUZzPMYBUaXr++d7/FNchIF+2GzAONswbftFjgg2nJtyMwKspeCaVipPxBK2LbTPD 8KSNsvcWHqoPPuLHyW37aq7UCiTezGpu+vMnc2wuvQs1jovzeysAxi53NY52Ty/thhX7 gm8llfSQD0t5y0Dqy2ODrBfsF5ryNyKwdcaCvrYhb4MZDZM5XTLq6QJCPfLF4DYd5KaG f8ntZUbPNvf4fcDMmPADSagdd5obrp/hqmOpkdIr+jA3Yn94CxtuPrQ1MP3/5ni241iS 9m4dV3ZmDCbnrYky0jy481ZbQ1i4FLA2r2g5M+aah3CmkogUoXbpngem7KRYAKDksplN xH9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721646256; x=1722251056; 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=1UxZeJVXfh506tEb3223GmpHqSZOGPy9dFtloKHCAl0=; b=mu2UYkuojyvdy+NmEkZpDEe95sbnFHcuKmiszhlMF8jmOn9IVI1HHmTTTTdY+JN1uS rN5AvywOx4emm8LRCehIgxTVVvP6g2iEODYjVyHzUO47mxnFaxe/7EqMw599LD3Wm5fy bg+hVYRCdJDaLEX9FTU2UoMLzdOsyk54wVhM6iurJxVNjPauEpOJw6fCIVlDeK8R/3K0 Dbfj/fjLtC0/jUTxudzEjTihsRs5pL5O6Q9QYpiHi/Mq/p8d1m5iQ4kP1c/v67LuKY95 +z3Lr+6hRBGGUS/kEWR0koUe+r0/EbHZYldDom7ey7fHC96E/k9/zVnhGANtQk4FIanI duOA== X-Gm-Message-State: AOJu0Yxw/c+W7SU5a1QKQDfTTesnRnoWqD0G76A+EjN7WDLSutSdNhuU RR5w7DPInCirOwpvA4c2GoQPk6WlgN/zjQzhbERpfBJDvTQLNZ1C/QLAA0u+cqk= X-Received: by 2002:a17:907:940e:b0:a72:6b08:ab24 with SMTP id a640c23a62f3a-a7a4bfa3dcdmr451066366b.14.1721646255614; Mon, 22 Jul 2024 04:04:15 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7a3c95088fsm406324566b.212.2024.07.22.04.04.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 04:04:14 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id A57DC5F8FC; Mon, 22 Jul 2024 12:04:13 +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?= , Ed Maste , Li-Wen Hsu , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 01/16] testing: bump to latest libvirt-ci Date: Mon, 22 Jul 2024 12:03:58 +0100 Message-Id: <20240722110413.118418-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240722110413.118418-1-alex.bennee@linaro.org> References: <20240722110413.118418-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x536.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This brings in the latest python mappings for the BSD updates. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20240718094523.1198645-2-alex.bennee@linaro.org> diff --git a/.gitlab-ci.d/cirrus/freebsd-13.vars b/.gitlab-ci.d/cirrus/freebsd-13.vars index 3785afca36..29ab9645f9 100644 --- a/.gitlab-ci.d/cirrus/freebsd-13.vars +++ b/.gitlab-ci.d/cirrus/freebsd-13.vars @@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake' NINJA='/usr/local/bin/ninja' PACKAGING_COMMAND='pkg' PIP3='/usr/local/bin/pip-3.8' -PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson mtools ncurses nettle ninja opencv pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-tomli py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy sndio socat spice-protocol tesseract usbredir virglrenderer vte3 xorriso zstd' +PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson mtools ncurses nettle ninja opencv pixman pkgconf png py311-numpy py311-pillow py311-pip py311-sphinx py311-sphinx_rtd_theme py311-tomli py311-yaml python3 rpm2cpio sdl2 sdl2_image snappy sndio socat spice-protocol tesseract usbredir virglrenderer vte3 xorriso zstd' PYPI_PKGS='' PYTHON='/usr/local/bin/python3' diff --git a/tests/lcitool/libvirt-ci b/tests/lcitool/libvirt-ci index 0e9490cebc..789b4601bc 160000 --- a/tests/lcitool/libvirt-ci +++ b/tests/lcitool/libvirt-ci @@ -1 +1 @@ -Subproject commit 0e9490cebc726ef772b6c9e27dac32e7ae99f9b2 +Subproject commit 789b4601bce4e01f43fdb6ad4ce5ab4e46674440 diff --git a/tests/vm/generated/freebsd.json b/tests/vm/generated/freebsd.json index 2d5895ebed..2a361cecd0 100644 --- a/tests/vm/generated/freebsd.json +++ b/tests/vm/generated/freebsd.json @@ -51,13 +51,13 @@ "pixman", "pkgconf", "png", - "py39-numpy", - "py39-pillow", - "py39-pip", - "py39-sphinx", - "py39-sphinx_rtd_theme", - "py39-tomli", - "py39-yaml", + "py311-numpy", + "py311-pillow", + "py311-pip", + "py311-sphinx", + "py311-sphinx_rtd_theme", + "py311-tomli", + "py311-yaml", "python3", "rpm2cpio", "sdl2", From patchwork Mon Jul 22 11:03:59 2024 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: 813708 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp1811333wro; Mon, 22 Jul 2024 04:05:53 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVtOx2bXc+dR2NIJY8/PKNYPcp86uFz6LS3i17z7CJsbKtwYeLvZ/T+x2tuMO22+2NGp4W2AvUv72j2i0e8Ta1d X-Google-Smtp-Source: AGHT+IGm7vF6DSCTyCUXOqPKo4qNRDTw3PAj0u6oY+4X34PyoFKjxvKC5ED0Tnrtp5sXY4PfOusk X-Received: by 2002:ac8:5e12:0:b0:447:d640:aabc with SMTP id d75a77b69052e-44fa538f74bmr98195201cf.63.1721646353434; Mon, 22 Jul 2024 04:05:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721646353; cv=none; d=google.com; s=arc-20160816; b=sD4KkXIxUjttx5BmWYhZUp24GT/wuC+zO2mtYBNr2x1brSoKxRQqzvTk3iOTwzK2DK 1tbZ0Nl9JSZdi6pGqTY6qgySObicxGD0XZtUq3IptVmZPOU+gHdznXuVfW1YA8JqEhqt Rjcu8LboJGDb/GKnLGBW9J74zpCThW6WZyE9AZWmEaeOyutGG1RNh4TnGWc9YpNDPHv5 SIFeKH5GTh7WLsU+6uW95CaBUHcbszZ9K6zrph5JqMome+jzvWyCdnh1weGCuzWgtcth IxVHtuCG1E3tSDR0NlSHr5ZwzpaNubWnt0teXw/gdfb9XbRcJyDbRoFHtNs7pI0gWCpg +D9g== 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=B/uzwaGj2Fi8+Yx5qy3aEaskQ+qw83w2a8whjBsiJBo=; fh=GfIFuf7i6ltuyccu6FxK8uqJ25FczkZRFX0wnzQEXuM=; b=FpphuuG7TOVIvvVyKArGdeAh5K+aGGpFnjKO2DQ8WRn4U3DxlJ7YkMe/jRGfPPcit/ uLixIla1qGcsH9gH/zVguCYc+aKeLvd/VTJgAWAM3z7eZd/LwD/2nYkAxeArAyZqoQN2 8MJGZNsnB3riq/8JqOuYuupidb52le4EJNdgriLf3lZNZexUR+QOEsTPkPImfYYVWbkf oqmPeMrz5JCRB9bm7xMFzC1njTCZcrTobkqrBDo0jb+lkWkMv5KqNAtVYyn76f/ZPNnL SoMCDXlRiO01kT4EpK7yuRB3+WhySpEdXc7CaB6WJQCP2quSQfR8EB64YVRNd1AbfsyW uATQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l0AFLjkx; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-44f9cdbb3ebsi74771081cf.298.2024.07.22.04.05.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jul 2024 04:05: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=l0AFLjkx; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVqq8-0005dS-1M; Mon, 22 Jul 2024 07:04:24 -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 1sVqq5-0005UF-HD for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:21 -0400 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sVqq3-0002RJ-4y for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:21 -0400 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a77e5929033so412109466b.0 for ; Mon, 22 Jul 2024 04:04:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721646257; x=1722251057; 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=B/uzwaGj2Fi8+Yx5qy3aEaskQ+qw83w2a8whjBsiJBo=; b=l0AFLjkxU3lP1p+y3t5/Dp16CmSqSHRt6aJl8bsPEuy9Fet+BGa97uUuFV0vw6UQIZ +z+2h395kl2OaThtl45sFt98WTksSZLekX5rIz8zRLsDEhJyMIOFT79BU654nLKStEfc KaAP/U3lTF2/57cjsHJ6C6g4vVuukO9EP3B3tQrjZga2eZfgRnSC8qRBIWCkXmmqmrYV KpuE4llUjunNEqllB4RrwhevKMndytABWUQWGAjDlLlFf/zYiC/RrelFEJ3qgVa4SaTy 9SGnP9wA6UOIiRO4uNw96K6G4njwKGa245RDHzLtoyvifT0SYwHAJ25sEdL6gIbmYY+q Itmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721646257; x=1722251057; 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=B/uzwaGj2Fi8+Yx5qy3aEaskQ+qw83w2a8whjBsiJBo=; b=w20uA4LzjCqL3oYYZ8uJ6TQr1Eqmk9ILMJy/3cisrjPiegalu/Q5XSJhexvlmFx/SA vERNSNDj/4owIbTvkmubQhyzxk27s5Odx3e+seuGEJ6xlbr3Tb060+DcuRlH1bIfMs0D uZHD/0IUmWf40j1VDim5RzIhkG7VQNoeCLkwEjbNrweVgy6E9mGbrVInMD7odJpD+a17 ikd34S9WxEhLpSgbVA6AkxBPiBPGBtX2JOHMgtG9Y21AsaIVG7BJzVpZNeJALuputcId fdQfl13xsOKpQbzTxdC6j+ksYN0PoPMiJPtGwztCxgi+YMKsma3t1EuigS3Xomx3h7ps XSSg== X-Gm-Message-State: AOJu0YxGl0Azu4rYoD9uBdjFK/tqCEofI6HSa4mmUVR8F1RB0ZNbIMzL /FVpTNXvp1tDL7cPn0nRNsIP/ZPKJxBZ4QISxhYY8pP34Qt+VMVG1rNAkVi0ci0= X-Received: by 2002:a17:907:2dab:b0:a72:7603:49ef with SMTP id a640c23a62f3a-a7a4c1216ffmr469782566b.35.1721646257367; Mon, 22 Jul 2024 04:04:17 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7a81cd53d6sm2675266b.139.2024.07.22.04.04.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 04:04:14 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id BCAA05F931; Mon, 22 Jul 2024 12:04:13 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Thomas Huth , =?utf-8?q?Cl=C3=A9ment_Chigot?= , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= Subject: [PULL 02/16] tests/avocado: Remove non-working sparc leon3 test Date: Mon, 22 Jul 2024 12:03:59 +0100 Message-Id: <20240722110413.118418-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240722110413.118418-1-alex.bennee@linaro.org> References: <20240722110413.118418-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Thomas Huth The test has been marked as broken more than 4 years ago, and so far nobody ever cared to fix it. Thus let's simply remove it now ... if somebody ever needs it again, they can restore the file from an older version of QEMU. Signed-off-by: Thomas Huth Reviewed-by: Clément Chigot Acked-by: Alex Bennée Message-Id: <20240710111755.60584-1-thuth@redhat.com> [AJB: fix MAINTAINERS] Signed-off-by: Alex Bennée Message-Id: <20240718094523.1198645-3-alex.bennee@linaro.org> diff --git a/MAINTAINERS b/MAINTAINERS index 7d9811458c..d5ff6c2498 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1727,7 +1727,6 @@ S: Maintained F: hw/sparc/leon3.c F: hw/*/grlib* F: include/hw/*/grlib* -F: tests/avocado/machine_sparc_leon3.py S390 Machines ------------- diff --git a/tests/avocado/machine_sparc_leon3.py b/tests/avocado/machine_sparc_leon3.py deleted file mode 100644 index e61b223185..0000000000 --- a/tests/avocado/machine_sparc_leon3.py +++ /dev/null @@ -1,37 +0,0 @@ -# Functional test that boots a Leon3 machine and checks its serial console. -# -# Copyright (c) Philippe Mathieu-Daudé -# -# This work is licensed under the terms of the GNU GPL, version 2 or -# later. See the COPYING file in the top-level directory. - -from avocado_qemu import QemuSystemTest -from avocado_qemu import wait_for_console_pattern -from avocado import skip - - -class Leon3Machine(QemuSystemTest): - - timeout = 60 - - @skip("Test currently broken") - # A Window Underflow exception occurs before booting the kernel, - # and QEMU exit calling cpu_abort(), which makes this test to fail. - def test_leon3_helenos_uimage(self): - """ - :avocado: tags=arch:sparc - :avocado: tags=machine:leon3_generic - :avocado: tags=binfmt:uimage - """ - kernel_url = ('http://www.helenos.org/releases/' - 'HelenOS-0.6.0-sparc32-leon3.bin') - kernel_hash = 'a88c9cfdb8430c66650e5290a08765f9bf049a30' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) - - self.vm.set_console() - self.vm.add_args('-kernel', kernel_path) - - self.vm.launch() - - wait_for_console_pattern(self, 'Copyright (c) 2001-2014 HelenOS project') - wait_for_console_pattern(self, 'Booting the kernel ...') From patchwork Mon Jul 22 11:04:00 2024 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: 813709 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp1811383wro; Mon, 22 Jul 2024 04:06:01 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXwPngJao7UZLG6o1iTk5cg3RIKkhCbL09B4/LFo7wIFSz6svaTjuh/bXiE7uleg7x7S8j6Et/bkQNJKRI13hRv X-Google-Smtp-Source: AGHT+IGmHA9GRN5wDJQgvkaj9qBZR7NkXmToViH08EoK/LBiEpGyr7te61BzbExsnk+c7x47+G/a X-Received: by 2002:a05:6214:29ea:b0:6b7:a3f1:3251 with SMTP id 6a1803df08f44-6b95a794074mr91348046d6.51.1721646361699; Mon, 22 Jul 2024 04:06:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721646361; cv=none; d=google.com; s=arc-20160816; b=DsWnOtvC3aQxCmKs9KgGvjIFk+naEwlkc1YWjUNqJ9KtnJobiAT9UD9CijoOJ7pPw9 6uniaBNP8DBzV+tiVOyQeX8qw/+A+AhHp0w2MHNA3bQZPVNdRUTJNh0ATjh7pt2VHA0U UmovSTTnDi+u/IGhq3SrD3WzxlkWfS3/8+piXouCLZh9Cl9ABux6zwUqkcj8e3YUaLmY KDdG203n4sGFiayEsiO1jKtYQlxxXlWj26O3tztL7dBoDuS1BLzwPKWAqt74ngyoUF6e rsDo3hdZmgNq9KJ+IC1oJhk5E1wOsDiDEbOkpNUlm/Bot094SznaPd8VdlrxN8cs6hpv 3j2w== 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=HOA3flkzKrxX9n6zT74lJ3BeaHTQSwskXB32JdvIhZs=; fh=V3SahL3bHQhKsmgBMuM5Lhl/PeLS/lM1PzccrPFr5xU=; b=uvPpsdSWxvuuYlgcraeDPuxqH8NUH+z6fMLUcd+8e08sgHNcedfQjeaZ9e6HB11vn/ 9yMEzW5oeKraVTLD3myTjHJKmtYRId7PwxwvNbEgBQit9HWpnUXlHa6hMKwuzSvsDDEh XLH+GM7H90CuMgxg+PiooYkKSj4BR2uFy7oAfchk3bfOhA0+QB/+ywOnfNXdnQQK7RiC VaiYxMAUAgabRi3T0MKj+wCFMdQORYHCMXux6S0d9HmfkINz4iL7y2Bbiq0DpDmZuUKS 8tErKpUTDVU+ZnHhrk/6o8q6iFnbfo60n0lgnduEVPHPeemBjVSQDlgfCcjSUEB7uY7I lilg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QhM0veX8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6b7acafd93esi75376606d6.495.2024.07.22.04.06.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jul 2024 04:06:01 -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=QhM0veX8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVqq8-0005fa-Jt; Mon, 22 Jul 2024 07:04:24 -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 1sVqq6-0005Wt-DN for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:22 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sVqq3-0002RR-VB for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:22 -0400 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5a10835487fso3503326a12.1 for ; Mon, 22 Jul 2024 04:04:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721646258; x=1722251058; 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=HOA3flkzKrxX9n6zT74lJ3BeaHTQSwskXB32JdvIhZs=; b=QhM0veX8fSgUxwxhg5YMau6mnPPsLjAnW+z/M+us9jjv/w7+2wSHgcPhgg7upI8mce rq/YiG4+p0oAJEx7FlhStyGoIsmOuuc2pNOBLa5zW61ut4MNKdgcTGdZIHvY485hWpxc QS8ljbbUG8skwIMWqVsnYxR68gTlIqlwWtzW9k5uzk8JJuwQR2IxoYeBt8YT3/bYUlf/ zGS8zUJ3mNE1vvjw9pVMXyGmGd1Gc3Ewe/9EoeHT2CGTIcV9g2QmJRCIFPCtTcsN3qQN jVm+v49D8fboe7zD97HzH6tUg2IEt3TceEF/HfyEoxasPCCLuZAq5u4CgOWdi9RyAhJH D+3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721646258; x=1722251058; 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=HOA3flkzKrxX9n6zT74lJ3BeaHTQSwskXB32JdvIhZs=; b=ajuan/lhOSBJ6pz5bI37a9bLmu4gW4IFp5MS0sXS1NK6okyWUsng9RR3FZsTdTdb6d zKP5rNb4EKqMNafnAW2h+5oKhBFNG2XU8wQh+y/C9Ifhcbsxhzk9mSLGET7wUd32d7H6 gkq98LYf+6dc3gjug/41kBkwwr7AZH/RRFlGxalFv1I7YJcOkw69gxuU2VtrNG3bwuTT neV3n5RJQT1YAPbGySG9gfzKU0TeYNNY28Y5tPjBrs5+I8sExDmJmoO8Y4OlTfB68WIM 664LjwqCizH+8pYH9i9+vWarmNC4w6+hLAOGlb2IJGGjVDP+euoH0d6OJ83ZXs9EYhJb dZXw== X-Gm-Message-State: AOJu0Yy/XJxQnxvcpK8NL3igpiGKRM4/WFn0T5MeI0ZAC+AIXNucpRSI tKPfg30uSewHTNJlUA57Stclm06FDWQgSg4qf70Q6zIu5Oq2FioTqwNIz9myrUn5wo5k07rxoos u X-Received: by 2002:a17:907:968e:b0:a6f:1443:1e24 with SMTP id a640c23a62f3a-a7a4c0f43edmr470180166b.34.1721646257932; Mon, 22 Jul 2024 04:04:17 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7a3c922d15sm412555266b.168.2024.07.22.04.04.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 04:04:14 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id D9CDF5F948; Mon, 22 Jul 2024 12:04:13 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Akihiko Odaki , Gustavo Bueno Romero , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 03/16] gdbstub: Re-factor gdb command extensions Date: Mon, 22 Jul 2024 12:04:00 +0100 Message-Id: <20240722110413.118418-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240722110413.118418-1-alex.bennee@linaro.org> References: <20240722110413.118418-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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 Coverity reported a memory leak (CID 1549757) in this code and its admittedly rather clumsy handling of extending the command table. Instead of handing over a full array of the commands lets use the lighter weight GPtrArray and simply test for the presence of each entry as we go. This avoids complications of transferring ownership of arrays and keeps the final command entries as static entries in the target code. Cc: Akihiko Odaki Cc: Gustavo Bueno Romero Cc: Peter Maydell Reviewed-by: Gustavo Romero Signed-off-by: Alex Bennée Message-Id: <20240718094523.1198645-4-alex.bennee@linaro.org> diff --git a/include/gdbstub/commands.h b/include/gdbstub/commands.h index f3058f9dda..40f0514fe9 100644 --- a/include/gdbstub/commands.h +++ b/include/gdbstub/commands.h @@ -74,23 +74,28 @@ int gdb_put_packet(const char *buf); /** * gdb_extend_query_table() - Extend query table. - * @table: The table with the additional query packet handlers. - * @size: The number of handlers to be added. + * @table: GPtrArray of GdbCmdParseEntry entries. + * + * The caller should free @table afterwards */ -void gdb_extend_query_table(GdbCmdParseEntry *table, int size); +void gdb_extend_query_table(GPtrArray *table); /** * gdb_extend_set_table() - Extend set table. - * @table: The table with the additional set packet handlers. - * @size: The number of handlers to be added. + * @table: GPtrArray of GdbCmdParseEntry entries. + * + * The caller should free @table afterwards */ -void gdb_extend_set_table(GdbCmdParseEntry *table, int size); +void gdb_extend_set_table(GPtrArray *table); /** * gdb_extend_qsupported_features() - Extend the qSupported features string. * @qsupported_features: The additional qSupported feature(s) string. The string * should start with a semicolon and, if there are more than one feature, the - * features should be separate by a semiocolon. + * features should be separate by a semicolon. + * + * The caller should free @qsupported_features afterwards if + * dynamically allocated. */ void gdb_extend_qsupported_features(char *qsupported_features); diff --git a/target/arm/internals.h b/target/arm/internals.h index da22d04121..757b1fae92 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -359,8 +359,8 @@ void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu); void arm_translate_init(void); void arm_cpu_register_gdb_commands(ARMCPU *cpu); -void aarch64_cpu_register_gdb_commands(ARMCPU *cpu, GString *, GArray *, - GArray *); +void aarch64_cpu_register_gdb_commands(ARMCPU *cpu, GString *, + GPtrArray *, GPtrArray *); void arm_restore_state_to_opc(CPUState *cs, const TranslationBlock *tb, diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index b9ad0a063e..b7be8e5a44 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -1614,18 +1614,21 @@ static void handle_query_thread_extra(GArray *params, void *user_ctx) gdb_put_strbuf(); } -static char *extended_qsupported_features; -void gdb_extend_qsupported_features(char *qsupported_features) -{ - /* - * We don't support different sets of CPU gdb features on different CPUs yet - * so assert the feature strings are the same on all CPUs, or is set only - * once (1 CPU). - */ - g_assert(extended_qsupported_features == NULL || - g_strcmp0(extended_qsupported_features, qsupported_features) == 0); - extended_qsupported_features = qsupported_features; +static char **extra_query_flags; + +void gdb_extend_qsupported_features(char *qflags) +{ + if (!extra_query_flags) { + extra_query_flags = g_new0(char *, 2); + extra_query_flags[0] = g_strdup(qflags); + } else if (!g_strv_contains((const gchar * const *) extra_query_flags, + qflags)) { + int len = g_strv_length(extra_query_flags); + extra_query_flags = g_realloc_n(extra_query_flags, len + 2, + sizeof(char *)); + extra_query_flags[len] = g_strdup(qflags); + } } static void handle_query_supported(GArray *params, void *user_ctx) @@ -1668,8 +1671,11 @@ static void handle_query_supported(GArray *params, void *user_ctx) g_string_append(gdbserver_state.str_buf, ";vContSupported+;multiprocess+"); - if (extended_qsupported_features) { - g_string_append(gdbserver_state.str_buf, extended_qsupported_features); + if (extra_query_flags) { + int extras = g_strv_length(extra_query_flags); + for (int i = 0; i < extras; i++) { + g_string_append(gdbserver_state.str_buf, extra_query_flags[i]); + } } gdb_put_strbuf(); @@ -1753,39 +1759,58 @@ static const GdbCmdParseEntry gdb_gen_query_set_common_table[] = { }, }; -/* Compares if a set of command parsers is equal to another set of parsers. */ -static bool cmp_cmds(GdbCmdParseEntry *c, GdbCmdParseEntry *d, int size) +/** + * extend_table() - extend one of the command tables + * @table: the command table to extend (or NULL) + * @extensions: a list of GdbCmdParseEntry pointers + * + * The entries themselves should be pointers to static const + * GdbCmdParseEntry entries. If the entry is already in the table we + * skip adding it again. + * + * Returns (a potentially freshly allocated) GPtrArray of GdbCmdParseEntry + */ +static GPtrArray *extend_table(GPtrArray *table, GPtrArray *extensions) { - for (int i = 0; i < size; i++) { - if (!(c[i].handler == d[i].handler && - g_strcmp0(c[i].cmd, d[i].cmd) == 0 && - c[i].cmd_startswith == d[i].cmd_startswith && - g_strcmp0(c[i].schema, d[i].schema) == 0)) { + if (!table) { + table = g_ptr_array_new(); + } - /* Sets are different. */ - return false; + for (int i = 0; i < extensions->len; i++) { + gpointer entry = g_ptr_array_index(extensions, i); + if (!g_ptr_array_find(table, entry, NULL)) { + g_ptr_array_add(table, entry); } } - /* Sets are equal, i.e. contain the same command parsers. */ - return true; + return table; } -static GdbCmdParseEntry *extended_query_table; -static int extended_query_table_size; -void gdb_extend_query_table(GdbCmdParseEntry *table, int size) +/** + * process_extended_table() - run through an extended command table + * @table: the command table to check + * @data: parameters + * + * returns true if the command was found and executed + */ +static bool process_extended_table(GPtrArray *table, const char *data) { - /* - * We don't support different sets of CPU gdb features on different CPUs yet - * so assert query table is the same on all CPUs, or is set only once - * (1 CPU). - */ - g_assert(extended_query_table == NULL || - (extended_query_table_size == size && - cmp_cmds(extended_query_table, table, size))); + for (int i = 0; i < table->len; i++) { + const GdbCmdParseEntry *entry = g_ptr_array_index(table, i); + if (process_string_cmd(data, entry, 1)) { + return true; + } + } + return false; +} + - extended_query_table = table; - extended_query_table_size = size; +/* Ptr to GdbCmdParseEntry */ +static GPtrArray *extended_query_table; + +void gdb_extend_query_table(GPtrArray *new_queries) +{ + extended_query_table = extend_table(extended_query_table, new_queries); } static const GdbCmdParseEntry gdb_gen_query_table[] = { @@ -1880,20 +1905,12 @@ static const GdbCmdParseEntry gdb_gen_query_table[] = { #endif }; -static GdbCmdParseEntry *extended_set_table; -static int extended_set_table_size; -void gdb_extend_set_table(GdbCmdParseEntry *table, int size) -{ - /* - * We don't support different sets of CPU gdb features on different CPUs yet - * so assert set table is the same on all CPUs, or is set only once (1 CPU). - */ - g_assert(extended_set_table == NULL || - (extended_set_table_size == size && - cmp_cmds(extended_set_table, table, size))); +/* Ptr to GdbCmdParseEntry */ +static GPtrArray *extended_set_table; - extended_set_table = table; - extended_set_table_size = size; +void gdb_extend_set_table(GPtrArray *new_set) +{ + extended_set_table = extend_table(extended_set_table, new_set); } static const GdbCmdParseEntry gdb_gen_set_table[] = { @@ -1924,26 +1941,28 @@ static const GdbCmdParseEntry gdb_gen_set_table[] = { static void handle_gen_query(GArray *params, void *user_ctx) { + const char *data; + if (!params->len) { return; } - if (process_string_cmd(gdb_get_cmd_param(params, 0)->data, + data = gdb_get_cmd_param(params, 0)->data; + + if (process_string_cmd(data, gdb_gen_query_set_common_table, ARRAY_SIZE(gdb_gen_query_set_common_table))) { return; } - if (process_string_cmd(gdb_get_cmd_param(params, 0)->data, + if (process_string_cmd(data, gdb_gen_query_table, ARRAY_SIZE(gdb_gen_query_table))) { return; } if (extended_query_table && - process_string_cmd(gdb_get_cmd_param(params, 0)->data, - extended_query_table, - extended_query_table_size)) { + process_extended_table(extended_query_table, data)) { return; } @@ -1953,26 +1972,28 @@ static void handle_gen_query(GArray *params, void *user_ctx) static void handle_gen_set(GArray *params, void *user_ctx) { + const char *data; + if (!params->len) { return; } - if (process_string_cmd(gdb_get_cmd_param(params, 0)->data, + data = gdb_get_cmd_param(params, 0)->data; + + if (process_string_cmd(data, gdb_gen_query_set_common_table, ARRAY_SIZE(gdb_gen_query_set_common_table))) { return; } - if (process_string_cmd(gdb_get_cmd_param(params, 0)->data, + if (process_string_cmd(data, gdb_gen_set_table, ARRAY_SIZE(gdb_gen_set_table))) { return; } if (extended_set_table && - process_string_cmd(gdb_get_cmd_param(params, 0)->data, - extended_set_table, - extended_set_table_size)) { + process_extended_table(extended_set_table, data)) { return; } diff --git a/target/arm/gdbstub.c b/target/arm/gdbstub.c index c3a9b5eb1e..554b8736bb 100644 --- a/target/arm/gdbstub.c +++ b/target/arm/gdbstub.c @@ -477,11 +477,9 @@ static GDBFeature *arm_gen_dynamic_m_secextreg_feature(CPUState *cs, void arm_cpu_register_gdb_commands(ARMCPU *cpu) { - GArray *query_table = - g_array_new(FALSE, FALSE, sizeof(GdbCmdParseEntry)); - GArray *set_table = - g_array_new(FALSE, FALSE, sizeof(GdbCmdParseEntry)); - GString *qsupported_features = g_string_new(NULL); + g_autoptr(GPtrArray) query_table = g_ptr_array_new(); + g_autoptr(GPtrArray) set_table = g_ptr_array_new(); + g_autoptr(GString) qsupported_features = g_string_new(NULL); if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) { #ifdef TARGET_AARCH64 @@ -492,16 +490,12 @@ void arm_cpu_register_gdb_commands(ARMCPU *cpu) /* Set arch-specific handlers for 'q' commands. */ if (query_table->len) { - gdb_extend_query_table(&g_array_index(query_table, - GdbCmdParseEntry, 0), - query_table->len); + gdb_extend_query_table(query_table); } /* Set arch-specific handlers for 'Q' commands. */ if (set_table->len) { - gdb_extend_set_table(&g_array_index(set_table, - GdbCmdParseEntry, 0), - set_table->len); + gdb_extend_set_table(set_table); } /* Set arch-specific qSupported feature. */ diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c index 2e2bc2700b..c8cef8cbc0 100644 --- a/target/arm/gdbstub64.c +++ b/target/arm/gdbstub64.c @@ -564,7 +564,7 @@ enum Command { NUM_CMDS }; -static GdbCmdParseEntry cmd_handler_table[NUM_CMDS] = { +static const GdbCmdParseEntry cmd_handler_table[NUM_CMDS] = { [qMemTags] = { .handler = handle_q_memtag, .cmd_startswith = true, @@ -590,17 +590,16 @@ static GdbCmdParseEntry cmd_handler_table[NUM_CMDS] = { #endif /* CONFIG_USER_ONLY */ void aarch64_cpu_register_gdb_commands(ARMCPU *cpu, GString *qsupported, - GArray *qtable, GArray *stable) + GPtrArray *qtable, GPtrArray *stable) { #ifdef CONFIG_USER_ONLY /* MTE */ if (cpu_isar_feature(aa64_mte, cpu)) { g_string_append(qsupported, ";memory-tagging+"); - g_array_append_val(qtable, cmd_handler_table[qMemTags]); - g_array_append_val(qtable, cmd_handler_table[qIsAddressTagged]); - - g_array_append_val(stable, cmd_handler_table[QMemTags]); + g_ptr_array_add(qtable, (gpointer) &cmd_handler_table[qMemTags]); + g_ptr_array_add(qtable, (gpointer) &cmd_handler_table[qIsAddressTagged]); + g_ptr_array_add(stable, (gpointer) &cmd_handler_table[QMemTags]); } #endif } From patchwork Mon Jul 22 11:04:01 2024 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: 813706 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp1811210wro; Mon, 22 Jul 2024 04:05:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWqLp+Ea56WNSHJsd+SspwchU18y4s7a70nvwAsUQMnSvIC+Pk4zG24KhidFBuIVHmZredGe5VB0Q3w5i3M2Qzw X-Google-Smtp-Source: AGHT+IFY5CadAa9YFHT7DQPQEdBu64nK7eV1KcHyWGmBheOcg4X5lxHUumqtIyV3Xv8tmkH3fslc X-Received: by 2002:a05:620a:290d:b0:79e:ff0d:1f49 with SMTP id af79cd13be357-7a1a133e2abmr639704885a.34.1721646336875; Mon, 22 Jul 2024 04:05:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721646336; cv=none; d=google.com; s=arc-20160816; b=FuFOBeoO5ANlwcW+ARZbBcUyBOk6e8rAXT5O3to4ytsMyhoCgZW2vgiO4Gr7hLe1Tx CK2LdRIYqYESRyTKpPOe7X7ekZG0WEvbfUgvyv9Fv37UidMhGHqhtHBozk0oN3KmZbb1 L2iPmQogO75LdgXGJidWTGQoNkuQaLWjO9oh49FMgoKMM68ewFBjjwKcQzuGZXoJeJXp 8pLHfOvkRzTvwhCz+dxJKTbyawQqy2jtP1IuYfIFXWhzdwS6ildRjra3pJIrXARYQUj2 dOayxGHpAwSuQWDGFu9EyjcpxNKKdRe4OR3c5C0m0j9buAPhYGUXa6vkRukWXSSX9Rzv JwYA== 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=rc/yY6n9+uzIblLVcOxQLSBJO6NUzRvL8eMhoaOnKuM=; fh=1PNDSUIgWMpxaJh2mfwmcRcPtq9I9Vv7ttnzcXFuxFg=; b=Ei9TvcfJs3I1RWWoBKjQhQHkeG57lSa395gCiRESm9LUboiUDrtWBB7BW+keUa3snt sYXLHhV+RUg3E5ZsrWglcae80EN0OamsK/v42Ncu4Jk0o2PlPoiehNJlegHPBilSW1ZT Y6+m+iRI3PBzdA0/k7Biy7opSeW7wOgihCQg3WkGEUVSuJ12zXhzaptlU8RKpwI6WMMS 0iZJCWgbb+CsbYUz5Od7kwfEqKaqcdJnhMxSWu/bu1MSdgnyxa4sZ5H6tOSHmrnmp0fA SqWb93s7jfEHIsdd2/pSxOFryjWEQkTTAj3KE5Lkcm7Vc/b6ZYK0aDSLl3Q1DxU530mF +Mbg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F9PJh7qh; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a198f98095si759956085a.3.2024.07.22.04.05.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jul 2024 04:05:36 -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=F9PJh7qh; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVqq8-0005gz-UV; Mon, 22 Jul 2024 07:04:24 -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 1sVqq6-0005VX-3V for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:22 -0400 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sVqq3-0002RO-Qk for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:21 -0400 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-52efd530a4eso2374475e87.0 for ; Mon, 22 Jul 2024 04:04:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721646258; x=1722251058; 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=rc/yY6n9+uzIblLVcOxQLSBJO6NUzRvL8eMhoaOnKuM=; b=F9PJh7qhTL7nfKidWlu0Y6z/JdxdaIotSS9jP4lKfb7DlwIKFLLZfzqGng0qcxmbLA PVOiv1iRenRx3Ws2uRsZ9txeq1fvB6j/2j2ZGiry2Od1CuwbJR04tTZkI5Zct2GQFXAe 8asmYqg/eLWnpXfmU3o1+Lj/iOeuCjCu1lHyb8N38LBNsHP1G3V7vpeOUxOunGq0bZmk TyNny389eBSCp7MJ14r1uqRQDx/RuDvffRh9qMPeVQboWVkIbYqK8JtkqqkbmY2bnDqn utOzVf36afpIMZgrCppJgAzaNXDmmSqqm0IEhHFZ2tbO+J9Lf+NvLlHx8VEKy6TlSe2v RfbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721646258; x=1722251058; 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=rc/yY6n9+uzIblLVcOxQLSBJO6NUzRvL8eMhoaOnKuM=; b=KD3raENBUcWpuBiG1whJ6P4JekuWmbvh/xfuQ5gzCF9bDbsCmWUPQAEAxXA2MjJESJ /6S4HipewuNL9f+Xft71pyuBEPiRqbM1Gz2ky6PxTKg2B1yxjarPuDPUO0C+/SCN2+TL sr+hWWNWdU0QnaybzdT39Y0hSfGrudXoKnchhSCcy9oa1NTaAr0rkhoY6rrMMG5DkOeu 0gtW1GGmzaYDqP5EiDyphhcPPLR23pKx9lQbsk0DkSYrjsxqe2xW5REKvFSriPL3OSkP oN4+fEF90W6bCKLdYOIo+m9cWjTnJFkJkvpr4FIVtAWbm1qZrQXP606y+F899zDLoeK+ eQeA== X-Gm-Message-State: AOJu0Yy/fTxcscQNiWgRT2ZzuamnSkEee+9nswMdqqyGIFwD2lNzsqTX 8eAQGHwStfrFzly70mHqQC03drRRAnLMIaEea33stE3gcXAb/vIekiOMsMBvFhY= X-Received: by 2002:a05:6512:a8d:b0:52e:9b9e:2c14 with SMTP id 2adb3069b0e04-52ee543f28amr10479329e87.60.1721646257613; Mon, 22 Jul 2024 04:04:17 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7a3c786032sm408823766b.34.2024.07.22.04.04.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 04:04:14 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id F3E7E5F94C; Mon, 22 Jul 2024 12:04:13 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Simon Hamelin , Alexandre Iooss , Pierrick Bouvier , =?utf-8?q?Alex_Benn=C3=A9e?= , Mahmoud Mandour , Richard Henderson , Paolo Bonzini Subject: [PULL 04/16] plugins/stoptrigger: TCG plugin to stop execution under conditions Date: Mon, 22 Jul 2024 12:04:01 +0100 Message-Id: <20240722110413.118418-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240722110413.118418-1-alex.bennee@linaro.org> References: <20240722110413.118418-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12d; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x12d.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: Simon Hamelin This new plugin allows to stop emulation using conditions on the emulation state. By setting this plugin arguments, it is possible to set an instruction count limit and/or trigger address(es) to stop at. The code returned at emulation exit can be customized. This plugin demonstrates how someone could stop QEMU execution. It could be used for research purposes to launch some code and deterministically stop it and understand where its execution flow went. Co-authored-by: Alexandre Iooss Signed-off-by: Simon Hamelin Signed-off-by: Alexandre Iooss Reviewed-by: Pierrick Bouvier Message-Id: <20240715081521.19122-2-simon.hamelin@grenoble-inp.org> Signed-off-by: Alex Bennée Message-Id: <20240718094523.1198645-5-alex.bennee@linaro.org> diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index f7d7b9e3a4..954623f9bf 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg-plugins.rst @@ -642,6 +642,28 @@ The plugin has a number of arguments, all of them are optional: configuration arguments implies ``l2=on``. (default: N = 2097152 (2MB), B = 64, A = 16) +- contrib/plugins/stoptrigger.c + +The stoptrigger plugin allows to setup triggers to stop emulation. +It can be used for research purposes to launch some code and precisely stop it +and understand where its execution flow went. + +Two types of triggers can be configured: a count of instructions to stop at, +or an address to stop at. Multiple triggers can be set at once. + +By default, QEMU will exit with return code 0. A custom return code can be +configured for each trigger using ``:CODE`` syntax. + +For example, to stop at the 20-th instruction with return code 41, at address +0xd4 with return code 0 or at address 0xd8 with return code 42:: + + $ qemu-system-aarch64 $(QEMU_ARGS) \ + -plugin ./contrib/plugins/libstoptrigger.so,icount=20:41,addr=0xd4,addr=0xd8:42 -d plugin + +The plugin will log the reason of exit, for example:: + + 0xd4 reached, exiting + Plugin API ========== diff --git a/contrib/plugins/stoptrigger.c b/contrib/plugins/stoptrigger.c new file mode 100644 index 0000000000..03ee22f4c6 --- /dev/null +++ b/contrib/plugins/stoptrigger.c @@ -0,0 +1,151 @@ +/* + * Copyright (C) 2024, Simon Hamelin + * + * Stop execution once a given address is reached or if the + * count of executed instructions reached a specified limit + * + * License: GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#include +#include +#include +#include +#include + +#include + +QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION; + +/* Scoreboard to track executed instructions count */ +typedef struct { + uint64_t insn_count; +} InstructionsCount; +static struct qemu_plugin_scoreboard *insn_count_sb; +static qemu_plugin_u64 insn_count; + +static uint64_t icount; +static int icount_exit_code; + +static bool exit_on_icount; +static bool exit_on_address; + +/* Map trigger addresses to exit code */ +static GHashTable *addrs_ht; + +static void exit_emulation(int return_code, char *message) +{ + qemu_plugin_outs(message); + g_free(message); + exit(return_code); +} + +static void exit_icount_reached(unsigned int cpu_index, void *udata) +{ + uint64_t insn_vaddr = GPOINTER_TO_UINT(udata); + char *msg = g_strdup_printf("icount reached at 0x%" PRIx64 ", exiting\n", + insn_vaddr); + + exit_emulation(icount_exit_code, msg); +} + +static void exit_address_reached(unsigned int cpu_index, void *udata) +{ + uint64_t insn_vaddr = GPOINTER_TO_UINT(udata); + char *msg = g_strdup_printf("0x%" PRIx64 " reached, exiting\n", insn_vaddr); + int exit_code; + + exit_code = GPOINTER_TO_INT( + g_hash_table_lookup(addrs_ht, GUINT_TO_POINTER(insn_vaddr))); + + exit_emulation(exit_code, msg); +} + +static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +{ + size_t tb_n = qemu_plugin_tb_n_insns(tb); + for (size_t i = 0; i < tb_n; i++) { + struct qemu_plugin_insn *insn = qemu_plugin_tb_get_insn(tb, i); + gpointer insn_vaddr = GUINT_TO_POINTER(qemu_plugin_insn_vaddr(insn)); + + if (exit_on_icount) { + /* Increment and check scoreboard for each instruction */ + qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu( + insn, QEMU_PLUGIN_INLINE_ADD_U64, insn_count, 1); + qemu_plugin_register_vcpu_insn_exec_cond_cb( + insn, exit_icount_reached, QEMU_PLUGIN_CB_NO_REGS, + QEMU_PLUGIN_COND_EQ, insn_count, icount + 1, insn_vaddr); + } + + if (exit_on_address) { + if (g_hash_table_contains(addrs_ht, insn_vaddr)) { + /* Exit triggered by address */ + qemu_plugin_register_vcpu_insn_exec_cb( + insn, exit_address_reached, QEMU_PLUGIN_CB_NO_REGS, + insn_vaddr); + } + } + } +} + +static void plugin_exit(qemu_plugin_id_t id, void *p) +{ + g_hash_table_destroy(addrs_ht); + qemu_plugin_scoreboard_free(insn_count_sb); +} + +QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, + const qemu_info_t *info, int argc, + char **argv) +{ + addrs_ht = g_hash_table_new(NULL, g_direct_equal); + + insn_count_sb = qemu_plugin_scoreboard_new(sizeof(InstructionsCount)); + insn_count = qemu_plugin_scoreboard_u64_in_struct( + insn_count_sb, InstructionsCount, insn_count); + + for (int i = 0; i < argc; i++) { + char *opt = argv[i]; + g_auto(GStrv) tokens = g_strsplit(opt, "=", 2); + if (g_strcmp0(tokens[0], "icount") == 0) { + g_auto(GStrv) icount_tokens = g_strsplit(tokens[1], ":", 2); + icount = g_ascii_strtoull(icount_tokens[0], NULL, 0); + if (icount < 1 || g_strrstr(icount_tokens[0], "-") != NULL) { + fprintf(stderr, + "icount parsing failed: '%s' must be a positive " + "integer\n", + icount_tokens[0]); + return -1; + } + if (icount_tokens[1]) { + icount_exit_code = g_ascii_strtoull(icount_tokens[1], NULL, 0); + } + exit_on_icount = true; + } else if (g_strcmp0(tokens[0], "addr") == 0) { + g_auto(GStrv) addr_tokens = g_strsplit(tokens[1], ":", 2); + uint64_t exit_addr = g_ascii_strtoull(addr_tokens[0], NULL, 0); + int exit_code = 0; + if (addr_tokens[1]) { + exit_code = g_ascii_strtoull(addr_tokens[1], NULL, 0); + } + g_hash_table_insert(addrs_ht, GUINT_TO_POINTER(exit_addr), + GINT_TO_POINTER(exit_code)); + exit_on_address = true; + } else { + fprintf(stderr, "option parsing failed: %s\n", opt); + return -1; + } + } + + if (!exit_on_icount && !exit_on_address) { + fprintf(stderr, "'icount' or 'addr' argument missing\n"); + return -1; + } + + /* Register translation block and exit callbacks */ + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); + + return 0; +} diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile index 449ead1130..98a89d5c40 100644 --- a/contrib/plugins/Makefile +++ b/contrib/plugins/Makefile @@ -28,6 +28,7 @@ NAMES += hwprofile NAMES += cache NAMES += drcov NAMES += ips +NAMES += stoptrigger ifeq ($(CONFIG_WIN32),y) SO_SUFFIX := .dll From patchwork Mon Jul 22 11:04:02 2024 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: 813707 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp1811259wro; Mon, 22 Jul 2024 04:05:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV/OUUWdiJYcv329gINfDxcT98vFgTZB4TSpm6K58C48sFIdI56AJS01RheAn0lrXfOMSU6HdFj5uICL5oB/XoP X-Google-Smtp-Source: AGHT+IEYzCGmvgp0xBnD2AqjuJ3G36r5mcYtxwLldYCV661USZeVfWCVGp90vEezr+fJH7WJFHLC X-Received: by 2002:a05:622a:11d5:b0:43a:f1f0:12f with SMTP id d75a77b69052e-44fa5387489mr105593751cf.59.1721646342984; Mon, 22 Jul 2024 04:05:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721646342; cv=none; d=google.com; s=arc-20160816; b=JP3ur6oCthF+OvBGFW6RSTSBA9tyyFXC1bcpt+Pzvl4STPcBMPreocCwdoCJ1vgj6P Kz6AvcLT2Muoq8I1PC7SJ04Z6eh7jVN48h3fZrEGw4yelErTNvVXJYkU7sOSwoBpmALf 7WxAzV6o0Vo74MJTl75EMxG4/4weJsiF6tSIAGVoKYHtYwJma0Sxt/pG01PNVeUNxOc+ p9shpZaY3EQzWrrH9dHZ9fh88cORfR21pMO0N+8uxFuE9O6/qyCPDZHRKn9CbJ2YWDDm fk/CMECGKOrkbpvn7XI+AIq5FnbhF04Ra+t7j2/xdFEwf7g2oh9uWcA3WBZjphjKHqHc TlZg== 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=CUepoQkJbTEdFdSk4GA6KAzs4URRnm4V9SeWpypNLMA=; fh=eahvdF4yo2f0nbZI9+BnUcTmO+7Zfxk/JvjCmxe9NWc=; b=b83KOod+0gLBtB2V9RTnPYtablCeGtwAs7cJiubZHrc0vkgbDLgk+ukQ0k+vMeSLBA f4GvDy/O9IxrNRgSGSFKZzXSReKTX+x0KtWCxnK+c7eOahU0erIo3E17gHfmOzVNXGjx EYOKAn7z31ChrcJ9D2q2CpscrksRQp02iOMNIZgiZ81Ap2hocfcklJR2JLlpqUnfjIuG dRn6MssOI48fqRuWKrmqUSU3q4dRT5vd+lqMhoBRRGlivw6GHadRqHUozDyZZB0KEUI0 hXrhMrRcdojdqCql3vFVVG/1GZXEzznNA/b7O/yYjSm8/mNPROpG1Z9Ba4KlhcujTB1N lXOQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yobLrQ96; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-44f9cf0cfdesi77194811cf.697.2024.07.22.04.05.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jul 2024 04:05:42 -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=yobLrQ96; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVqqB-0005qW-1t; Mon, 22 Jul 2024 07:04:27 -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 1sVqq9-0005iA-2V for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:25 -0400 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sVqq7-0002S0-Ch for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:24 -0400 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-5a10bb7b237so3415590a12.0 for ; Mon, 22 Jul 2024 04:04:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721646261; x=1722251061; 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=CUepoQkJbTEdFdSk4GA6KAzs4URRnm4V9SeWpypNLMA=; b=yobLrQ96S33VR/w0VHi5hvI56kMEX/b2+bE22ik6Hj9w2A8YEFntd3xXCBIaGfW3j0 8P45FtH68Xx4IXENO3X8DqZfjWUZ9vj5o7VvGI8soBCUGa54odPihJSesbtZa3Kx6rky QpfYnKzabwo339RQhNchZlYsjZxPbvkpt6UOlh0PIoAZCiIyj7GQ9tOpcVlRId6kEIkM AVpZNqCysnGJAhkZFCQZ5PPM20ZOvCILGq/JbUrWMPf9iddwW9HfVkJWe0kAisSXMEm8 J4ubUnmHYp6VEbaydGz7L1/IEu3n+caInBHm2vMWMsHw2in3H2jHgyA1egOmLDV+lo5F FMSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721646261; x=1722251061; 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=CUepoQkJbTEdFdSk4GA6KAzs4URRnm4V9SeWpypNLMA=; b=XSseW87WffNvC5W659T80jQ3DUnMDIloC4442sELOYX3S5M6PbbLrI0J49zYl1OcG5 IKjLXk+KRcXu1giDlq9v1XHTQDSiIWfgnyOeksLk7lTtp7CICLbFqzDvhP3vnHPWWwCX Sv7rkn6ADRNK8O4Etsp0aaXbSKEqDlGEMZ2ZTdMy0NwgOnb4jW04JXY+a55ITv5vQkqO P/xmo9ohvYe/INM00iPWies1tc3Q1wl3W01WpZes7IM1VmOrHeVt8IiZEZ7Ngaxx+ZJM ChyhMQGEz5GPgqXDT5DJIlqs7x0z8x95gfnW0y1pP44r9tx/qFyuspxEPz3PvsOEBK0T 4TeA== X-Gm-Message-State: AOJu0YyvmsUstSGCFO+KRuCE5JapZR8FmFB5TlX3qlOMjR2aJKJZgoZZ KFB2w6bRXe4ASKitYo56PyqmD4xyLYSYbUST0kSvKbGfVqUqGcAubYFblhQJBxI= X-Received: by 2002:a17:906:6a06:b0:a77:b664:c078 with SMTP id a640c23a62f3a-a7a4c010bcemr469474066b.27.1721646260391; Mon, 22 Jul 2024 04:04:20 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7a3c94a9e0sm409565266b.188.2024.07.22.04.04.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 04:04:17 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 15DD95F9F4; Mon, 22 Jul 2024 12:04:14 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Xingtao Yao , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Paolo Bonzini Subject: [PULL 05/16] plugins: fix mem callback array size Date: Mon, 22 Jul 2024 12:04:02 +0100 Message-Id: <20240722110413.118418-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240722110413.118418-1-alex.bennee@linaro.org> References: <20240722110413.118418-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier data was correctly copied, but size of array was not set (g_array_sized_new only reserves memory, but does not set size). As a result, callbacks were not called for code path relying on plugin_register_vcpu_mem_cb(). Found when trying to trigger mem access callbacks for atomic instructions. Reviewed-by: Xingtao Yao Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Reviewed-by: Alex Bennée Signed-off-by: Alex Bennée Message-Id: <20240706191335.878142-2-pierrick.bouvier@linaro.org> Message-Id: <20240718094523.1198645-6-alex.bennee@linaro.org> diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c index b6bae32b99..ec89a085b4 100644 --- a/accel/tcg/plugin-gen.c +++ b/accel/tcg/plugin-gen.c @@ -85,8 +85,7 @@ static void gen_enable_mem_helper(struct qemu_plugin_tb *ptb, len = insn->mem_cbs->len; arr = g_array_sized_new(false, false, sizeof(struct qemu_plugin_dyn_cb), len); - memcpy(arr->data, insn->mem_cbs->data, - len * sizeof(struct qemu_plugin_dyn_cb)); + g_array_append_vals(arr, insn->mem_cbs->data, len); qemu_plugin_add_dyn_cb_arr(arr); tcg_gen_st_ptr(tcg_constant_ptr((intptr_t)arr), tcg_env, From patchwork Mon Jul 22 11:04:03 2024 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: 813713 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp1811547wro; Mon, 22 Jul 2024 04:06:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVKx+PzEwiWbEqfbV/9cfIQfmZudSOnMqesDkHtuoCkWrQHJWK12L5Nfy3gvie9UtuB2w9Nu8aFjwrljZGj2Acz X-Google-Smtp-Source: AGHT+IERwkeTpIOXNpkmPm1QOPD5VAXvmRu1LBMWIZu0XFHHX9PADCnSHmFq37HEH077WOFSLiY1 X-Received: by 2002:a05:622a:1a9d:b0:447:f445:9291 with SMTP id d75a77b69052e-44fa536b33cmr85722621cf.59.1721646381247; Mon, 22 Jul 2024 04:06:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721646381; cv=none; d=google.com; s=arc-20160816; b=W4FtLggsJmMPlOYtzTJs/8w8atRIHouWjiimArX/+Ndraxm+Pq+Hf4kgrCHWkt5QNA MxVxwC/hNoiGyXTb2UAzXki8wJaJ0TisLhBbYMISoCXgHlmS0SeZvFcPda5Wafq707mD M/SwlYA5oGpGghXKVZCx/6QLSmanGGKu743U/iNs1n+nL7y0PYJDEgOLz65MbF07AFfE QnMQxi8oUVcq/e+U9ZgJ5Exas2UMJLByNmyu9DYNukIjSnqakj0o5UwPQUz081+l7ize MQ6smsk2EW5ax67SypaL96jT/8RjiOgQeEIbnxl6QVEyPhQ2LKz3S35lgfGIuTHSsA1/ aR6w== 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=ve/EVDm+/avLGnI6H90trY1ZG2F2hzrIYhnNFlab21k=; fh=5VfksGkLSIfI8Y2mJuNvmJ0Yf7cc2crceeyE/6eCO1s=; b=o4p1bU/ShIbRzHY59wHt8f6+DUQiX89lYLRnfbinjpsJ+6g0bvVffw97dKmqz6O1cM ntpzX/yGGrOiCf1iE1Fd0zaLtDdbLoQOw3VvxqTJmJIftl24K8eHpsRlEMpvIYGs6A7S uyp1GCSA/uwtpXY1KFD+ydKz2eKqUlqQeNHyirFl/kSXAvsfkwFDF7Q4GSjxKGUcM3QF jKSqoIE7FN6eHbZ+Ee3gDgUv+hPYJVR3aXcWiZELPLNC+UDrSIow97GLgK7/arrujszd /zxQGHFFruuhjoSX93s5XghpXn+exjtqPVqqWQhZxKIXPN9N2FxaCaUNJfe01vNbDwCB vENw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Bxk5oYch; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-44f9ccfd642si77824721cf.114.2024.07.22.04.06.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jul 2024 04:06:21 -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=Bxk5oYch; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVqqE-000651-Ns; Mon, 22 Jul 2024 07:04:30 -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 1sVqq8-0005gu-P7 for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:24 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sVqq6-0002SE-SY for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:24 -0400 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a6fd513f18bso365876666b.3 for ; Mon, 22 Jul 2024 04:04:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721646261; x=1722251061; 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=ve/EVDm+/avLGnI6H90trY1ZG2F2hzrIYhnNFlab21k=; b=Bxk5oYchM6CL4kJsCkOfPOQJJmsH6lxbVkjj1WjOEc2OhPXvTob102FMTGFsPsHyBa D6nhJJoBnOwp7vcsLvxmW+j3fGxMEv+T0FxfXxQuJBr56xZeKxKQhw9bTXE9doTlI4Bd eFJX+bwsGGcsRQ6aE5lVQbQuF0ZVlnK36GU5IAL9trBLYvITX83iFJO9/fdJ3FBvn8Ja 4UvzeNQWpcz+JMoVrwDc14RhAHHaI3xbtkwhpFyn4hxp8E24o8dlY0S2ODjqSvDRbbC4 F3pnQnvT0d7mif93YDdgHtJTkRfMBv9NjDRnI/jWQ8UmpdGf9MHW0FFt2QPciY5Tmy/V NvnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721646261; x=1722251061; 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=ve/EVDm+/avLGnI6H90trY1ZG2F2hzrIYhnNFlab21k=; b=nSw2mXDJAIwu2Ri0Rnvw//J2oUwocu8nwYP6JyOBVXlo0up9HCsbZV4FMIRZPQE+7P uDhbu/RAq5ZYppoi4qR2ONrcSoP4CXw2fkRUKQ4NdtT1xKR6wcGWsxv7Wp4sps28rF6A PsMsaqFEwVKzZKaRI4dIrK4yBefgluZB6V9uolOYIasRjvhHH7CT8tFOPx8XJxfA883r 3rUNNIsh1KKlFcnMLpY0a4ACX9mSRXdyF1E3fD6oza/6ytDb2ymzO1F8IyFNnrAs0Apz NcOo9FTQfoUEzTty2ygaTQh7c78yBfPnzc43k3UYIbQMsNnQO5LgqgfiG7+3k0ya7av8 7+ow== X-Gm-Message-State: AOJu0Yydh3V+c/1Jys7tuzbojyYJvlbE0sv+ntilGdmMa0WEzwkTFakz zr1xz+m5UzXQlzF8GUe26QfBgGJQeEU2oe4ceUnq7W5LjESbUnZ7py/gSvUIIlg= X-Received: by 2002:a17:906:aa55:b0:a77:e1fb:7df6 with SMTP id a640c23a62f3a-a7a011177a7mr901431066b.7.1721646260996; Mon, 22 Jul 2024 04:04:20 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7a3c785c6csm407394666b.20.2024.07.22.04.04.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 04:04:18 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2BC305F9FB; Mon, 22 Jul 2024 12:04:14 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= , Alexandre Iooss , Mahmoud Mandour Subject: [PULL 06/16] tests/plugins: use qemu_plugin_outs for inline stats Date: Mon, 22 Jul 2024 12:04:03 +0100 Message-Id: <20240722110413.118418-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240722110413.118418-1-alex.bennee@linaro.org> References: <20240722110413.118418-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x633.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Using bare printf's in plugins is perfectly acceptable but they do rather mess up the output of "make check-tcg". Convert the printfs to use g_string and then output with the plugin output helper which will already be captured to .pout files by the test harness. Reviewed-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20240718094523.1198645-7-alex.bennee@linaro.org> diff --git a/tests/plugin/inline.c b/tests/plugin/inline.c index cd63827b7d..73dde99578 100644 --- a/tests/plugin/inline.c +++ b/tests/plugin/inline.c @@ -71,10 +71,12 @@ static void stats_insn(void) const uint64_t cond_track_left = qemu_plugin_u64_sum(insn_cond_track_count); const uint64_t conditional = cond_num_trigger * cond_trigger_limit + cond_track_left; - printf("insn: %" PRIu64 "\n", expected); - printf("insn: %" PRIu64 " (per vcpu)\n", per_vcpu); - printf("insn: %" PRIu64 " (per vcpu inline)\n", inl_per_vcpu); - printf("insn: %" PRIu64 " (cond cb)\n", conditional); + g_autoptr(GString) stats = g_string_new(""); + g_string_append_printf(stats, "insn: %" PRIu64 "\n", expected); + g_string_append_printf(stats, "insn: %" PRIu64 " (per vcpu)\n", per_vcpu); + g_string_append_printf(stats, "insn: %" PRIu64 " (per vcpu inline)\n", inl_per_vcpu); + g_string_append_printf(stats, "insn: %" PRIu64 " (cond cb)\n", conditional); + qemu_plugin_outs(stats->str); g_assert(expected > 0); g_assert(per_vcpu == expected); g_assert(inl_per_vcpu == expected); @@ -91,10 +93,12 @@ static void stats_tb(void) const uint64_t cond_track_left = qemu_plugin_u64_sum(tb_cond_track_count); const uint64_t conditional = cond_num_trigger * cond_trigger_limit + cond_track_left; - printf("tb: %" PRIu64 "\n", expected); - printf("tb: %" PRIu64 " (per vcpu)\n", per_vcpu); - printf("tb: %" PRIu64 " (per vcpu inline)\n", inl_per_vcpu); - printf("tb: %" PRIu64 " (conditional cb)\n", conditional); + g_autoptr(GString) stats = g_string_new(""); + g_string_append_printf(stats, "tb: %" PRIu64 "\n", expected); + g_string_append_printf(stats, "tb: %" PRIu64 " (per vcpu)\n", per_vcpu); + g_string_append_printf(stats, "tb: %" PRIu64 " (per vcpu inline)\n", inl_per_vcpu); + g_string_append_printf(stats, "tb: %" PRIu64 " (conditional cb)\n", conditional); + qemu_plugin_outs(stats->str); g_assert(expected > 0); g_assert(per_vcpu == expected); g_assert(inl_per_vcpu == expected); @@ -107,9 +111,11 @@ static void stats_mem(void) const uint64_t per_vcpu = qemu_plugin_u64_sum(count_mem); const uint64_t inl_per_vcpu = qemu_plugin_u64_sum(count_mem_inline); - printf("mem: %" PRIu64 "\n", expected); - printf("mem: %" PRIu64 " (per vcpu)\n", per_vcpu); - printf("mem: %" PRIu64 " (per vcpu inline)\n", inl_per_vcpu); + g_autoptr(GString) stats = g_string_new(""); + g_string_append_printf(stats, "mem: %" PRIu64 "\n", expected); + g_string_append_printf(stats, "mem: %" PRIu64 " (per vcpu)\n", per_vcpu); + g_string_append_printf(stats, "mem: %" PRIu64 " (per vcpu inline)\n", inl_per_vcpu); + qemu_plugin_outs(stats->str); g_assert(expected > 0); g_assert(per_vcpu == expected); g_assert(inl_per_vcpu == expected); @@ -118,6 +124,7 @@ static void stats_mem(void) static void plugin_exit(qemu_plugin_id_t id, void *udata) { const unsigned int num_cpus = qemu_plugin_num_vcpus(); + g_autoptr(GString) stats = g_string_new(""); g_assert(num_cpus == max_cpu_index + 1); for (int i = 0; i < num_cpus ; ++i) { @@ -135,20 +142,21 @@ static void plugin_exit(qemu_plugin_id_t id, void *udata) qemu_plugin_u64_get(insn_cond_num_trigger, i); const uint64_t insn_cond_left = qemu_plugin_u64_get(insn_cond_track_count, i); - printf("cpu %d: tb (%" PRIu64 ", %" PRIu64 - ", %" PRIu64 " * %" PRIu64 " + %" PRIu64 - ") | " - "insn (%" PRIu64 ", %" PRIu64 - ", %" PRIu64 " * %" PRIu64 " + %" PRIu64 - ") | " - "mem (%" PRIu64 ", %" PRIu64 ")" - "\n", - i, - tb, tb_inline, - tb_cond_trigger, cond_trigger_limit, tb_cond_left, - insn, insn_inline, - insn_cond_trigger, cond_trigger_limit, insn_cond_left, - mem, mem_inline); + g_string_printf(stats, "cpu %d: tb (%" PRIu64 ", %" PRIu64 + ", %" PRIu64 " * %" PRIu64 " + %" PRIu64 + ") | " + "insn (%" PRIu64 ", %" PRIu64 + ", %" PRIu64 " * %" PRIu64 " + %" PRIu64 + ") | " + "mem (%" PRIu64 ", %" PRIu64 ")" + "\n", + i, + tb, tb_inline, + tb_cond_trigger, cond_trigger_limit, tb_cond_left, + insn, insn_inline, + insn_cond_trigger, cond_trigger_limit, insn_cond_left, + mem, mem_inline); + qemu_plugin_outs(stats->str); g_assert(tb == tb_inline); g_assert(insn == insn_inline); g_assert(mem == mem_inline); From patchwork Mon Jul 22 11:04:04 2024 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: 813704 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp1810968wro; Mon, 22 Jul 2024 04:05:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXXwRiCAg6syaIwlND67gDWXJ2fMVzNNF7fDEGPfcHaHrtn69iEoCWQppSuW46CSqbjw4M6qiVm0tUujBMVvO2R X-Google-Smtp-Source: AGHT+IEaCxEKL5tCeYJ+Ku0hx122hN0ozoUWEqvZClR/SPIMF+r9au0QeQQjWnPydrIDwpMxZccT X-Received: by 2002:a05:6808:f0b:b0:3d9:243a:7b02 with SMTP id 5614622812f47-3dae9855369mr4405851b6e.40.1721646305570; Mon, 22 Jul 2024 04:05:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721646305; cv=none; d=google.com; s=arc-20160816; b=MvvRyJgnP2C90fGDDZnpuicyTkS0KWdjdfdFIQBzFMDH/Fln/M5ryHufgWfd5mGq7+ mswyhMRE2z5ultB+DPW99RZyY3q1etjPR9MjmXyUUrGF8jXPkwoaokJrwhyTZxU3feAh 4oomqsuFXGWRwa3AEUxyjsCF3b5J/X4pb8zZq7YdRh6f2SaY32D8IFMgFUtqy5dkghOi URT8ZAwykHVwfDnfZlEjjJGqrN/CF/fRD/S57RSBhLJnakjGoif1J5kaPfik03tikhS9 WBBx2Sjx89mU5TAIEKlEz0PNGWM09lg+bg+pw2Bk2OTzPq3YXygzymvZXfAH2dnexI0D +EMQ== 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=6Bff66en4q3ciCjIte8eGShr6vFbC86/IAqQsdiX7yI=; fh=7qpV+nKlrUnm20HIL05a4olauL2ABxFbqvGze+nPJf8=; b=PO2/aY4pVisHy2GN5azX9jRF5699UsvTQ0MUslLqcK6L+jSX/fOaUYjLGZGIsS0PUU 0MY59ez06R+QcuIe+V07t5SBg5Zk3Y+bwOPEAMybNQ9ydLHkY9XVqj7w7nDAmuySjSha ByV+mrMFIMJgHQiimzdM3pK/IKcPNkciUdQdh0gHPNZz5xwEaqyq9mb56Nel2Wfd/MU2 wAoW/mYPsJDiJ5oDk9bd6pM5KdrdAnqwEA7jm0zQOaUw8J9ojqgfcJzsyUXUVHUNWJo9 prJ9ukRZDXMWKtma0UfQFl/xUbsSlv2/nuZlTvouT+ORiZuYv2qK+Vdu1lmZ/c+yd3/N 7ubg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y6pzBmek; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a1e0cc1a2514c-826dbf98aa9si812221241.39.2024.07.22.04.05.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jul 2024 04:05:05 -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=Y6pzBmek; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVqqA-0005os-Mw; Mon, 22 Jul 2024 07:04:26 -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 1sVqq9-0005i0-0z for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:25 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sVqq7-0002S3-Ct for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:24 -0400 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-5a2ffc34431so1360469a12.0 for ; Mon, 22 Jul 2024 04:04:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721646261; x=1722251061; 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=6Bff66en4q3ciCjIte8eGShr6vFbC86/IAqQsdiX7yI=; b=Y6pzBmek71k0omMZ7EkLieRtQ76+lwiCBDt7YBOgo+0eC5CTZfkA0+RKUu+ZiJ+jko d2rW69W0qddiSEW6II5vl1YY/UiUBYmVb36IoSf+IFaGTvPYmDXxMo10nK4IVQdx/lXf dAIyW6XP/791XE8sWS+6r6KgQNEnzxP1jSOefaoam9ezHtC/Ltbb7FRL+ysJKR7+w62O mwDGUF6NJ8ORdscof6VSl8TPGnviGNlV9FR658JbhVkoCsCJfBitepYLM2vqbhqzpZ+5 EZ6cG+UcT7dqt9INPwXY2NVtyvYPm/a8LlKky8bYTu/lVcNpcBmP24lblKzysckX/dje Tyjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721646261; x=1722251061; 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=6Bff66en4q3ciCjIte8eGShr6vFbC86/IAqQsdiX7yI=; b=akjfgD5NkINjtMBcJnwfF3aCdoUXRvtSDAYwp7V3YGjDsH8vH8ZP5mAsb47r9u3dT/ 53QvJlGCifltRQGH3N443TQ/YV9Vp/8PN6HSkVuwOAqYyA/zA66J1q8yZlm8vNtVlo0V Rod8SgipD4zqpodxeSv+8kKp7w1yg2V0tazN+fl1hW69KThAdM8/cy9MEZqN+eL5KbmJ TiAAwPYl8ZDt8wes7svh3y7uEkIUWbCJBueYI29jLhOIbxbznnf3/a7T99SrabnAX+E/ qh5qMZTicOdxU2kdeCUhI5l8kQN4MNTi8q41FcKSS2ImJxPgGBMIv+Y2uTtx50xI9Rbm FA4A== X-Gm-Message-State: AOJu0YyLrgJRde4lfcG7aAkIVcYvtCubspTd3pGd236+yLVUs7bevNeb mv49vUrmKPpi8mNK9K/VND9ilazoRUUWAzcm/nYlzdIauKhutyZvm7E7IP1ClOk= X-Received: by 2002:a05:6402:3590:b0:5a1:f9bc:7f13 with SMTP id 4fb4d7f45d1cf-5a479f4fe93mr6178268a12.22.1721646260687; Mon, 22 Jul 2024 04:04:20 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5a7344dd630sm2232918a12.54.2024.07.22.04.04.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 04:04:17 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 400CF5FA03; Mon, 22 Jul 2024 12:04:14 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?b?RnLDqWTDqXJpYyBQw6l0cm90?= , Pierrick Bouvier , =?utf-8?q?Alex_Benn=C3=A9e?= , Alexandre Iooss , Mahmoud Mandour Subject: [PULL 07/16] plugins/execlog.c: correct dump of registers values Date: Mon, 22 Jul 2024 12:04:04 +0100 Message-Id: <20240722110413.118418-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240722110413.118418-1-alex.bennee@linaro.org> References: <20240722110413.118418-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x535.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Frédéric Pétrot Register values are dumped as 'sz' chunks of two nibbles in the execlog plugin, sz was 1 too big. Signed-off-by: Frédéric Pétrot Reviewed-by: Pierrick Bouvier Message-Id: <20240620083805.73603-1-frederic.petrot@univ-grenoble-alpes.fr> Signed-off-by: Alex Bennée Message-Id: <20240718094523.1198645-8-alex.bennee@linaro.org> diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c index 371db97eb1..1c1601cc0b 100644 --- a/contrib/plugins/execlog.c +++ b/contrib/plugins/execlog.c @@ -101,7 +101,7 @@ static void insn_check_regs(CPU *cpu) GByteArray *temp = reg->last; g_string_append_printf(cpu->last_exec, ", %s -> 0x", reg->name); /* TODO: handle BE properly */ - for (int i = sz; i >= 0; i--) { + for (int i = sz - 1; i >= 0; i--) { g_string_append_printf(cpu->last_exec, "%02x", reg->new->data[i]); } From patchwork Mon Jul 22 11:04:05 2024 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: 813711 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp1811411wro; Mon, 22 Jul 2024 04:06:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUeGmAYJt19D5gomMXFaRwbBaACTALhQMq8SqGUiUERLj6D3AdbHMgsDdP2DhPsu8qMhn1eyYSCl/1mr+/apLn8 X-Google-Smtp-Source: AGHT+IFzgy3X16losYAekheLYCzAMa52QMs85sRcYJYQi0p1rJRqGkYdkn5GpdJi7xPeowScf/Pk X-Received: by 2002:a05:620a:288a:b0:79e:ff18:b4f1 with SMTP id af79cd13be357-7a1a65e2ac3mr843342985a.51.1721646365042; Mon, 22 Jul 2024 04:06:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721646365; cv=none; d=google.com; s=arc-20160816; b=cusKNybtS3t8aCjWm50PTfgMl10xEQ1uZW/cOqxvPV5AV7426u+ADG742MRA/MI6nQ KHaJtOWe19CPqJH7jdUaCuImb9lZPdwihbEd1k6ulbOAe7Z0S3OE8imh7nGz/2jEh33X RG7df4nCtoSFT3kGfZurpF4YZajqsAh6SqXIGcDu9C4F+dCc2Uspvez1gMkg/xIehiaC KF2+m0ZhllTjElH6P8gDSP0oqOHOzqU/y/OTKGQU0bANuxPMJqgfLfLLfRvt5B6HCN6j xp4yvb8nbe0tzMm9UhvGjuHlS70xQSN2+WTuaGbJyMhYZontAljAUIVNFb7NzpK0ePAM gG1w== 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=PrRW6kDAk1zqxe6ChLfrm5m8ZkEkLVOG9+rzr/DdABE=; fh=KEPLpLQVO77v+WBSDPeXmXKEnOIOhNHYNw7geHkyLGA=; b=C2bvE5x9pXZeQBbsW5wlWC3UeLNrUwE57if3cRTMcXvZoXy5WXEj8QtZPkcDiGo9R+ nPFGHjjO1WZUhQ7JoTZQLYFgWva3RAh5Rz59tIKETrp+ibwaS4GtZvAPddK27YCozeQp q30n3Cm0acBMvZ5kaGzPgkcVm8PaVs0tUKvSkuwTn2NPYzbVoOXjvO+kpoccd9eSF6d8 OnrmrXl6jGENBnPBJTkm08DvMDAwjlWdLvt/iy7V0a0tl3J5P8Ygca2/FNTLHMGbFH1s 7RiQB+GBgsqJIkY8KXVWxjs4Do30+1N4T461G+mhvznWG76g5g1XRQ6KlzwTTAqxTHhj CaOg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dOJU5A2G; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a198fb0b7dsi759982385a.195.2024.07.22.04.06.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jul 2024 04:06:05 -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=dOJU5A2G; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVqqE-00062R-5L; Mon, 22 Jul 2024 07:04:30 -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 1sVqq7-0005am-D5 for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:23 -0400 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sVqq5-0002Rw-Py for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:23 -0400 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a77baa87743so434604166b.3 for ; Mon, 22 Jul 2024 04:04:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721646260; x=1722251060; 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=PrRW6kDAk1zqxe6ChLfrm5m8ZkEkLVOG9+rzr/DdABE=; b=dOJU5A2GMkruF/LwkIgq6HbbZWgHRVbeKZdQTqVSV7hI4k94cyOZo8M3D2qE2ja5pX 4pmeWZlygJCu4p9aiTWPNxf5kjmWlKNAbbp72/gJf//yVTQluhi32jKzrt/U3yrVhWah GUSizjGVPEfFR/wA9IYh9hLaIWOwSITuE4rh+qVnoVQzQe59BCdmCsT4aR0xPOHMbGRc WTMtXoeKJR9g0urDBZl2tisNIItJ8vJleaPi11iNYcPTPAsZult1xHNfsBBd7p1g3VZp 8hdZUy4J0FE3OhirN9jIzPkbVW8GL58IQgXuZrctSsZPY7UrS98UMIAPybq9KHVqU13L zA1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721646260; x=1722251060; 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=PrRW6kDAk1zqxe6ChLfrm5m8ZkEkLVOG9+rzr/DdABE=; b=ggEsxEkiv7hi2lCaO+9dM6AfIzZkqW5TMoG/80yEMXIqPDnExwvS6FDP/VEr6ZJUkq 7lb8MqMsP227LfQ8boYujzyUXPh/iN1/5IJItlDmoo8YXN0lXd31kDzLDVNH0A5Vm9t5 ZTIDCP8BaHr/8lVekByK6xLdElRZemq9espf8yjsiQEmKQBbqJm5Jc5ZngWX0ft7vW3Y Naan7sQJynLPyGX4KVvEXvE9f0HjWZUQTP6s5JupcZUqS9xN3PGLLG6n5SO2NeXU46GY PQiLQB/6j95iAAEgbJEN5YylH3IscM3Sh851d+ELEgdObT3E1M3IsKjQiig1hkgyPkvu lDXQ== X-Gm-Message-State: AOJu0Yxa91HqcoCOe4+n/NKZZ4E7/WWr0ivR/iW9miZDWP0Rn3npMjnZ v4nDjqTBw5qBu4X9d2YbuJ59Rbjr/8wfZrz1CnxZh6pRxssyF/5LZDoJFNw2Ivw= X-Received: by 2002:a17:907:7f27:b0:a77:d7f1:42eb with SMTP id a640c23a62f3a-a7a4c051b22mr506743066b.23.1721646260101; Mon, 22 Jul 2024 04:04:20 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7a3c785d7fsm408521466b.29.2024.07.22.04.04.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 04:04:17 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 5823A5FA17; Mon, 22 Jul 2024 12:04:14 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?A?= =?utf-8?q?lex_Benn=C3=A9e?= Subject: [PULL 08/16] semihosting: Include missing 'gdbstub/syscalls.h' header Date: Mon, 22 Jul 2024 12:04:05 +0100 Message-Id: <20240722110413.118418-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240722110413.118418-1-alex.bennee@linaro.org> References: <20240722110413.118418-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé "semihosting/syscalls.h" requires definitions from "gdbstub/syscalls.h", include it in order to avoid: include/semihosting/syscalls.h:23:38: error: unknown type name 'gdb_syscall_complete_cb' void semihost_sys_open(CPUState *cs, gdb_syscall_complete_cb complete, ^ Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20240717105723.58965-2-philmd@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240718094523.1198645-9-alex.bennee@linaro.org> diff --git a/include/semihosting/syscalls.h b/include/semihosting/syscalls.h index 3a5ec229eb..b5937c619a 100644 --- a/include/semihosting/syscalls.h +++ b/include/semihosting/syscalls.h @@ -9,6 +9,8 @@ #ifndef SEMIHOSTING_SYSCALLS_H #define SEMIHOSTING_SYSCALLS_H +#include "gdbstub/syscalls.h" + /* * Argument loading from the guest is performed by the caller; * results are returned via the 'complete' callback. From patchwork Mon Jul 22 11:04:06 2024 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: 813705 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp1811161wro; Mon, 22 Jul 2024 04:05:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUo74EWjZM20NTKOQNC1wTn4ISlEgEZfMVnJ2TPAgOx2N4z5HP8Lv9PLcrNi96mMalS2/ZR3v66ZGf5gtDV2ojz X-Google-Smtp-Source: AGHT+IG4/tGCYmzQOWJkS8CAzl1U7erwXOzd1w4cyKwsnbhPEbP7KsfBDZpWJzdmKAd4F+1DZ1p0 X-Received: by 2002:a05:6214:e4d:b0:6b7:9a69:f5f8 with SMTP id 6a1803df08f44-6b96106a6ffmr70620476d6.21.1721646331357; Mon, 22 Jul 2024 04:05:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721646331; cv=none; d=google.com; s=arc-20160816; b=jJ7hIhnPQ6jixrl6bHvqvWH3jjzjS8ntgfoZUebAuYJ7D9rd5U9VlEybDnLzqgRrIR ki0XG7SFZksjGD09lLPzJhOvjVFLbS/wALui8OqEAcnDjPQOAL9PuHLHXarrQfQQPu4N BLhxOrH0rDUdGj3p3zt+nXJP3cgW7SdgiCGkon5jqVrwJmSl9C+rYjjaM2ngutJdjxnl EKBc1rJ0J5oCPhBIgYj1WO2qU/PsFbf+QlWvt4wTCTkd//YQ+Ke4gQBQ+Ws+wMj/k06G GcKey7FKl7vPNvg2cb/pj55NqOBnK5Lg+5Pevl2BZOBgFBVwbwLXgTbCG8ey6yg+flZ7 B20A== 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=7oQdAPnxXqSmkLw/KIFULqM8OBF8epxnQmZ+s02z5ZE=; fh=Fx59QpZtCR9PEBggQfLRr6quoMeSb4XM5gi4qmp6zEE=; b=ADxdbefhLFysmBhgTdabBk4FmBLCgiTZ1MbggyN6RDvP0U6RMtNIaEhVv27T0ZKqJH Zi/pJ5gCtfgU1Cb/eR2eCWwyC2Ft8PJe9zFELeaJ3AqNTcvMfr0iI0rk2ywEefdHslnk DlgarEdFPpzqXlWhctPTADLjpKyijPDcKnkA6V58OFi8dPaBIKqKqdKNvWu3aONO4IHA XnsouTbT4y14m7TadviwpwlnbjvdQWyiGqaJDRdNHEy7+UhudBklaTT/xYxj+ZdtN66n ldkgWiP0JgxWEW98zN5zoCRvpy4CyVJSOKKiVG5CKcr9NQgkwdJqGmWJYEBP/+XRcbvZ Fw4g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EQAF3nMV; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6b7acb1d6bfsi79247966d6.567.2024.07.22.04.05.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jul 2024 04:05: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=EQAF3nMV; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVqqB-0005ry-E2; Mon, 22 Jul 2024 07:04:27 -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 1sVqqA-0005nA-8k for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:26 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sVqq8-0002UL-It for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:26 -0400 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5a3458bf7cfso3059203a12.0 for ; Mon, 22 Jul 2024 04:04:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721646263; x=1722251063; 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=7oQdAPnxXqSmkLw/KIFULqM8OBF8epxnQmZ+s02z5ZE=; b=EQAF3nMVMkBnW1elX7paO3PoRncp7/gdKC6yxWMA+i4QRDxVL1tG7syYPdZ6/E9CfL 4NrqKfHZe9+MLGVfbN3JGIWzDzLHzLMpzKIKCSsHGjD+iitC5wYyUg2bxr4j0jsW7iCl f8i/7zLLAg0yZKucW2926MrwZaL8EZfPQDvV3esFRjh86g8mWVHAaGKmM+QC+A/wJIT1 +8iI5i9kTuB9709vqnWS0g4TTIFbHfZdemewuBwd7PJ8YZrKas7yLyhL7dIV1Co8UfG2 A54n3W/DcVQL2ddJ0SFxDkKXbmR8Men5IcMngirq9x2GHb1ad4Z0Ff/8aJW8FgNWMVW5 H/IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721646263; x=1722251063; 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=7oQdAPnxXqSmkLw/KIFULqM8OBF8epxnQmZ+s02z5ZE=; b=T/VHZVwLPCyix4xz52jcDjmyNogw3g4m6aAIx2ylnbIoj5rbRWxLPchimOOsGLsZ8m Q45zUh0EUBRPPlQZVHZWPuzTqpnxKTxmbfXkI2RV02bW8/h1pF8hk4ERQxt/xEk+aWT5 swAoAkFxQbN+5g9DIfwpgsPtrohlnKTDIkIndNfIl7j7dkmVAKI+pCSuvRfeiVQyAtg6 ciQEMnRZOH3fbP7ae3d8AlGwQugDyKJgVGs5NHVoeajDK4kwXoyYNNXEIhPx3/zLIesX EdRqRmOaFiMCGc9tcAkedYjy4OQEs+z0o0KmuoVnsEym4t0s4YUSDuI9WTrpR3Fvv3FG zfnw== X-Gm-Message-State: AOJu0YyQxEwAYAytNb3dPVlkTImRQL+PL18KPhnVxwtQExpWwASe8ZNm 3QQmcl3CkXwXSjyZivFi64oTguCFHJ2wra/8CSCVYZzagPm//+ZSOgD8ChGGZUY= X-Received: by 2002:a05:6402:1d4c:b0:5a3:e652:d59 with SMTP id 4fb4d7f45d1cf-5a4761b3f06mr4502987a12.0.1721646262557; Mon, 22 Jul 2024 04:04:22 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5a30c3f0673sm5907642a12.61.2024.07.22.04.04.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 04:04:18 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 71FE3620ED; Mon, 22 Jul 2024 12:04:14 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier Subject: [PULL 09/16] target/m68k: Add semihosting stub Date: Mon, 22 Jul 2024 12:04:06 +0100 Message-Id: <20240722110413.118418-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240722110413.118418-1-alex.bennee@linaro.org> References: <20240722110413.118418-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Since the SEMIHOSTING feature is optional, we need a stub to link when it is disabled. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20240717105723.58965-3-philmd@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240718094523.1198645-10-alex.bennee@linaro.org> diff --git a/target/m68k/semihosting-stub.c b/target/m68k/semihosting-stub.c new file mode 100644 index 0000000000..d6a5965e29 --- /dev/null +++ b/target/m68k/semihosting-stub.c @@ -0,0 +1,15 @@ +/* + * m68k/ColdFire semihosting stub + * + * SPDX-FileContributor: Philippe Mathieu-Daudé + * SPDX-FileCopyrightText: 2024 Linaro Ltd. + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "cpu.h" + +void do_m68k_semihosting(CPUM68KState *env, int nr) +{ + g_assert_not_reached(); +} diff --git a/target/m68k/meson.build b/target/m68k/meson.build index 8d3f9ce288..4d213daaf6 100644 --- a/target/m68k/meson.build +++ b/target/m68k/meson.build @@ -11,9 +11,12 @@ m68k_ss.add(files( m68k_system_ss = ss.source_set() m68k_system_ss.add(files( - 'm68k-semi.c', 'monitor.c' )) +m68k_system_ss.add(when: ['CONFIG_SEMIHOSTING'], + if_true: files('m68k-semi.c'), + if_false: files('semihosting-stub.c') +) target_arch += {'m68k': m68k_ss} target_system_arch += {'m68k': m68k_system_ss} From patchwork Mon Jul 22 11:04:07 2024 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: 813714 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp1811589wro; Mon, 22 Jul 2024 04:06:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWSVV9MQQ19065VQlVXTv5IDakoHo4qfsaNHNFGNGfHh2M0DPaf4OiuPiojSNml45Qvyq3q9FI/sgvcTgFo8uLm X-Google-Smtp-Source: AGHT+IHIGYgFie8d7ybHmQzb3v3ynssPBwuUlAuhZCikAHA6gNSVIrmczHlWC/+/+EDfkDswLVkK X-Received: by 2002:a05:6214:4104:b0:6b5:dfd8:ece2 with SMTP id 6a1803df08f44-6b9611a0258mr69314806d6.30.1721646388389; Mon, 22 Jul 2024 04:06:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721646388; cv=none; d=google.com; s=arc-20160816; b=rxc4SEK/ROuDedAaBU63axyg2PrMOkC0Cn1Mnn5ZyJSc83kjyOt3gw9cUYU59/qIP6 kHkN23wFkSM1bgDwks5xyHzvnX0ZFrjtoKM7p4Zisp9f07hr/H25j2gukBDEHqedT5O3 rBwzcuRlKTsqSD2tx9jMDgU1XVyzeJy9Li9JqAwnGrqWuDcrRW2zf2FHCIwL8tk4uf+N ysPFXtCNse4jn3q05DQFEl6s6GVK9iaV0qAm2DbCqh28nD1f2xgFqo4xcOne7VYn1v9d d2VFFnDeo4+tXeXbvy2X5MiWbCagx6OBKLcQlEynXYX0d9l3V5hbAioYGrlQ/adeiq3/ Jt1Q== 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=gtiOJDs8/QqWg6V+YgjT6LO0f8xyqBg9VO+Gwatl+Ss=; fh=yO49L5h6RFmRuUHwEB0C3r9lQ2vLnfef1j6ffh1xT3g=; b=Q4QOC8hKAPiBuZD2+zHjWamQmMhBnILITrDFD8WdgKYefiMN0rj6y0tGK0lW/jAfVh EkIIGgc2Emj1Gd+vjfzlNuRXN9TlkWv/i/5Wlz7v/JWL0BuiuxLetnrb+6t9lw2rOBjG krWXukZVRprhdjE17HfBLmwZ7odGVdMulNAN8y/FopdKC6B5TrDE/OQFHLFcvCAuRbzR ci3n8h5nB1OidN5+1mAK3MjK97gcUgt1QhNYfXOUwZH2FyBf9OhJ0oIPOPrcNmKlZpGy Kx+oM9vi9jAIRaor97Z9N0Uk+IRGIPxYhDPMocowrYewJ9UGTNXyQlI6D7r1wcernfhi H+9Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q5qWm8VJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6b7acb11b45si76235796d6.558.2024.07.22.04.06.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jul 2024 04:06: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=Q5qWm8VJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVqqG-0006CE-D1; Mon, 22 Jul 2024 07:04:32 -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 1sVqqE-00063T-AV for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:30 -0400 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sVqq9-0002US-9Y for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:30 -0400 Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2ef2c109eabso12794611fa.0 for ; Mon, 22 Jul 2024 04:04:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721646263; x=1722251063; 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=gtiOJDs8/QqWg6V+YgjT6LO0f8xyqBg9VO+Gwatl+Ss=; b=Q5qWm8VJV5ntHRH4uFNWNG8NPCBeMX1bpE2GSjcsfo7yfMD9TnQaDowXdgsc/eIeRh c0YAteVDW1+pjT4hjgHvL1ErOyykjy/AGx5Wy4undKzhvY55/NyHebw69F4q/wnbU39z G3reI7F0XXQGbJx9Pj/SNZmnCRGeIWPyyuvLrma/cs9tk63vxyOeHMzpREKLb+YlcJ1m rfizdZB1npsN2PPjTRAONZgpoBXl4IFan6tpkJnTUGyNbjUBM8X52BVWYp9nQUwf4sCD eRZ44ZpViH52VSG9eDxpdbOPEbGrqghRnA3yu17waxqONoyvaLO10iOkn5/3IZVoN6Lv JHHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721646263; x=1722251063; 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=gtiOJDs8/QqWg6V+YgjT6LO0f8xyqBg9VO+Gwatl+Ss=; b=shAoqyO9qGg5u3PgRPoVjNfLvMC7VEYZQ2d1sSALIR+o974MVyAIrDC7C3vcQa/KpI VstiSWbTAhOC7C3CUQ65Yhnw+w32ksDtNxSr4zIr25mlj4hq0mnmmr67Gk2JX+YrJifw OHyYQYQUgVFj0W/wXj/lPuOC3EeGjxjiRFX1r8GATR6CRC0uzPw/SQh3vA3bwVlGOfxy Ad5WErL+aheAwSw0F00mRDp2+pW1N38gEAiG02f5K8dh7o6L0gMZnl+TmCHh8xGDxKRw wBng0Q4uExzV0LNtT9VOoTyLOu9j8w0kslBxgMCn8mkCwr5iqah4TtjydYdysunNhihW qGgQ== X-Gm-Message-State: AOJu0YyDxW2qA8zpAOPb2zCQdTKlWvhn7Z47tftlO94nNqaTINNo2g4Y xEUnYglVvwfiD7zwmVswGfXIPPC/aElLXg4fyJTBTLg5G0P4+hcj6jR6Y9HhMYuBio//mMeXbSJ 2 X-Received: by 2002:a2e:7401:0:b0:2ef:2f37:345b with SMTP id 38308e7fff4ca-2ef2f37352fmr18755391fa.30.1721646262962; Mon, 22 Jul 2024 04:04:22 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5a30a5ccf09sm5960051a12.10.2024.07.22.04.04.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 04:04:18 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 8B289620F2; Mon, 22 Jul 2024 12:04:14 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?A?= =?utf-8?q?lex_Benn=C3=A9e?= , Aurelien Jarno , Jiaxun Yang , Aleksandar Rikalo Subject: [PULL 10/16] target/mips: Add semihosting stub Date: Mon, 22 Jul 2024 12:04:07 +0100 Message-Id: <20240722110413.118418-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240722110413.118418-1-alex.bennee@linaro.org> References: <20240722110413.118418-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22f; envelope-from=alex.bennee@linaro.org; helo=mail-lj1-x22f.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, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Since the SEMIHOSTING feature is optional, we need a stub to link when it is disabled. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20240717105723.58965-4-philmd@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240718094523.1198645-11-alex.bennee@linaro.org> diff --git a/target/mips/tcg/sysemu/semihosting-stub.c b/target/mips/tcg/sysemu/semihosting-stub.c new file mode 100644 index 0000000000..7ae27d746f --- /dev/null +++ b/target/mips/tcg/sysemu/semihosting-stub.c @@ -0,0 +1,15 @@ +/* + * MIPS semihosting stub + * + * SPDX-FileContributor: Philippe Mathieu-Daudé + * SPDX-FileCopyrightText: 2024 Linaro Ltd. + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "internal.h" + +void mips_semihosting(CPUMIPSState *env) +{ + g_assert_not_reached(); +} diff --git a/target/mips/tcg/sysemu/meson.build b/target/mips/tcg/sysemu/meson.build index ec665a4b1e..911341ac37 100644 --- a/target/mips/tcg/sysemu/meson.build +++ b/target/mips/tcg/sysemu/meson.build @@ -1,10 +1,12 @@ mips_system_ss.add(files( 'cp0_helper.c', - 'mips-semi.c', 'special_helper.c', 'tlb_helper.c', )) - +mips_system_ss.add(when: ['CONFIG_SEMIHOSTING'], + if_true: files('mips-semi.c'), + if_false: files('semihosting-stub.c') +) mips_system_ss.add(when: 'TARGET_MIPS64', if_true: files( 'lcsr_helper.c', )) From patchwork Mon Jul 22 11:04:08 2024 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: 813710 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp1811397wro; Mon, 22 Jul 2024 04:06:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUbchjraT5+DU3NeIV+PyteavqkZfhTTc0zYWh0kt1sBdacQzNwfpJsPMTATpsq44PJMfzw5MIqnZZUQYbRiYcR X-Google-Smtp-Source: AGHT+IEeJsLtoiXFOhf3xG2hCeuBauP2a3AYEtvFpfS2TKn9koyH5Z++YFkFdCTO/PBLa+cwTyP7 X-Received: by 2002:a05:6214:19ed:b0:6b7:8edd:410f with SMTP id 6a1803df08f44-6b95a5b3c26mr104438376d6.8.1721646363723; Mon, 22 Jul 2024 04:06:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721646363; cv=none; d=google.com; s=arc-20160816; b=BJHwjUKYAbGv0HHfN4j/mxG9OBFf4iuelUYIag9wjfRCtykP+kkzZWKAEVt0lx6DF7 5SOGRSu4QL2zpUi7w1jTKtquwx2OkOkQB0u+lkMFRV4umAlSjCoFlwEc+oTfyOuITd2m xDBabGMS6jvQqXYP4wkRnW73dcuFFv0NZs75tvoqXs3ef64UHOOWScduw6aMvQXrYNx6 S75CUyJd3cRR2yA/179YJRBhXdHadqDgviLf9y+p6toUVEogaFpLg2XyXK3TsGd8C40p 5oxRAUl5Aj8km24w2O3mVqbfN1+sfvKL5RTch/QzDZB2k59SQX/XOZcUY8ZjkIu/Z963 HAbQ== 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=OsxJlG2O21VU9fz45mO2VxagozV0j39OOaB75wjf6W8=; fh=+W1UX2FSWwqig+rOS0FP5WCVBVv8s6YNbR+Rvwdi9Ts=; b=Tl4yNGvFF0KLcveZzxa5EQP1sd6fN++zXc0AkG8bVPZAA/g5+6vcI0/BPYFyOzKOx0 pmDc218y7n4whDyxKK1e0BpZRS2ebYrkI3ukiWJJYQiKwb7brHyxbYMHDfvcUwdQm3Bq BWI3axE23j6zO5kZUZ5ZNzYmElgf/7m9WrgoCnFSSqhi/UFbpb2Q4BxUFdzTsOBscK+W tC7OLhFk5Xq5/MWwJstq9DBdP9LhN++IobHcJgiCBzj3FmaE3hmwqdukuOzlNGYefyPb k4Ygk92WkDss1yc+/rq7ZdLQSmAHfY3S9ISaqjEwgoMAFlAFyWnraxfOcxoCyd0Ela4I uzvA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XUZL3zDx; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6b7ac999d46si71505086d6.255.2024.07.22.04.06.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jul 2024 04:06:03 -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=XUZL3zDx; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVqqI-0006JL-4H; Mon, 22 Jul 2024 07:04:34 -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 1sVqqD-0005zM-B5 for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:29 -0400 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sVqqB-0002Uv-48 for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:29 -0400 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2ebe40673d8so51617151fa.3 for ; Mon, 22 Jul 2024 04:04:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721646265; x=1722251065; 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=OsxJlG2O21VU9fz45mO2VxagozV0j39OOaB75wjf6W8=; b=XUZL3zDxrjx/biO+Lxu2gvXLnHHvvK5qnYleovcclpmnv4HmJ1NEs/UdaA0n9NUgtK SvAU2PgLERQmgtUothD6G77VqjgsLNbbiNDHsCnnIHKfkAfOqAQ0ufR8Tuif/ltsO2g0 /M3X+Als1upx7z39oph2O5IKl0TdIFtx29x1Enrde7kBhJyvm/n0rOp6TMvS7RF8ByM0 azHXbagQTtHMsRMQoer6V8TsdTpmA6r6m28GW0vxumloRLfXR2TPlZuQE8PF+UYZJCa3 MOg9O+ErPw4Bk94i05KSf6UviGJ5eudQHKivaf9BbdnNWwmEX/8hLTpFMZXzjW2dgvci EjHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721646265; x=1722251065; 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=OsxJlG2O21VU9fz45mO2VxagozV0j39OOaB75wjf6W8=; b=uSOMl2JzBn5Cenp0fP5RjYRwCkY5sVBt3bIWrtOKxKJVSQLMjSzT5KcFl3gscuS8ol dDdVtQttgEt/iaWhfNqXg/JSdmX/zvyIq52vEmZkqmQeiLwu70rNFUVz1PutTqmji4V4 p60rXNaY/t6nswrQllAsist7BvecQXoUOFdQXU59teDW2mxPmRhbulMNxvtp35iFOEN+ LblpompQ1U1OdBRY2gJlaDadTFMimn54UmwloYD1qs6deF29xC39Pc+SfBQ7DUdO3l7q taFz5w1KjMLRHZsCPf4vw1aAXgeFu3A0XEhT5l4us43caAomIp/tmUaTJ1USD5qPzHhx 30mw== X-Gm-Message-State: AOJu0Ywv01mHTUWIqHCCJDeZoJTND5aQYi4w53g9s2lUZqOAIIZCIZZT G0Oe9KNJqayWHQ88IPI1MVH0bqv98NilWhkz285lQL+qg6kEt8G8O7MpMwgpPrc= X-Received: by 2002:a2e:8006:0:b0:2ef:2c0f:283e with SMTP id 38308e7fff4ca-2ef2c0f35cdmr24288051fa.12.1721646264920; Mon, 22 Jul 2024 04:04:24 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5a30aaa3505sm5954123a12.34.2024.07.22.04.04.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 04:04:20 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id A2365620FA; Mon, 22 Jul 2024 12:04:14 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Anton Johansson , =?utf-8?q?Alex_Benn=C3=A9e?= , Paolo Bonzini , Laurent Vivier Subject: [PULL 11/16] target/m68k: Restrict semihosting to TCG Date: Mon, 22 Jul 2024 12:04:08 +0100 Message-Id: <20240722110413.118418-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240722110413.118418-1-alex.bennee@linaro.org> References: <20240722110413.118418-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::236; envelope-from=alex.bennee@linaro.org; helo=mail-lj1-x236.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé The semihosting feature depends on TCG (due to the probe_access API access). Although TCG is the single accelerator currently available for the m68k target, use the Kconfig "imply" directive which is more correct (if we were to support a different accel). Reported-by: Anton Johansson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20240717105723.58965-5-philmd@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240718094523.1198645-12-alex.bennee@linaro.org> diff --git a/target/m68k/Kconfig b/target/m68k/Kconfig index 9eae71486f..23aae24ebe 100644 --- a/target/m68k/Kconfig +++ b/target/m68k/Kconfig @@ -1,3 +1,3 @@ config M68K bool - select SEMIHOSTING + imply SEMIHOSTING if TCG From patchwork Mon Jul 22 11:04:09 2024 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: 813717 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp1811687wro; Mon, 22 Jul 2024 04:06:42 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXtaTA5X/wdFJPUujT7Qeozh8PJuRh+cHBUZseTeT4bIr4zPtnLbuayj258XyIKpatOG7D1dqgxTqtuSqCfqKLf X-Google-Smtp-Source: AGHT+IE0jl8CljHHq4rlTM9JUsHOAPNtlmjHOT57f5zc530FFKyYAW3Qpl7aMFbOoqrBanPdjhUo X-Received: by 2002:ac8:57c1:0:b0:446:44d0:3aac with SMTP id d75a77b69052e-44fa525c4a6mr101916741cf.7.1721646402577; Mon, 22 Jul 2024 04:06:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721646402; cv=none; d=google.com; s=arc-20160816; b=WH8dLHTER4JKziVc2v0Ac0AVnk2qAzw4yyhVrvm4/k9UHVA2rc2EUKIX/VAjSzAAUy 2KRUF3ufVKYRfp4FcU7WthpBgF8sw1i39ypyE0Kejhz06+Xefi2rXQPIjTxMUNroGg3y 5S6xCmprUGi6vXTo/RYWBd/jh8p7YT9eF1JIUfyi2fs8UIjMlGN54XJFNcowCRq3pgP6 FS7MI/T4LDL/3X6CFPdIJ2Oaoe0s3DMpwRshYUv9bwt2jh8A0l7030eOeODuFdamGR9W Ml6osPOkeXMRksP/bguNiRqSkNyS1n3HaKmkJeFjnjFqVs5h0IuyyyDneEXE1igW0VWr sxKw== 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=N5Md4ulxL95o26Yk8COW88V0WI0Iz0p2W7Xea2hC5X0=; fh=5kuTqtULM/H2KsISwbSyQblxYD8Ge5k50AcXgbVAwWA=; b=DHJgrKu8F1dD0S3qd0OO6W3NcS/+ts2tGJnF96uZhLUgdnvLt3Nswf1xy1hWDa5iYX s9BSbe0ZJnp1Xbzm3oKxOxLg1oos6DZFN4Gvh8S2U9COna4VMitkiav1XD83fUmU5tvm 2XsQ/Kgsq84udZu6fKwbxSTZ64oEz9iUMMp4SmDyk56EeEl3x3me1JZm3Z0m5mzoK6nr CynFAboktqZl1sRMRJ5eg0nkmFXURANNlha2FdMK0q0H/fY0QV7sKODZXkCKGVh/hSMR MxYtzvYOL3xoSenTMYckhtbxePsvjDAVzeTBs+E2M0dlW9Wt7g1qPVsEBD31f87ZJ1Ey httA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OUeccvxN; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-44f9cd2a12asi70788341cf.204.2024.07.22.04.06.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jul 2024 04:06:42 -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=OUeccvxN; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVqqE-00065c-SI; Mon, 22 Jul 2024 07:04:30 -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 1sVqqC-0005vX-9b for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:28 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sVqqA-0002Ud-Kh for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:28 -0400 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5a2a90243c9so3130754a12.0 for ; Mon, 22 Jul 2024 04:04:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721646264; x=1722251064; 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=N5Md4ulxL95o26Yk8COW88V0WI0Iz0p2W7Xea2hC5X0=; b=OUeccvxNIGQ43WKRmmtf+e8xP23rQBnyhroNgaUZB5j25of/PWHp2kf2w+7ayqutE6 kzQ36iV67E/BFzbm3qDWBh5uh+WKqpkRWmBYxO3mZGFuNG6hIeJ5zOe9WO3TrwYIaaT4 CX8hlK9NQpukDqhKSyP7ydvppmsh1y97RTeZIqq1CaU/gzhaOKeKFlk09xC+7LCPkIYB PJIYB5kwv7CuZ+OpONZOHEZQUaixyKtT+wKCsi2N1/zy2Ig+KCP2o8jSmb2o6jOSFHak F5sfu4BH7oc9QBef2FF4mOohNYrpT8AR9CDBPpY2fzMzpcfCNF4lYRAhAbCCCFooQMTl q9CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721646264; x=1722251064; 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=N5Md4ulxL95o26Yk8COW88V0WI0Iz0p2W7Xea2hC5X0=; b=mOeZje39UJLDRqfGVM4Ic/b7bmddFCfk7zI6IwDOKaIV3pLNLruzIHf9Rct5sCZeer xgC07mwDDAYD6pRjbMpyBBOdE6DooXMURnPS0BgAsE804QTrPZtskA0lP1C78IQq9VNk F48LQxoFSolwcJ832+SbMMDDOZn6lrfNgQU2K12LNfeCLwBDpTdQ4WrLLvIhEwxIwstN Z7p6uf/AWy6ZFZQae/Lt6MkZlxYA2SIjBbHQOx/ePCDZHuZEfVAnZhn/VGWo+PZf57UK k2n0j7L3Hl/Y/SVZSG0d+DinjAtT5oPVzFxLjlPXn0bxuYJkm6l9S/4kUPuRTU3maqL0 btUg== X-Gm-Message-State: AOJu0Yx9AGamakjzgLfbln0+1MkMoYsGoGtA+xD35W0hAZ3ZvSATNiTX G2v3GNbL3PPMyJuOuwSY4vuWsJpok9dRnElc2wcewwZYE3q/z0SVY8eAYuUgQ0bXmqUnzw6Czp2 v X-Received: by 2002:a05:6402:3486:b0:5a3:18a6:698a with SMTP id 4fb4d7f45d1cf-5a47ac09492mr4527718a12.33.1721646264018; Mon, 22 Jul 2024 04:04:24 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5a30c7d326csm5881186a12.86.2024.07.22.04.04.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 04:04:20 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id B94B4620FD; Mon, 22 Jul 2024 12:04:14 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Anton Johansson , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno , Jiaxun Yang , Aleksandar Rikalo Subject: [PULL 12/16] target/mips: Restrict semihosting to TCG Date: Mon, 22 Jul 2024 12:04:09 +0100 Message-Id: <20240722110413.118418-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240722110413.118418-1-alex.bennee@linaro.org> References: <20240722110413.118418-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x536.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Semihosting currently uses the TCG probe_access API. To prepare for encoding the TCG dependency in Kconfig, do not enable it unless TCG is available. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Message-Id: <20240717105723.58965-6-philmd@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240718094523.1198645-13-alex.bennee@linaro.org> diff --git a/target/mips/Kconfig b/target/mips/Kconfig index eb19c94c7d..876048b150 100644 --- a/target/mips/Kconfig +++ b/target/mips/Kconfig @@ -1,6 +1,6 @@ config MIPS bool - select SEMIHOSTING + imply SEMIHOSTING if TCG config MIPS64 bool From patchwork Mon Jul 22 11:04:10 2024 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: 813719 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp1814978wro; Mon, 22 Jul 2024 04:14:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUMBP97lKuq0tcqhz111jRBw0LJc4LKUDJDZi7AVq8LYSaTB9STZNeiEI+CDjYiJTN+yokS9XQHNU9TLjKpQlDp X-Google-Smtp-Source: AGHT+IEFxtKQ9t7eyZ/DE0+r17C+iyvyelmnA3nD9wru3QH2LF2QPQx6SQtsLy3Nc6vozKzFtzsw X-Received: by 2002:ac8:5812:0:b0:447:e5e8:83c2 with SMTP id d75a77b69052e-44fa5388e4fmr89810851cf.55.1721646896995; Mon, 22 Jul 2024 04:14:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721646896; cv=none; d=google.com; s=arc-20160816; b=eRKx6pKnbZGaOmAL23OjJGoIPMJQWzqReFKOFS7/fFno2n0T8yIHIRi5yQb3zgAz1R Fjs5lHwiT5yJd1fLsG3NWACHgKdLbWgLpCvkNeeTDLvkaFZUZyNDX+ee1H1SbcaqdUp2 VbLMQIg9VpZdtsS1VjLJknGkSV0GTpVccZGhsbrEzhomR3WkWWjIoJbM+k3JZsMvKFnT M6e34Zgq+mNUkqAUT0MY/K6tFLkeJXM1Rmj8Be9pD1ptuKdq3avijK7znw+RIpSKydZp DNX/A2IF4q1QVuxokjGYYkmJI6Qsl45oOdMDOBSYiZKATkTMAz159it4IukqV16KWzQs xpHw== 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=mrk2g2iMtnBRvtrBAoapMSBcMDfcCWKQff90zKvNuK8=; fh=wbzY7RULYzqK353CoktUxnKoy+CCKaWn2DI0fjgaXjk=; b=Mh+A+1ZnfI4MKghflcSIO4N0YkxfFHJU7LqUeLrurrVCXe92HW4Xr58pVTFSWEWAtE uUTAXY3LzESA6qz98KW+0BNWVQNHDERJuk0nbE195LaYSYxVCTJDrAU7NF6aMaL2XLMA n8eVMzMgTU8Z7FOAcFskAQP5frdAIBCqgREYoNLCu6KmSXOKufJAGh00SUnvYn9jOzzJ WJHKlQll9y8lAdlv+VPdnwkc4IkYxjxMVUW6ACAqabJKENYmwmQ0o6937WtxgZ5TITNN UFe+LvKuHV/4tSsjDK0P3/WCkqDqvYddzefwhM5PBSPX2tADgAFU1BbJd5Y28FVGM/h5 sNOQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uH9Bt1di; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-44f9cdd934esi76537171cf.491.2024.07.22.04.14.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jul 2024 04:14:56 -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=uH9Bt1di; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVqzn-0002cV-2Y; Mon, 22 Jul 2024 07:14:23 -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 1sVqzk-0002S0-6f for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:14:20 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sVqzi-0004Jw-1b for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:14:19 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-368557c9e93so2107299f8f.2 for ; Mon, 22 Jul 2024 04:14:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721646856; x=1722251656; 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=mrk2g2iMtnBRvtrBAoapMSBcMDfcCWKQff90zKvNuK8=; b=uH9Bt1diQUxDNNipwH2hOzfCbKNutV7bzf44MeMYBL+cYStDlFjT+V2b3sc9GF2dO3 EekDqJSAJuZw76oVAXQqnjpaHMngyLWYAdIl8zDtBKHEJ3pRNiYb5uvSBH84QMO0388P iAXlTPTzr93jBLG8UL3CIJ2RqiFYjjrPgsV/PE6Uc7iONMCqkNqK6Ex3JyBYBM+wwx7h w5Kol6NFiWQakxH3qlC4Se4RgEiCk+4X976GiUZF/Y0LL/leo6wNGdjluUOSPZrRw4hy 1AZ6bowTsiBDBJxcBq8JZNvHNQCgZ9lI0u20bR6RymGwIw+YB+7W+DUkvnjOeHUJuLI5 ew9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721646856; x=1722251656; 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=mrk2g2iMtnBRvtrBAoapMSBcMDfcCWKQff90zKvNuK8=; b=gqEa70EEl5eNbYG3X9FrtPSQ7nG45O7/DrUH8bvfyVSZWBgJFf/zJ3yGh5ZSU01sk2 JUm58ft2OTmmXRxnNcduwbWHiEKxTi5TIA6UJYCbvw+rpltN+pzlgv0UXsk0z749xpAI 3aC4X+EOgi17WpPVtbtRUw/8DPBi8tt8AL3UP6JkpGcpar98ktt33s6mktfGj0oc9gcY 5HWTsePyjVcC1XXcnELSqfY+ISdynKmfghP4rS7A5I1lxSqq3Acn7U30un5NVyRbMCpj b3hdmoG3q5nqCkqZVlC4yiY3j54aYJx660XUkcq+LQRX2pI1nN7/dDYWxssTkarG3cvT FE0g== X-Gm-Message-State: AOJu0YyNapcw/YYiyvp7Nf9ou/aDEiyLrFd67YPcGuGXWohlQwzU/Cpd QrSPTC4SWhJuywZJF1Wb63vNcI4EmyL9lOz8tBJeUiz5cN7n4SCVP/KJ+mNngBI= X-Received: by 2002:a5d:5f8d:0:b0:368:445e:91cc with SMTP id ffacd0b85a97d-369bae13627mr5096890f8f.21.1721646855413; Mon, 22 Jul 2024 04:14:15 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-368787ebd50sm8179498f8f.93.2024.07.22.04.14.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 04:14:09 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id CF7E962102; Mon, 22 Jul 2024 12:04:14 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Anton Johansson , =?utf-8?q?Alex_Benn=C3=A9e?= , Palmer Dabbelt , Alistair Francis , Bin Meng , Weiwei Li , Daniel Henrique Barboza , Liu Zhiwei , qemu-riscv@nongnu.org (open list:RISC-V TCG CPUs) Subject: [PULL 13/16] target/riscv: Restrict semihosting to TCG Date: Mon, 22 Jul 2024 12:04:10 +0100 Message-Id: <20240722110413.118418-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240722110413.118418-1-alex.bennee@linaro.org> References: <20240722110413.118418-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Semihosting currently uses the TCG probe_access API. To prepare for encoding the TCG dependency in Kconfig, do not enable it unless TCG is available. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Message-Id: <20240717105723.58965-7-philmd@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240718094523.1198645-14-alex.bennee@linaro.org> diff --git a/target/riscv/Kconfig b/target/riscv/Kconfig index 5f30df22f2..c332616d36 100644 --- a/target/riscv/Kconfig +++ b/target/riscv/Kconfig @@ -1,9 +1,9 @@ config RISCV32 bool - select ARM_COMPATIBLE_SEMIHOSTING # for do_common_semihosting() + imply ARM_COMPATIBLE_SEMIHOSTING if TCG select DEVICE_TREE # needed by boot.c config RISCV64 bool - select ARM_COMPATIBLE_SEMIHOSTING # for do_common_semihosting() + imply ARM_COMPATIBLE_SEMIHOSTING if TCG select DEVICE_TREE # needed by boot.c From patchwork Mon Jul 22 11:04:11 2024 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: 813718 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp1814844wro; Mon, 22 Jul 2024 04:14:40 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVTVI+Bdn93A9UMe7rvuEuvATAA1ZdJXtndmwGjrXFdr1oz2jKd+u5V2WA4t3munOWbB2xJiwkt6NCZqxm+1UV8 X-Google-Smtp-Source: AGHT+IGBuRtBRHiSJa9iLw6ao+zyfAykIe71Qh/Q4PMHvcPvt5JAIJUhNe4gGBXmhGq6VWs7vVBr X-Received: by 2002:ac8:5fc2:0:b0:445:e9:e67b with SMTP id d75a77b69052e-44fa582b32bmr113992961cf.23.1721646879997; Mon, 22 Jul 2024 04:14:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721646879; cv=none; d=google.com; s=arc-20160816; b=E5s7oPG0v1JVX6uMr8ROVPJrpBG0fVJ+yZp4J72W8qBDDa5Dbq2aYdfFWq7QGYKJG0 0l455KCfJ4psFni64PNDLbTQBpmwEPhdqGBk3FO6TqvL3Ji8Gz5VYs1Kd44H5li9CW3H l5F94/UgBTUi/AlipXKysv/nS59PdII8stY1V+LvDyIVGI/p1VkDhRWnaO76jD0AqNPB 1oZv/VnRxdhuqLpPcF/o3Ag1ZnPxQmzBPEP2H/vPyjuOFEW1GoTbrFdlihnnf0kM6JV1 kVaII9wCz+XlPZeh3yXU6oenBFdOE1Cv0Qs8Nhq0NVHAj/2XBlbZ8ebbrXDc9u+lMgfd FlkQ== 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=Ql8l31gb6ox+2gEb124K+SkO2XK4Lwws9D+yeW2DVYs=; fh=L/ekz8k4rSm/Fm4EU3+uVtY6hJEPk3x571oF5U9HiHI=; b=sSeNJcZmbRGL0P01aZT+0ABqdgGytEnsNEVaXjkKbzCoxzhEhtt9QBIj0iJ+Stwgrg nZW+iNPKBUWgJjgIwLfBflGd37eeNqTfGJZmTmvKOraT7JxSrxbklpCuh8bZAB+1OSyX sXT8LGwfI/Hcg0ImWWtmIOCqjEkQN+LVlTWUCCN9pnn//TgSRlSbGHs8g0smtVnlpQFg ONT8BciJGbIU1K7Br9mAX/zIFpSCM9m1zlH0A2arcH1DPhKXW1X4bx3K8Olzytyd0WN9 0QN1ICOJ2V3lbTvMhhcaC/SgJqwSyPXdVmoMfKPdJDOQezQ1y0JsnQMopAHsRxdIO5lh qvYg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j9fww0gc; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-44f9cd27fedsi75983761cf.172.2024.07.22.04.14.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jul 2024 04:14:39 -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=j9fww0gc; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVqzl-0002Ts-3J; Mon, 22 Jul 2024 07:14:21 -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 1sVqzi-0002L1-Ho for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:14:18 -0400 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sVqzf-0004Jo-Rc for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:14:18 -0400 Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2eede876fbfso56481141fa.1 for ; Mon, 22 Jul 2024 04:14:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721646851; x=1722251651; 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=Ql8l31gb6ox+2gEb124K+SkO2XK4Lwws9D+yeW2DVYs=; b=j9fww0gcbu+ApJfPWJdf+E0QELG0fKr/mC9ZZX9GTPkvrJw9zsQOTUZb1Wxvr7A8Nh yDdBXabrEadcjdrZeHEEoNj7ZKCGS5qCrbYIA0rXoZ4hA1YU9moA0dgov3MRWzKXxpYT Ccen9HwsqN+CdZwo8mM6Zwo9Rt9yF6xycpJMcIFMj4GT1pAdH3eCESErhNBpa0T+j1cc I5oI42DLCs9S0oBLEBsYqKBoZz5CgY3PZaON8ihjUy7ag6aLhbJOwp2NEnZgsMatQqSl p8CB2Hue3DwPdXaMltpN+YfkfM7tWcD9sQ4B16eZzh1pM6R5s4rOGcUJO+0FtU+qlN6m K1Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721646851; x=1722251651; 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=Ql8l31gb6ox+2gEb124K+SkO2XK4Lwws9D+yeW2DVYs=; b=hKnuUVdY/Xt/chANaKZekn8f9I81Boq8YSGUuyKbq5nVLJbSuyXWtI2ncwOVYTxaqJ X+Tyk7dwLIqP6THr7fRvH8P/xKJUp5/g3k/efU1Qaiw2R8vWd3TCXCctSIf+rCqyH2Wi ljwdVcX9svU+uCa6qUg1PZtqe5qIiNAGCoi4RPR3vvC/2XW9qXMec7Ki7xZYVBETMVnr YWBRi/8kbaMUEiRM3ofe6BABqnjIZfwtxLrR2yADRLqVyxk3CQtcf08Cs2xuS/Vsr9iW Pj8WzNPUVEvqxsyR3lQ7GO78yiNotxKh6zRh3PRXq8AcP0UVYmuLLsEh6dzZjoe+ZMFb ISUw== X-Gm-Message-State: AOJu0YwHP0Q2X58WJR8zYo7lUqBNhIW7Fhzp3MuAbEYmXP1oy4k9VLUS FEQE033krn9UvRdNR+sWAvUVPMvJovEsXEBrTWfw36SJDSEdqDV6YE1DmzQFZJU= X-Received: by 2002:a2e:95d9:0:b0:2ef:208f:9ec5 with SMTP id 38308e7fff4ca-2ef208fa19fmr41661291fa.31.1721646851030; Mon, 22 Jul 2024 04:14:11 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427d68fa0a6sm123897995e9.9.2024.07.22.04.14.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 04:14:09 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id E571A62107; Mon, 22 Jul 2024 12:04:14 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Anton Johansson , =?utf-8?q?Alex_Benn=C3=A9e?= , Paolo Bonzini , Max Filippov Subject: [PULL 14/16] target/xtensa: Restrict semihosting to TCG Date: Mon, 22 Jul 2024 12:04:11 +0100 Message-Id: <20240722110413.118418-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240722110413.118418-1-alex.bennee@linaro.org> References: <20240722110413.118418-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22f; envelope-from=alex.bennee@linaro.org; helo=mail-lj1-x22f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé The semihosting feature depends on TCG (due to the probe_access API access). Although TCG is the single accelerator currently available for the xtensa target, use the Kconfig "imply" directive which is more correct (if we were to support a different accel). Reported-by: Anton Johansson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20240717105723.58965-8-philmd@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240718094523.1198645-15-alex.bennee@linaro.org> diff --git a/target/xtensa/Kconfig b/target/xtensa/Kconfig index 5e46049262..e8c2598c4d 100644 --- a/target/xtensa/Kconfig +++ b/target/xtensa/Kconfig @@ -1,3 +1,3 @@ config XTENSA bool - select SEMIHOSTING + imply SEMIHOSTING if TCG From patchwork Mon Jul 22 11:04:12 2024 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: 813715 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp1811590wro; Mon, 22 Jul 2024 04:06:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU14VDiQjbSRdl93ay+O8vMkyQj+Qy//vWMOIf/3f7obSxQ2dCuaAQQUNNCTfYyZZ8uJhoZR38c+2IzugB4DY3y X-Google-Smtp-Source: AGHT+IEpxQKaob5ISSuMBF2KPSbYYMmlQ92ewvabar0+vqnqK6QQoJkRVLOZCPVUQE2lMEiYa+SM X-Received: by 2002:a05:622a:18a7:b0:447:f11d:3a59 with SMTP id d75a77b69052e-44fa5362df8mr80711221cf.63.1721646388645; Mon, 22 Jul 2024 04:06:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721646388; cv=none; d=google.com; s=arc-20160816; b=wF2kdp9iSAbD8GsvuQ6+cvCJFO8uMCGnWKsMkX9JuETl4NzS7g7uU/MTiZ9QPJQT4A gE+Cc+2UpC/ON4sxLxWNPdPINr+viqguSnDhYtEchiRvx5xKoSHJbGFlp0KQ0Eks/vgl ZjzRPhRf/KRONpehYiI+jxqe6oUwLkUpGb6LWR5M9PNEJdupPC1TH1s34zG75FbRhuCa GNXlXR12fWtPE7Y1A/iQrCHP6JIDR1hDrCqsLS6vnNqunvIu1DhLXOKGA+NFIoPDUjd0 w/Z/+7QoTivfHN97Q6pvBQ4fet3aPjE7yRaCgR6ISlfMvnx31SKaW18eHsw1yQXTi8lY /OgQ== 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=yjOKFmUYW+JcwieNHJkzMimsCu5Ki6cUKvCgnrmOD/I=; fh=3yyKDpaCxaFBfItysmkKsFuZuNanDUZN/HxeN7bI7WQ=; b=fOfOusjcc3GcnJtlhBqzejDhBpG/StRu6BjGBA1RybRpHPaEaHVOeZSj2yQFt/fs9u jkg/cRsk5eq0EDvodpvvNyvXppASr4NpwFLm/8zab6Hu2L90XngPKqDECcY/Zl5ogn9a bPgsHGByppH9QwW2xeABlqfF+GprRxubHBXE8Sdhu/Gyfo+VPHSB5+RjijDqW7YIgjJa BxgBsesySsiHnXmPfzZLbr7+AVr34naJW4BXCyrRAwNRhjN6dtTi76cg9l24zi0DG/RJ zvG35baSJ8uEVxLY/DpuAUlCgOE0HMQHr56p6qSqa45rVywnQXxM+/Kmp92aFgVNCN1W bHZg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AYh0wVkg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-44f9ccf9063si75660871cf.150.2024.07.22.04.06.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jul 2024 04:06: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=AYh0wVkg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVqqG-0006CP-Ec; Mon, 22 Jul 2024 07:04:32 -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 1sVqqE-00064Y-Ii for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:30 -0400 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sVqqC-0002VH-KU for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:30 -0400 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a77d9217e6fso390107966b.2 for ; Mon, 22 Jul 2024 04:04:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721646267; x=1722251067; 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=yjOKFmUYW+JcwieNHJkzMimsCu5Ki6cUKvCgnrmOD/I=; b=AYh0wVkguaYPalmDlCMdW9zbOEvy+gh6gP8iK+WI/aAwNsuwM9iL8uVN71ecgK+lmY n0WM2BqTF3O0XAAAd2Mmim6zaa4fRZ2x1zStcYbmKA0iP/kt7D1gWzFTNvRoQFTjy5ib nozN5UoPlg5Tfqj5dXV2wxEC2ZsCMJ/OhRytsb7ELiI2zOZmEFdJ5hl7Z3ldz8EHIfo+ UUURhfxlUR+jQ0i1DUcZW9L+mvwDl85icGID1rswDfl9iZNhoSJ7mSx/iwxePr2lmlR4 rp00AOAFbDeykaEG4X1s1OtJHZK/eqJvQakCo4EUeMY2imjQbWdNzzoNaAsQDO60HZXv H6EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721646267; x=1722251067; 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=yjOKFmUYW+JcwieNHJkzMimsCu5Ki6cUKvCgnrmOD/I=; b=VUPODSlcBvXKLEdswQtllb70Dbm06kiHLKfUdYwhznVXrLHOnjeJyEVQxJz1UNYUAy y6wRkLzvXAhDYgxforjNGabP6E2ltlnOGaNsC81zZbQVPBAKuoCev4p572R42sHp/m2O 17gZTXKGQFFAtPJQfDIvKUM0SWECWbB7h0uOYQ9BRBbj0uDL0MKQOfWJEvH+xTRMZwg8 E1gr72SV4ITV49FO5R9DhdzTyga4iphuiN71eT0UR5sEF9euQR5uB0WkwgN0k4UjPCbS Tlk5/yXq24Cvko6ad8gpcZBwO0J/0Nif5vlzUvO3nQ3V8bBoa4kYLMELlAp0uYXUGvgr 8lfg== X-Gm-Message-State: AOJu0YwaB/tVDIBz1fP43LXRSK0IU1QY0vF9sGZPWyuuhdd3cfQTDFHL tqXz5mR0RyOO9Pqz6F6SSRDOP1c8aM+i74TW90O8aoZ5C2IFOHtbS9cdUbw9m0s= X-Received: by 2002:a17:906:c150:b0:a77:eb34:3b4f with SMTP id a640c23a62f3a-a7a4c00b86amr427897366b.17.1721646266987; Mon, 22 Jul 2024 04:04:26 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7a3c8bf30csm414499466b.141.2024.07.22.04.04.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 04:04:22 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 07D3D6211A; Mon, 22 Jul 2024 12:04:15 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Paolo Bonzini Subject: [PULL 15/16] semihosting: Restrict to TCG Date: Mon, 22 Jul 2024 12:04:12 +0100 Message-Id: <20240722110413.118418-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240722110413.118418-1-alex.bennee@linaro.org> References: <20240722110413.118418-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Semihosting currently uses the TCG probe_access API. It is pointless to have it in the binary when TCG isn't. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240717105723.58965-9-philmd@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240718094523.1198645-16-alex.bennee@linaro.org> diff --git a/semihosting/Kconfig b/semihosting/Kconfig index eaf3a20ef5..fbe6ac87f9 100644 --- a/semihosting/Kconfig +++ b/semihosting/Kconfig @@ -1,6 +1,7 @@ config SEMIHOSTING bool + depends on TCG config ARM_COMPATIBLE_SEMIHOSTING bool From patchwork Mon Jul 22 11:04:13 2024 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: 813712 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp1811485wro; Mon, 22 Jul 2024 04:06:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU58JdTrNVtaYEVNH2L0g/kG86Rmf3Ba03U1j1AaCdbxIH0407zPjo5Pr3xsx/ZEPWCGaDvB3ZPaMr6294TTcbU X-Google-Smtp-Source: AGHT+IHg9hwEwn1Yggjy1eOCDieVSkT/JzWqA2rhW63UeJj1G9wgHoJqLZanoC1bjRA9L4txKmle X-Received: by 2002:ac8:578e:0:b0:44f:9e6f:cff8 with SMTP id d75a77b69052e-44fa5254a11mr98353551cf.10.1721646372804; Mon, 22 Jul 2024 04:06:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721646372; cv=none; d=google.com; s=arc-20160816; b=LCMLPd7MCrbbtmbFIgg3tX2MTfnqz+vZvLaDyNUYhmwoZy1k9ZYQNhy4YwzDnFBlCD W0fUCkeMX8I39BGqJGFG0iVN5kLPLHAy3UAcTrGBV0ptIGUIi3QuVGUbcNtOs+jP4UC/ sHhUK3BzLTo3BgvfMzctVFRMv96jLG5+EYM96ft43laBM4fXuqU58aAJoaDJ1MXMFYwm aefDWA6UkroOH/X1OgvsoFcJWQ7omgIvNsjTYirKJGA8SV4oLC6YWVDqy4lCGrhwky2F 954APOmb47g7x38K85Uapqri6KBpTJvK2c+6gXjimcFUcvSkZ1tSJnFt8B6SJdwR15M0 +GYw== 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=7AtSpKBg1PmrqtB9T+k18UXmGojBdHF5u/W8SCXR64Q=; fh=5ExLRslnAggF8THD2ZQctuJD9B5JZH2d+ESoW8qvBaY=; b=HYNOCtN+qHmqwoqcJv4nP4ivtBwa31lXjXudqS47y33C3U2VcC6v9m+hlvSGP13sJ8 gci04Y1RfADNvAxhB/JaHflD79dbeFWRHottxT48PspORfYxo22tm7R31SomggK9Ugf4 4IYO4hRP6NHTGJipNp1oMBSx91DzDFDS0kXeIem2cyC/I7t3G/L+ZVP6lAAAlNm5GoFC duu0O0xw+s9RfdkaQ/oBxK6jFAI8/4y6PqZyzDxDLYmzhM4j/vYf1un23bILlnNKNR2M qc3/S0qJ0G0unayKrri/9AhWg99u4N+8pJ+3zH2gDCA726XGupeXxRBJ/fivu4qQ0cZp LD8w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AP79L0uk; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-44f9ce02b6esi78757391cf.609.2024.07.22.04.06.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jul 2024 04:06:12 -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=AP79L0uk; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVqqF-00067l-Ev; Mon, 22 Jul 2024 07:04:31 -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 1sVqqD-00060S-JW for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:29 -0400 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sVqqB-0002V2-S8 for qemu-devel@nongnu.org; Mon, 22 Jul 2024 07:04:29 -0400 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-52ed9b802ceso3601634e87.3 for ; Mon, 22 Jul 2024 04:04:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721646266; x=1722251066; 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=7AtSpKBg1PmrqtB9T+k18UXmGojBdHF5u/W8SCXR64Q=; b=AP79L0ukUD9rMYNL1/5In/Tpiucwh15srzsL+o9SWCqsL7rgyGsmV3U5XxU+ASC+z3 I04R8pJ1Q6b8oigypEfjDbrJiYFtT7AL2YuMMgUZ8EaaXqVdjmYIAoFVB8B8M7b0za/E J4sn77ANVB2fNCqKy4/NdbjEq6B75IVLE64K/2sOHeqgFNScrMpX0F5FCPnTVkF8qv// X76Yq/qsY5FfJxBaUQ0voCRPNu3/6G4O25n2FU4HXAplhjBkpQRYku7G4Wds3TAr6VG8 AHAJ5c/DnCWGt3VQK3Q7aMF85LunfcO+4GzGvUbdhHxePlPDB8GbttPzKHH1eJnNCiwz G3Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721646266; x=1722251066; 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=7AtSpKBg1PmrqtB9T+k18UXmGojBdHF5u/W8SCXR64Q=; b=L8qgU5AeT7Db7hYKXEVEZ5TAx3HGjDCNCAsP8Yz5TWYCsB3T8xigm4TXwHAwXr6ydk T1xFu9m3kQ51EEtqbjm4lmec6r1arbXgja/mlQlmvAl3ikkos4g0oYDe2PiOMYWu/BYt xKJh79+57sfDpUco/pjBLw5T7wL5YPQvEmwptET0REyFzhT+9GP85Gl7sZT2pRmh6aB0 7LAn0n2U6LLjkmKGVvsSqW3Cm+++iB+JorqgfsG0otH32KomGg9u3V2bXmrJ6oUyx6+l AZojN626B3eK9683d8mVecwTaQODQtCMORYg8G4RO8jnpzzaTGv3XqTh1AzUQ18Uqy3T r4yA== X-Gm-Message-State: AOJu0YwtHbTIIm/pHOP4RABu5i8o/HVybnYEKsO0iBbf4C4BRPsALb+D Aqzr8FA9xXJlRDCuvHlAIZuFUCwIwd9K9FywU5aviq7LK/cSoAWhjJXwBLXL9iOcy0JzqlPdKSy g X-Received: by 2002:a05:6512:1322:b0:52c:e0e1:9ae3 with SMTP id 2adb3069b0e04-52efb851b4amr4187041e87.57.1721646265801; Mon, 22 Jul 2024 04:04:25 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7a3c9225fdsm415887666b.173.2024.07.22.04.04.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 04:04:22 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 1D2416211C; Mon, 22 Jul 2024 12:04:15 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , Pierrick Bouvier , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 16/16] tests/tcg/aarch64: Fix test-mte.py Date: Mon, 22 Jul 2024 12:04:13 +0100 Message-Id: <20240722110413.118418-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240722110413.118418-1-alex.bennee@linaro.org> References: <20240722110413.118418-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::132; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x132.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: Richard Henderson Python 3.12 warns: TEST gdbstub MTE support on aarch64 /home/rth/qemu/src/tests/tcg/aarch64/gdbstub/test-mte.py:21: SyntaxWarning: invalid escape sequence '\(' PATTERN_0 = "Memory tags for address 0x[0-9a-f]+ match \(0x[0-9a-f]+\)." Double up the \ to pass one through to the pattern. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Message-Id: <20240719004143.1319260-1-richard.henderson@linaro.org> Signed-off-by: Alex Bennée diff --git a/tests/tcg/aarch64/gdbstub/test-mte.py b/tests/tcg/aarch64/gdbstub/test-mte.py index 2db0663c1a..66f9c25f8a 100644 --- a/tests/tcg/aarch64/gdbstub/test-mte.py +++ b/tests/tcg/aarch64/gdbstub/test-mte.py @@ -18,7 +18,7 @@ from test_gdbstub import main, report -PATTERN_0 = "Memory tags for address 0x[0-9a-f]+ match \(0x[0-9a-f]+\)." +PATTERN_0 = "Memory tags for address 0x[0-9a-f]+ match \\(0x[0-9a-f]+\\)." PATTERN_1 = ".*(0x[0-9a-f]+)"