From patchwork Thu Jul 18 09:45: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: 813159 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp209071wro; Thu, 18 Jul 2024 02:47:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV7l3E4FkKQXPlRka+UPP/0kWFGQxbgT+VhzfYi8BLgBwuAmOT5DLL/hc1/pCIheCsIygrjV1m4cOMy9Yj76MvX X-Google-Smtp-Source: AGHT+IH+4HqQVnCvNmdmoRlheHMqp0FcXJXJ0jAD9SQTlaqTxHEDjO6IGg+S4xOhmKsraiY3FKC+ X-Received: by 2002:a05:6214:b6f:b0:6b5:17a2:887c with SMTP id 6a1803df08f44-6b78caf7dbbmr38330616d6.10.1721296042638; Thu, 18 Jul 2024 02:47:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721296042; cv=none; d=google.com; s=arc-20160816; b=fIqweFnax8SXGyaPMJ9Pptx/RK9jCkd1fusAHP3+ckwyl5oyHRfkGywKOTX3MVggPC XERheqxHLz6aog8WAnuZvoGZfYi/pLTl0bzHFJCP49qpFxDxubuG3ITAa5OSn4T4IZk4 EK+7V0bLAOawuAMZho+QSflpoYnPTmHJ3b5ASOPdBReDqSBGUrPINSQes83HNAY3MvhW qDDSgA+U1N26j3bdH30wmZ8n1gf4Kbj6Gz2/9zfKtcaD4boiBMrXhfctVbdwv0RmE2AO 2kP8SnmXecrF0fyzrbd0XFfmtZzO+ySV82WUdzTJE9LSM/uQLYgXSk2DBmesbH3hwTUB qovA== 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=eiL23Hf/vBV9ASWOfC+7pEltV8d4GARYopmJ0bnXGMI=; fh=9YDXP0Rf0yv/AwWPNsV02EolRzh1/Mdt9TUvb0lyfwE=; b=XaZo3Uosu79x2IYp7GFkvU8Ql3SoPBF0lxYlgdk24Q5fBGy5LUQdq5Pi9YpP14tjGj oK5PNYyfij6oS/bF16Poe3RFEECDhEjyl2T4bg19m1SEsn8flCauRv3duO0MdVVJviF3 8vOhvNJAfQUUw9QAdYaZjBRXJE9NzaJl6MAtFobdofo++hTEw+KQBcTJb6IF2kxUpdnv CsRU3v16iRIJhDgEk2U4QFn4hRqSk6flatFpqOLdgont1agMxU6HTPEG/fZHIHJnkWCf D9jqjMJ1Q7+RvYXT8RgNlQaX9cOoW/L5T1j2uYIGj00DdiEKn/JTdTsGjgdIzt7Tkfa2 5nVQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oAqv5y7e; 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-6b79c57b4aasi15202526d6.113.2024.07.18.02.47.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jul 2024 02:47:22 -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=oAqv5y7e; 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 1sUNhh-0003Xs-IO; Thu, 18 Jul 2024 05:45:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sUNhf-0003R3-Pn for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:35 -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 1sUNha-0007cf-Jw for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:35 -0400 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a77dc08db60so63136566b.1 for ; Thu, 18 Jul 2024 02:45:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721295929; x=1721900729; 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=eiL23Hf/vBV9ASWOfC+7pEltV8d4GARYopmJ0bnXGMI=; b=oAqv5y7efXP8VZJsMi9NkSSjAz1PDY2/FWnDQPravbv48re10J5Zz+4gpmiEqKI93N BiSrv57RKrVvhqgZSq0qElfezGSChzuUR/T5kmaxL9S0C5zs3lzLEM/4HCTT3H/ZtcGY bBfvnFJ5rjKSYi9PQJOsmJlbyJXOwtPneKEqqgsphY0J/WbkCa30RFnZrsgXQhs1iCuh iF3+oC7IV4ENGIci1csj3LvfEcksyaZHZMeAa6kS5xL5qnnj+FapMsMF4WS+GATJrES3 ha2HJStXCj//Zgs0dMu9nZvTGjm4OPztI8VdQ//q4MlmBLhSPIxUGTp3ith2/GJNE/wX xr5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721295929; x=1721900729; 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=eiL23Hf/vBV9ASWOfC+7pEltV8d4GARYopmJ0bnXGMI=; b=fIpwKWG/l5IwxGZuDj4sBTCE8Z4d3AsZosrwbHyYuhqkxe0wEGJKikHYEPU2Lg4xRN n1AvWZVOn25fEDzZMS/BEJG9Wp3OMJARcpIUxto7OfrDjBu5FuNZZUQLOn5it8NqGY2G TcDAvu1Pqnq92aNtiqBMRJ5B3YTM8pzfuRBOsaDJ+HgSqlhRHZk9pedR1LP5Y6D6slF8 UD60NehE7GBWnzOm8+bNYD3NmrWc/Ag9SEortCbNcM2mxOU+TGV0m7mH67V7tOs6+Ulf e4jDLrlWqE+h6AZJBwmVmwd5/CmQSyRtRDxLvg/l2gncAbMSwzfM5CGFAM9VVysGXdzG 7izQ== X-Gm-Message-State: AOJu0Yw77ZC48N8U0H3TlR8wzxcP4C5xgGHF8nCKsurICNiAa5rVjcFb sSP8yC/ssCzqcgETEY4Qiz3/YlV9xXltUCISQzvFw4MT5RqA2X/RNCqcKC6bPmY= X-Received: by 2002:a17:907:c0e:b0:a6f:4e1f:e613 with SMTP id a640c23a62f3a-a7a012f6e53mr421023566b.37.1721295928544; Thu, 18 Jul 2024 02:45:28 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a79bc5d202fsm538844866b.78.2024.07.18.02.45.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jul 2024 02:45:26 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 13C9B5F7B4; Thu, 18 Jul 2024 10:45:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , Aurelien Jarno , Thomas Huth , Daniel Henrique Barboza , Alexandre Iooss , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , qemu-arm@nongnu.org, Bin Meng , qemu-riscv@nongnu.org, Aleksandar Rikalo , Pierrick Bouvier , Liu Zhiwei , Peter Maydell , Wainer dos Santos Moschetta , Palmer Dabbelt , Beraldo Leal , Li-Wen Hsu , Ed Maste , Richard Henderson , Weiwei Li , Alistair Francis , Max Filippov , Mahmoud Mandour , Paolo Bonzini , Laurent Vivier Subject: [PATCH 01/15] testing: bump to latest libvirt-ci Date: Thu, 18 Jul 2024 10:45:09 +0100 Message-Id: <20240718094523.1198645-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240718094523.1198645-1-alex.bennee@linaro.org> References: <20240718094523.1198645-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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This brings in the latest python mappings for the BSD updates. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- .gitlab-ci.d/cirrus/freebsd-13.vars | 2 +- tests/lcitool/libvirt-ci | 2 +- tests/vm/generated/freebsd.json | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) 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 Thu Jul 18 09:45: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: 813161 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp209219wro; Thu, 18 Jul 2024 02:47:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUkh+7jMhYGufTATD7aoEkqXKBVX5/4bSGDtFhvgBuszZ3f2d2pNn/Og+PznvucIC6u4mACRin2/+WHQTZ21AcA X-Google-Smtp-Source: AGHT+IEIot/fCo0IUoYkIoV9DkMXTL9MS7DbVGInRdp3goAYLAOiNCGusG5nMiojrlAmnxsVqwDK X-Received: by 2002:a05:6214:29c7:b0:6b5:7c8:8336 with SMTP id 6a1803df08f44-6b78e31b61amr52610236d6.56.1721296070893; Thu, 18 Jul 2024 02:47:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721296070; cv=none; d=google.com; s=arc-20160816; b=qJEtZte3MXrhKzV7kwKcPd/U3H/zZ2NkSvsOf6vtwoSzkrC4uSgBSgj9RF0vXlPbUH qnGBpcOSSnP6CmQkB1YxyWrZ8TfoB8MJ6wzxYCxtbYL8WmtIolHV85r5VFqFsQmm3VJk lSbITZgs1o/vOcQpn+CoxRomhGFk3VGGwnV1uxJB4EQqbwoNWLltZK4UNeBKcxhQXu8T nO+6D5LDZHy1NlwnWHAnrWr4hkXBsjAj85HDW9p3nj7cQTYN/Fc/hVoitj3q93hNZKBE fze9nWTbsCE5lHcwdvuoYE27Q+E8oNUUd5C7WV3NjJhKTfws1/eM5Dq5ZqNl0avHwFpo wfFQ== 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=9fK9wM/QALdoRYcPahbnEbwp8pC6VCEMrlhDYV6cnZU=; fh=beqeaCbg3aLuhWjdCjtVml16Q9BL8y3cIrg7hH7f1U8=; b=HPxDtQqwSiEf139HT/YgHN8oqqhy7W8EIfjR2C7MzIFrLWcE+cvkOMzKLKaMoTUI6A XfmKN/h3TkMrW36N/t2emq0Vv2S4fdDUfr+Qr22tjqG71ci6RFYPs6jxyJNeTRKtmRoA dCLibXAzID54IfH5yOofh+v+sHbyf80VBe9nw2TDQyFhscmZhmGsMVNGikcUoI2vqf6+ 8HvId7JenaVvajjv65nzJQ/08HpELXzm+GbYBnQnYSaBVraonFNjrhUsebCGERo0CDGL xxY/PpJWwF/oHDa9wYiSmysVLXh1xo9QYpSduJB4hLhYHMpgl6VYZqdH5WE07MhE3SE2 Zk2g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Hw+4REFP; 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-6b79c57b6besi16172746d6.55.2024.07.18.02.47.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jul 2024 02:47:50 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Hw+4REFP; 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 1sUNhi-0003dD-Ms; Thu, 18 Jul 2024 05:45:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sUNhe-0003Mq-Mx for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:34 -0400 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sUNhY-0007bP-L5 for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:34 -0400 Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2eefc3d707dso7507161fa.0 for ; Thu, 18 Jul 2024 02:45:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721295926; x=1721900726; 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=9fK9wM/QALdoRYcPahbnEbwp8pC6VCEMrlhDYV6cnZU=; b=Hw+4REFP/OjxJaxIzK6Boh0wq06h91sCJ27Zr5FZ4e2QQvw64ZIUlTdztQD7KZQuzp zqoK8/ZDd4QlbPOL32VE5lfTCyAoP9xd+CWkGuoC5VJNbho7p9wkbO12PgI3e2e6KNl2 uMSvX7OPehv6O2p44BNpDQdzkk4xKDrxOOiBgeoRgM43XeFAkWlNESSZMGGrWsmHS54j bQCkxdUkrz5f3E51O6Zwf+LCJWR1p5auwPM/1iMFT9pZOeSf8GfShbe+UT32+95exK3T p2EH/vOmKcuLfDcUjeQX70Dv9sVvXFJm/uHDxXUBOmUv5HCRm/PMO5i7EUg7swa8e+pz sOFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721295926; x=1721900726; 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=9fK9wM/QALdoRYcPahbnEbwp8pC6VCEMrlhDYV6cnZU=; b=lDjALLVwkJOnvYUo6ntPqQU9Q6roaEriSEMftEMeYOxMOmqxuqDiy98ztYGmVuAhal IyZAETCguW6OkDq+slnW0Z1O6ZSNxB4ceYQ4ZC1iek2UFUIZUhr80ivo5Jwgqg7MkB5k edBOtPMCJMaCWLGUlbuJGuCfdE54UhxSFXVk3oE4Cy2+ZvgYtGmTJUGaWozeDLYGZuAb 1Lis7lA6IoPbcCUXVblZwO2ofJwG2ZoKK43GS1VwLhF61RztGQMac+adEI8gMY31f+wU u8DmhUPQgdQ2+73CaQDikNa7nn1ic3iA4e1bYDeR7QOHd2oRtGz/vl8pzkAxY2+6yuDx UO4g== X-Gm-Message-State: AOJu0YyrP0e6z5PxOvHsSNOp1C8AxZBjyGnweOVQGV42YTdD7VQrU87q k4rwv0RogAJQ+kM0gMG5IQxhKWSPNk2OvUPheP+6ujjLyeKO3u3pK1Qb5XXWRyo= X-Received: by 2002:a2e:3502:0:b0:2ee:7a71:6e3b with SMTP id 38308e7fff4ca-2ef05c99152mr12055521fa.27.1721295925742; Thu, 18 Jul 2024 02:45:25 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5a21662e2f3sm295410a12.40.2024.07.18.02.45.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jul 2024 02:45:24 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2BD625F929; Thu, 18 Jul 2024 10:45:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , Aurelien Jarno , Thomas Huth , Daniel Henrique Barboza , Alexandre Iooss , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , qemu-arm@nongnu.org, Bin Meng , qemu-riscv@nongnu.org, Aleksandar Rikalo , Pierrick Bouvier , Liu Zhiwei , Peter Maydell , Wainer dos Santos Moschetta , Palmer Dabbelt , Beraldo Leal , Li-Wen Hsu , Ed Maste , Richard Henderson , Weiwei Li , Alistair Francis , Max Filippov , Mahmoud Mandour , Paolo Bonzini , Laurent Vivier , =?utf-8?q?Cl=C3=A9ment_Chigot?= Subject: [PATCH 02/15] tests/avocado: Remove non-working sparc leon3 test Date: Thu, 18 Jul 2024 10:45:10 +0100 Message-Id: <20240718094523.1198645-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240718094523.1198645-1-alex.bennee@linaro.org> References: <20240718094523.1198645-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22e; envelope-from=alex.bennee@linaro.org; helo=mail-lj1-x22e.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: 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 --- MAINTAINERS | 1 - tests/avocado/machine_sparc_leon3.py | 37 ---------------------------- 2 files changed, 38 deletions(-) delete mode 100644 tests/avocado/machine_sparc_leon3.py 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 Thu Jul 18 09:45: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: 813160 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp209086wro; Thu, 18 Jul 2024 02:47:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUFntkZxCyu7a7dxRnK7FNQ+11mCxKHCNM5l89ZDUSBrypK5wygyfY7Rr0gbyTqbSagWuncoDiLyj+dMkGg+LCW X-Google-Smtp-Source: AGHT+IH+QGxIBlzkp9bLXUydcuRpSVu6RWL19FcA8yNptY2lPHzt4x+TQStVwXQc7Qnh7fUi7IWz X-Received: by 2002:ac8:5846:0:b0:447:eff0:a48b with SMTP id d75a77b69052e-44f96aa6dd1mr2376571cf.39.1721296045038; Thu, 18 Jul 2024 02:47:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721296045; cv=none; d=google.com; s=arc-20160816; b=QUsUjbk2YkOKA9a6b2CPiH1wK6/lLojC3C6Xj7IYkWbLTnZLUkuOJLoLHnevQ2+Blb c1eZTdlcHrR6YuNGg9OR+J8SBCEIivzGentWEce4gK5Vo/DxIm9iEZwsCEqXRvlOCvad YmD5NroogR99mE7YkpSa1jpvqbR8DfsDraOru9yuwUEgdoMJKqVYgCW+jnI3lKn7/qWH FDyDIGgO2DsboRlPbeATzyyxjnGaY7vl+htE+Q11h11QTlHUsMq7pVcb92ZncDKd/WdB 8ELLmNCA/C3JlnDjMiT5HfZ7uST6qyJYEPFbdl/U0VdGk1UCZD5wQjnd6r4W8nM+jFG6 TidA== 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=wE20Qkai0DWtVgRAp+2zGzvIZ0jfzXCysKEeOi4HYzY=; fh=QB0EXMfyionIa2i3DaubhB0ZFo/9cnE/77GNwb2ILro=; b=xUgjgyBRXEhPSSes9htPzxikNjBZhgdsu3WDUyg/vwSYSEmMVUo1dAw86euHzVWGmN ElBwUwyu1IagKW9tvcakJsRA1UggWrL5JYWVlLzq5ZOE+DKx19jvC/iWuI/ehqaW0Win x7X9f/mTK3n+AnnUcSktgYXWUmYpPJPzQBj0LsWE9VyFN6kLkpljOLOhy2GmXAUGGjJu eAzJsBvuYby1TA52NRseBeBkKXHFfvLcna5gcHW2npTts7rknbFd0uUS+BTGn7L9rwfV 3VC78tLnsCa8qEvsva21rA/buQ6cnXxAv+OWaeTyYNxkzdnQz6aQp6MJ+8UWZH7e/aTk /K7w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uPCEyn4u; 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-44f96ac20e2si1720511cf.674.2024.07.18.02.47.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jul 2024 02:47:25 -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=uPCEyn4u; 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 1sUNhe-0003NM-Uy; Thu, 18 Jul 2024 05:45: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 1sUNhc-0003GT-U1 for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:32 -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 1sUNhY-0007bc-LF for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:32 -0400 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-58e76294858so3211619a12.0 for ; Thu, 18 Jul 2024 02:45:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721295926; x=1721900726; 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=wE20Qkai0DWtVgRAp+2zGzvIZ0jfzXCysKEeOi4HYzY=; b=uPCEyn4ufsL+Ka8vW4mcKZdlm/YljRHBULt6/QEu5CoUsmj1uf1bPitm6pBe94O48S C2TAST3dBjDDOgG0XY7H/45oYvmjU+sURbTugqSl2eLOWk2RJNSLi4Ev0falGodeJ3wF o3hR1m3/juA3XXoDNNku7xtbgHo+r8D/Tk/skvFfx1O1P+2ugJzIw3K96+ZsQ0uKscQJ sFb7H56exk7Kkgux3FwKYrfwxz9Y1G/ggDcCCFIUuqQQx84mwspW3cN1DaBn8zAcZA0a 0tcQjiZZYvP3sK89qL2phXjvSRl9mZisQemlPUJF75klVbCU+tSkBMhxkQWS4LRCWx7q ONQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721295926; x=1721900726; 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=wE20Qkai0DWtVgRAp+2zGzvIZ0jfzXCysKEeOi4HYzY=; b=ZDRw+df2wPNJ7MkqVSlWU0VkjCBMkpQnJ2y49E764Cl16qeVwdxZmBPC9qSujou8ny P3yWvSnpouxn1KTvUs+eOdallqlAsu71h1oqCDMKlrcxc5PRfptRh2cF8wMBfo8xXbcg zksk8b61zi8cDt/tMNRYRH/sCx5IHJ1z3meH29OqQ1tzwUOV4VS5NHy/HrzF7cIoaYUb t8rN9alLUcsCYmiHudm+/+qJ52EKfrRdKwTPDGdMROY25cnQ5Ml6O8QVqi7avq0Zt801 EaZ5PoiDRRRbAHMqScPzCybA+q43yKyTVFtWt62wPCrW1d0hMAHb87ibrrkf7Fexk4P7 Qldw== X-Gm-Message-State: AOJu0YxEc81N7Zbj+0YRDEygiAvCbEWJRZUXL7oKxBC8lYyN+E8IxHHS JxvO3agGYUif2hbqc3l8gZWtKjdGLVrNriLqx/0HGBx+6pHX/TTbBiVrIk1HCps= X-Received: by 2002:a17:906:4686:b0:a72:afd9:6109 with SMTP id a640c23a62f3a-a7a0f13cb46mr237186866b.16.1721295926248; Thu, 18 Jul 2024 02:45:26 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a79bc5a3650sm552863666b.17.2024.07.18.02.45.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jul 2024 02:45:24 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 48E5C5FA10; Thu, 18 Jul 2024 10:45:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , Aurelien Jarno , Thomas Huth , Daniel Henrique Barboza , Alexandre Iooss , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , qemu-arm@nongnu.org, Bin Meng , qemu-riscv@nongnu.org, Aleksandar Rikalo , Pierrick Bouvier , Liu Zhiwei , Peter Maydell , Wainer dos Santos Moschetta , Palmer Dabbelt , Beraldo Leal , Li-Wen Hsu , Ed Maste , Richard Henderson , Weiwei Li , Alistair Francis , Max Filippov , Mahmoud Mandour , Paolo Bonzini , Laurent Vivier , Akihiko Odaki , Gustavo Bueno Romero Subject: [PATCH 03/15] gdbstub: Re-factor gdb command extensions Date: Thu, 18 Jul 2024 10:45:11 +0100 Message-Id: <20240718094523.1198645-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240718094523.1198645-1-alex.bennee@linaro.org> References: <20240718094523.1198645-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=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 Signed-off-by: Alex Bennée Reviewed-by: Gustavo Romero --- v2 - don't use strrstr, instead maintain a strv array - process the array later when building the query response - shorten names to hit line length limit --- include/gdbstub/commands.h | 19 +++-- target/arm/internals.h | 4 +- gdbstub/gdbstub.c | 142 +++++++++++++++++++++---------------- target/arm/gdbstub.c | 16 ++--- target/arm/gdbstub64.c | 11 ++- 5 files changed, 106 insertions(+), 86 deletions(-) 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..104398f922 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,59 @@ 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 +1906,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 +1942,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 +1973,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 Thu Jul 18 09:45: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: 813151 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp208642wro; Thu, 18 Jul 2024 02:45:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXWoW+jsaJanF0pjlAMRaAVKbXp/ZbcfbWfoXgBun1m6B4IZuAN2Zr6vKzC8DHM6ak8VQ3PnP/ilvawMQ/RAuIU X-Google-Smtp-Source: AGHT+IHNgQhnW52nQ60Y4ZAzx60t+lLPDiJ6TIyuKGDe1fqxXvDbduTmJaM3wNy+DAIOE2Xl/+BA X-Received: by 2002:a05:620a:1909:b0:79f:68:dc09 with SMTP id af79cd13be357-7a187448b75mr505099385a.23.1721295954947; Thu, 18 Jul 2024 02:45:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721295954; cv=none; d=google.com; s=arc-20160816; b=gvRTK/5rgEL9WExuyYnWgaeVoyjTfM1tNH+Q0e3LQV8sgwi+Wk317EvCoZaOSz09Sk /tnir80QBcFjo1mYQ+7eqO2YV8fpJYEFybZpIdB0bMefKcmV4fWxSn1I14AOWJtQ0WV+ XoXW9xzjlgAaawEhAzw8Jq5niDy9xQ+vyGpcY3Z3bDFN9JtoSGXpEWWufmCTn54zeqjD azxZsiatV1mw8YpxJXaUtuxvu0px8uALmROxx8YLRjH5/W6K8QkSo866n7A0Tv5rSVMG /Vze1MuWoRHaNVSg8aM+ivk32VUwBGCSmMR29vLbyOTNlVEw7nqwoQMiHmSZt9XjmN0c 2XUA== 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=Cy5Sl4WXq4QMVwT3rabklASKFIpoNgNRc1QNcX2+dVk=; fh=VLRt2SZiOWgfjzatswR7ydNpSQo5kgWOxLnp/yzs0fs=; b=qXvauj/ApgLBeHcAUYh95QbV5Dm9V9EnTbKcW6HNn5pAjtJE1sczjnjyOxzKeEKiZ3 quURcV2GYtgpPMe1Tm5TtIWuS16pvqSFBYac0j0M3gZFhkBedJKAywSRr01py+Xj85Fg Q2dV77bCsfbhtavQDPJ7OCpSovXCkRg76zPEdiUVXcJB9iqwFbuQhCEU4eWjeReZhG/8 S1qG9qASAiuxQRsGbeCc1tkLiII49Z6mbeca/xNQSyomx1VFRxb8Yn3UsoVRTZSmz38D DqrUKFC1l6D4Rcu9CGKPVv0x/brRUdiDC3sXp5EW+Bx8qPR9IoBPg91jLXd+vzaYw/GZ Kjxg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="rOB/PXfq"; 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-7a1939db992si16616885a.719.2024.07.18.02.45.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jul 2024 02:45:54 -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="rOB/PXfq"; 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 1sUNhf-0003Qm-SG; Thu, 18 Jul 2024 05:45:36 -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 1sUNhe-0003Lu-FO for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:34 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sUNhY-0007bj-MI for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:34 -0400 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-58c947a6692so617816a12.0 for ; Thu, 18 Jul 2024 02:45:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721295927; x=1721900727; 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=Cy5Sl4WXq4QMVwT3rabklASKFIpoNgNRc1QNcX2+dVk=; b=rOB/PXfqox2Xr7qbdRnSV5XUqXINt7jUdD2nYiM1JR94HDZGlERlTZ5H+HpgC4efla WRs6it3Z3oPdgGqPin2FzMtbRgvJ13p64w9OUJC50OD/KNlpNoKSKPm/Hrpevuf9pNLU mD1vqNukSijmX+CUNvghL1HC9OzVjvHc0wtH8QG0kP08g7k+QW0gcgQacnHaM4B8Q8e6 zRwIuD4YOF/0PHGFhRG1j70rGrUsnuY/amzhnHNInLrNHTrmycEoAcUVUDLg5SiKutB9 567sFBmwQF9mhO8XsCvIwQXUw2jb2H72/74LXJ6jkIG9N4vFecYohK0P8geWs17kFLNu L4ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721295927; x=1721900727; 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=Cy5Sl4WXq4QMVwT3rabklASKFIpoNgNRc1QNcX2+dVk=; b=B1dgX2HCDVj1CrB+NDTip3C4oEgpJgs7ICBbKROSp2M7onk+6ZUcHb9UWI5BPELZZo ZNczXrMql4SN2eCnrTJbB0rPwN3qDCCu2QgUodSGJKwt3aeRJr4C6BzhXc4/fhlLsqJb Fu73h/gHylWU3qeXmA5HV6xIGA5YDTD9y8lRhyDm39KYFMuIIGUfqjq43YnzwH4Gs9jV xo2sa7YpkYetidsWMMTn5lAGWV06lzIGmTpQVRznKaSu/xjIB3HHDY3KqWkyHNdaEue6 l0kOzjuZXGoeNPHK3oa/vPPrPbYP+X1AR9I0IqVkz61S5ZAceWJDyaUOOKZ3tU4MQiCr Hwqg== X-Gm-Message-State: AOJu0YwE4+z6xQVIcRuadyqYclzD+lNyQJgKMpeBhsbU5WIMCENuDuXf dC3lmNrglrg9irN2Ckh8RPaFTKtYfVgLwduatD5E/WP4Qo4L04KfLBlAc/DDDkI= X-Received: by 2002:a17:906:a3cc:b0:a77:e2e3:3557 with SMTP id a640c23a62f3a-a7a013386b1mr339357566b.57.1721295926809; Thu, 18 Jul 2024 02:45:26 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a79bc7ff89esm539861466b.158.2024.07.18.02.45.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jul 2024 02:45:25 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 62C205FA12; Thu, 18 Jul 2024 10:45:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , Aurelien Jarno , Thomas Huth , Daniel Henrique Barboza , Alexandre Iooss , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , qemu-arm@nongnu.org, Bin Meng , qemu-riscv@nongnu.org, Aleksandar Rikalo , Pierrick Bouvier , Liu Zhiwei , Peter Maydell , Wainer dos Santos Moschetta , Palmer Dabbelt , Beraldo Leal , Li-Wen Hsu , Ed Maste , Richard Henderson , Weiwei Li , Alistair Francis , Max Filippov , Mahmoud Mandour , Paolo Bonzini , Laurent Vivier , Simon Hamelin Subject: [PATCH 04/15] plugins/stoptrigger: TCG plugin to stop execution under conditions Date: Thu, 18 Jul 2024 10:45:12 +0100 Message-Id: <20240718094523.1198645-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240718094523.1198645-1-alex.bennee@linaro.org> References: <20240718094523.1198645-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x532.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: 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 --- docs/devel/tcg-plugins.rst | 22 +++++ contrib/plugins/stoptrigger.c | 151 ++++++++++++++++++++++++++++++++++ contrib/plugins/Makefile | 1 + 3 files changed, 174 insertions(+) create mode 100644 contrib/plugins/stoptrigger.c 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 Thu Jul 18 09:45:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 813155 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp208931wro; Thu, 18 Jul 2024 02:46:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX/y7F20Bs1Pw1AMB6540hs+DIAAD9DptahVKr+RrEni/M6LkPk/fbSD/taynwVL8SYPpKQYMMnF63KXvgYnKiM X-Google-Smtp-Source: AGHT+IHau0lOLpMemIt+Z+WncKnq9naYFbdybvnTMCcCay/u3vDCQ7UiXGy77ilSciiC1yaUtjEu X-Received: by 2002:a05:620a:2556:b0:79f:1915:5b3a with SMTP id af79cd13be357-7a1874a2555mr513920485a.38.1721296017944; Thu, 18 Jul 2024 02:46:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721296017; cv=none; d=google.com; s=arc-20160816; b=Ec0bKeWqLTaySTjJnLzC/EhAAKR/etiQxsxyeVQyF4XSlw+KgyPDxlMzE9kPwxmjOC y2zuoaWIM8iTfVcdHkPuIdq5pW/I71bEs8L98Duu8839dR6Xlq9G4oL3Kp2KuckSmfKK 76kwP1n8fwhvT65Pd6aCX0iAEDgfTRAk+DE5ulgk3C3GsHnKsk2Ly9cTeiqICWl5WetO d71BB6PEHxXIh1WbrZWtwY4O2IHkaslpMAtELwA928YSyziR7dTcMHUB0SXBaHDI46oA /tJ4Ht+Z4lOGvHXqglNvXzaNwW3d33cG+SrsEPIo7V6pH9oolLIe6xi22a7wVWhtZaU/ DM/w== 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=cfJ7q+u8E5nRKTMFGfs4eIENy7w0T/uQLo6/QnXe36U=; fh=Z5LQW3mKTq+A7HY/6JgPpVE63lTkQ66osdawJ+R83Ks=; b=Izyt0EJBq/nTthCo/S6EzTg2cKUwo2NKLg9BeyuR7bqdYpYsvcw26Mw5ot2GU6+1SZ 536pQXKiuDSHUSTsow/fGIk+Uvz3N31anDnFPpefp09tcmvmqSz9eDl/dxURu7dwi39r RceNUrmUIlAbpn/ohosSZjBPj8vZ0/ZRwnMP5HaudghtMV509tXolXm8ZRF3xIuNAo56 4K7BKqKeqBNsePnG5qrKNMsEktHi2OqLvwWA6I7uuB/4avh5vw0fOUbWRJeLSxF4O+lr j3faVy9hq2UAtRDVBI/QHAQVhGO9MZOBeVZPeygYDQeu+zSU28fvAy1kRhZ1zcSrAamO dL6w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="W/vqKplL"; 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-7a1939b02e7si17028485a.560.2024.07.18.02.46.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jul 2024 02:46:57 -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="W/vqKplL"; 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 1sUNhm-0003s3-6n; Thu, 18 Jul 2024 05:45:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sUNhg-0003Td-F7 for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:36 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sUNhb-0007cp-75 for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:35 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5a1337cfbb5so734357a12.3 for ; Thu, 18 Jul 2024 02:45:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721295930; x=1721900730; 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=cfJ7q+u8E5nRKTMFGfs4eIENy7w0T/uQLo6/QnXe36U=; b=W/vqKplLhNsBKwOOa3PbyDmRJaAdSzEezRplQvU2CEc+29BBeT2Kp0GLSllcO19uLn 17UjZeloh61oPoCIbNX65KnaQpwcZZLYGO1gmj3M22ncfQKXSW+bPalIios4ciSUM1LC 6/DehDqNvnn8w4Fa4lAs8EzPxjXRCeKJkXjA1VCH2B0CXCUjxAyrMEI7KlgegxdZN9t9 iixuFOAPez7Wb9i6Fv/9VtUDeucN3DCF6WTD5usyVODB2y5pQXtyB+DkDA+jrGttUXvl KkcSzfRmnrVldonpZpfxQKRTHIqfa/SE9Q5+g1Lk+PsMPpBFyi9oxO1GekV5klnZwJU/ iLvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721295930; x=1721900730; 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=cfJ7q+u8E5nRKTMFGfs4eIENy7w0T/uQLo6/QnXe36U=; b=P7K3bxDqq266tWJnmaysfBzwdKhspjErdpCkRtR/3hk4K9YRUEAuQVk1AJDHyJwbLM yR7qzjlLXUD4CVsoPObvdxMk/ifIcVOXkxo5CEedDMNs4Oo07nY+7Lf+oSnA/G1hZKDg 7BDF71QAssC4XRTRsQ0bIAOYxJ/O/ZZkTMAMlSsNVaHQzR6Et+UYw+kEkGf1IOXsyvTA Us0xHSNYSoTzd3MwBGZB06VMODX9bhkVSba6QuLbEKqtg9yniNFllNbXhe/6YAXZ5QVF YHv8SaVGgzwBlr5GxRNrM3Hf01FGQDQpZToYtf514r1dL6rkQWncr7auBJHmfpypCYYI qN3g== X-Gm-Message-State: AOJu0YwPI1uFksX5pIV31nbv7pIyEArk6Ew5hE/lR0l/bq0Zo0w/hBX7 enBNO6A0x9PWh0UR3TgnxfM0DJal04V7b8LtnREJOIW42xEem81zTIKZp0VRjVM= X-Received: by 2002:a17:906:e0ce:b0:a6f:dc17:500a with SMTP id a640c23a62f3a-a7a0114c017mr296526366b.23.1721295929309; Thu, 18 Jul 2024 02:45:29 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a79bc5a39fasm550343266b.10.2024.07.18.02.45.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jul 2024 02:45:28 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 7AEE15FA15; Thu, 18 Jul 2024 10:45:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , Aurelien Jarno , Thomas Huth , Daniel Henrique Barboza , Alexandre Iooss , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , qemu-arm@nongnu.org, Bin Meng , qemu-riscv@nongnu.org, Aleksandar Rikalo , Pierrick Bouvier , Liu Zhiwei , Peter Maydell , Wainer dos Santos Moschetta , Palmer Dabbelt , Beraldo Leal , Li-Wen Hsu , Ed Maste , Richard Henderson , Weiwei Li , Alistair Francis , Max Filippov , Mahmoud Mandour , Paolo Bonzini , Laurent Vivier , Xingtao Yao Subject: [PATCH 05/15] plugins: fix mem callback array size Date: Thu, 18 Jul 2024 10:45:13 +0100 Message-Id: <20240718094523.1198645-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240718094523.1198645-1-alex.bennee@linaro.org> References: <20240718094523.1198645-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x529.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 Message-Id: <20240706191335.878142-2-pierrick.bouvier@linaro.org> --- accel/tcg/plugin-gen.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 Thu Jul 18 09:45:14 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: 813157 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp209022wro; Thu, 18 Jul 2024 02:47:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVI5daNG0dkLVnQhnIyyVPUXS9o/xc3Nc8I0JBFUFWUEYCPmcZbbpq3X35wCZV3dV+y6WOMCpwgDRqjZHnjDtSa X-Google-Smtp-Source: AGHT+IGbLeRAi8FyMOrKA3cXGwpIr6Y3EeuQZBwgZA9kT27mmLN/tpcZo85m5YyWuQh0Z57cmwln X-Received: by 2002:a05:622a:652:b0:447:dedb:99eb with SMTP id d75a77b69052e-44f96ac63dbmr2588861cf.60.1721296032522; Thu, 18 Jul 2024 02:47:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721296032; cv=none; d=google.com; s=arc-20160816; b=usRlqZKellEBQtB63//HC0lVmNSp0vejyMUyHdm9tDLxm63nNuiRR0ObJNcX/mJvMS LuMePICs/LJ3Fh+DN/TK3/7JSnPGdRXJt3T4GfRwWS9StA6ZCCYCwTv9t7G06GV2pUxu TYdNhkI6y0IO+oRFKZKNvGQ/+n3IqMUJ47neDPx7qvVYqRGst2BajeLOBLvtszJ2PdoB j2KL+96DQGijCEIAfxZ9zytZdLfImM4VDQ4wGBFwpgTeiw7LShyJEmQ7DPAwOTFMMsgD LJz+pE0LAb+nxR44W37z7jJBZAvHGm2XH860rduY65VC2yR3RT1PEH1GMaTiWyhpJdtN Oceg== 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=/y96L2Gm/13AJ5RhhShqLNnx0hUTQIR5fDVZBbdIxXM=; fh=9YDXP0Rf0yv/AwWPNsV02EolRzh1/Mdt9TUvb0lyfwE=; b=O2hhTGYr3+EZhv/ZtmTC1a90/p0xdu2QMznW13GiLlI0cCwlCwBwAvlhl8Pdp0LhBD cGG074qj1YsZwEsU4feRnPSsKpkMf0ewnkNnFicCHeSdWR8D4so/nn4qJO4QXQFqdkTF SLh9zmny9zaFaML0rQTiSzitLFL4T/XS3BJh9EiGufMADM3O3NiLm+3zVX2xlDXNYyeA LiPq0Y8RgnrDDt29mPQ81sgKsDjEY+bo6vbc1OoKHjYeV4b4wUYHzJy8mt7I5htYtddm kqhRbcM9Hfy7IFCHKyVdbnsTAAY/VnraqOPsSAkQcFbhhKuoVVBwpBmwWGd/tgVFNRBS 9oWw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="yOgMT/Zj"; 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-44f96a3a7b2si1819721cf.389.2024.07.18.02.47.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jul 2024 02:47: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="yOgMT/Zj"; 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 1sUNhk-0003n1-Td; Thu, 18 Jul 2024 05:45:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sUNhi-0003e5-PK for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:38 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sUNhd-0007dx-Fz for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:38 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-58ba3e38027so504739a12.1 for ; Thu, 18 Jul 2024 02:45:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721295932; x=1721900732; 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=/y96L2Gm/13AJ5RhhShqLNnx0hUTQIR5fDVZBbdIxXM=; b=yOgMT/ZjMuDtH1ZTaQF/WMemtnEGu8H7XJaJsSq7C0ScksGdA4WmNu/EjxhJCQTYH9 DgOSjzemBeb3A670wuHSBZZyVIof11L60BQ8keSGCBzwLk6XpQkhdcMHAvIlvAWSdGD5 r6cVWJ49NIshYiFPXld2n+eV1dVV1zbTc0HBj+RHZ69ycfAQ0p/a9RdL/yoPvipy63Oq 5nPTRgHKTLmZcSSa3JPQJTNDoE3rlLIVDarBy2HE7I1zX7SD33ZE/lLBP5AkjRvrRRcC IKNK3p4pEGf0IqiKsnPyXNwLXK/Zb9YjnjsxIYJmBlCDBelbGqHog7b/kYNNH2EGtGdz 7P2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721295932; x=1721900732; 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=/y96L2Gm/13AJ5RhhShqLNnx0hUTQIR5fDVZBbdIxXM=; b=ueIj6TlYJEKoEHoWTnTlHIy3SFCspm8Mq7Majf/oyByUDsbNCSwQ542b1jLUfsPeBs kp8J3QEpEbDFydkf0xEkru6y7uFlQChgLuws2xjqrFKokioEX98RGSA9gWL9TdsWnMy0 pSwtDWKnEiOF3uKzDMLzgOdC//jNorQ6mJRKVystBWGdkm2F8eAO86ZqMEeSeyjY4VSE IaeusiRgthPnAIe0gHvpPsdq9s+zJxIsPJUeEabzvVaWOxKqlUFzBvn2funoeObfi1Dq 185WGgo41qBP2+IFOpZNq0vxK48xk1O6GVapOf7G8AuNsCsWucJ1acCDsAzJx5EF+pL2 0jqg== X-Gm-Message-State: AOJu0YxGh6F0gY9vojt0ug58/5mD2+uGTWAQiOueyJg/ZxALW8ihw1vA djaDnQ5WuyMWHWGTO0p/kF3bdG1h9dC8dH3SGYEquOlnw1K3L7wHrclafKVDNjw= X-Received: by 2002:a17:906:5fd7:b0:a77:d8c9:ae23 with SMTP id a640c23a62f3a-a7a013bf072mr309693766b.59.1721295931807; Thu, 18 Jul 2024 02:45:31 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a79bc5b7f28sm535903766b.70.2024.07.18.02.45.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jul 2024 02:45:28 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 9404F5FA39; Thu, 18 Jul 2024 10:45:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , Aurelien Jarno , Thomas Huth , Daniel Henrique Barboza , Alexandre Iooss , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , qemu-arm@nongnu.org, Bin Meng , qemu-riscv@nongnu.org, Aleksandar Rikalo , Pierrick Bouvier , Liu Zhiwei , Peter Maydell , Wainer dos Santos Moschetta , Palmer Dabbelt , Beraldo Leal , Li-Wen Hsu , Ed Maste , Richard Henderson , Weiwei Li , Alistair Francis , Max Filippov , Mahmoud Mandour , Paolo Bonzini , Laurent Vivier Subject: [PATCH 06/15] tests/plugins: use qemu_plugin_outs for inline stats Date: Thu, 18 Jul 2024 10:45:14 +0100 Message-Id: <20240718094523.1198645-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240718094523.1198645-1-alex.bennee@linaro.org> References: <20240718094523.1198645-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x529.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. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier --- tests/plugin/inline.c | 58 ++++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 25 deletions(-) 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 Thu Jul 18 09:45:15 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: 813158 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp209045wro; Thu, 18 Jul 2024 02:47:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXWqaLvXLA6ecIj7YIxnHmo3cAE79nur7WIsGsrU7Lg5w+cOIUUDjhmIuRnELcwDlTmqu3GA1xlHaxmHjJpLAXU X-Google-Smtp-Source: AGHT+IEBWw/4BkcWOkYiNVibYAGcFJ/dHJ83RI0x76L/VcXqtqiWjAhjbaPNbN0zNoVKRDFPuoFj X-Received: by 2002:a05:6214:f29:b0:6b5:e852:725f with SMTP id 6a1803df08f44-6b79c65e9a1mr22969186d6.24.1721296036043; Thu, 18 Jul 2024 02:47:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721296036; cv=none; d=google.com; s=arc-20160816; b=xH37Z+ph0ITPQWa7K0rRPlICPGgjhgYKqetSIzSDT1Zu+z46Iu2+360bwPI0Hrymow JU210KdLGdxoG+So/wivbLJWS2iyuwYkIKAl4Frs6tf2/KTh6fUVZvUZAkQXgBkvJWBI zrBW+ZY59ioGYjBdrsoWq4yDSsSvF11g13iPFue/yofQr05llLwAaqCeJq1u9N2yC5AU S5JIczE2ipYZPGvy4tX7hReUyLjkYwpI1Jcd70sgRjN7V+NF1FQVfSDU77Jd39AvnucV SD4xRySXupz0QGPkejClcHb3OKSMnICv8wWbXygaadHXUQGZlGnzpDQSRjU6AYMtr05o 3amQ== 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=2cfYyhSqeU6lh61PrlYddSdndv7Xezjj0qPHaR6Sb3o=; fh=F2hKSArt4PB9gDPPa8OyXpjrWfyr8VkdzeBnc62+l2E=; b=fFa0o/pf3kVk0YF6FN3zpWp+iJkRmRj3OpgpMHi1NgoC1XNmoKFJOH7jBZup5rSGMv oDDfIZ7N8bqHpVCLXwT4QbTrkQ8tnJbSoxrHL6wXKQakya3tQ4zX0X4ig8cgtmlFxpog ZGAOmDLfPPkQDIz2SQRfponnmhde8gPQjRHuz0eDnbW5Qe00Uq3c0xVmlgfzwLej16Oz QsUghKHHA5kl+Zc7QyEApURNyYvyVAd5yfTYo0g4h+b1D1RdqGoA9xPxxvI1KaZyfUs0 9y8BTZsD3U3Ooq+t5POGtsMlLxuFt0myvf6EB6WYWLfwUCtVbge3bAEUlPiNcDosKnBK RYSw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dMAHTH8x; 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-6b79c93269esi15440656d6.521.2024.07.18.02.47.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jul 2024 02:47:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dMAHTH8x; 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 1sUNhn-0003wR-2f; Thu, 18 Jul 2024 05:45:43 -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 1sUNhh-0003Wk-82 for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:37 -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 1sUNhb-0007dA-Ko for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:37 -0400 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a77c1658c68so62453066b.0 for ; Thu, 18 Jul 2024 02:45:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721295930; x=1721900730; 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=2cfYyhSqeU6lh61PrlYddSdndv7Xezjj0qPHaR6Sb3o=; b=dMAHTH8xBY2EHU2pf2H0Y3UDAFhH+mmoc4LWBCoD5uaIX2u82EerR+l2OLNW7a7PzD XNz7XPSvfTuF5GEzbkFamRjon/rBu0tsnhbFszqN1O+BKsT+E5iz6pdqiPd16J+RjgS6 u8XUHhQo8fEzFpj6Be2M7PBu3BabKF2Y2fJrdz/Y0vHgxpbGytRdBii0PL2p2FGpXPrk RTO9zEBn7G7ozP6rHb5A5l+M48/vw/Yoyv4v4HqjYs7zTYsyQ5+LU23aPHoFJhCDycFn rTOE/uLSFzjXlJUUGIZZF2+4VUCGXfyIZaHG/pU0VjTXJ1L/P5jZZzFyzbMWQp9uJpLO eMdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721295930; x=1721900730; 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=2cfYyhSqeU6lh61PrlYddSdndv7Xezjj0qPHaR6Sb3o=; b=ZLcQWS7h8esotnh3WVM6Q5IPymf7C879Rj3bCnk+lOvcPS/MOu+0x1C+vPSTD1+6FO 5zfQlfDbRXcN6vsFkvhsBd0SFSjRGBNVsi0Ng2+oLDAeh6zUvJVxyEUEZn6siwVYbrcF N1BzDWpYTPsxXyy9o0POZeZG4YRj1ycb2fFyuoyhQqYskKrAvh0bUwR5CUuuvXSBlKLP axiEJUOJARVVUKX7lgmfQqGidXgdp6PGMgBKezlXiyr71N4vMHiE0hD3m+pgbY6jtFVl j0LUdTjUru0j/QqG77gY0lJZ3zpM5f/qyskv++kZKPmFYuB6QCjecy9zzsARbzcs9VZE B8Zg== X-Gm-Message-State: AOJu0Yz4THDfUqJrgTaol2cbsLpPDMWpXrNgK44yBf74LatG0pvkDmrI 1sDtbfBni8gbBJQWJGugBVItYUG3dB8ZPyLZxxA+tT+qYiRih3CxFc1mQqrtgK8= X-Received: by 2002:a17:906:fd8b:b0:a77:a630:cf89 with SMTP id a640c23a62f3a-a7a00ef47a6mr364181766b.0.1721295929671; Thu, 18 Jul 2024 02:45:29 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a79bc5b7e50sm537503566b.69.2024.07.18.02.45.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jul 2024 02:45:28 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id AB4EC5FA3B; Thu, 18 Jul 2024 10:45:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , Aurelien Jarno , Thomas Huth , Daniel Henrique Barboza , Alexandre Iooss , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , qemu-arm@nongnu.org, Bin Meng , qemu-riscv@nongnu.org, Aleksandar Rikalo , Pierrick Bouvier , Liu Zhiwei , Peter Maydell , Wainer dos Santos Moschetta , Palmer Dabbelt , Beraldo Leal , Li-Wen Hsu , Ed Maste , Richard Henderson , Weiwei Li , Alistair Francis , Max Filippov , Mahmoud Mandour , Paolo Bonzini , Laurent Vivier , =?utf-8?b?RnLDqWTDqXJpYyBQw6l0cm90?= Subject: [PATCH 07/15] plugins/execlog.c: correct dump of registers values Date: Thu, 18 Jul 2024 10:45:15 +0100 Message-Id: <20240718094523.1198645-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240718094523.1198645-1-alex.bennee@linaro.org> References: <20240718094523.1198645-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: 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 --- contrib/plugins/execlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 Thu Jul 18 09:45:16 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: 813166 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp209397wro; Thu, 18 Jul 2024 02:48:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXgWk8PAfhozJ8MZpp/90g5vv4DQP1fI30RsSIeNa8FJLCCUxZXKIWXXNR65QpKmyhCieZ8CnLv5bxmfKnOINA+ X-Google-Smtp-Source: AGHT+IE4uCr4rk/8lzvrs8HdJl2j/a4mSk+lCOegkjJZk0AkMe1b7CWYPniso0SMCPxJRUw1IXPO X-Received: by 2002:a05:620a:2952:b0:79e:ff0d:1f49 with SMTP id af79cd13be357-7a19390a203mr25905185a.34.1721296104835; Thu, 18 Jul 2024 02:48:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721296104; cv=none; d=google.com; s=arc-20160816; b=PknspMd7DSvUscqd9Igd8Es3xvmYq/CVsiW4Z3r9vQNX+ueZ+p8N4FCf4qvF27Vcxe ZuXfEGYYTL8u2jnulfWKcD8z7csjUFPJ7D/BI3yc16Js3sqZjf//n7n89okyuNCWCjOJ x543ypfesnekLSCQgkkzZekP9cRC+Z6T9AQ8le0huzWtBDJvJQIPOtmJWwIzJOIs3l2/ aVTZAA/Vs+RlS0Fp3vTRjMHpQMWvHcVMYH3Bt9qmPgaMT68YERotfpou0zAdTEcknkra Up9z8dmza18d2m53MS4sK+6sJwilj1f6IJ1cwcNtB0Q0995yz+HBrpIsOFGjOP3Ixjwu /XHQ== 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=TIv8kXkJQxNuIpW4TekgSCMbtMULcZSn0Uoke+OjUOE=; fh=9YDXP0Rf0yv/AwWPNsV02EolRzh1/Mdt9TUvb0lyfwE=; b=rxQwoIP2y8wWM9Dg0mbd3N81twlqax7cE6rPWD3g34o3ntjoecH/HtPqAAHMjtetBS c8K+WmXQTDFIoqwbI8C/mhZow+72CJuGSn8mwUAPeMMZVSl+HRXEAAwDiYVpMgyJiQjl YACLQFTLX6y5Nfj8R8h9CQcImUxZAZemrzl8Ybx23MAnHSOOZ16V2Uyteozy5wDHiGEn kzsrRv7uvwYRE+IZnx39VJ9jXciAb5S9HO0SA+Axs5d9OPK+EJ8/4Avy8V+o91nt73a6 ZBbI8aQdt+GgoWkNyZ2LxlxSN/3BDBgT/T4PoM4Hu0RBaZqxuuhNjUop7wtdkts3WdON SBZA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x7MWVlMR; 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-7a19390257dsi18586885a.195.2024.07.18.02.48.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jul 2024 02:48:24 -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=x7MWVlMR; 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 1sUNhs-0004Je-5H; Thu, 18 Jul 2024 05:45:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sUNhj-0003h1-DA for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:39 -0400 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sUNhd-0007dp-J5 for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:39 -0400 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-52ea5dc3c66so216187e87.3 for ; Thu, 18 Jul 2024 02:45:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721295932; x=1721900732; 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=TIv8kXkJQxNuIpW4TekgSCMbtMULcZSn0Uoke+OjUOE=; b=x7MWVlMRa0NaNFOWDd5dG7KUvwoGDJfrQ+bETitL8SCIunChPQX/e4JbkLsZtTQ2RZ CWSc1clwrk/c+xF5m6OUhgEcUFSKoNIqyOuxyDw/qtl3EtXZoAHYL598TWZ3qSWH3+2c zP8fFEr+ZlRAM6XdsLqYc8qM+/GDCxnAs6rE7caKtLnXVAUSNLYG3OhplAU7+vYgXQHO 12grYzKZGtMpckF8Ha5ds9+XW7x1loTlGHoNH6Lo3DRBsZW8A+RCocW6q9Tj+98144tz IrS+4mcr1BXjmKkVyrcL77wUfuZ2T3E2ttGa3R1dGfR+aAlSMXxF3vrWHawPrxGrcro9 ubAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721295932; x=1721900732; 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=TIv8kXkJQxNuIpW4TekgSCMbtMULcZSn0Uoke+OjUOE=; b=ZZjiiVZE5eNAaygwLFmHXZEuWPXNpzZOefzd3EXotfrLbx0Txj7+s7qvUkoE4IDgDp u2W01c84ov3J94tgjMJKjKNEiBNmBioMSPPtw84UdruVcHBWtAZKgOkfnpY6qZf3K59I Ic6fWUjWP5xwLokVcRRyAumVc01047IbZgjIhugYslwc6TsBVdDcnHMYejsSSwYwELXB NuPe8griSMd0gMsyE1VtY/nbTxtBZzW8AN80I8d4HZg9JF6Ivc9CSTL+3ffNTOwBFydy S4rdaXr2hG6abSEyu6+kbQKooCoki7fttTgeeotpk/8v9CWSg5bkm2zNDfKCoN659D0W CQYg== X-Gm-Message-State: AOJu0YzOc0+gXvxXRvhkmRVPCLBuFbbZVkxDpclmbkGQSTBIAlpgPuIK tJZXYbMHAaZonsZlkp9Eu84Z7q8o39xi+uY/w4SpascL3cEivU57eH0CtzNwM74= X-Received: by 2002:a05:6512:12d4:b0:52c:e091:66e4 with SMTP id 2adb3069b0e04-52ee5433cd3mr3475108e87.44.1721295931330; Thu, 18 Jul 2024 02:45:31 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a79bc820e32sm540039566b.204.2024.07.18.02.45.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jul 2024 02:45:28 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id C24075FA3D; Thu, 18 Jul 2024 10:45:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , Aurelien Jarno , Thomas Huth , Daniel Henrique Barboza , Alexandre Iooss , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , qemu-arm@nongnu.org, Bin Meng , qemu-riscv@nongnu.org, Aleksandar Rikalo , Pierrick Bouvier , Liu Zhiwei , Peter Maydell , Wainer dos Santos Moschetta , Palmer Dabbelt , Beraldo Leal , Li-Wen Hsu , Ed Maste , Richard Henderson , Weiwei Li , Alistair Francis , Max Filippov , Mahmoud Mandour , Paolo Bonzini , Laurent Vivier Subject: [PATCH 08/15] semihosting: Include missing 'gdbstub/syscalls.h' header Date: Thu, 18 Jul 2024 10:45:16 +0100 Message-Id: <20240718094523.1198645-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240718094523.1198645-1-alex.bennee@linaro.org> References: <20240718094523.1198645-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::129; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x129.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé "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 --- include/semihosting/syscalls.h | 2 ++ 1 file changed, 2 insertions(+) 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 Thu Jul 18 09:45:17 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: 813154 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp208909wro; Thu, 18 Jul 2024 02:46:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWYXdKupTxBuTnHwBAjEH/AO37LElMfJ8GvdrkafWb1Q0OZSQcYtWJEe8h7MbnA29QmvywQBpREhldZDlGH2/0y X-Google-Smtp-Source: AGHT+IGNfx800lCj4SFdhKj5T7sJe9Zh4WzUyONq/N+NeOF082jto799aJwBDeiBJl0ho/EvzoUy X-Received: by 2002:a05:6102:419f:b0:48f:40be:3a9e with SMTP id ada2fe7eead31-49159980b3cmr5042223137.21.1721296013599; Thu, 18 Jul 2024 02:46:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721296013; cv=none; d=google.com; s=arc-20160816; b=mye8QPYFTZMbnDG2h98IsD1RspY9kCe7IepzePHGgUhQ9QPwEibxF3z9T581ORTwBp UoqyFhyw5w8Q42TSSlcDQrHyHssTUkKqIrLOrYGr41qx+Fb3pa/qvu2nkKWmWyN3n2OO ApTnx8H1zU5JgRPR93ufTEhk8BMKFShR+B3vB/uRPC7U0bAEwy/FGd+awhpmGM+YJMaL QpcPvDRy2f5fdELywrTaJLHrmhu44mlXHHArjI5h4lBWVygnOcK9vC7T1vDADTTt48Rl MCixWMma091xlDAh+FONqZzmrH6Vw6OLcfkK4B0d2m62XhAz45ehk0iYIkuIBDz9a8bS Mjbg== 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=31PAAvqWVfPeuheMTgufizM0WJ/VodpQVnBOiKhybJo=; fh=9YDXP0Rf0yv/AwWPNsV02EolRzh1/Mdt9TUvb0lyfwE=; b=Rcb3hFJsopt/aRPbtytwVbdv1t/OKW7QEdO0ZRqHEUSDP3hg0fiUmlA1wYvnNPOLMC URpjYqc5E0YbR8mB/ov5XFc31UMvktvhLp268zCIG/CXyDfVolWenjlUIUdmnUpHb/+B BjIQAAoYUWbL+OLnUhxf71siBIfxguXIysVIIJ20oRTio1w/J63vLkoUsFWxUFyrl/2k BS2VBDe/Ae4tmAC0wMwcz5dzunEVv3yt8WdgiIkkkVlwUx63LHdw04brn9kLs5221QeI OVExQLHlVp0QVpKTFCHJIrvNw0mjUnPYW3caHztIN1CRi+bL3jOdh+qEYQ3Mfr0QjmF0 ZijQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kJ5RiiAa; 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-44f9696c921si1858151cf.22.2024.07.18.02.46.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jul 2024 02:46: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=kJ5RiiAa; 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 1sUNho-00043X-CC; Thu, 18 Jul 2024 05:45:44 -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 1sUNhk-0003mp-PJ for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:40 -0400 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sUNhe-0007eH-B4 for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:40 -0400 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a77c7d3e8bcso51360366b.1 for ; Thu, 18 Jul 2024 02:45:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721295932; x=1721900732; 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=31PAAvqWVfPeuheMTgufizM0WJ/VodpQVnBOiKhybJo=; b=kJ5RiiAa/3L/YPqk0F0FMzVwsYLkdnT5QqE5IWM5GVjBFeXKBGxhVR0pVPLdCBAph4 dB7RmUyL5fSRXdBy4ra9flzjDeDrHD4PjS1zQSgfxNJNaNV+u3y0hF1+j+De7dz3ywqu j/hVPFa4G5d5J3wMqxH91zFh5mZUlU2LRAlMp0hF9vEruh/nBHay3NDCMnAoUs1CjPkr HXgj6fJRZBv861MBTmEPtIrBHa+u5GEPJ1MXd1MtXw6pvHzf3QnZJ90MoF6AAroHyH5e lp91G/N7jLfH6QOQRGmPcpmqLaMRUKzWMUO+fnHi7OLiCCC8+0P0Cjin9yE5cnwG+SCc rPyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721295932; x=1721900732; 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=31PAAvqWVfPeuheMTgufizM0WJ/VodpQVnBOiKhybJo=; b=X2lldgVGuBDKi0B1HyR2eShOsHGkoKlBf5Qb/OTzU8sk6pc+Lsjy536fGzz1dZdvhI ynz9TR4Pa0qZSU8EuhQWIyw2V2SHOsr2ezikMKZ0+5olbCUo8Lgd4wNYdUoYdmDkfbqt lYaezl+QXsm8oE34lfXCIPoGaM0rFeZ0jWBp9Q5K/PmIVb4ApEWvvtJG4pPU5mGezK52 sChWIa6PEmI2c+zoyu5ribyuTIZRFcIE4Smu7xoiXd9KCXBaqaOKBPaiE5yaBBEGhwNU k+vVnmOnKgEbsuKyQK4pqwCUIhTLBLnFL2wVc/LrIaCr0R/OB6K7FXNkFVi/XY3uiyP8 lm7w== X-Gm-Message-State: AOJu0Yy6/1do5YDF2ynwBnKoct1xSLMywWfF+YrjBkmUUJAGJyIy2du9 u/Yrd5spLZvtRh+9hs5FyhOiBhsMCzYOUaJbXYQn/GtTsTa6QaUmqZESolq3rvo= X-Received: by 2002:a17:906:6411:b0:a77:cc46:80f7 with SMTP id a640c23a62f3a-a7a011a6d55mr277345766b.28.1721295932139; Thu, 18 Jul 2024 02:45:32 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a79bc5a394fsm539425566b.31.2024.07.18.02.45.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jul 2024 02:45:28 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id DAE685FA3F; Thu, 18 Jul 2024 10:45:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , Aurelien Jarno , Thomas Huth , Daniel Henrique Barboza , Alexandre Iooss , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , qemu-arm@nongnu.org, Bin Meng , qemu-riscv@nongnu.org, Aleksandar Rikalo , Pierrick Bouvier , Liu Zhiwei , Peter Maydell , Wainer dos Santos Moschetta , Palmer Dabbelt , Beraldo Leal , Li-Wen Hsu , Ed Maste , Richard Henderson , Weiwei Li , Alistair Francis , Max Filippov , Mahmoud Mandour , Paolo Bonzini , Laurent Vivier Subject: [PATCH 09/15] target/m68k: Add semihosting stub Date: Thu, 18 Jul 2024 10:45:17 +0100 Message-Id: <20240718094523.1198645-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240718094523.1198645-1-alex.bennee@linaro.org> References: <20240718094523.1198645-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x632.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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 --- target/m68k/semihosting-stub.c | 15 +++++++++++++++ target/m68k/meson.build | 5 ++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 target/m68k/semihosting-stub.c 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 Thu Jul 18 09:45:18 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: 813156 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp208985wro; Thu, 18 Jul 2024 02:47:07 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWVPgdnFTAjeRq4h+T7Kic3wYvMO05FYLD946syKwxzKnRlw+z53PmZTTkeSltjWjcODHoSBWhBF0qK40f9287h X-Google-Smtp-Source: AGHT+IEAjSUyxjxvccXkMZksmE+Lk1CHD5nbHKWl4SfR+wDG2MazH5hRuuPdt96r3Z6TuEeo99s0 X-Received: by 2002:a05:6902:2005:b0:e08:548b:db5b with SMTP id 3f1490d57ef6-e08548bdd21mr628462276.22.1721296027007; Thu, 18 Jul 2024 02:47:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721296026; cv=none; d=google.com; s=arc-20160816; b=qycZ7PWPtLQ8yaMq3iSHEH6NFqw9LKT8RH7iuk2ucZAr4cbm3wcohDuq9rrQV/+YxB VkHNisZ3ceHbU3mwnvIH9N1IUt3BlhV9/K+j5foXIqyYiyROppNCy0FnYq9Sf8zrqWJM EPq0pQOkrteWZ2KPE3b4o00EyM2rG5fXcTKXqkEd0Ig96pNmRWZ9KA9oUtL3c22rgCNW KLmv+Z7ysRw8Xd9u87gXalPVADwEZNE01XPPjour8lbwlsWYEUi2zOg1+zNCpEGVvbp+ 97MMr7bweUhiGjGYvN1NnhDWRMJVAu0GGJ6YHwJ9/gZBDUQ/JsZd8WitqnivtVDoL1xI MeCA== 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=LQ57eYhV+4NmhOZrvCDoI18cEKYxHnDZEqAzqcJTJWw=; fh=9YDXP0Rf0yv/AwWPNsV02EolRzh1/Mdt9TUvb0lyfwE=; b=Ak791DxZ2Ju67uvOxog+wCVsCW66hSZhb76cbNGTuv1+Dp+ScouqRvv5SphjMtotCd 2u9ihNEh6WzScU2bydr0Osqu+UvK/0BZiEXGdx/M4tIVZk7iHLYOTA5qsAz8cvUDy0HF ht5009X7taNrtaWKqkD9KUaEQTo/mAu6pw1o+0lDGN4xwu9a2KfmqH0nPjvjTV+hQfte Cx4cEiWGU62LKLOxHRCEJCyt1ydI63ek0EGWgomsFTcb9wfshxspn4b4Vi9ztEhqXlEr vIDD1rIZMOHeivkw4fU52/3UjOpXDMoakSwu4NLY5cimH8wT2FocF6A3m5Q03j5+YOOt FwUw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=A9OwHH+O; 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-7a19399040csi17618585a.489.2024.07.18.02.47.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jul 2024 02:47:06 -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=A9OwHH+O; 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 1sUNho-00042z-9f; Thu, 18 Jul 2024 05:45:44 -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 1sUNhm-0003uM-Gk for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:42 -0400 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sUNhg-0007fc-9Y for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:42 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a6fd513f18bso60828566b.3 for ; Thu, 18 Jul 2024 02:45:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721295935; x=1721900735; 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=LQ57eYhV+4NmhOZrvCDoI18cEKYxHnDZEqAzqcJTJWw=; b=A9OwHH+OVNAENWVCNcYlM9gWl6SLB51nXpJ4u8b9ebdGxdycL2RfZ6BFZzixZCBQHy ScId/NLb/d9mC9QbxooccQU+7Ht4HCe5MCz85fRyW1iafuLXTpkoY1NMoFrWCvfr178f R5V/6bfMa+SnZRXZItBe4L/OUijt6oF1Cj40BOWDV7BKFnu7HB94UFf88xE+jwnaMyPB GMAWoWRC4HMisj6RW3/WCl3h8GMmqSBigSr7+UNjAcMEZ1L5gJUkjJHbVqrWSzWFil3Q 7A1um8lCQcAP9sBG+Yt7ZYGUOeRpTLsGvPtXs6EKsBnCqfQkzbv07V/3WIPQYwbFd1bc G4fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721295935; x=1721900735; 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=LQ57eYhV+4NmhOZrvCDoI18cEKYxHnDZEqAzqcJTJWw=; b=Ti4q3TAL1FZmbj25uB1Iz3NDAEYqzzErG4JJTfcCcgAJcu/euUtX5QBvd3c9Hp3nEF hQdHirNyL7+Sy8Fkm7r7w2W4M7VF6rO51bgV7XwGgWT9WhkfIRZT0PKR2k14Y4g12heM LvSaOf+6Bkcs9fDcP/7f1zdRDWlvB1bD2PxcQa8FvuUm0aUzdD5wiqxKaNGL10Dc23wa kTYTc7uTCCOjnO8jUQeHzAsLhRw6PNWNSz3P8BSvVaxvV1iHy7ZBH+lThVd7VfhKcrRo rSSJ8HLQ5xpcuSgadPmCTyzDjOcBbOAMDlz3aUIUP0NZ8CCAerINOwBLHsVz4+Vm6fzv S4WA== X-Gm-Message-State: AOJu0YxmTKwR+pu4XII/QLbhyW1uxhZCYrI0DdBZY3ScoVSKVejwq8ua bQPjx2dHt1/urNn1/TEaVHvhZC7dxEyAw4PukI4KiExhqNFR+wF2Itsv9Mtcznz33PiGwpVwEDT U X-Received: by 2002:a17:907:b9ca:b0:a77:daa9:401 with SMTP id a640c23a62f3a-a7a0119df30mr259401266b.35.1721295934214; Thu, 18 Jul 2024 02:45:34 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a79bc5b4f87sm537915366b.48.2024.07.18.02.45.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jul 2024 02:45:28 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id F1C575FA43; Thu, 18 Jul 2024 10:45:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , Aurelien Jarno , Thomas Huth , Daniel Henrique Barboza , Alexandre Iooss , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , qemu-arm@nongnu.org, Bin Meng , qemu-riscv@nongnu.org, Aleksandar Rikalo , Pierrick Bouvier , Liu Zhiwei , Peter Maydell , Wainer dos Santos Moschetta , Palmer Dabbelt , Beraldo Leal , Li-Wen Hsu , Ed Maste , Richard Henderson , Weiwei Li , Alistair Francis , Max Filippov , Mahmoud Mandour , Paolo Bonzini , Laurent Vivier Subject: [PATCH 10/15] target/mips: Add semihosting stub Date: Thu, 18 Jul 2024 10:45:18 +0100 Message-Id: <20240718094523.1198645-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240718094523.1198645-1-alex.bennee@linaro.org> References: <20240718094523.1198645-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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 --- target/mips/tcg/sysemu/semihosting-stub.c | 15 +++++++++++++++ target/mips/tcg/sysemu/meson.build | 6 ++++-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 target/mips/tcg/sysemu/semihosting-stub.c 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 Thu Jul 18 09:45:19 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: 813163 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp209291wro; Thu, 18 Jul 2024 02:48:07 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVZqstOoym5hXLg2Ms/uMHYCowwPlvPQo2MT7V+dQlaY7TQXxNhVQ603SVVrt9jLHBMKpOw9oRiJdt7TYgJbJTT X-Google-Smtp-Source: AGHT+IGDJ9D+XDt76pzD2sVOKfh3+2ScawV+D83x99YtzPg3RDblC22BWoUs4gm7LCKkDBEYm2b2 X-Received: by 2002:a05:6214:130c:b0:6b0:62bb:ab9a with SMTP id 6a1803df08f44-6b78ca81e5dmr60576076d6.19.1721296087049; Thu, 18 Jul 2024 02:48:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721296087; cv=none; d=google.com; s=arc-20160816; b=FzydBWmFWyvfEperTI9LQLwObeJ1dWQ5WpTJibmqHt5grEsgDr41Y0fPlRtj6f2S1k L8peoP6LteMGxXLCp+PU1gwLl1SETltHqsKbY1f2Dbn3GqQcArsnyq+PqFSh22ZWF7wh a+ewCdetOrnsoKrzoth5pdqF5/Vd75bjOml06/zKVLCJR4hruSGj5+1Kz7napVJ+WGH2 OfBqXwOgFfgsZT5w5RPjTspGbFylXNoZSDmQdH3ZZKk7Mir2N537DcFPFldBMaSGNRJi /jjEc9JjKORxjM57QvDn1zX7Lx9F1SYyU/tKiz9dPapFfqGMuosKz7MplzevggsHYmiu 8GBQ== 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=w/7VI3SrH+zYbARBw7BAZJVT4QrnBg3//kUdSkwSc88=; fh=sovPD4wkHfJ9bVr28Ru1bKGyprdwCzLBlH3OiEorkRE=; b=JTZhwRsFN0j5LN/RGHxuhma9riPZE6Lctuw/QgYQkIBG5Y/s0JuNEJHjVBz9vYj4/I VADOjV4XqhH5M79p4rdKvTb6jkohb1Xa+JqkhZpI+8CH1osruPQ1GXdyU0DhnQ3/iydu t0OGGSGz7J4HctOyEZkReeY1cgvG6GNHSjx3LOuo8VN+MthGZriJ5pqlFfQPeoJXTiGF bjqa6O4w6wLvZsmbou3AB1XIbF1qUJ0lBqBhaXQWJX134Q0QtmLDf/EG+GqahQhdEYz6 rmBJOXVBHZ01+8t4i6M5/vlg5E9GGhk6KUf6ibATpzxN6ygYVUcsALINFLvfngtMTIgL VIpA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="lvhCLR/k"; 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-6b79c57b63esi15194506d6.44.2024.07.18.02.48.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jul 2024 02:48:07 -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="lvhCLR/k"; 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 1sUNhp-00048z-L6; Thu, 18 Jul 2024 05:45:45 -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 1sUNhl-0003pC-B4 for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:41 -0400 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sUNhg-0007fI-1i for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:41 -0400 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2eecb63de15so7914661fa.0 for ; Thu, 18 Jul 2024 02:45:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721295934; x=1721900734; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=w/7VI3SrH+zYbARBw7BAZJVT4QrnBg3//kUdSkwSc88=; b=lvhCLR/kr5rUecCPJAWbY3Y4wSN4I9Dw6jIxwj2mfokY4BgFH8jjMftF2q3DgNNqu8 qXvsANQXcEhx+V3X+LL/jdxcWwdSf1L0+kEnfle45uvsaaLgghktDZtpWCa2Ztzbt066 byJjLmlXKLu4CGIU2EEUbk++7lR87PtutAm69crsLOyO+299ChyOMgZj6W6D8oBZrJ4E ZtC/vlFhyFhKWX1oCnavhSaRPo9DCbukfd4irdhlYrUKHHZd0VsCN+iet7MxDD6uRETQ kUeMXIpwjHijsq7APK9RlAPZYuX5lDICNvYolZgxT/rkfvUZb5BnBznhYTRioiGKmPCq 3ILw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721295934; x=1721900734; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w/7VI3SrH+zYbARBw7BAZJVT4QrnBg3//kUdSkwSc88=; b=rdS6jyv1WAAehLCosg/w1PI6Nop3WZRHqpEQegge0OEYX1SXFHQlSqUS7z5XyYXQw1 2vb+4IZmP6rm2brIxXmYThHh9DHHhmb6HcJLnqr6kwPtkutw+UbI9Gz+7nFtLuApJi5g jQ8Jia+GCGE5+JWedLU9y6M79qe5N1QzN51P17tybPDAUuhGaUsgnPbd7/gJ767WOLzw TuXMMkPvCgC8gULufcUwLLoaoNA8P5sPJACz2q7wWXnk31OKG2Uyq4LJm0Z+UF0xkcKw 7YRckHbxjpVvoz/npOvNR9dNv9+0aI2E6b/EoiBBOUFxYmkNy6N1yHkciAmNhgsPea9w z0sA== X-Gm-Message-State: AOJu0Yy0+ZWgqO4qR956TZOiSYPcHQ58fuKabg0vBRGqYESMGT1HM+yP n+9li2hZOGwoQIVGyFbsBb9w848Wvry5K6ytzDjZ+QnRdEA5Ed/kw7F27St/1kM= X-Received: by 2002:a2e:9b54:0:b0:2ee:8d07:3d51 with SMTP id 38308e7fff4ca-2ef05d73becmr12317431fa.49.1721295933810; Thu, 18 Jul 2024 02:45:33 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-59b24a76f02sm8189084a12.2.2024.07.18.02.45.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jul 2024 02:45:28 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 15DCD5FBD9; Thu, 18 Jul 2024 10:45:25 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , Aurelien Jarno , Thomas Huth , Daniel Henrique Barboza , Alexandre Iooss , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , qemu-arm@nongnu.org, Bin Meng , qemu-riscv@nongnu.org, Aleksandar Rikalo , Pierrick Bouvier , Liu Zhiwei , Peter Maydell , Wainer dos Santos Moschetta , Palmer Dabbelt , Beraldo Leal , Li-Wen Hsu , Ed Maste , Richard Henderson , Weiwei Li , Alistair Francis , Max Filippov , Mahmoud Mandour , Paolo Bonzini , Laurent Vivier , Anton Johansson Subject: [PATCH 11/15] target/m68k: Restrict semihosting to TCG Date: Thu, 18 Jul 2024 10:45:19 +0100 Message-Id: <20240718094523.1198645-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240718094523.1198645-1-alex.bennee@linaro.org> References: <20240718094523.1198645-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::230; envelope-from=alex.bennee@linaro.org; helo=mail-lj1-x230.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 --- target/m68k/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 Thu Jul 18 09:45:20 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: 813152 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp208805wro; Thu, 18 Jul 2024 02:46:30 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX39+e+u/lbL8r1KKm8+50JeDRE+iTi9GncKrfn/bUKsFWtmm/5iYjBuYyfw7roYKUNaiqYh+QIASLRD9LE0fS2 X-Google-Smtp-Source: AGHT+IGh19cdoWPXEtTJd/rpubeMjymlumRHcgAkKb9lj6Az7QS4OgNzN/+0uLw9TINAz96XuFIF X-Received: by 2002:ac8:7e92:0:b0:440:480a:8b69 with SMTP id d75a77b69052e-44f969b3dc4mr2974431cf.28.1721295990337; Thu, 18 Jul 2024 02:46:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721295990; cv=none; d=google.com; s=arc-20160816; b=08h4QqioKQFzwjtsyJPOmCk8UbA1tVPVDjeWFXGXql7oFGHfiVQKiMllBFbBiiprNr 5WnnsBUBsDZr1CWaTiy9/2EnTooJ6hJobZDr4Y99ljjrb8SyI1Mq0zehddvRxWl0Rozd mwmsby55v63ouw7aMVI7aGc73/xQ5fKKRt365Z74OFGWm2B13Hi3Px3rUpT+ezmJsOcW h0mEgG4kDqH9YyqGFtml42dPnVG4uR/iS+0f7S9Auf6x2xVc6xMKJsEx0p/U3A6QoqM5 iizPatkZ+C7kHZA2BYdXvOFcjOxaQqQDt1KOiWVRY5Qd4PF17aTs5VSbOfpBiNI4Im/3 UhTw== 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=zvJgiNwmcThWcFCTBkYzV1Mv+ko91ZQ+foVJXf+2J8s=; fh=sovPD4wkHfJ9bVr28Ru1bKGyprdwCzLBlH3OiEorkRE=; b=zP++9l80sscuHf/KvA5a9ovMJnUlcKt9TFppSxQ7bcAttuPaFt5c2naDkZt1BIAGXT 02BdvCZ5q3RkOO17h0nvlkBcBbOloLEjYHNP6/JZfqzEy24vm0IhFLvwg8hZ4mWndbs2 xnuW8G+QU6KK81FtFtJDGzidfuxq3vBgeDZ3aTE7qWOg7sCVrW4CMhUMXgNv79XUGkKS Mlf/qQjnuazj0UMrFRUfWY7eTaWZ//O955lnj5FRnhT507w1mwZ4OZNK5m1258HVhQuG nuJ0wHtPbkdmYGCjoheIYm1ZHdYgIV98H3ES/tt0GLEdl2klBgZn0N9/2el/5DE6/mkX PDxA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yKZ7xzVV; 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-44f96ac68b7si1751021cf.713.2024.07.18.02.46.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jul 2024 02:46:30 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yKZ7xzVV; 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 1sUNhq-0004I8-VM; Thu, 18 Jul 2024 05:45:46 -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 1sUNhn-0003wU-1n for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:43 -0400 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sUNhg-0007fn-K8 for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:42 -0400 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-52e97e5a84bso163593e87.2 for ; Thu, 18 Jul 2024 02:45:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721295935; x=1721900735; 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=zvJgiNwmcThWcFCTBkYzV1Mv+ko91ZQ+foVJXf+2J8s=; b=yKZ7xzVVA3zz+w0bz3Kq6b6nvV7swgD/M7uETtYxSRWz5maB8D4tN9R9AuOGeTa8Gh EksKpUKOJKFWVUx1HYfd6yh19KFG2M8X27bbl7gSBeRd9PlKouWcrsnSc7GoS/DGdBZn KD1ppXsfTkalRGclOwX0NFdpZIJLJOIQptML4S5mUrhdh9fLPk+0HK/vI2Fx5CJPnRvR FQfO88e8f096mxrurl7jLYMgCDRG4m3aTlmy+1hljc4Xy4VFJcbriAAn8hLCCUmOj069 kRaQ/mlXI0OiBKb2WoyEjU8rrhXoxRHj+qHgIOzQaOfzw4Z6jB9HEtGfCXsQ2mhZ+mu4 7eMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721295935; x=1721900735; 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=zvJgiNwmcThWcFCTBkYzV1Mv+ko91ZQ+foVJXf+2J8s=; b=AlD27aZhAwt302L7mowj4RtUydQvqhZ7Vh4xH1T0zWfWQAhQSMn4s7FJaV+ogbextM +h8HRdUk2RUzv6zMjSBG9ixREjXVUypnGuZU1nqDtxJblV5YggdntCeefFvhXL2j8f8w AtSVpz/LjpO7Txoe3U15xfJNsb5Fc+L/L4/ihOA38ISfEoC9m3+VyfwUtGVAxYCtPXbb kqkFdGtqSELlpPpR1PIWGrFK1ej8OHKk9WvAlkBbLuRBm83o+7KNsz1KjOhgFWUXru4j maufS13K+8aLy7H0hnw+CmVlC7yMVTimMjHn8KaWCfVLejAXDEl4P43vxNjIbBieyUKS nR8A== X-Gm-Message-State: AOJu0YyXfDCODQuv0iUjbaAZbDnex8LSuF6IfN/oKN/APefWkjdVR397 K9BlGgyCX1187wo4aLxv93MSg/bgnRvi1SnfV0ryzjZc14c/y3TbzlwP+Pf/fos= X-Received: by 2002:ac2:4e0b:0:b0:52e:d0f8:2d43 with SMTP id 2adb3069b0e04-52ee53b6f01mr3409785e87.17.1721295934626; Thu, 18 Jul 2024 02:45:34 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a79bc5a38d9sm541521566b.25.2024.07.18.02.45.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jul 2024 02:45:28 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2DF765FC6F; Thu, 18 Jul 2024 10:45:25 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , Aurelien Jarno , Thomas Huth , Daniel Henrique Barboza , Alexandre Iooss , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , qemu-arm@nongnu.org, Bin Meng , qemu-riscv@nongnu.org, Aleksandar Rikalo , Pierrick Bouvier , Liu Zhiwei , Peter Maydell , Wainer dos Santos Moschetta , Palmer Dabbelt , Beraldo Leal , Li-Wen Hsu , Ed Maste , Richard Henderson , Weiwei Li , Alistair Francis , Max Filippov , Mahmoud Mandour , Paolo Bonzini , Laurent Vivier , Anton Johansson Subject: [PATCH 12/15] target/mips: Restrict semihosting to TCG Date: Thu, 18 Jul 2024 10:45:20 +0100 Message-Id: <20240718094523.1198645-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240718094523.1198645-1-alex.bennee@linaro.org> References: <20240718094523.1198645-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::136; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x136.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 --- target/mips/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 Thu Jul 18 09:45:21 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: 813165 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp209394wro; Thu, 18 Jul 2024 02:48:24 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWgZGE+RFA8uegQH5qFHR/frTR0ncVVzrMrYRqdr1z2nKolQZEnWqhjVMvkvixpoa04Z5lxsNE1MsbD3qnUoQch X-Google-Smtp-Source: AGHT+IGRjK/T18s7yJRzgHmCEsiCSsJLX88YLzty2ofz/y8BSZ2KuciZhd4smg32cGLEy5etAqV7 X-Received: by 2002:a05:6214:5e96:b0:6b5:e0d3:31b3 with SMTP id 6a1803df08f44-6b79cc19c1dmr36365176d6.9.1721296104561; Thu, 18 Jul 2024 02:48:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721296104; cv=none; d=google.com; s=arc-20160816; b=PRtJB4dxsk86OZ6EqeWKZqk98OiVOPh79TRuaE5Tg8RRcsQWAEIolG0mkL3ZDIfWD7 ic89kaUzQTNaV+VPh9BLthRvzpcGjGJzClkTI0L07uRtf4QXTcjiPqU5/L0lnDj8V2np 8C7qCGE+2TPXQHcLsEFADu1sR8af4ZQHrYP2UR6rx21U7F4J1SSphvtzgYK7K5Pw0Cwx jfj7hYuwLnZfm+Ftq7h38e/vZVmZyHZTQX7rHx6+6an6DRJJ0M/bLtBijyPsxftky21v pTRtcLc2clJ9HnrRzGr3t4xcWGjjZ/RsTX6WUgPzqxH3/LF1fqWNm1BXhqamNTSjggz7 k5fA== 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=fNz+AOYp7KBdTk9g+6bf31v47vR5RhTCmRUMfVqRcT0=; fh=sovPD4wkHfJ9bVr28Ru1bKGyprdwCzLBlH3OiEorkRE=; b=z/jl1KtlfmcGXfzJy4LtjHnCG+UWiPIdDfhkK0CZlF/u3QgenwElL9QNKvXBWNqmHW asiYptOPdZ9N/gnYqY6AvtETCOcejWHnt2mypAo1g9ayL0lYh91OI8Yz3TmKRGuKsmSu CsT2HmqfzRf3et2DVJ04RTy05dlW9qK7aAcFH6gdVn1DCB6vkz0CToraK17pK/F9F+uS 5I11XYKqWkGRuoiXrABIaJFQxVJRM4iLjDA2GMwSOb8dJ8T0R0C0tHbU7ErmHAF5OCfr Jdnx8TrOMi9gljhU385n+NDWdRi1iwFLR+U12lCvpAZHrcgtmvevSlMsKJXtFAiKS4z/ eG0w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xtUkIWCz; 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-6b79c7b3521si16249216d6.248.2024.07.18.02.48.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jul 2024 02:48:24 -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=xtUkIWCz; 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 1sUNhu-0004WH-0A; Thu, 18 Jul 2024 05:45:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sUNhp-000494-J7 for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:45 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sUNhj-0007hc-Ip for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:45 -0400 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a77b550128dso59651966b.0 for ; Thu, 18 Jul 2024 02:45:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721295938; x=1721900738; 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=fNz+AOYp7KBdTk9g+6bf31v47vR5RhTCmRUMfVqRcT0=; b=xtUkIWCzeGHZr4PM7SOHaNSGuSMm5/q2BMPb4lJcdt7rmInQTJTg0oVJQeMxwZOuQx r7OZprzCBk+tPPJchsoYM2INZ1hdIe3siKNT4tzh2dqcN5ub5Qtr5gliXkzcQwa1aBjl GS6q93xzLjDuGOCNColST48dD/vnCuOyt9ytwZnKYUgZ8L7xr6NHWlTlzZSb/7VjFLSi XA2CFSVppVlVHHpXK2PUKEl4njD2vojd4oKaXNZedCahhUA8IXFkXj9kaJGYx1+Zs/Iv 2D/GMcmgERRiH7AXrSnuW6PSC3ZFYisGyR9y9siAZHQ28XUHSP0DGYJBj5atGk5O0sJx VYJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721295938; x=1721900738; 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=fNz+AOYp7KBdTk9g+6bf31v47vR5RhTCmRUMfVqRcT0=; b=RHi88y/FE6zy2wDBUO3rL++ZhdriFSRM2/gpaw8ty6xJTuQkwLokkjmmNXdOwDr9jv RaqGo3F6CQOzhGNdqKwcvqFocKKdTYH4ktYvyUQO3bN9BaG5iCCTwWIrfQqfq+X0AXxS l7knR5jVypQnWWkJwTru+nYAmaczTdI4JhOig2jaMH2PxpLI/wT8yvQSqz2onVL+ztsd tug+b4Nvze1VlR5pEFXgXeIsFZt/SfF2mVjMBDVQ/ilvWeFU+jcyYBNaCnw9F0xOiwlR ZTJo6tLlvcuJDQIuPP1ZWj6hjCWJqLUpNyeSPk78a63yb1hSGzMcG9vJZ0kGHZ/Jm9F5 Szpg== X-Gm-Message-State: AOJu0Yzq5vP2B6VmTjqhYk/0/XveIlPC4HVgAnLwlPBh5tgVxrIwVC57 j4Vuyz0QVlMWjVglOCET1GILRcyVygH0bnEQwLU5sUrKEgHgHo6wF6URq5PgzE8= X-Received: by 2002:a17:907:da3:b0:a6f:bf5d:b365 with SMTP id a640c23a62f3a-a7a012f6e5emr432518266b.33.1721295937667; Thu, 18 Jul 2024 02:45:37 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a79bc7f1e20sm536964166b.116.2024.07.18.02.45.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jul 2024 02:45:34 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 453315FD74; Thu, 18 Jul 2024 10:45:25 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , Aurelien Jarno , Thomas Huth , Daniel Henrique Barboza , Alexandre Iooss , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , qemu-arm@nongnu.org, Bin Meng , qemu-riscv@nongnu.org, Aleksandar Rikalo , Pierrick Bouvier , Liu Zhiwei , Peter Maydell , Wainer dos Santos Moschetta , Palmer Dabbelt , Beraldo Leal , Li-Wen Hsu , Ed Maste , Richard Henderson , Weiwei Li , Alistair Francis , Max Filippov , Mahmoud Mandour , Paolo Bonzini , Laurent Vivier , Anton Johansson Subject: [PATCH 13/15] target/riscv: Restrict semihosting to TCG Date: Thu, 18 Jul 2024 10:45:21 +0100 Message-Id: <20240718094523.1198645-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240718094523.1198645-1-alex.bennee@linaro.org> References: <20240718094523.1198645-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x630.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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 --- target/riscv/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 Thu Jul 18 09:45:22 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: 813164 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp209325wro; Thu, 18 Jul 2024 02:48:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUIc3qNaMjVu3DyNCNSv1oZpy+4BduJL119BrvIvJZFoihvfzQbYG94AF5yBbN7l2dmIvqU7CkMH5R1yn7rExz0 X-Google-Smtp-Source: AGHT+IHZwBi2PRs1kutFw5z1WQkqw5kbCb7cvU4x/W6eCFZHxoHrgXlTCIM7QQZasdX/hOmVfxCi X-Received: by 2002:a05:6102:2d05:b0:48d:a5ff:2f5f with SMTP id ada2fe7eead31-491598eba4emr5613050137.12.1721296083263; Thu, 18 Jul 2024 02:48:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721296083; cv=none; d=google.com; s=arc-20160816; b=o4h9clo9XBt/6kd8WpeCTnrzXxM4DP6J9wiM+I0T3TDpanbMZncrd5F7gFvjYtJdsV 9WVvR4ps+2QM/398/b0hCJT4ftfdR0Hr5KGE+j1zNrB27VDDBozAjmPwc3BmoUrhFgJd zUMIpYWATK3k6dr7rcSOdu4E458UbCl6Kaj1vFSOh6s7xP7ePaBy6LpxWHyVVCuaPoYV rlcLdvUuz59F8MVi25EP9vvMuGCTnk8p5buozIzGh35SqxoUhLxkm+6xsJPv7svSh2Sp GFJfeDAlTqAZzy8vP3Hx5BlADo+jdBcrZ3MB1NJ+wwBHWmW2V1XGFY5DuB6HVEHClttP FI9g== 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=cxNsjyJQ5Q7BdQvFXGuXSJi9cfIKmt9opJ8u2XLF6e8=; fh=sovPD4wkHfJ9bVr28Ru1bKGyprdwCzLBlH3OiEorkRE=; b=EgnUdgl+MH+GPqushfBNtOnxqbDfGHEIxHzPmgqMFFwlkIqnxoTOC7BlbCDL6YwBN4 5QHAxMzkkwomH/ydtJ+reqfM0JWcU2HhJqHy/sr892a7TfrZ2SrZT8rIEhIB70gMicGm Jxr5mf+PU52zSuVgtOSKacyj+Z4ESQz6KeiCljsIhmnyKrLTC29VZfpQvQCpaXNJcUEn OPewtFLKKbszlsnaKJvlwMY6q7m7Ah7O2a+9Bjd3bSOJwfXu8RUKA/p2DmBKVXKYrrDo YlmkjNDBWp/RhaenB9Ev5+bFpGds7tbn4Qg57ITs+2Rw/0QSWo7VlOhCJ12c8lg7AFki S5Bw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GeudxROc; 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-44f96a65bcbsi1743971cf.526.2024.07.18.02.48.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jul 2024 02:48: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=GeudxROc; 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 1sUNhs-0004QX-Oz; Thu, 18 Jul 2024 05:45:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sUNho-00041w-1F for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:44 -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 1sUNhi-0007h3-KU for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:43 -0400 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-58f9874aeb4so634378a12.0 for ; Thu, 18 Jul 2024 02:45:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721295937; x=1721900737; 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=cxNsjyJQ5Q7BdQvFXGuXSJi9cfIKmt9opJ8u2XLF6e8=; b=GeudxROcOqgIFDmRHp/5Sx034rwxaHJa5qz72b+gHtAEjfoYTsvn61i1KIwDfku5OZ 4hv10NJ6XsTx1qB6vlZBL4KwZL+rY34BrGWTL4dHcfA8NSOzjkJ+N03CeOabePew338R Y950KNZ9zhQEHw7m6emGJU8qs+36NLTt3AfymHunR42l0hpXfi/GvK8iJfc+CUz/MH5O rDQ+SMQVpowH9UNs0eLSFQihtRM+faKNHC5mWbFaAQyWD6qZijsCML7a2xL/yAfKFb/N CqJWg7EI+cceq6zYchvjDu89DSCregfoOrhn8gm/9GFo9kM4Dj5nF4bwB+aoN9KCF9u4 jDxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721295937; x=1721900737; 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=cxNsjyJQ5Q7BdQvFXGuXSJi9cfIKmt9opJ8u2XLF6e8=; b=ZbAGPG3XwY02mvjPV7HT72KJ0/4kvqKbUXdLw6+382W1OAyqwbHUwd7gicbApIV1QY V1qjNuRBEZyD/4uCRsCyeJgpGwgMZKEUwYl9svT8dMLu9Io0NwgnrjSYEbsBpEotzBxW 8zN6GzihSggtktcudpnx3NMJvzzJD7Sl3hw4/8pz1LGbpIoItYxs4vsZzVNf1lSyzJFC lMekX0s5GoEYeaHrxgA6Vg3H9VW8C4mEBwyAagzZ49hz5q/Ae8RmhxIC15sUlj/a65TF Cfa+V91fSnMK5ao+zYmRXrzPKAg+/FbpZWN4AIkBSi5rcqM7HczcAzwheXc9+ejFUjnn ygAw== X-Gm-Message-State: AOJu0YxDp6Kuyb+k+Xji9RW79wYWk+sJ9ECMltlVvc0T6iGBoIg7HTCg gt4C/Kk7gXGL8EbKS+svzoUk8qtTDccSSOXx+LXMfjt2fAdLcNrxjgnBASCI+1Y= X-Received: by 2002:a50:9ec8:0:b0:57d:10c7:aa4b with SMTP id 4fb4d7f45d1cf-5a05d0f0298mr2611954a12.30.1721295936832; Thu, 18 Jul 2024 02:45:36 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-59b24a770dbsm8213773a12.4.2024.07.18.02.45.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jul 2024 02:45:34 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 597175FDC6; Thu, 18 Jul 2024 10:45:25 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , Aurelien Jarno , Thomas Huth , Daniel Henrique Barboza , Alexandre Iooss , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , qemu-arm@nongnu.org, Bin Meng , qemu-riscv@nongnu.org, Aleksandar Rikalo , Pierrick Bouvier , Liu Zhiwei , Peter Maydell , Wainer dos Santos Moschetta , Palmer Dabbelt , Beraldo Leal , Li-Wen Hsu , Ed Maste , Richard Henderson , Weiwei Li , Alistair Francis , Max Filippov , Mahmoud Mandour , Paolo Bonzini , Laurent Vivier , Anton Johansson Subject: [PATCH 14/15] target/xtensa: Restrict semihosting to TCG Date: Thu, 18 Jul 2024 10:45:22 +0100 Message-Id: <20240718094523.1198645-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240718094523.1198645-1-alex.bennee@linaro.org> References: <20240718094523.1198645-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 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 --- target/xtensa/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 Thu Jul 18 09:45:23 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: 813162 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp209226wro; Thu, 18 Jul 2024 02:47:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVelANDOEWLyvTRpE3L1ap8vGkqiKIHboQTxKWmCIMIj7xc+yfiFcP2mRvOW+nrcAFki2Vp9b8BnuQwHMPT27r0 X-Google-Smtp-Source: AGHT+IFYppJ8UD372qCSTAZJMlXX8/TM0g5o70lizVjx0rli8+4dzUcRvaYeWDTl5Ec6WuIa8TtB X-Received: by 2002:a05:620a:28ce:b0:79f:1d:c486 with SMTP id af79cd13be357-7a18749cd42mr560983985a.33.1721296071442; Thu, 18 Jul 2024 02:47:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721296071; cv=none; d=google.com; s=arc-20160816; b=PVKjAX7285wSRB6WydlmFgvTXleSKHefJrTqWonTRkEg+qgLZZCdeZ6c64kCWGSjT6 eP6sABnXBTngHJETgIbVprRTjsAV2p6X89Ocuf+4G5GDGTM2T++f49fb9PuX2rPutZyP JNYWea/yc0hVdQJyCMcSuOnfL8dZl7juv2oXJI7h1RhhnlPidXdSeDAxiqOz7bj53ENr CtlMp0k//L238UBTaCTqIz5a9ABydAv6WSIaO1rOnVXtz/a7Sp4JB51B1ursGCt4VEip NpclM36K6wRnz0NLGKBTK3JZ1I/Vitx8XfszAnFz5LXa5aOAUZhUTlTi8Iu32Ha40Rja Z8Jg== 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=ylkt+dork9PKLTjjXHJbOq2whhnT3rDmt5DUEGl1o4o=; fh=9YDXP0Rf0yv/AwWPNsV02EolRzh1/Mdt9TUvb0lyfwE=; b=SJZ957wccFCJpIHlubOzR8Csmd4wJFQeOuQunmbZBXjpLm+pA67WjlKDkVYQ7yxuzj mk91jnQNYv7SqeBiov7ZwUeD66uW1s6folTHIJrNcGz5aR+OpWi+FmJgnkHbivjsmCfs 8xZVThV6T9rqdhNwzhNN6fyi5BhjQWUw8IjSHvlXkFPnoo0AM1O3rqFyfwvEEBeSXnpA EdZTbxvpcxTt0aUAWjLSjOH9M7Qggqg3HPxJYFJE7K9g2N/BCG4UzRDsSvEQVaIX58Cy sSe4RLLJITyma+ZZ4dwEfZznZKCKYjTuzQNJzQHbK0GM8RFGGIzmvfcUmQMa50KEEZ0R ETLA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ipfBhn7c; 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-44f9696cab2si1878281cf.28.2024.07.18.02.47.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jul 2024 02:47:51 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ipfBhn7c; 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 1sUNht-0004Ur-M2; Thu, 18 Jul 2024 05:45:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sUNhp-00046n-39 for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:45 -0400 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sUNhj-0007hG-FM for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:44 -0400 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-52ea929ea56so253290e87.0 for ; Thu, 18 Jul 2024 02:45:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721295937; x=1721900737; 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=ylkt+dork9PKLTjjXHJbOq2whhnT3rDmt5DUEGl1o4o=; b=ipfBhn7cBlC500LwXpTMDBzFYLz/lG0mLuRRqk3rxLWPaIR9M0ioHd4jjsqIBAk4o9 hQwuTI2XZway+WXMNTOwTMQI/WOmP4YpKkE6NAd14XEMrIBgDuC/61ce2omVk9YXhMsJ 6n/1kxjTi9pntef73FcGKSKmq/smY7XTnnw5jW40yUsikV82kSauibqrXarg+hV5pH5d dnsQktlelQjZl6HWtt9ARFuBrjHnG8AKcQVtfALCO1vQe4T37mR355AePJRYctYCdD07 611Gze+KXMqueQ+uKCaJ0MS2x228Xuc+X0K2wR+11hf5tPn2xmLQDvXX+79C3QHXxhvz JCRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721295937; x=1721900737; 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=ylkt+dork9PKLTjjXHJbOq2whhnT3rDmt5DUEGl1o4o=; b=gDkRlvvZvU5jqFuq90jfKNvWDmHsdurfTQoBxFvy0QfqEtAcf62u5KlTp7HoYaoJi0 FWStn4kaAF5Y5ja5CO3BDf1RH22pEv7GPf1wzQlDS8ORcZZA6ur0kKXvVdRJZg5h3200 4w0IFz9Splwrrs9QY/MphjceYKGJQg5vpEB0KAlSGnYRXB/U3rRdNbVUHIgmZWC8/qJB Y7j+6I67G67XBuZ8h9kC7sBy+i0tICeeI941W0qy7SsoEk+QVP69qWwsHvRq1WanOYhg NMRVAhe7UERAzvtP5B7K7bJaz/jHeaGaMf/mojnr1gSRhemKMS6nOSSpWf8lYv1caQhS NZSQ== X-Gm-Message-State: AOJu0YyBtKpsKsEh5dHgvD+LkaECF6ja9i0sKDYnVpwXIWpPQYDeOWCV T/HJvhaD3y/leZzC+Bw/jpbw8EP2mryGraezyo8i7na4HeqbPWkGTwlnPFa2zKs= X-Received: by 2002:a05:6512:a8d:b0:52c:d5ac:d42 with SMTP id 2adb3069b0e04-52ee53a76a1mr4011463e87.9.1721295937215; Thu, 18 Jul 2024 02:45:37 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a79bc5a3584sm539375166b.45.2024.07.18.02.45.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jul 2024 02:45:34 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 6D0865FDDA; Thu, 18 Jul 2024 10:45:25 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , Aurelien Jarno , Thomas Huth , Daniel Henrique Barboza , Alexandre Iooss , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , qemu-arm@nongnu.org, Bin Meng , qemu-riscv@nongnu.org, Aleksandar Rikalo , Pierrick Bouvier , Liu Zhiwei , Peter Maydell , Wainer dos Santos Moschetta , Palmer Dabbelt , Beraldo Leal , Li-Wen Hsu , Ed Maste , Richard Henderson , Weiwei Li , Alistair Francis , Max Filippov , Mahmoud Mandour , Paolo Bonzini , Laurent Vivier Subject: [PATCH 15/15] semihosting: Restrict to TCG Date: Thu, 18 Jul 2024 10:45:23 +0100 Message-Id: <20240718094523.1198645-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240718094523.1198645-1-alex.bennee@linaro.org> References: <20240718094523.1198645-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x12e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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 --- semihosting/Kconfig | 1 + 1 file changed, 1 insertion(+) 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