From patchwork Wed Feb 7 16:37:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 770643 Delivered-To: patch@linaro.org Received: by 2002:a5d:40c1:0:b0:33b:4db1:f5b3 with SMTP id b1csp400787wrq; Wed, 7 Feb 2024 08:39:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IGp1dGQrdUfrgkQx+nVdXOAuuAUAaGL5Gx0ilw5gr8ndJ+/qNNBOHUjcOUWiV705XpGTtYF X-Received: by 2002:a05:620a:4e2:b0:783:6ab0:f15d with SMTP id b2-20020a05620a04e200b007836ab0f15dmr6335879qkh.30.1707323986049; Wed, 07 Feb 2024 08:39:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707323986; cv=none; d=google.com; s=arc-20160816; b=CiWsZ7bruPMPiz8dauTl0VflDw5NXEFBnAf7o60Bd+4rEv5HdtzfvEpg7k0/HdH98n Xqd4A+TzMyd2Awn3qqMXNmiDWd/svbmIOm6PbzSOtJtj5cVTQY6fJKXM+XMvfVM85DHz 32yFlXD54IoejsnWzy4BdzTW9rt8YVWGpVZa7iAaydPxi3vXNrisvl3Pks540WCrWUrr uNgQt+JXcZk7c4e4uRFPg88SMVXZoBJrcUuoygPwzhD2rveerjOLxDLjbqSqNZxqa4yO rci5lh/m122ACh7KZGaBz0U5dFJoEcZ06Exiw3FUBCju4WZPWyPfUy+P2jWjpn1S7Kj1 UbUQ== 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=JB4Epfg8EtaZj5aKH+XSQiP5F2xLNHDHewznk8QZ/uQ=; fh=/d4O2SQlumuuuNxUC9rAAsc9G78SzZHvwKv5F+/5XTw=; b=gUGXuX/xHqFo7bo/t7zeY3AEpbr5Vzf2uhhNT5bVxFckos9IyaK8BgB5O04mpkUDhF 6x17TgEdl4qjV5z7H3Du7I9bRedToYcvjwMSRzmzrHWUZf0TniYZ4i7hAZAjqgcDKO3M Di/5i4tvOPD12WRcitJy0tzTGfJq7D+H6JLT6LKZgGazNeo0GY1L/lglrPZ4Rw3QeVBM bz9wKRinVY6oRxUqSazG/DaXiNuCJqPT9z9OqF/V9hqQpXhvvHn9CtpNKxU3mAHxvje+ TMXtY8LdsC+kn3mX4qh3/77QRUwbXYN/EPaUBQQBLmJIdtjwdm6mSw2R4zf+hhOb2S6r /72w==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="S1/XuH9h"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCWsshG2HMAiojz7owiaVR4NYNY7OixmrpW/XRRhZV2dbbcPWHxjadOWHWqe/H0riW51GmMzGRPNHnGFNlkOb7gP Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t6-20020a05620a004600b00783ab5f86adsi1402766qkt.265.2024.02.07.08.39.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Feb 2024 08:39:46 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="S1/XuH9h"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXkwF-0002on-H6; Wed, 07 Feb 2024 11:38:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXkwD-0002nw-RJ for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:17 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rXkwA-00066Z-Uc for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:17 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40fff96d5d7so7338985e9.2 for ; Wed, 07 Feb 2024 08:38:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707323893; x=1707928693; 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=JB4Epfg8EtaZj5aKH+XSQiP5F2xLNHDHewznk8QZ/uQ=; b=S1/XuH9hhVCF17vL09deGuOPCEvDKTUWFGonrGvtfAQlnfYnDHLG9gurWZBPzu93JD mMAXEk2QzuU5g7qovS1sxb/IBZ38/UqeF9nPK1QvnqmtebkjusizrjWaC3L0/E9mnNdw VeCqeIMY1IwdvbmhNq+IEuepGT3YFZhiEBqcjGonyt8Cf8c5DiThSG960t3535KkT6ZX oUqg3s5Sf69QHoZYUJfAYXdTCceHa9Zb1qKP+aRGGDBwMUWmMDdXrO0n5Jq2lcCMj2OT l/oI0C6M00Jy7PhVkz5w/3fZ6eK1TMXVY+m6CXeok28/NPp+KiiDDit+ny4jDf4vHEA7 XLtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707323893; x=1707928693; 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=JB4Epfg8EtaZj5aKH+XSQiP5F2xLNHDHewznk8QZ/uQ=; b=JTvpIqGzWdk8yqd5xI+A2J19IBeB+p0AIjiK+pIdalQOsxiXSVMqFw3T9mXcTMN7Jb ETdcrtNUrayeFSYm1WLmnpmk8UpErB+4Au+hLjwNHRP1RMaZyGrubLzT2rWnC6VVCKaA gHChCJhv/Fe2HI/f30UX5eahaDCtMYRTNe0o3ePOSRkiyrkJLRAThLQJBoKCoPPRDCaa Lo0nGXr7Hpns7pGzNtHAMWDS7FPBxNkmLF/mUDmFnczTqVO1SHAvu+hik5xDgs2QdMzo ka4m90oHLeD9ymLxELq5sfqerY6z+LW4oHdYZghv/FX14KueqHWmHkA8vQdIJgX9aGWL ucvQ== X-Gm-Message-State: AOJu0YyvOTEIF7tH0Cw6bbQS5qc09V3pz2+Q8xurKJSlXj0mFOZEh+MA euFeGEorp9cb8jYP8VWEZ///R6ffjQkstHSZoEBW2srmLOBsRzQavorkPSsD48U= X-Received: by 2002:a05:600c:19c7:b0:40e:fc29:f503 with SMTP id u7-20020a05600c19c700b0040efc29f503mr5405118wmq.2.1707323893503; Wed, 07 Feb 2024 08:38:13 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVp0oEbxQlW6lhYbqyiSfzsKgCLMiomGRKPA033C3MhkCfL8fILFps9xeAf/6Yl8ainmRYQ53W2P/oK0WJuCXotuRRzakC+kxGpY0oivDFJktSNHlI/GOKq0HFQqAf6ivyjx/yD5XhIln1qOPA0t088I5s+/ISRLlRpXigdaq/ZyZd2ewr+s+gZ7mN/1+ScxGBj7UW5NLdxFOjXjQCIYSTIHJmwMNji7mHrOVp9kvt4PHtXI6wl8DAP1uf7MrAFa80LAeuuqxk3sN8OLjP2iRmjimMiUjdaz1B8+oRWV5GOWKykDSpUPSlEl9W0goLRkS+7/aiiAwtwmGTQWqCwOfJy0zGX2gE1NskLgNPSh8fS+M9jL+TDNdeQUEq6B2GFA2bopBKOYQoF4EeVYwpbIa+w2BZ2bPYTQpUZsqyFhxgGfanNibpUyLBTDzBQ+ut45Kn7BtsJd7ZDWb7mjngI+UrOE2z14Y9Kg+cTMXGD2MSNiKKgnP85b+Y4hG7CL1jpCg6xK8EdnWrM52cQQsg2uRTRtqHcW55CNuk1ySQV+EbsG8808OgzUmzL5OxEMJFTA34TyywR+brmx9ZCjrfgpOxwiYIL5I/AaDS0PxiUE+Q9bnA93AHzIfKCdhRU/k19eLE0B4+HE9mxO7lsh+Kt0DumFz9JqtwrsvotX4SkwWQiBFf5pzNe6JxCMfZJsskUMIP6O3ezSpIUEDiG3XKp4Me/bCMZn/8gjs/7XR8WpTYt1iYqTLNsiJg9pbcixbGpyDVQeV99ED66J0F1fwi+H1iQt/2glPfy8PHUACCjuhTUoF0Et4gCJR2/nD4DQmrC7jiMn08JZ8ForUt/A3EijVwHLmEYmD4k6Nn+1rRsnJWnsg87Bbs7sOjME0VlwNvRYw== Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id p22-20020a05600c359600b0040ffe1ca25bsm2621880wmq.21.2024.02.07.08.38.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 08:38:13 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 3C8BB5F7D3; Wed, 7 Feb 2024 16:38:12 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: devel@lists.libvirt.org, Jiaxun Yang , Daniel Henrique Barboza , Chris Wulff , Weiwei Li , Bin Meng , Thomas Huth , qemu-riscv@nongnu.org, Marek Vasut , Liu Zhiwei , Aleksandar Rikalo , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Alistair Francis , Warner Losh , Paolo Bonzini , Aurelien Jarno , Beraldo Leal , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Max Filippov , =?utf-8?q?Alex_Benn=C3=A9e?= , Ed Maste , Palmer Dabbelt , Li-Wen Hsu , Laurent Vivier , Kyle Evans , Wainer dos Santos Moschetta , Riku Voipio , Fabiano Rosas , Andrea Bolognani Subject: [PATCH v2 01/14] tests/docker: Add sqlite3 module to openSUSE Leap container Date: Wed, 7 Feb 2024 16:37:59 +0000 Message-Id: <20240207163812.3231697-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207163812.3231697-1-alex.bennee@linaro.org> References: <20240207163812.3231697-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Fabiano Rosas Avocado needs sqlite3: Failed to load plugin from module "avocado.plugins.journal": ImportError("Module 'sqlite3' is not installed. Use: sudo zypper install python311 to install it") >From 'zypper info python311': "This package supplies rich command line features provided by readline, and sqlite3 support for the interpreter core, thus forming a so called "extended" runtime." Include the appropriate package in the lcitool mappings which will guarantee the dockerfile gets properly updated when lcitool is run. Also include the updated dockerfile. Signed-off-by: Fabiano Rosas Suggested-by: Andrea Bolognani Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20240117164227.32143-1-farosas@suse.de> Signed-off-by: Alex Bennée --- tests/docker/dockerfiles/opensuse-leap.docker | 1 + tests/lcitool/mappings.yml | 4 ++++ tests/lcitool/projects/qemu.yml | 1 + 3 files changed, 6 insertions(+) diff --git a/tests/docker/dockerfiles/opensuse-leap.docker b/tests/docker/dockerfiles/opensuse-leap.docker index dc0e36ce488..cf753383a45 100644 --- a/tests/docker/dockerfiles/opensuse-leap.docker +++ b/tests/docker/dockerfiles/opensuse-leap.docker @@ -90,6 +90,7 @@ RUN zypper update -y && \ pcre-devel-static \ pipewire-devel \ pkgconfig \ + python311 \ python311-base \ python311-pip \ python311-setuptools \ diff --git a/tests/lcitool/mappings.yml b/tests/lcitool/mappings.yml index 0b908882f1d..407c03301bf 100644 --- a/tests/lcitool/mappings.yml +++ b/tests/lcitool/mappings.yml @@ -59,6 +59,10 @@ mappings: CentOSStream8: OpenSUSELeap15: + python3-sqlite3: + CentOSStream8: python38 + OpenSUSELeap15: python311 + python3-tomli: # test using tomllib apk: diff --git a/tests/lcitool/projects/qemu.yml b/tests/lcitool/projects/qemu.yml index 82092c9f175..149b15de57b 100644 --- a/tests/lcitool/projects/qemu.yml +++ b/tests/lcitool/projects/qemu.yml @@ -97,6 +97,7 @@ packages: - python3-pip - python3-sphinx - python3-sphinx-rtd-theme + - python3-sqlite3 - python3-tomli - python3-venv - rpm2cpio From patchwork Wed Feb 7 16:38:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 770650 Delivered-To: patch@linaro.org Received: by 2002:a5d:40c1:0:b0:33b:4db1:f5b3 with SMTP id b1csp401209wrq; Wed, 7 Feb 2024 08:40:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IGOE0JigpGVrFo63SF9QdLnxFqkORRTWgyEnskzfFIxNo88O2MXhRgTvj8pUHYH9+8SrSb7 X-Received: by 2002:a05:6214:500f:b0:68c:8268:b5c4 with SMTP id jo15-20020a056214500f00b0068c8268b5c4mr8438330qvb.45.1707324044565; Wed, 07 Feb 2024 08:40:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707324044; cv=none; d=google.com; s=arc-20160816; b=ldqPgNrwpK/suhz6lq/OpSe4MDswBKrgaJzZwtJNCGGdHQhRalcHIPnuJiw+bGbQvl pnYDwGhB+pe4w+hkTGfFTvwUBBbxE4kqukYhzATLCuw5T4K2T0SJLgzCEkTJMqETMwiC PspufRtyrID1HQTCJY2HX/ENLSD1e/GMmKb7Lyzm/2LPUyUXkDoTh2gJFR1IocrQQ+Qm GKqoFeinSiVsrsCSTSyvGTDeWhAh/oeP3hWkCqvmvWg03cF4Z9LEg1/NT61gqOe2zycF k2OZXfaRtpeGOD94n/k/IRVt7sn7wlarX7kQ1+pHsv4BzL1ZDkNv07NISPLch2CrYGVs AQKw== 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=LXky2CMDdzuIC8PBdEAHx/6nddz6mi+8QtS2LPbBGiM=; fh=8z3cOSgrvpxBVyZPFOjnN0WW8M4v91MMzYt/vJCXbI4=; b=r5vYHp79wTovcS4gZzQj3yDXN0iaXclIBI7u/AxpltlB/Lmx/LaZI8y52j4sRFSFF3 IVNRb2W+1pGP4APVwlVy2/jhQdIOEmKsQp/ahy8XjfC8e+toqwU1MFosFP2Iz2ThUYsQ KiVoU6DylKkaz/xFhoom8vvJGr4eqD6zGl7Bg8ChBwy4PIsXK3CIHwz7j7pwlNXhgEjg shFpIex2CKh2OuzJV08X8njdN13pqrSjAM0j0U8ikqd3zCtsNLJ1j+2oYhLkhguwFvHG 41rAkzPZVujxqNtYBJli4uptmAXZoPnFZHYLnhnd9yreiFtPkW/iIqrMl+nK8o3caI1T 9qNw==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NAQQcfYH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCV81CAX8iLEY39A3/AN1lYAy06pmVbyjT0d4HA+CC4E1gbciDgNCqAyUbV5kl20Q5Huw+o5leIM4LDh9EVpwzj1 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e3-20020ad44183000000b0068c484c7b78si1394067qvp.349.2024.02.07.08.40.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Feb 2024 08:40:44 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NAQQcfYH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXkwG-0002p2-2y; Wed, 07 Feb 2024 11:38:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXkwE-0002oO-Eo for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:18 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rXkwC-00066r-Pq for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:18 -0500 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-33aeb088324so629375f8f.2 for ; Wed, 07 Feb 2024 08:38:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707323895; x=1707928695; 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=LXky2CMDdzuIC8PBdEAHx/6nddz6mi+8QtS2LPbBGiM=; b=NAQQcfYHLL2BKX1Gdad3Jl6EucdWuXbq/UfjbsidFzBrd1PKuGRMfjnysWETedfrUg 3Oc4fNpGRe/pMo8itUwclDP80nX8gXUg5gem3m6oJ2rE3+zwUhSOFpgZ2sGPcXaWGZol NdM0OsJLi5ekbqetvtjzZbFU0gfEVMGbihbhamKOiPdSkKrE8i0Wix3doJu4jjkgB8bS 6yqJEkWguOfuAe0KBB+BPbG5Anxseje8hEAdOWHQCc7l7f8KCQ4TRGDYhJ8wfPS1E0XO z6JA05PDz2Guw4Q6AfNQ+K6BCEsIyZBWKZzgy4ycS3xkFFA8jEx3szwy2+rCJCmckjW8 UUlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707323895; x=1707928695; 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=LXky2CMDdzuIC8PBdEAHx/6nddz6mi+8QtS2LPbBGiM=; b=cyVXrI9+lZJFmcDJhGPXKiRJlSBti++p2nT2bAvfBh/SFCf5b/jI1Rg+nSLeVJLwzf UOo9t4kloXV/NIQyeeyxYrloCDdfn25Zg8U8bnJiMpeBHpBlbhGZkAMw5N4N8xEZPCtv iV6tX2IAwhj9JIzSbLpgR3y93f+rmtl/Fq9ojglfvaGYcDuAr+Rnc43eAzuSRNZGMAmd HgqfHg8TIflBUikAI6+9LZ4VUprJcnmcAceRudpiIRpmfPpqdyN5gTo05XXEAMqltrey 8RfuaXaJzyoDvHob6uwgc2UaTgUNkAJVAyCTSt6QA2EYLZk72XMQAfCqnjcj4ymt/rJ5 /rOA== X-Gm-Message-State: AOJu0YxC935s2x0GoGQ2zzFZFK7Xe7dYiQmYpwssTDI2QxBneVJI8AuN D/miF4eYCFkaY2QXhSX7RWj/5q9IVI0IUqn+krByrKDoFT3PDMACuvUl4P8Re3M= X-Received: by 2002:adf:cf10:0:b0:33b:10ca:d190 with SMTP id o16-20020adfcf10000000b0033b10cad190mr4595531wrj.24.1707323895429; Wed, 07 Feb 2024 08:38:15 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCURBABIzhGa29GJYD85vS1JlzBfwWWDBHDHNWOOt+PDigk4w90BZ3LBumxAS0OFVAuoaDI4+lsk7CucyNvPbqBGgPHFsYFinOKkl294O8mFv60MgGCuy4cfDNpwcESvls/IDaLuI0xLuZGQBlceyDOcm1BtQsPS3DwPIKG1pJsY0CKXE85vkiCOC5bpv4NqsMvXlrNiH+66D4FXPhJwcAaludYFlGuXZOBw8TS5+hXHog7Y9RvVH9w+9ELXoC1WmIsTIIes1CL2f2PVsHhPrehOAtvLgyFiLJ2TY2Au27b6J3g+JqvLZ29ub+POWomgB+PZvRRHUiSMWJiyV79xsffnIeTMqpLKA7cpDE5F4FwGPreWAvQbOuURwQGIJJt1Szu/NdSEP+c66Esr/qN5KpgFBPNDAtz2lT/9snhtUuKUZGBDouVjzKZ3L24RVJMjGPfAGsbUJIBnLdIz8UTJBulXVxcHdpkKhoCz/wU0/v8QURznRA80nUFgw+iTHn8HJXQ+GALLM6tJtV6J3Eq1FOR6CBYU8TDS5Ice2wJYpkCDnciaCM8auI6l87jUoAKQ9ijqTHUjyOIuJb/fnbF5oHr/NTGKJENwmXEqPi2JCDMfzZHw7tC3nAxnjspSOP4VmYMenExo7E9CqLgFJ6OfWMMXy+uUSZIoeiPjYfH9aXhr0iVCaPTp6xPhD0ekVcwPDdT4Ju7JZ2HrqpS+p0WCKKGRKcWIioHe+C+jF7GnI/U7wwvYe604yr8Fu/G6KWhADhDIp7olwjkaVRbtCIMzmVry3dZKHrQcfb01tIExhqMdxWWhgKVOoteIuxjpO6C3GNgjB/GfazFo1yAIcZE4dgqfXCDvW2sOAczAePfKxKSSoNi6AC6DpL6QxjaITmtrmNZYo2pC Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id d11-20020adff2cb000000b0033b278cf5fesm1852878wrp.102.2024.02.07.08.38.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 08:38:13 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 510C05F88E; Wed, 7 Feb 2024 16:38:12 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: devel@lists.libvirt.org, Jiaxun Yang , Daniel Henrique Barboza , Chris Wulff , Weiwei Li , Bin Meng , Thomas Huth , qemu-riscv@nongnu.org, Marek Vasut , Liu Zhiwei , Aleksandar Rikalo , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Alistair Francis , Warner Losh , Paolo Bonzini , Aurelien Jarno , Beraldo Leal , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Max Filippov , =?utf-8?q?Alex_Benn=C3=A9e?= , Ed Maste , Palmer Dabbelt , Li-Wen Hsu , Laurent Vivier , Kyle Evans , Wainer dos Santos Moschetta , Riku Voipio , Rabin Vincent , "Edgar E . Iglesias" Subject: [PATCH v2 02/14] docs: mark CRIS support as deprecated Date: Wed, 7 Feb 2024 16:38:00 +0000 Message-Id: <20240207163812.3231697-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207163812.3231697-1-alex.bennee@linaro.org> References: <20240207163812.3231697-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This might be premature but while streamlining the avocado tests I realised the only tests we have are "check-tcg" ones. The ageing fedora-cris-cross image works well enough for developers but can't be used in CI as we need supported build platforms to build QEMU. Does this mean the writing is on the wall for this architecture? Signed-off-by: Alex Bennée Cc: Rabin Vincent Reviewed-by: Thomas Huth Acked-by: Edgar E. Iglesias Reviewed-by: Thomas Huth Message-Id: <20230925144854.1872513-5-alex.bennee@linaro.org> --- docs/about/deprecated.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index d4492b94604..82922476d72 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -183,6 +183,14 @@ Nios II CPU (since 8.2) The Nios II architecture is orphan. The ``nios2`` guest CPU support is deprecated and will be removed in a future version of QEMU. +CRIS CPU architecture (since 9.0) +''''''''''''''''''''''''''''''''' + +The CRIS architecture was pulled from Linux in 4.17 and the compiler +is no longer packaged in any distro making it harder to run the +``check-tcg`` tests. Unless we can improve the testing situation there +is a chance the code will bitrot without anyone noticing. + System emulator machines ------------------------ From patchwork Wed Feb 7 16:38:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 770647 Delivered-To: patch@linaro.org Received: by 2002:a5d:40c1:0:b0:33b:4db1:f5b3 with SMTP id b1csp401079wrq; Wed, 7 Feb 2024 08:40:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IGBTKoOhjU69x+bNv+3VXEj5Jw+N93axat4fKeZRRKr5hNKW5DNlhCr+tUmu+ky2NJW+/N5 X-Received: by 2002:a05:6808:1b27:b0:3bf:f200:c000 with SMTP id bx39-20020a0568081b2700b003bff200c000mr305497oib.29.1707324025321; Wed, 07 Feb 2024 08:40:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707324025; cv=none; d=google.com; s=arc-20160816; b=bptVyvOZxWb2KgeySCgUiz5oGEDDeHJrUAfOQ0biC49dS5DTISDGtsPpO1cUqs4iVH SeW7FIpx+KQtOXJdaXdgs4bD+9XGacHmhEBpnsAkxpGZw8mUATGFyOiTz2s8/maF0fok ul5moo4pik5VT2klpeX37308NDR1sBLI1VxR7GoUTuxpiK8K4bomZ/JJd31T99Ac5Yn9 gFtD21zQ2/INxrh8MswOcLcmatIfVAJU1Q3l1H2SjFvqgDpXx/PMGWD4fgXf5RJOW6yb vMi61NFrhqyRChl9Tjl171usJ6upczbCuOboJyPXfFH5Atv3JjXY22DakNtFskF46clp DF+Q== 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=4XrdlyPxX7fzqYNhg32fjbzatjpy7oOVQl+tyM0KqaA=; fh=tVXCzSqQeIZ9DM+D2QRncwuQlZNP9Sg06OO62tjX/1U=; b=wxg6iVU87FXrC11CefmK/y6eRmPjLNeU4VTrl+RJMNJU00Q8ZwjBHP0Gd14lN1QcMI 6QSeVnfHTSld7QObK+sPp1f+L8boFKTWwkpzOK7uVd5mwlg16krTqUGnToGMpObvrHHg MsKmAeNF4ADj9vbQVYu351OTaUO/KtoqQB0EtG2/KCFrIhIp5xmAz+G64a6f2jM3MJt8 Rl4nSewEmTXjGlD5O67fDSCx7CgarqLlwrtLCCrRKry7CZQsNE+ivK/br/P0z3Cw2Ywu XTruLn9rUrvT7gOk0zIEZxzXDak+xb/wOKtg5JrIybSVhwGUJAChgGbxl4LZrJesKVmo 7REg==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=snotOtLv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCXGtik9knUIpBOti1dq0xK9m1mDL5sW/zlHHzYAYYWQxY60ok7hM66QZgapfVn7eMKIJiUtC7gJxgws45jlUs7L Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a8-20020a05622a064800b0042aa1dab42dsi1467640qtb.554.2024.02.07.08.40.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Feb 2024 08:40:25 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=snotOtLv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXkwL-0002sl-22; Wed, 07 Feb 2024 11:38:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXkwI-0002pf-M6 for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:22 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rXkwE-00067K-OK for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:22 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-40fe3141e1cso8096905e9.0 for ; Wed, 07 Feb 2024 08:38:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707323897; x=1707928697; 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=4XrdlyPxX7fzqYNhg32fjbzatjpy7oOVQl+tyM0KqaA=; b=snotOtLvwVpKbWPhm7wpatKLekwNvlVPtoYKSumMcrk+pBT4HZoElHixY+sDIio6sk QnG2BGi4uYqeGxNlYT+6hiC5qdI+iaVg3kIBkZID22k0/nI6nTSPLpari4EoTz4w04yy JLq9QxYNkt0sGli1lt5yDZxoO9ubF4aVzfQksEUXNtg5Zy8XkEPZFymzQ1ED3L9VfTOd mRgCBhT9D9vc8vqgLDpxC+6NQhV/Rs5lXFTMx6MUSGhN9qQiSRSGua9eE+Uggp8lhbbO yBGm0MyW7HLMZBEayr2MDgNz2hPyoAb5IEx7QBfKOwKWTcaDp//OJviUlzy3rM19T1tQ 1ciA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707323897; x=1707928697; 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=4XrdlyPxX7fzqYNhg32fjbzatjpy7oOVQl+tyM0KqaA=; b=YrKmQOHl0sTJn6oibELSsZyyI8rkwO/meeg+gw4aiIXGmIFS5wtnjPLAUpfXg+a1qb zoheXY2PObGpnDYU/aMNA8KnNlvKzq/VB5poBM8BkwdSV5/Q7ypWlD92JB4u6uLN4JYS JD2FQ/LxROfi16QmQobsnV8cwOnbc8PAPW8F0V3/3hugMNGgJTjOsD1VkvpHGM33vNI+ Cb+3DvTTxSzj4hBXNfadoDytUw8MPq1/EEfsCSgL0F4vH/0Mn3MuOuDR/4gvCypmSE8N iHmD7ZX/95KqBGtwfSy4rnPFlvhLR7MUHsz5e/Z2pyyi3aAw3JV0I1IN/slTJXpIg0k4 xrGA== X-Gm-Message-State: AOJu0YyjfZazj3CanwOnFBobdD96TVRl/TPjPtWg58wlpdKLkfUKHEq9 +ZSM9McTHUGcMuJLz0HaoRJTHz0qc3LEd5k8X9tg3Ef7aVDQtpjJWi3tcRxRyag= X-Received: by 2002:a05:600c:a08:b0:40e:fb8f:debe with SMTP id z8-20020a05600c0a0800b0040efb8fdebemr4884119wmp.38.1707323897182; Wed, 07 Feb 2024 08:38:17 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXyZ5+acAuDUHb7TgMFnMsuwKsw3ljUwkqM34AK+NfpZnr7sWoJ37vTqNMlT1oRbxzAZOXObeySLPXnLBK7+4hzxOGV2pbYvkRU+sowfGEvZbY6aqidNUk8fVvW2KQGFs3kKfE6p/sY1/2l5mzRGqbhjAj21EMKolfmnAIPcYVXX8VZO/XbsJOc3cIQNYZFzw6rkI63QKcaSHkdLMvfLUIGi9pRbvmSCvYSsRlihLYfCv3WaWJ6jS3bQKc64tmMfPjmU+0bqWOIq+I3IHi7Rojsc5T4rHxJ74mWv6AuGsoJw+/rnonLz5Oo9zxHmv6NrT9t6LeC4mM2u4DoBYu/6aCCH5px7EbarTR8XqjuWUgn7rfGwCWyUuZajUNE+osp+wqcMkrgTDL2ABxQR548Tmnxxps3NRqiiC/xfL/a3yMzM636ZaI13s4luhrUDNuR6FY7gJXAvzl30CyFgmiiZK3I+LHmic0L6m6Bnn/EeaYhGr+MekZ3bjWr9Mq4Pyl/MdeO7nCThrQ4ApEctS2cTBexPqPptuap2rJZWGDBX7xGUpB48c/KrYFxrI4wWFOhXbJOvk2uQNtTjUtMNoRQas/h8l4HXXKEb30Vr4FlN5MCDmWBB2nIUMcvM2GqDtSGxp/40tV0lZ24FdgRHkOAoK5NvCOjiHotlyip61IC5ouFPjAt+OlmDaAVUDDh7aEET9fF0NhPw9SkSTu51am1736A44qTe7P8u/zqTDe+1NepefJO+stZyz/AvkJuM2QZm92D1oZ+VAfmIl8uXxxBZivTK2jqRJ5Opag2YoPl7tbEO+7kRSi+deJudFTkqWFlpeb2p1j9NVayvws= Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id p22-20020a05600c359600b0040ffe1ca25bsm2621888wmq.21.2024.02.07.08.38.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 08:38:13 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 6709C5F890; Wed, 7 Feb 2024 16:38:12 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: devel@lists.libvirt.org, Jiaxun Yang , Daniel Henrique Barboza , Chris Wulff , Weiwei Li , Bin Meng , Thomas Huth , qemu-riscv@nongnu.org, Marek Vasut , Liu Zhiwei , Aleksandar Rikalo , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Alistair Francis , Warner Losh , Paolo Bonzini , Aurelien Jarno , Beraldo Leal , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Max Filippov , =?utf-8?q?Alex_Benn=C3=A9e?= , Ed Maste , Palmer Dabbelt , Li-Wen Hsu , Laurent Vivier , Kyle Evans , Wainer dos Santos Moschetta , Riku Voipio Subject: [PATCH v2 03/14] configure: run plugin TCG tests again Date: Wed, 7 Feb 2024 16:38:01 +0000 Message-Id: <20240207163812.3231697-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207163812.3231697-1-alex.bennee@linaro.org> References: <20240207163812.3231697-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: Paolo Bonzini Commit 39fb3cfc28b ("configure: clean up plugin option handling", 2023-10-18) dropped the CONFIG_PLUGIN line from tests/tcg/config-host.mak, due to confusion caused by the shadowing of $config_host_mak. However, TCG tests were still expecting it. Oops. Put it back, in the meanwhile the shadowing is gone so it's clear that it goes in the tests/tcg configuration. Cc: Fixes: 39fb3cfc28b ("configure: clean up plugin option handling", 2023-10-18) Signed-off-by: Paolo Bonzini Message-Id: <20240124115332.612162-1-pbonzini@redhat.com> Signed-off-by: Alex Bennée --- configure | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure b/configure index 3d8e24ae011..ff058d6c486 100755 --- a/configure +++ b/configure @@ -1644,6 +1644,9 @@ fi mkdir -p tests/tcg echo "# Automatically generated by configure - do not modify" > tests/tcg/$config_host_mak echo "SRC_PATH=$source_path" >> tests/tcg/$config_host_mak +if test "$plugins" = "yes" ; then + echo "CONFIG_PLUGIN=y" >> tests/tcg/$config_host_mak +fi tcg_tests_targets= for target in $target_list; do From patchwork Wed Feb 7 16:38:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 770639 Delivered-To: patch@linaro.org Received: by 2002:a5d:40c1:0:b0:33b:4db1:f5b3 with SMTP id b1csp400641wrq; Wed, 7 Feb 2024 08:39:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IE+hDPcJxUz4jKoFY/9ren/toiM9hFMBNV2noku1IANOT8tS2A7WKXhTqSWomBovEm82aiN X-Received: by 2002:a05:6808:309e:b0:3bf:dc4a:f3f7 with SMTP id bl30-20020a056808309e00b003bfdc4af3f7mr6401695oib.35.1707323960605; Wed, 07 Feb 2024 08:39:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707323960; cv=none; d=google.com; s=arc-20160816; b=pCcy6cWPpe7aF7TuPpZNCiSBvtq4KgauUf8EYSmNVZdSoog+41CrUtjf9MMXNYpu9N t2f89z3GfXNjh47VQEin5Imu0Zh0N0cHswNAszNy54yFwzWzlbZsQENhSpnSrEeYyXlF MrO2y3A28jZntrtgEl/yKwyrpHuDEAKk0j3VvD1CCap9hcAxg+bkpjH5GpN73gpw+MZr p2cn+P0Jc2pnEiKt3d/zphJSXe3+VT+dqthqtFmVkUTsIZcr9Ygg9pXQZuGae4MdP77S poreqO1KKWUoKokiCLJYzecv3h+5UrBWPrWN/lhk1iAKxTXg5g0Knjn9tTcJ0OV782Pc Uq1A== 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=al2EF5joR1GpZYix/IJ7sorp1km6Nnx+serOjQtc33w=; fh=n3s7qGoCu//JPKieQRsiO2LKreTKSPwfsQw9ivy8Xe8=; b=Zz+LmaHZKfcEuccRc2Mv+fRzkWWI6KTal766FnPs7fiqoBWXFHEO+kcwT988llaey9 FPcpkqnlPU8ttSDlejI4L0YGvBnUuIEnhh7RKg9NHj3S52D9Glq6B2/WWIWhB6J8oVPc TZZTGVZBNpign2taaVc/tDHR8x409ciVhsBql4w95YKqKvC0rLNWC1zZR+Kb/siqPK8a mGAafPPQL7sqHnTFgmFItGSN9OjsgrYTIgniQOMgj5irPkW75Af4mQgQrwAFkonUy4bx oZ/MMEF7C0mSnFo9zXZzVX8yt4ND8yZQie1t6mFR7KQVwM4S8zFuiywL8KeVXVg3ajn5 uFIw==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N+kFrznv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCWF6PXfpN67TJPKxOGTMHCOArERspJG2OMrz2HGXUFrQEm917CFPeksQcd+s1QV7jJHBaY1pQac7uJgrYdgUZox Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y2-20020a37e302000000b00783f0d6b2absi1422550qki.390.2024.02.07.08.39.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Feb 2024 08:39:20 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N+kFrznv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXkwJ-0002r6-Im; Wed, 07 Feb 2024 11:38:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXkwH-0002pQ-Ln for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:21 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rXkwE-00067G-Cr for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:21 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4101d096c92so4429365e9.1 for ; Wed, 07 Feb 2024 08:38:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707323897; x=1707928697; 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=al2EF5joR1GpZYix/IJ7sorp1km6Nnx+serOjQtc33w=; b=N+kFrznvTJ0P9ZboHnXtaevVALylMSNP24w386OGQE+l3iK6kH3jvDND58pQkemXD0 a+GoRlPmPN07imDVS90HOho+O3UdnuIfGczSDciXexfPguAVP/Gbd8jNI7CiuuUlpaC6 rtFDbQs3FQeBNND6Bnt32VlVXThcQ0BPlXDHTj8F66R5qvjErPqOVRA4fyuP2QqBfeNo LoVkw0rVcXMLpqXRLnOJuDRVHi9D3bB+OvHbMMNCzqeuIitE6A7NAKJqXbCy1SaX5cR1 5ly7UNsiDcxJfg4jkKNJXZIgNJYZxLKlIfQOduwbXnJYldB7Edb6BDqIWW1s+WjIsh+r rQMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707323897; x=1707928697; 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=al2EF5joR1GpZYix/IJ7sorp1km6Nnx+serOjQtc33w=; b=GGvcpTemdTbemJhzqwSmH/SEzqQDYML9aTFa4WZrvM0dpaAe2G2qSXoYDbDJ9W/r0P 3B69I6D/2pE9iEfgyU4E+UF17kPANRjs50ukn7qUaRXH81kxKt9+1zmo44Ur+UP0MiP8 evidrwoUKtyrbPGZtvrbtuwdv0PRX6kvh3ljE01b7saVLeCCgyjbXYfC9WNUkTzMjwZi Ui0zzKD5OPszsNsPN/hRXP2FZjvAq2erMMF2FkpFWKk4au0avGk/z4lDQvr+ZTupwF2a vrgnl8wHw/l5b9w2BS6OjthmMgTq+JpchUoFi0J9noDRDwXP9LhnplGScYPfr2qeECql w0vg== X-Gm-Message-State: AOJu0YwCzNcM73ga5dGZRN8IprctjfMdRC+ewmiXDmKThHuXNnJ0ecfv Rv1Sky1ddQ8+4X45nfl4r74D8pKpqei/s59eRwTAIciNUEOwZcKY7ZHisAxGirw= X-Received: by 2002:a5d:6703:0:b0:33b:1ae4:10b1 with SMTP id o3-20020a5d6703000000b0033b1ae410b1mr3549305wru.47.1707323896841; Wed, 07 Feb 2024 08:38:16 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCU4pOfHiiGwCo4OdHghcmtkfTz/YfCpp7vi1P0k0xuEn7MMyfZkDp5SuiQyA+Dalk1TdFnzHYKAox7Cy2JBgUZvuV7AZWigReJq216WwBzezxWAcZ9bhnJQRXY2r0SV3mP8Tdnhel2lFPGIg2QKfsoGxAX6bATIC7y+sY9yBvBzKf8e/0ixlUCJFHy2ET3h4d9K4yPGT+UlK5zEtL3cEY0lRAFrRNFSNAEkudXO0jP81UW4Zl2AhKcYL6trJCRRZsToazF0RfHIgM+0nifwnqbafeCwP8Q+icMq2dVZkrxchd8ENxvMq3gtJWLuWTWIR0JNrfgc7BuLg4iQEYhNDmsRkTBnC6lqKreHleXYUqIkuoO17HJqdfmypDi+GS61iYaGNm6QSX95W4vqYBgJMLw1ukGO2Ziq3+aGhI+imBOSZ8HdelrkoaPUfJ/G2LGEGqCGLhvJk0RsOWyf8rUYpNr4E5VqVSNYF8rS7HI6wFQASzJeiVWZHPg2nrSjR+2USFDTG8FhgsMl/oWzZ2At9aXfcqxrwy9JRw9S71iJpLlNI6r1wkTvYKpgdcb3loyeVSRdBF9wk5mVZcMUCNprRJ7n6+OQbwWezf0y3wM7TNy6UYvOeKNQOSY8M76BnlFCy3Wfd0jYtU47cp02K7Vk1fw6bPr44uKVeyZQlwXfZFidPwYQESasogOqF1TYk/R/tCiAz4xyHqahKHEwaxfSwq7EGp5ChGqGqv8PakDLFUbxjElwOLUZ8halcTPZ2Fh72XskZVGrX/coi08kcBIduLGN3gKulq+c3/782DnwQc0MeM1LAPV+uT+DdlDYBBmjUDooTTp6Uu9WTxk= Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id az2-20020a05600c600200b00410141aa57csm2062945wmb.15.2024.02.07.08.38.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 08:38:13 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 7A6545F895; Wed, 7 Feb 2024 16:38:12 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: devel@lists.libvirt.org, Jiaxun Yang , Daniel Henrique Barboza , Chris Wulff , Weiwei Li , Bin Meng , Thomas Huth , qemu-riscv@nongnu.org, Marek Vasut , Liu Zhiwei , Aleksandar Rikalo , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Alistair Francis , Warner Losh , Paolo Bonzini , Aurelien Jarno , Beraldo Leal , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Max Filippov , =?utf-8?q?Alex_Benn=C3=A9e?= , Ed Maste , Palmer Dabbelt , Li-Wen Hsu , Laurent Vivier , Kyle Evans , Wainer dos Santos Moschetta , Riku Voipio Subject: [PATCH v2 04/14] Revert "hw/elf_ops: Ignore loadable segments with zero size" Date: Wed, 7 Feb 2024 16:38:02 +0000 Message-Id: <20240207163812.3231697-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207163812.3231697-1-alex.bennee@linaro.org> References: <20240207163812.3231697-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This regressed qemu-system-xtensa: TEST test_load_store on xtensa qemu-system-xtensa: Some ROM regions are overlapping These ROM regions might have been loaded by direct user request or by default. They could be BIOS/firmware images, a guest kernel, initrd or some other file loaded into guest memory. Check whether you intended to load all this guest code, and whether it has been built to load to the correct addresses. The following two regions overlap (in the memory address space): test_load_store ELF program header segment 1 (addresses 0x0000000000001000 - 0x0000000000001f26) test_load_store ELF program header segment 2 (addresses 0x0000000000001ab8 - 0x0000000000001ab8) make[1]: *** [Makefile:187: run-test_load_store] Error 1 This reverts commit 62570f1434160d356311e1c217537e24a4ac85cd. Message-Id: <20240201122835.1712347-5-alex.bennee@linaro.org> Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée --- include/hw/elf_ops.h | 75 +++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 39 deletions(-) diff --git a/include/hw/elf_ops.h b/include/hw/elf_ops.h index 3e966ddd5a1..9c35d1b9da6 100644 --- a/include/hw/elf_ops.h +++ b/include/hw/elf_ops.h @@ -427,16 +427,6 @@ static ssize_t glue(load_elf, SZ)(const char *name, int fd, file_size = ph->p_filesz; /* Size of the allocated data */ data_offset = ph->p_offset; /* Offset where the data is located */ - /* - * Some ELF files really do have segments of zero size; - * just ignore them rather than trying to set the wrong addr, - * or create empty ROM blobs, because the zero-length blob can - * falsely trigger the overlapping-ROM-blobs check. - */ - if (mem_size == 0) { - continue; - } - if (file_size > 0) { if (g_mapped_file_get_length(mapped_file) < file_size + data_offset) { @@ -540,38 +530,45 @@ static ssize_t glue(load_elf, SZ)(const char *name, int fd, *pentry = ehdr.e_entry - ph->p_vaddr + ph->p_paddr; } - if (load_rom) { - g_autofree char *label = - g_strdup_printf("%s ELF program header segment %d", - name, i); - - /* - * rom_add_elf_program() takes its own reference to - * 'mapped_file'. - */ - rom_add_elf_program(label, mapped_file, data, file_size, - mem_size, addr, as); - } else { - MemTxResult res; - - res = address_space_write(as ? as : &address_space_memory, - addr, MEMTXATTRS_UNSPECIFIED, - data, file_size); - if (res != MEMTX_OK) { - goto fail; - } - /* - * We need to zero'ify the space that is not copied - * from file - */ - if (file_size < mem_size) { - res = address_space_set(as ? as : &address_space_memory, - addr + file_size, 0, - mem_size - file_size, - MEMTXATTRS_UNSPECIFIED); + /* Some ELF files really do have segments of zero size; + * just ignore them rather than trying to create empty + * ROM blobs, because the zero-length blob can falsely + * trigger the overlapping-ROM-blobs check. + */ + if (mem_size != 0) { + if (load_rom) { + g_autofree char *label = + g_strdup_printf("%s ELF program header segment %d", + name, i); + + /* + * rom_add_elf_program() takes its own reference to + * 'mapped_file'. + */ + rom_add_elf_program(label, mapped_file, data, file_size, + mem_size, addr, as); + } else { + MemTxResult res; + + res = address_space_write(as ? as : &address_space_memory, + addr, MEMTXATTRS_UNSPECIFIED, + data, file_size); if (res != MEMTX_OK) { goto fail; } + /* + * We need to zero'ify the space that is not copied + * from file + */ + if (file_size < mem_size) { + res = address_space_set(as ? as : &address_space_memory, + addr + file_size, 0, + mem_size - file_size, + MEMTXATTRS_UNSPECIFIED); + if (res != MEMTX_OK) { + goto fail; + } + } } } From patchwork Wed Feb 7 16:38:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 770652 Delivered-To: patch@linaro.org Received: by 2002:a5d:40c1:0:b0:33b:4db1:f5b3 with SMTP id b1csp401322wrq; Wed, 7 Feb 2024 08:41:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IH/u1dVclBizlQr3LfAI2qXXvZ0rjvWS4HDOzA1NxCh/qB7JKjqmw+tmeVxmWDBGDrlCSPw X-Received: by 2002:a05:620a:38f:b0:785:4fda:6610 with SMTP id q15-20020a05620a038f00b007854fda6610mr6104728qkm.58.1707324061258; Wed, 07 Feb 2024 08:41:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707324061; cv=none; d=google.com; s=arc-20160816; b=XT37ElAJq1PZlsH5XoeuSqWGJ7DF/mQhWGlY2KEwdNjchkP89hJE1iO41Ax2Ra74+G jgkLtYNURl24yUdW0wCF8h3hTyAsW/KvAUUrOXIq0118JI4Ilwoj+yPigXBU7PnPFSg8 eGQEN5Tg2TE2ske8NmHhURSlc7CU/XRdpVtodrPWJQ7r/wLL+sUS0FMRSuf2yHsouuAn liGeIVlBDFXc54oZzKPl7/a/MbsJh9MqJgMbsh3jLSXEgGRPC1UhzKnG9CwOBUjPyPxZ /99aLT7C6N/NKTfTyJ/znBYZ3jSHIlKTuYEbgqtWB4qSTOhrZjynDyiGU51CAjyNWzQB PA5w== 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=7r6TD7yChzqzHwHFrhbxu1OMWzC/pBSk9CaZVccyvoc=; fh=nVnVe9+F4NU4vAH/0LlOcQowFjqWBdTPAs11kuxwzRI=; b=UvjhxkJidC5UPtiniuXsaEwcaSqcgXQASYzGtwIczjU7Ik3GHZidTv71yuJWrw6Vjy zy4jd2NwPKKlV4WgVfnDmnhQR2z9b0QrHnikme/GT3OpjMar8H09YTBymvwINJ1DLcLX YTvwqrCBRkqDQOAGeF5MB0WHZCPpqALf1c6cHJP7EwBdRlK2dgjpq9grX/ImAwv2nGbb 6W2DbSGfcLwoQ/95xLWlRfY+WgGmWpkkn3DX4tugqjAG4lP1JEfB9TPqtEF0I86Scx6K 5RhJ9rUQ7Erb3R3sfYfmrnImSvSyO87kISGo/CBn9MNfHQV8kGXo+JB/0mJYdJKmaiSZ SHNg==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D0d76ixf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCXdv5yJBlT4/xCeXt53bHWTy9OxxXUKo15W/BwGWIVo5qa52GluFXXRh3Lz8y6KMlPC3iS0S0n8DcIu2/hsgE2B Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id de40-20020a05620a372800b007840d839f84si1538620qkb.523.2024.02.07.08.41.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Feb 2024 08:41:01 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D0d76ixf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXkwK-0002sA-Ba; Wed, 07 Feb 2024 11:38:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXkwJ-0002q4-0B for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:23 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rXkwG-00067i-7x for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:22 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-40fc6578423so7467315e9.0 for ; Wed, 07 Feb 2024 08:38:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707323898; x=1707928698; 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=7r6TD7yChzqzHwHFrhbxu1OMWzC/pBSk9CaZVccyvoc=; b=D0d76ixfydzCvymGynM4XSeC/0Wr35r779jBaRwDgQuzgPaugYpmhsOwAM1ajh0Qm7 YzgwGdAabvggaKK4uXEutdysALzzt29sUlg21F6pwohiA1ohmuvmOtodQM9/iQi88d+2 q/aB9R1dvBkka6410p/DaEFi+7xi38Lqi3IIfhUk6RMHSLFrXLqlLNDx05tBfdbyeyZX NpY/dVI3W6we2/O4RxnglDSn+pTYGVsHKYUjgENItTm8vZ62WMXEP+WwGsKp0fFPPfpO ECkIvZt74vY6PKBToTb6I1JQ/k7K8KehOl8KVSHk80B0938gW6ZqvsrpFyY7mSmb04eY 2Y5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707323898; x=1707928698; 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=7r6TD7yChzqzHwHFrhbxu1OMWzC/pBSk9CaZVccyvoc=; b=wlTcgluXIkoHiQTHTASLiO0NiYw5JytGCRh0cZ04sQM48sii6g/r1ywVGWA0uS0FNG EPb+LwA8dw5WEiSIySzxtf9rZoQGUKWT/EOzi9xb3BMquewCD1E85DzlAdk4Lgg8xOk8 PmQzUONolYIBkewRdDYxhZaxVvb1bQh4uLB5BowfaiTRuPg1rkQSZkzqdMV8+8wcYpIC A9S49CCK3PGrKBaN+M4zifJbWK+NGnqVrnHU5XBPe0qallPXS+Fiil9hgXyybIzZ49y1 Bmmzu1tzcwBVnX3dX1KjzPIiXFQGrwA8ovhMiI2Mrtzg8+DfM00tsgTUcZ2GSKxkmp2c KyAQ== X-Gm-Message-State: AOJu0YwYZbpx31XORdTgJ8dTf0ofir4RtHwCcO+P2aVq3skbakz6JSi/ HCV1oUhhY0WVphNRCmTPZlgpmejnW+SdrkBpPrF+4vBfYwUUV/4FAUjeCC7FzRU= X-Received: by 2002:a05:600c:4509:b0:40e:61d4:5d3b with SMTP id t9-20020a05600c450900b0040e61d45d3bmr5501081wmo.20.1707323898707; Wed, 07 Feb 2024 08:38:18 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCU85CmzezWXYjs7d04q56iflk3XNrfO92Z/yFqfgWD8aHJHO0wKepHAKyLrXeM78NoyCem0hOqWjs//+iigpEwll3DGDCdotjlWHO9Vlii+1KZoYVv4UpRFTx4A9R1nWwBtPU6gkjW11JZpfg5QBcgJe/6k/KSCeNC/iTnLyYKckSeBQ4HBPXTiueMLYb9mXjJhcR08zAVu9VQxQp4UkWD/Xmmx0pjD+hoCVsRyIkIcFpuuK7pZVh3pUSkzB7MeuCtIQPARuUOrv4Krsd7lbteVU5RKdCfZF1q2ZAB0/lUlAQM68BJ6yfqiKfguHEjv5H6v1K5vzuLBzuwVT7Fk8iQQGYB8d7RMIFQ42UGsF3eUJCGD0Fz7MqH/+nhApqx4R6q2CMxmsOY/Lln/3x46LUWky2QZYHduRTqcBgkrUnLALtczONlSCTSdAYDy43qlUacDkffDWuflJ/HDF8LzeGvOqlArR9A13QYSQRuVgNGRgmBmIU2et8X6Q1qrKoJyJ1xZ27+fdqzaRMHwb85Pc2Z/g5KF6w15ZAzvFGzkzkMaDqFdPISrK5NpaGsHUC2YvZzzrJ/P6hHgYj+NzcGVT0mGSpUlzBPPP5kOpByjGwBfDGAzacgRz00mH+/E5QZrAIin44MdlWRsuBR0NGXi2EhjfLgRpfXNK6g1Ju5cyXCbfdmi3dmu8ldCMNNuL0P2c1uwLAthHHpcXA6uDiewoiFDufeM/G6Gnea/RyV9lXjjx7Xw8TxSKgQsbLrQHw4TBTVG4gOVTpoXlrE8ZiXUKZLj5FEnzYe5m4JHpWdhXJ7MPZgECXZFVgEP9aImd0lCwLjtf2hMMjLQW71uDBcRTCMdlG2MjzdGj8XHOg3c Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id m14-20020a05600c3b0e00b004100826da82sm2653264wms.21.2024.02.07.08.38.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 08:38:17 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 8F7AA5F8DA; Wed, 7 Feb 2024 16:38:12 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: devel@lists.libvirt.org, Jiaxun Yang , Daniel Henrique Barboza , Chris Wulff , Weiwei Li , Bin Meng , Thomas Huth , qemu-riscv@nongnu.org, Marek Vasut , Liu Zhiwei , Aleksandar Rikalo , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Alistair Francis , Warner Losh , Paolo Bonzini , Aurelien Jarno , Beraldo Leal , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Max Filippov , =?utf-8?q?Alex_Benn=C3=A9e?= , Ed Maste , Palmer Dabbelt , Li-Wen Hsu , Laurent Vivier , Kyle Evans , Wainer dos Santos Moschetta , Riku Voipio , Ilya Leoshkevich Subject: [PATCH v2 05/14] tests/vm: Set UseDNS=no in the sshd configuration Date: Wed, 7 Feb 2024 16:38:03 +0000 Message-Id: <20240207163812.3231697-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207163812.3231697-1-alex.bennee@linaro.org> References: <20240207163812.3231697-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Ilya Leoshkevich make vm-build-freebsd sometimes fails with "Connection timed out during banner exchange". The client strace shows: 13:59:30 write(3, "SSH-2.0-OpenSSH_9.3\r\n", 21) = 21 13:59:30 getpid() = 252655 13:59:30 poll([{fd=3, events=POLLIN}], 1, 5000) = 1 ([{fd=3, revents=POLLIN}]) 13:59:32 read(3, "S", 1) = 1 13:59:32 poll([{fd=3, events=POLLIN}], 1, 3625) = 1 ([{fd=3, revents=POLLIN}]) 13:59:32 read(3, "S", 1) = 1 13:59:32 poll([{fd=3, events=POLLIN}], 1, 3625) = 1 ([{fd=3, revents=POLLIN}]) 13:59:32 read(3, "H", 1) = 1 There is a 2s delay during connection, and ConnectTimeout is set to 1. Raising it makes the issue go away, but we can do better. The server truss shows: 888: 27.811414714 socket(PF_INET,SOCK_DGRAM|SOCK_CLOEXEC,0) = 5 (0x5) 888: 27.811765030 connect(5,{ AF_INET 10.0.2.3:53 },16) = 0 (0x0) 888: 27.812166941 sendto(5,"\^Z/\^A\0\0\^A\0\0\0\0\0\0\^A2"...,39,0,NULL,0) = 39 (0x27) 888: 29.363970743 poll({ 5/POLLRDNORM },1,5000) = 1 (0x1) So the delay is due to a DNS query. Disable DNS queries in the server config. Reviewed-by: Thomas Huth Signed-off-by: Ilya Leoshkevich Message-Id: <20240206002344.12372-2-iii@linux.ibm.com> Signed-off-by: Alex Bennée --- tests/vm/basevm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 61725b83254..c0d62c08031 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -423,6 +423,8 @@ def console_ssh_init(self, prompt, user, pw): def console_sshd_config(self, prompt): self.console_wait(prompt) self.console_send("echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config\n") + self.console_wait(prompt) + self.console_send("echo 'UseDNS no' >> /etc/ssh/sshd_config\n") for var in self.envvars: self.console_wait(prompt) self.console_send("echo 'AcceptEnv %s' >> /etc/ssh/sshd_config\n" % var) From patchwork Wed Feb 7 16:38:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 770645 Delivered-To: patch@linaro.org Received: by 2002:a5d:40c1:0:b0:33b:4db1:f5b3 with SMTP id b1csp401067wrq; Wed, 7 Feb 2024 08:40:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IEvv2OFtCjLl/4wVRPXSfmaYMrN3X/hsYmDLpt3ENqMQzFtBSxaFzAnBfqE33xQuxgg0xle X-Received: by 2002:a05:620a:1585:b0:783:bd57:f8f5 with SMTP id d5-20020a05620a158500b00783bd57f8f5mr6413743qkk.77.1707324023828; Wed, 07 Feb 2024 08:40:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707324023; cv=none; d=google.com; s=arc-20160816; b=GF7ngWFo2szFlbTaKfMqmZkjb5hBV1N30ag1kCSSTg2fxakgHieWo6gIHSycMcywXw CjLAgRvCI5H76Jp/QQAWieNHEvWBH3uuWELKcU94/KvOrBhi2tBNJysH/tVTCD1rjrpt P33WUSAZquCtVwMw8tHDePG+LNjM2UUD+ClyJv6cDQ/li7zUsRDTpuQG/im1bIseqRFN dLAB1UF0zgChpMLcuc7LrMTI7T3ZxuEmzCS4VZiOf3W2OBXTaVCbW1dDhOerOGs2Efm8 R7DUQmv8tJa7R3/GuWg2V+YRe74VWfUqwWK9DGhRASqOt7rSnvg3FDQ9asa2O+hpHvBx tueQ== 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=sv6+6UUCSeP9lDN9ptL/PjxKqIdnYqTvePhCbUVP8t0=; fh=kraneBanPTid1qO2tUFY6ao+FTCRWHMtOjISepCjraI=; b=cl8Pgzcj49SucAi52CuL92NUs/WuUQU/M4OKyfMkbxpg0p+GoNui6jSMvNF2J2i7Sz bsqpZGIle4bdtMWpdgCZr0xPh8VVI8OkVwfCKqSVxK/U9+tLZ+3pvAPEmD2YXune+E4A 5zzAj5v6tooEUDRsKjkhjfP31FmrJq/rM/F0ibCalgZVl6lRsiJeshDXvWbxR+baIP+x c9H9YhE1j6UwbXQn/Xt7TQNNSzezzqY3rtzr2KmngtSj9sA6pegV2iryw5zuWexfNGcf 7QP8+oSLTqzeV2mtrUXiRss1lmjvdvmSAyZiYqFf8SoliCnvGG/B+2dN/wG2ZArDptI3 olsQ==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N5jsd9Ee; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCV0uvcbkZpm1p8wF0+QAbpkrp0r67VjV+TxeynxIhiX6rcX3DkOhBwayon0IS52sD+uVUzBLz4BFYZtSNtB8/un Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f17-20020a05620a12f100b007858aed2194si1426495qkl.140.2024.02.07.08.40.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Feb 2024 08:40:23 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N5jsd9Ee; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXkwP-0002wg-5f; Wed, 07 Feb 2024 11:38:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXkwL-0002t0-Bp for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:25 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rXkwH-000683-UI for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:25 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-41008ab427fso7700515e9.0 for ; Wed, 07 Feb 2024 08:38:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707323900; x=1707928700; 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=sv6+6UUCSeP9lDN9ptL/PjxKqIdnYqTvePhCbUVP8t0=; b=N5jsd9Eebr4ArqWnSXBa9iaQ438x/q7V8XQAXZEXZr1qRsRkuUIT9r4XRVJRMznGpw bPYjyLsg1CPxy68OLFmbUZfkVmFW4Gxe6+kLYlRvwYnNB8/xU+S9eny/2f711ncfeZhX OdQTdY/pDa8d7npNbnbkpNrQ7FJIiozpOkWifmhYo0KiYf0aPo1KaZUXbluiF9AY9pKz NwNJ3sdF1JGfFUpZw1CtfOzMWp9afn5yYlAqN/fyXROzznq5R58r/FVV8xWV8XUIBhEm HmGWMiFk229VY1THL6xMgikWUAPzLNyYziZCJklrHnY8jawzvBuHu5UYMxq4c7Ne/t3u kvLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707323900; x=1707928700; 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=sv6+6UUCSeP9lDN9ptL/PjxKqIdnYqTvePhCbUVP8t0=; b=pL1DVB+CfnUWy38uYYkBSnpSXSA2xo4GQPWPwbW9WH4js1EsC44fUWh+R+Ii3yrZPg jSREkY+T+isJyEjnTo93/XU2mcEmIzRosewSeUxIt5Fq9Kk1c/4kLhsbbARSZHL/nqHD xnW9p0zKvw8NiiJ8p7EHTHYvmiqdEubLwa1PvkpKb+CTR/FZ1U4hcalLvgjZzLCrQINm WBJ4HNtK4zTRzCg6S+XLgi20KPxzBA+QIa+sxIjROu48SC2W/Gdql8zvKC/7IHQdRnvQ WLyw0imJDB0qa+wv+hSTF8pG4IpJzSmK+YG9xgX68KawX8J9T46qrSoUnT6Mo8DVJQx7 LYSQ== X-Gm-Message-State: AOJu0YyvQnKWTqJX9nBdUOiYl50VVtmrXGt/bxiu5MWOoIdRHfohWGxe 33eaXr04Tp2FW2VA8nbJoFLYNWK6eXd5oatMfv8CuYtJB0okAVQesfX4Xls5SXs= X-Received: by 2002:a05:600c:3b97:b0:410:8f2:262a with SMTP id n23-20020a05600c3b9700b0041008f2262amr2251051wms.13.1707323900427; Wed, 07 Feb 2024 08:38:20 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUc+/g0VBasm2gywElwD8kgkQjRnvf+5mxqMQ475EaW3HDaBUlVqVt7TNQPLz7Hzmn8LVcnhGm48FKUkWT9Pxg90l511VSDBEDsWrCWkasgdcXw2uF/eFqZNlY+XfQgKAolJE5FqBu5ABTssn0oGjz+Y/3BWQqkJyrVTJTXX4Z6/x/2/9KbSYmyBiz4FmqQ363UhlfE4q3VKzNNFGZzSSWtswqqFwn3goXrqLR+XbFGBizgh6JIDHcE6obEgc7AYd50t8cyQlePKyCCRUKYRdUMR2OWOZJ6r2nvtxvfmGLLEgJDuxjBfdg40MQ5MKtt4Fk0ObLAbeh34lu/Uc17ZrNsXOVWNqHFLmdrRO8w5DtLsc/Nn8uikVkWvliX33qA3FWnf/sp7FcWGluRcx/bnhE+sxNldnp25XZVgj9A0WbPFJ8+oif1EJW+MWknZ2JSXMP6whEmMxI1eu7kEpS5cfD9JqFm0Qd86btp0eO0sAPmJB1TVau8Xp+SU4Kg3Qthdrp/HNbERDE8ngelmfVlf4d0yhnrk+qzxZTcb1PvdnSZYtacNCAAdjw5kN7W96s/ufqW7xBl+oKvGLtFQvXkOlP+nsqmVkJlZLmLYTjSDf7Vxy/IYj/M7DRYIDhmxPJDy+mhxGMScrSfWL5Yb1hfbpAV7pvZcQ2GyNP7N1bzy77WybqmciVkxjq+v3OYdgSuMv8d570ta7ZkgdBHga4DqgCqhaZJxxKON5bg+JgLjED+9ws8xYElslpGRrqgPjCqHjjd3i+ieb+LyxpOSVaKpbb7Fi0K720kVgDJ9DNX71gVWGXAvsea1gYMi9KrSsOmoPOT+55TOQGpfRt7kNRixr3RZekv/ga8mFZEzZ51 Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id m14-20020a05600c3b0e00b004100826da82sm2653265wms.21.2024.02.07.08.38.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 08:38:17 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id A44A85F8E1; Wed, 7 Feb 2024 16:38:12 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: devel@lists.libvirt.org, Jiaxun Yang , Daniel Henrique Barboza , Chris Wulff , Weiwei Li , Bin Meng , Thomas Huth , qemu-riscv@nongnu.org, Marek Vasut , Liu Zhiwei , Aleksandar Rikalo , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Alistair Francis , Warner Losh , Paolo Bonzini , Aurelien Jarno , Beraldo Leal , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Max Filippov , =?utf-8?q?Alex_Benn=C3=A9e?= , Ed Maste , Palmer Dabbelt , Li-Wen Hsu , Laurent Vivier , Kyle Evans , Wainer dos Santos Moschetta , Riku Voipio , Ilya Leoshkevich Subject: [PATCH v2 06/14] tests/vm/freebsd: Reload the sshd configuration Date: Wed, 7 Feb 2024 16:38:04 +0000 Message-Id: <20240207163812.3231697-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207163812.3231697-1-alex.bennee@linaro.org> References: <20240207163812.3231697-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x331.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: Ilya Leoshkevich After console_sshd_config(), the SSH server needs to be nudged to pick up the new configs. The scripts for the other BSD flavors already do this with a reboot, but a simple reload is sufficient. Reviewed-by: Thomas Huth Signed-off-by: Ilya Leoshkevich Message-Id: <20240206002344.12372-3-iii@linux.ibm.com> Signed-off-by: Alex Bennée Reviewed-by: Warner Losh --- tests/vm/freebsd | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/vm/freebsd b/tests/vm/freebsd index b581bd17fb7..1247f40a385 100755 --- a/tests/vm/freebsd +++ b/tests/vm/freebsd @@ -108,6 +108,7 @@ class FreeBSDVM(basevm.BaseVM): prompt = "root@freebsd:~ #" self.console_ssh_init(prompt, "root", self._config["root_pass"]) self.console_sshd_config(prompt) + self.console_wait_send(prompt, "service sshd reload\n") # setup virtio-blk #1 (tarfile) self.console_wait(prompt) From patchwork Wed Feb 7 16:38:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 770646 Delivered-To: patch@linaro.org Received: by 2002:a5d:40c1:0:b0:33b:4db1:f5b3 with SMTP id b1csp401062wrq; Wed, 7 Feb 2024 08:40:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IGC93/1OsxU1/l9Rje940D0Dtf6AldT+fZ0I0o/6AWln3mVbd5NU4R0tQO4xK74Nc6p1dE+ X-Received: by 2002:a0c:e30e:0:b0:68c:c3a5:8120 with SMTP id s14-20020a0ce30e000000b0068cc3a58120mr68908qvl.3.1707324023557; Wed, 07 Feb 2024 08:40:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707324023; cv=none; d=google.com; s=arc-20160816; b=aHI26H900PneBMRqSbeiHq9BQXNGEWH9V9KYVoHByO2zxLep9gAmVs8fR5+4M4/9u5 aSM6e+oi7w+iARjPDZud+6k1soOagUibW0nkv+fw6hr3hIA1PDhmIAyet9lh+oODZj19 Wqj2g7AalXeW7sqKFjquOttNK4HNUHnql69VuYU1Q9pyBOfpuxwVCFG1Hq0JFqonZs/P 3GPg9NgqMLSslqgZQy6YUlXdeFhwAM8N51PTPgcZM52w8HsV8qjWfGTHGYk31evvKiKA bTMOJsYehKwYxRN9GsufEWgfNjB+JVgrFGrnI7bi/DsbIflUnHvWX9oIyIAJI171Km6k Xr0A== 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=9IbvextsUKhbDQgPyuaeoL3jSODZ/hWaknGrv+i1g18=; fh=pVYUJV4vKhVN//0Z0Fc13chhPlTxQqhbaUjiJdV2K7Y=; b=puwuJ+wHauDaF6YQd6Xk9f5Vv6B506OfsprJL/GFuXz3eTwdCqEAIxDNlF1E6zOwyA kA2zXnUyGAAu+IqHZ5jlbjFPn5poOoS+dL+zft5JsyP/JbKKnfO9qkkXsAjLtx5ltGRQ dPqBMSf6jjBiMyvKwE2dzuKH1ZuhKx/nmte2iIcukGeixSaTIsXdpo5CS9yYJhSDOwzM MclVtBKZ8qu4iryFz78yikPTYiyXyZV573v8o9W4aq7UG5K/bzVir2N53j0A0OWkkKBK g0RHV2DI0Pn4QmlqyQ7M9uubPdYT7BcC3nppQm40gQ+fWoqB4G5ZISxm7CjMwPgAKyKN tqBQ==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CuiGozEy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCVt/Dg/RhOPBqFmFROlwGzVAxQOLyzHWGrJyGh4xJEuoicboBP90e8FAJ7+99qC1bf34WmD0hp3da+mAlxCsko8 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j25-20020a05620a147900b0078591a8cc6bsi1429035qkl.609.2024.02.07.08.40.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Feb 2024 08:40:23 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CuiGozEy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXkwL-0002tO-Qc; Wed, 07 Feb 2024 11:38:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXkwK-0002sC-H0 for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:24 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rXkwG-00067n-EE for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:23 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40ffd94a707so8029125e9.1 for ; Wed, 07 Feb 2024 08:38:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707323899; x=1707928699; 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=9IbvextsUKhbDQgPyuaeoL3jSODZ/hWaknGrv+i1g18=; b=CuiGozEyOhm69oPTra3QbwGv1ujJrl7spKqq1nSc9Soav9a4jHRHJlqaBWGo9w52tu xwNgzbgaIO9v5og1jX4xokyT9SHeMFF/UvdrLDY4zLS78DkjAEBJsM3Atr3v4Iod9Esu httmM1D6pO6ISUTmPqaipHDpcVjWIzneqnPrNfdAQjWMAF3AYvAR1sOUXD42Qb/APhJV 57uxaPfYhB3aneVqtu1eMT0aONloQ95zygqGf6grqAgd4Nodf+XtZsNccGWk0aXy/2tN PT3XYD4GU503dhPQcPxniiGMMVfzJTWbYi33jbKGHsVRrztdl5SLQh65JNKXWmGdUutb 48pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707323899; x=1707928699; 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=9IbvextsUKhbDQgPyuaeoL3jSODZ/hWaknGrv+i1g18=; b=hIon1bFfAFiK6pFYOfr5e/D6efnkZZ3opEfT9K8vDh1NmbED6L/QhqOTh+CqMwTYEU Vu9vQbaFlRVTqh0JII2K7SjPTmMHcoqwhCzM0KII++Zz57A6+EhupL183d6MvI1a5TLI Vw1JMxYENrDRRY7cxArrfoNReTZ77zHNCyKGTn1DoW1IWmOanBkXVXqBQ/2AHLUokJ2K WMawpnNZY/m4quCQa6ii76IuWYIdfgLNsDPa9EmdUL7ZW3AQ0UqnXfkaj/Z3ggXj+4wg XNXE93vtcb2PKiPtE7itiPt3Xf7uiPCU7O+GOxTl2HgrDDNae/4vehCzf9jPscbTyDKO wPUg== X-Gm-Message-State: AOJu0YwyqypnacpFZIQ/jENRdOH9HiXHTPwpFRXw7Tzd3dwBekVQGd4x 24b7fgbQSvfb8odIGF/x4XCWnHwtewXazJC9VpxzIq2T8c+KKQm4DG4fej4e7zI= X-Received: by 2002:a05:600c:a08:b0:40e:fb8f:debe with SMTP id z8-20020a05600c0a0800b0040efb8fdebemr4884205wmp.38.1707323899069; Wed, 07 Feb 2024 08:38:19 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUhimZaeVtx0FbFGdLUmex+udSHN5v6slNAzSoXl1zK5iRAUFOlXiGyxUEPsIAB2Iw6yrfJpfy9JuFtECw1ez1I0fM0OiUxhmSd3VsQ4a4FINLxD3LzvA5fA1t+hj0BEY8du8uGuKhPI7FhZv1gYWRBNA0gytf/ZLiiHhvuIi630KxG2wUx8oxHpTPP7yfgjuAN+lESvm3k5gMaj/V3/k/8HpebV8NR99nt8a2ZpDXFYU1JfeqQMymopOj5ui5UpnALi4+keqhcBbhDM3dVbVlWYq+MlpFJntUv6+SzSkvQq3pd0IMPH14/kYspXRxw/PDoQSYld6+FO8CQe18ThwbpgTQbS9WELPTpMxBe0/OSO8iBB0cdtPpT/9m1ce1xzOg6dVSBYwsncfpClFmb3fzcZ/VK9CUxmlD2QMDSOaehe8Oan5kePrC8ceZYrbqY4pymxdAacVIPvqhRnN1MLewenZhTCXDQ8oE7WQluSJtMCxlwoEySZWbjm2ZcOAlZyXlRF8a2bYrYhaxIcdbN17/Ptn25JYTZabClpR1woxuDKVy7F+892PF2HEOhcvjMtwys8eJOgLa10bBxoA0d+TcGYPAdPJmsiRiWyTjytbeLi4eXgIZvxq/MP7qxsipagt88zTduIPWtmccczuTW6b9JDQniuRoZRNNLkfmZkEIShnrZNSWR5Jo+8Fl2/qUchSYk5IaiX6D0TQ5WhKU4hl1rlW1l4x3tmemdhrT57yHmdlrulASpAS4OaCJVuo8/r3LLkP44c8kSDWfBFPdkSW9TEAOpFXxncX69MHkzxjrjQFpyXrZT4TsV14ihoP032F7GgOv6KL1GwJbTPVEwAz33ICZ+e+rpZKqOwtQF Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id w14-20020a05600c474e00b00410232ffb2csm642397wmo.25.2024.02.07.08.38.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 08:38:17 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id B8E675F8E3; Wed, 7 Feb 2024 16:38:12 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: devel@lists.libvirt.org, Jiaxun Yang , Daniel Henrique Barboza , Chris Wulff , Weiwei Li , Bin Meng , Thomas Huth , qemu-riscv@nongnu.org, Marek Vasut , Liu Zhiwei , Aleksandar Rikalo , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Alistair Francis , Warner Losh , Paolo Bonzini , Aurelien Jarno , Beraldo Leal , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Max Filippov , =?utf-8?q?Alex_Benn=C3=A9e?= , Ed Maste , Palmer Dabbelt , Li-Wen Hsu , Laurent Vivier , Kyle Evans , Wainer dos Santos Moschetta , Riku Voipio , Ilya Leoshkevich Subject: [PATCH v2 07/14] test-util-filemonitor: Adapt to the FreeBSD inotify rename semantics Date: Wed, 7 Feb 2024 16:38:05 +0000 Message-Id: <20240207163812.3231697-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207163812.3231697-1-alex.bennee@linaro.org> References: <20240207163812.3231697-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Ilya Leoshkevich Unlike on Linux, on FreeBSD renaming a file when the destination already exists results in an IN_DELETE event for that existing file: $ FILEMONITOR_DEBUG=1 build/tests/unit/test-util-filemonitor Rename /tmp/test-util-filemonitor-K13LI2/fish/one.txt -> /tmp/test-util-filemonitor-K13LI2/two.txt Event id=200000000 event=2 file=one.txt Queue event id 200000000 event 2 file one.txt Queue event id 100000000 event 2 file two.txt Queue event id 100000002 event 2 file two.txt Queue event id 100000000 event 0 file two.txt Queue event id 100000002 event 0 file two.txt Event id=100000000 event=0 file=two.txt Expected event 0 but got 2 This difference in behavior is not expected to break the real users, so teach the test to accept it. Suggested-by: Daniel P. Berrange Signed-off-by: Ilya Leoshkevich Message-Id: <20240206002344.12372-4-iii@linux.ibm.com> Signed-off-by: Alex Bennée Reviewed-by: Warner Losh --- tests/unit/test-util-filemonitor.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/unit/test-util-filemonitor.c b/tests/unit/test-util-filemonitor.c index a22de275955..02e67fc96ac 100644 --- a/tests/unit/test-util-filemonitor.c +++ b/tests/unit/test-util-filemonitor.c @@ -360,6 +360,14 @@ test_file_monitor_events(void) { .type = QFILE_MONITOR_TEST_OP_EVENT, .filesrc = "one.txt", .watchid = &watch4, .eventid = QFILE_MONITOR_EVENT_DELETED }, +#ifdef __FreeBSD__ + { .type = QFILE_MONITOR_TEST_OP_EVENT, + .filesrc = "two.txt", .watchid = &watch0, + .eventid = QFILE_MONITOR_EVENT_DELETED }, + { .type = QFILE_MONITOR_TEST_OP_EVENT, + .filesrc = "two.txt", .watchid = &watch2, + .eventid = QFILE_MONITOR_EVENT_DELETED }, +#endif { .type = QFILE_MONITOR_TEST_OP_EVENT, .filesrc = "two.txt", .watchid = &watch0, .eventid = QFILE_MONITOR_EVENT_CREATED }, From patchwork Wed Feb 7 16:38:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 770641 Delivered-To: patch@linaro.org Received: by 2002:a5d:40c1:0:b0:33b:4db1:f5b3 with SMTP id b1csp400691wrq; Wed, 7 Feb 2024 08:39:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IEFQ7nVYlufuBVcqsJ+5CHDrYSitwKzEew46O3XQrwY8cLNWVzsjkCCO9Ewq8srvBhy2OPT X-Received: by 2002:a05:620a:cf2:b0:783:63bc:3eb9 with SMTP id c18-20020a05620a0cf200b0078363bc3eb9mr5317284qkj.20.1707323968074; Wed, 07 Feb 2024 08:39:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707323968; cv=none; d=google.com; s=arc-20160816; b=qJlDVjVzR0Cb86zd+Sn5mKzOsxT5x5M/XoNKLA5AcRY977OPvx3+quJU+Hx0pBWiXx crIBYyeVQ2lyw1AZyDxHFI9XkNjyJ7gl+0pX8pn89JPCmvUyPAjcgjO2Y+ewauQap4p0 lH901N+jiind7fEWQWS18auLp8E3Z46SF+yqoIC017aLKcYA9z36W8LQ6khzXdTqpHWg 9nKLj4v1e8rbFWGqkyL8gM4IccTq8mJloAJQh6NcCZSRETWHNYjMj8TD6AYf4+zLwwss 9AsRDKt/hB23xdGupJV26wO159y/yBOUHfJ2YxU6uBvT5y4KSR/KG4Fp4oLeQg094y4t 60dw== 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=fM5vrN0Mlz2zZCFNsOvOH4Md1jU+CHoqT++QO5pSQvE=; fh=gJPA9RCtAZDfLUrSoRCC6gHr1v8/iaJ1crMYus8Qyj0=; b=j40VMlQvRDg99uGzXN37pY8XgnqlCd3AFVRUhXYUIGrjtl9yG96FVmf12yzsE3PMcB rGwatzPY3ozdxLCQuyMbk/aqs9K/o2PnrhfFMgfDY27DX5qA2xqqnrnuqWJ0eefQ3kH3 Zl56EHmEnL4JqpgLEurOtLsLyzSyUurbbnaG0TYKUKBGyvIZZ9KMaDxfjC7WcCorxWwF Ki6vw0S5VwBTDI4cHsowpNh71zFakusynlaah6wCAreBCppNNcw7rSj7PU0UJgKyo1lr 27iqEpWsDrqlbE1Gk9U/A01N+O+/B5JX4p/mJzMdrAZnKdk8BBF5XDa+UgIcobvXrAQe x7LQ==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Dv8Ut1t3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCUeSFuTAaBf5IpAUbVB2jEzPWbCQFkw56sKHEGEwc+cwaRX/6v9/nWiTVB+fbc/y0fzoXuKmvwSydlw0ngqe/+a Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bk25-20020a05620a1a1900b007855ec5a0a1si1544195qkb.143.2024.02.07.08.39.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Feb 2024 08:39:28 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Dv8Ut1t3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXkwN-0002uX-C7; Wed, 07 Feb 2024 11:38:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXkwL-0002tP-Ux for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:25 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rXkwK-00068O-3u for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:25 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40fc52c2ae4so7330965e9.3 for ; Wed, 07 Feb 2024 08:38:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707323902; x=1707928702; 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=fM5vrN0Mlz2zZCFNsOvOH4Md1jU+CHoqT++QO5pSQvE=; b=Dv8Ut1t3diR6G97LfsvjCNnKcaKw/2qnmaaGSUtBpzlbQBrOYuISqhFjmmlW2JCer3 Hfyt8rdvVB9SvNtKES7wp8WLph9VNq+MDBfOL52xoWagGAVVFTsZRiNEuNAL05vgraAc vSbs16hXE0z8+x5bNeOJYV+EAqkMqTm+yO6ZByMWmd9AojdUHXHxjdCHw5EymUHlWaP6 tm+xnQqA/0Ur2OCLphxhwj3+NX97JPrLdoiklpdZHpUn27QEt+hJqJA7jDcO8I+cI6D1 z/vN51HKtnfYvvxL5CpIlgrboSNBRJVgjHBds/W0tm4rCkF1xZX+N7SFCbH8/APLz2Tb aEng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707323902; x=1707928702; 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=fM5vrN0Mlz2zZCFNsOvOH4Md1jU+CHoqT++QO5pSQvE=; b=FKwc6ThjN1/0gJ2QkBryWvb+fymqWe9BsFzvJHHCQD6CzSze0fujt1JvRqPg92mr+Q 0bZAZBQ3F4GOHpZTMb1eYahMn8QXYlhv1/V3NVn/+R/fxDkUo3uNxwBOSJnVEmnq6AKx iYh0mMel98jxWUTVRxmV7L5nWedNm81ObSORcd/jjxRMgU9AkKhU/NiLsxUSPYlpFVMI kw34ZqxGzmgUtyjTfn8VPSnGtrbWNP05DXJKLEgueqXbvZJAHzJ5W27PNUXUwFyXtaU+ 0SOQIs7b6nsIWD+CAsKNZpjoqMdzBpnsHXaEci9fOH6XsjUSmBjmd3XUOYTqtYCEONrH EbIg== X-Gm-Message-State: AOJu0YyPu9Ors/T5srY6R5IB0xZu5CEuwrQKuQ2XT1dAHqyAkOhFgo4H Ve77B+jpMXlnG90e1TtPBoticzTtpQa9DXtwiy86XNcVuDhzCj51F3Cg+BRB4WU= X-Received: by 2002:a05:6000:1887:b0:33a:e9dd:5b6b with SMTP id a7-20020a056000188700b0033ae9dd5b6bmr5051977wri.9.1707323902065; Wed, 07 Feb 2024 08:38:22 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUYag4D21fnS+Nt3Iaa0dWG4qWZq8iz7hwR054Tieh1RJruin5WpYjIvfHJUsbaIMXvRT0a8w0Y7xumZ62eTYqyk7M5dHRcd073VKqaempqxzU3NI3jMnLLMX1ouaZmTgS0y4gs6vgHt0JUXgU1HhOWnRQqW6XWyDDVCHNRid5ugUdq3Ex3o8zdgCEjQmyF51CVoJvMlwQSgBWFm1BJYnCZWfqQgVYVEvtShNto7qBgyNpXMV3ekxzMuGiuD/qRXcOCmfFIp/j7QuXexWYapukhaXU0c72UkvOlVP9HNrm7f4xJnS0IkJAg7k7+EDxbnQLlFpljISxnfi57XteE8g3ZHhqtGQPWqKD/A6YU+NCPq8rm45SzXwj7F7TL+3YI4/Ce4bk8V+Eu+PZFqfQuEh01tf3UQO0oKp8rFWUMnLpuLFijLiTv7g3GAun9BJA3IZLiHlYmdUAF3odWSigqf84aWgLHBo0pFBTbh9qb5ZQIjh2BHHLdseZbzvCGf8Rl+lyMdNcz0gyidQEUkamYgzJTBLmY072NCWj4BNad/X1FEseVZ1NhdnUleZ2WCBDQQYh/HQeppZzdUFnpmER0xxOzIPlsf8m6BHUaAE4W/C8PxNNK+Fef37M207yUmyNHrEN6B2tsa0+4vmttFuAp6q8/HNzQT9hwpLAwy4/sbChqabDwQjRU1WfBdFQnPEE/CytfnqGzqtLXTfGBYi0MR1jqktR/vCFBnQwS2W/D3uXbawLY9zAqUVTmaPrMTPxip9PXtfUkV+5xeheXSM1lV73AEO07XIZBL5g7TyZLT5JI+X+XjdHBAnIZXpvSDzIjunEZZrbnoMxWl75nXctY3GGHgdn1TVv7ZqYf+a6R Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id dr9-20020a5d5f89000000b0033b14f22180sm1931991wrb.20.2024.02.07.08.38.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 08:38:17 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id D06AA5F936; Wed, 7 Feb 2024 16:38:12 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: devel@lists.libvirt.org, Jiaxun Yang , Daniel Henrique Barboza , Chris Wulff , Weiwei Li , Bin Meng , Thomas Huth , qemu-riscv@nongnu.org, Marek Vasut , Liu Zhiwei , Aleksandar Rikalo , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Alistair Francis , Warner Losh , Paolo Bonzini , Aurelien Jarno , Beraldo Leal , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Max Filippov , =?utf-8?q?Alex_Benn=C3=A9e?= , Ed Maste , Palmer Dabbelt , Li-Wen Hsu , Laurent Vivier , Kyle Evans , Wainer dos Santos Moschetta , Riku Voipio , Ilya Leoshkevich Subject: [PATCH v2 08/14] meson: Link with libinotify on FreeBSD Date: Wed, 7 Feb 2024 16:38:06 +0000 Message-Id: <20240207163812.3231697-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207163812.3231697-1-alex.bennee@linaro.org> References: <20240207163812.3231697-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Ilya Leoshkevich make vm-build-freebsd fails with: ld: error: undefined symbol: inotify_init1 >>> referenced by filemonitor-inotify.c:183 (../src/util/filemonitor-inotify.c:183) >>> util_filemonitor-inotify.c.o:(qemu_file_monitor_new) in archive libqemuutil.a On FreeBSD the inotify functions are defined in libinotify.so. Add it to the dependencies. Signed-off-by: Ilya Leoshkevich Reviewed-by: Thomas Huth Message-Id: <20240206002344.12372-5-iii@linux.ibm.com> Signed-off-by: Alex Bennée Reviewed-by: Warner Losh --- meson.build | 23 +++++++++++++++++++---- util/meson.build | 6 +++++- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index b5d6dc94a83..e5d6f2d057e 100644 --- a/meson.build +++ b/meson.build @@ -2384,6 +2384,22 @@ else endif config_host_data.set('CONFIG_ASAN_IFACE_FIBER', have_asan_fiber) +have_inotify_init = cc.has_header_symbol('sys/inotify.h', 'inotify_init') +have_inotify_init1 = cc.has_header_symbol('sys/inotify.h', 'inotify_init1') +inotify = not_found +if (have_inotify_init or have_inotify_init1) and host_os == 'freebsd' + # libinotify-kqueue + inotify = cc.find_library('inotify') + if have_inotify_init + have_inotify_init = inotify.found() + endif + if have_inotify_init1 + have_inotify_init1 = inotify.found() + endif +endif +config_host_data.set('CONFIG_INOTIFY', have_inotify_init) +config_host_data.set('CONFIG_INOTIFY1', have_inotify_init1) + # has_header_symbol config_host_data.set('CONFIG_BLKZONED', cc.has_header_symbol('linux/blkzoned.h', 'BLKOPENZONE')) @@ -2400,10 +2416,6 @@ config_host_data.set('CONFIG_FIEMAP', config_host_data.set('CONFIG_GETRANDOM', cc.has_function('getrandom') and cc.has_header_symbol('sys/random.h', 'GRND_NONBLOCK')) -config_host_data.set('CONFIG_INOTIFY', - cc.has_header_symbol('sys/inotify.h', 'inotify_init')) -config_host_data.set('CONFIG_INOTIFY1', - cc.has_header_symbol('sys/inotify.h', 'inotify_init1')) config_host_data.set('CONFIG_PRCTL_PR_SET_TIMERSLACK', cc.has_header_symbol('sys/prctl.h', 'PR_SET_TIMERSLACK')) config_host_data.set('CONFIG_RTNETLINK', @@ -4407,6 +4419,9 @@ summary_info += {'libudev': libudev} summary_info += {'FUSE lseek': fuse_lseek.found()} summary_info += {'selinux': selinux} summary_info += {'libdw': libdw} +if host_os == 'freebsd' + summary_info += {'libinotify-kqueue': inotify} +endif summary(summary_info, bool_yn: true, section: 'Dependencies') if host_arch == 'unknown' diff --git a/util/meson.build b/util/meson.build index af3bf5692d8..0ef9886be04 100644 --- a/util/meson.build +++ b/util/meson.build @@ -104,7 +104,11 @@ if have_block util_ss.add(files('throttle.c')) util_ss.add(files('timed-average.c')) if config_host_data.get('CONFIG_INOTIFY1') - util_ss.add(files('filemonitor-inotify.c')) + freebsd_dep = [] + if host_os == 'freebsd' + freebsd_dep = inotify + endif + util_ss.add(files('filemonitor-inotify.c'), freebsd_dep) else util_ss.add(files('filemonitor-stub.c')) endif From patchwork Wed Feb 7 16:38:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 770642 Delivered-To: patch@linaro.org Received: by 2002:a5d:40c1:0:b0:33b:4db1:f5b3 with SMTP id b1csp400782wrq; Wed, 7 Feb 2024 08:39:45 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX2XxYktzOYuiQujZofbzw6Tki2qkq7ZzlWOM/rASbwmLzgrhpoxUiTOyHhkLz0M9rfZ+fsbj36jLq1HDk9lDA+ X-Google-Smtp-Source: AGHT+IEoLo8EGCAUuwdhCQc8KhM0PTXuTWDRziUj5yklTHNMWj8VumqOf9SsoneS+nrYMjMHtbl5 X-Received: by 2002:ae9:c10b:0:b0:784:ba4:7042 with SMTP id z11-20020ae9c10b000000b007840ba47042mr6188982qki.69.1707323985470; Wed, 07 Feb 2024 08:39:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707323985; cv=none; d=google.com; s=arc-20160816; b=yTkBkU24prNDAufGU9fbBZS0GVAlRj9HDtuHHnvhUhQsiHqB2ea12tsUmFNFrl/mbd D4DK0tXEN8H1pKcFSHVeCFu/D2rd+i3OMCqbjrf6VU5riadBFf5EJ42b18e+oNHKy3KZ eyBsh8bySFzbVcLBbenQU0b3hIEBc5TtA2Qs82wefoHvdS8bzNOHiSdcB1WsAorzJSi+ DMCKMbXqfotXAkV950mGKCZNNPPV0OGht4Qzvrl7heZeS8eTitULT/ABFgCsZm7s8zHn 62SdLX2QQPS+6F2JEzqN4iHQpIVc8iquKyNawa+D7atzDK57Qo5exVX4cDBqI6rZCvlQ LT8A== 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=Bsz/mh6XyPunNIOKbf6F3e4icAT2FQKVXxwZaYNEmKM=; fh=76qjU++vIzvMsoAgpKW9J1HPYpfffgtKcGUzkQuUaKg=; b=HD0NwkThhdiDRJhEzGnAWwn8mXXq9FeKhRIujnrWR+cPMaZkVFER8ReaBRwY3sVkfF bPimAUZsSPGr/+c02GdCvikXEgOuJ6rwRKCw2WPxANK9j+NtvT+ED87c8Sgkw7o5irFw ADrHnn3Cu0slixWjSgmDvl8PysSzYxCXIA6SJPUKjY7fuinSQArv8/PwXzGwL/XQHEIA VlCoM1gggMt4K72U5Tm4f9YcaVegj4TGT8IKmboSFpEZgNjNdOnuFjx+Wo03REeWie7c j6GXRE//Jvbl4bG8l2LZZl7xniQm5wsqo9nlW2JHnAMyE1jkNsTYIKePxEM7PFTx+U5o bUfw==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rhHFl7tw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCVGh+lYsUIF2fjF3Tqcb1erHXaIc9giXq/9PvMVGbQvl8/Fc9GRyResXftP5Ev7Gmetqs27OhAMMGIdMONpA/oW Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bs41-20020a05620a472900b007859f6d3b0csi1087232qkb.34.2024.02.07.08.39.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Feb 2024 08:39:45 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rhHFl7tw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXkwQ-0002x9-15; Wed, 07 Feb 2024 11:38:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXkwN-0002uW-8J for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:27 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rXkwL-0006Al-DI for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:26 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-41008ab427fso7701325e9.0 for ; Wed, 07 Feb 2024 08:38:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707323904; x=1707928704; 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=Bsz/mh6XyPunNIOKbf6F3e4icAT2FQKVXxwZaYNEmKM=; b=rhHFl7tw2jpXI13lBCgMSK1yP/oh1HLPsr4H3127lyXODA1a8EAEN4IWXq9Q40Ut3u EDVZukVm3ltYiE5Ld679algo9UL6/6yyloBa5Z6Uvr/zVppdzWCTDCZPnKmFJfPEeQIV E2aM9oJqfiEaLhT5a8ImuHzAQhopdWmwYNfE989qX8oVfFXgYd8KRtf8duFvTfLqLJFd P3XqBx98LmXdKo/QxjWVout2zqm1fSL3S5plgAM1inwipYFiEab6yMgGIM6joIDWmZkf 1qdnyKwit1pTinebN0gh56KOMUrjt/gyA506gOH8eEbK2YrypZyHovQBp1R4kCfrjMwT mH/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707323904; x=1707928704; 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=Bsz/mh6XyPunNIOKbf6F3e4icAT2FQKVXxwZaYNEmKM=; b=dS7XxJepe1jRKU1tOyrPqGvMl570xTATaPftHYicwerEFxcPPSmZ1eQdcjmUNN5rRZ 1bHaFPl4/S5qgUB+DYpjG2ZY2kQ1J9YxM7/uNoTrb2JjgBoFaATvC46KDqa+BjLmNBqs rtf2OPudEM5wS/vlBn6g5trGpQbkwWYEAO8ZrjpZngl8CIV2+skZq8V1o5uag+8b/cc2 qLYF3Q/SZJfoW1HC5V+30m37uYOQiAHFrSVRj9FoVADf7796cgDXYr/bUE+is1RbyrxU XBoOk0X5C0Swkt4YT5qCW0ARu+xnCo2MANHBqmCNGCUUSO0+wDRxVMFtRLJ21k+Zc3ss iyZw== X-Gm-Message-State: AOJu0YyVQFHlzvu7Kbf/wdoAzhvUdOu3VmxmOuDuBzLm3jG+Y3ONdQsC K2d43J4nh+9CUYZjq2rY8F+LZyKt9JHf1Jg287WXLKoQad3EZn+qGPSrz1+5NR8= X-Received: by 2002:adf:ab09:0:b0:33b:26b7:5aa8 with SMTP id q9-20020adfab09000000b0033b26b75aa8mr4468170wrc.56.1707323904126; Wed, 07 Feb 2024 08:38:24 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWKSKDs5pFpnSwz763rVAHqlB9UGVUPt3IyjFem9exc2KAdyjjmiMgWAn9O++Jv2MmvSBlVZJRubAZ2726Mx7oJ9uAy2fzCzZKz1HQiEzhp3HIq9JxCcnXjo0zTjpLPTyCz8kwIryVlDxSizi6pmIXOU5PMz6AD/Y9IXFi9xTVbjYzIUh/4MtnlGCDNoTLKFyhokg5jvgPXKu5CjBjmvkXtG5W80kKvE6thf2V9HNG3ODrZhjtq9oG6DPS+Ftuhjl1wSlkOJvylzyg2Pm4mVqv6zLtY3c4XGnygxaQWlWz8YXWGw3p64RCzbzexytTnHgOq1P2eFWTctPZIcJ1U74+3DEbd3ruzM6a9JcZgRlwt+ZX+iznBtwRd/QC7UM9si2cSy4YFjbsA1+SA66w7FB0CqR0hJI51473jjFI2hkKvmIUyzFtHoPSUo2dwVigMJw/qN4JihI9klknFMcbtDDOqSsm4Ywt+OlwvMUHGYbVphy3gZQY9OcPV93u3xCI+IGHY7KnGEGy7lp9bxlwvop+RkM7o/MzyYUFy08cMgqcGDJAjfnwrHyvduXNLqGC/LKJgLvK61S4fY9zJRClQ2madZr9clhNIRc94SIfuWTTHyHLexvAQ2hknO1HeAA2lfIF3TMh0gPk+oVkf6n+88s3dhqDbmZeytoNct91Hf1a/UfOr6WxrRrj8RP4k17hBzhM9rhUyXMpJwXYHPVmpDZRJxQckFqOJehI0lpxzAZXsrYqynWbo28ft3y/YNDp/PsD4pDqlqJyXDYKMsO5bV+7Odf8dMJp7NiazSfKFCMdsk27uzi/LAUirJwMoUiHmk1qQK8CLIroF3cI= Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id h6-20020adffa86000000b0033b0d2ba3a1sm1849517wrr.63.2024.02.07.08.38.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 08:38:17 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id F07435F944; Wed, 7 Feb 2024 16:38:12 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: devel@lists.libvirt.org, Jiaxun Yang , Daniel Henrique Barboza , Chris Wulff , Weiwei Li , Bin Meng , Thomas Huth , qemu-riscv@nongnu.org, Marek Vasut , Liu Zhiwei , Aleksandar Rikalo , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Alistair Francis , Warner Losh , Paolo Bonzini , Aurelien Jarno , Beraldo Leal , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Max Filippov , =?utf-8?q?Alex_Benn=C3=A9e?= , Ed Maste , Palmer Dabbelt , Li-Wen Hsu , Laurent Vivier , Kyle Evans , Wainer dos Santos Moschetta , Riku Voipio Subject: [PATCH v2 09/14] kconfig: use "select" to enable semihosting Date: Wed, 7 Feb 2024 16:38:07 +0000 Message-Id: <20240207163812.3231697-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207163812.3231697-1-alex.bennee@linaro.org> References: <20240207163812.3231697-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Paolo Bonzini Just like all other dependencies, these can be expressed in Kconfig files rather than in the default configurations. Signed-off-by: Paolo Bonzini Acked-by: Alistair Francis Reviewed-by: Thomas Huth Message-Id: <20240201122835.1712347-6-alex.bennee@linaro.org> Message-Id: <20240129115809.1039924-1-pbonzini@redhat.com> Signed-off-by: Alex Bennée --- configs/devices/m68k-softmmu/default.mak | 2 -- configs/devices/mips-softmmu/common.mak | 3 --- configs/devices/nios2-softmmu/default.mak | 2 -- configs/devices/riscv32-softmmu/default.mak | 2 -- configs/devices/riscv64-softmmu/default.mak | 2 -- configs/devices/xtensa-softmmu/default.mak | 2 -- target/m68k/Kconfig | 1 + target/mips/Kconfig | 1 + target/nios2/Kconfig | 1 + target/riscv/Kconfig | 2 ++ target/xtensa/Kconfig | 1 + 11 files changed, 6 insertions(+), 13 deletions(-) diff --git a/configs/devices/m68k-softmmu/default.mak b/configs/devices/m68k-softmmu/default.mak index 7f8619e4278..8dcaa28ed38 100644 --- a/configs/devices/m68k-softmmu/default.mak +++ b/configs/devices/m68k-softmmu/default.mak @@ -1,7 +1,5 @@ # Default configuration for m68k-softmmu -CONFIG_SEMIHOSTING=y - # Boards: # CONFIG_AN5206=y diff --git a/configs/devices/mips-softmmu/common.mak b/configs/devices/mips-softmmu/common.mak index 7da99327a77..1a853841b27 100644 --- a/configs/devices/mips-softmmu/common.mak +++ b/configs/devices/mips-softmmu/common.mak @@ -1,8 +1,5 @@ # Common mips*-softmmu CONFIG defines -# CONFIG_SEMIHOSTING is always required on this architecture -CONFIG_SEMIHOSTING=y - CONFIG_ISA_BUS=y CONFIG_PCI=y CONFIG_PCI_DEVICES=y diff --git a/configs/devices/nios2-softmmu/default.mak b/configs/devices/nios2-softmmu/default.mak index 1bc4082ea99..e130d024e62 100644 --- a/configs/devices/nios2-softmmu/default.mak +++ b/configs/devices/nios2-softmmu/default.mak @@ -1,7 +1,5 @@ # Default configuration for nios2-softmmu -CONFIG_SEMIHOSTING=y - # Boards: # CONFIG_NIOS2_10M50=y diff --git a/configs/devices/riscv32-softmmu/default.mak b/configs/devices/riscv32-softmmu/default.mak index d847bd5692e..94a236c9c25 100644 --- a/configs/devices/riscv32-softmmu/default.mak +++ b/configs/devices/riscv32-softmmu/default.mak @@ -3,8 +3,6 @@ # Uncomment the following lines to disable these optional devices: # #CONFIG_PCI_DEVICES=n -CONFIG_SEMIHOSTING=y -CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y # Boards: # diff --git a/configs/devices/riscv64-softmmu/default.mak b/configs/devices/riscv64-softmmu/default.mak index bc69301fa4a..3f680594484 100644 --- a/configs/devices/riscv64-softmmu/default.mak +++ b/configs/devices/riscv64-softmmu/default.mak @@ -3,8 +3,6 @@ # Uncomment the following lines to disable these optional devices: # #CONFIG_PCI_DEVICES=n -CONFIG_SEMIHOSTING=y -CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y # Boards: # diff --git a/configs/devices/xtensa-softmmu/default.mak b/configs/devices/xtensa-softmmu/default.mak index 4fe1bf00c94..49e4c9da88c 100644 --- a/configs/devices/xtensa-softmmu/default.mak +++ b/configs/devices/xtensa-softmmu/default.mak @@ -1,7 +1,5 @@ # Default configuration for Xtensa -CONFIG_SEMIHOSTING=y - # Boards: # CONFIG_XTENSA_SIM=y diff --git a/target/m68k/Kconfig b/target/m68k/Kconfig index 23debad519a..9eae71486ff 100644 --- a/target/m68k/Kconfig +++ b/target/m68k/Kconfig @@ -1,2 +1,3 @@ config M68K bool + select SEMIHOSTING diff --git a/target/mips/Kconfig b/target/mips/Kconfig index 6adf1453548..eb19c94c7d4 100644 --- a/target/mips/Kconfig +++ b/target/mips/Kconfig @@ -1,5 +1,6 @@ config MIPS bool + select SEMIHOSTING config MIPS64 bool diff --git a/target/nios2/Kconfig b/target/nios2/Kconfig index 1529ab8950d..c65550c861a 100644 --- a/target/nios2/Kconfig +++ b/target/nios2/Kconfig @@ -1,2 +1,3 @@ config NIOS2 bool + select SEMIHOSTING diff --git a/target/riscv/Kconfig b/target/riscv/Kconfig index b9e5932f13f..adb7de3f37d 100644 --- a/target/riscv/Kconfig +++ b/target/riscv/Kconfig @@ -1,5 +1,7 @@ config RISCV32 bool + select ARM_COMPATIBLE_SEMIHOSTING # for do_common_semihosting() config RISCV64 bool + select ARM_COMPATIBLE_SEMIHOSTING # for do_common_semihosting() diff --git a/target/xtensa/Kconfig b/target/xtensa/Kconfig index a3c8dc7f6d7..5e46049262d 100644 --- a/target/xtensa/Kconfig +++ b/target/xtensa/Kconfig @@ -1,2 +1,3 @@ config XTENSA bool + select SEMIHOSTING From patchwork Wed Feb 7 16:38:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 770644 Delivered-To: patch@linaro.org Received: by 2002:a5d:40c1:0:b0:33b:4db1:f5b3 with SMTP id b1csp400814wrq; Wed, 7 Feb 2024 08:39:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IGXcgrMKsd3fECI04eW0WepVgFv6E5vKZLTmM3+hRHKofh2lrRnjasRiNOVin2S7GEUtE+t X-Received: by 2002:a05:620a:21db:b0:785:4129:8c4b with SMTP id h27-20020a05620a21db00b0078541298c4bmr5975678qka.77.1707323989311; Wed, 07 Feb 2024 08:39:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707323989; cv=none; d=google.com; s=arc-20160816; b=pHtrJu3sPXOOpdwd91+N770T9H4rT0T+v+w9Z5TanoQTEJ2Y9J4kZenJ/OGesFqEQg NMjsNQ0xw3RILZhQ5F7um7nX1Hq2Q6sGjE/EyOhBd4mIQtOUIsxp1QoduTYcW0dp2Y9E 4DSE4FKQfJQ5+p02xtDDqTkvXXczY3BYz+pDCuypJNaVWHiNF8nOZ2JT12Zn3ysM/HRz Jf+vky428U5ity9y9t7NEdEsPIlBMagQsi0n4OJY4mJgEnr+FJI63UmhDyTnQJE68uZv cl/gAv6Yc3rj8j1BDdjKZraKzbTRgZZaD8sDHslhKROVC8iYCXX1kSrzhL8JSZcsf0eL W17w== 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=oWoGzkk5jlTntsP9Fp0ezGwzMskb1JgO0OTcfpG0rf4=; fh=HUlDND/9JLWYpf1VUzgg7d3FAR+8jEbcAUFMbcJydLk=; b=BppYpOTgU3qTIg0NLaAO1NCAGvlR2LZ1BeoPkPSKwC5DoQ9xYgXciPm+RdR1CVm6SF AD/bpO5yAfZq/Vyol9R7e8clIUTWYsRv9OIb+5BWL+eLah2/syiCTnkmjdWMIcEvR343 LWvvvk3vG5ygkxjVfIQdhHa4CMphK5M/7SDgqyye9f8VJW2ZIkEZbwoytrhAPzfXEMFT 4QdPVIHCRB1jPEv82BIi70FFPF6Vz7JeMMFaqPGD7JrpoarIZFztI5fKqJ23l9ybgNGd fMy/3a1Xauqax2uynx4TINzMi8zD8STN9Bd/3vmO7YSCT+S4+h0g/PUtFxk9HOzYOFud YmlA==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mCvzwygq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCWDznuzbK/a6i3XG9IlbpnH5YfrwoOaQXRSe0h8+NuqjBUEwa62bqC+HXeW9Z/Q7iDmTkwpltMd6tvvpQRadXMx Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t9-20020a05620a004900b0078562086535si1414126qkt.620.2024.02.07.08.39.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Feb 2024 08:39:49 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mCvzwygq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXkwP-0002wu-Sf; Wed, 07 Feb 2024 11:38:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXkwM-0002ty-EC for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:26 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rXkwK-00068e-Br for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:26 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40fdc63f4feso7868025e9.3 for ; Wed, 07 Feb 2024 08:38:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707323902; x=1707928702; 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=oWoGzkk5jlTntsP9Fp0ezGwzMskb1JgO0OTcfpG0rf4=; b=mCvzwygqxhve/FdYw7vM+UBP6w6qu/Tz7WK/foIeEyrQVW6k/i4Ydkb9gF9Qt+WT4W ZY+OwC1/9TBVMyJzGILuzy3eG6GdfU2obtNtfUgM3kJwqmCqO3QL+8Zi6G+Bt10t4MxO uhKQxhRJZZ+42XRpdAVF3IN43nBvmecRovbPNOlnS0yszWLs0PRHwsdndJLWfQK0Ol6E 24x9UiLhmUgPe2vTpvwHQaXuBMbpzTcB37XU3qhkjF/Jg4k6xkFg4Fbh1RFFZGl1uqnG Bu/xlEid0XNNnp0iZAqf/10Il2gEJll+T6o1DKJrWjTGrKEV4IyVJHKuA7WW53cr25xq qZvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707323902; x=1707928702; 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=oWoGzkk5jlTntsP9Fp0ezGwzMskb1JgO0OTcfpG0rf4=; b=jFHwJqxov0MJTJ4i+/gXSMN15RNEWYUxOPJhcAkSbSybJ7BTKUygBwlJ7NBvjAWpWR mSaOvfvbIebxm278bBaJrJbJCNvUah+gHUcf+KbOH8GfnYbKAaitEFy3dOQEjF2YlIVn p3jRwv45AuXx55UDatYtIYpJGESsBckU4XgntcUZRzdVbva/XfbODJPoI2qkwd1+BQ2w I0L5GgM5TTvPpiJvD1U1Ofyd8JcR9cYZdhhiqDe/sFqt6bLpY+cPEEt0JFY28+ah6G/P 4gGcfbOEc9Z3LISj8aK0JidzLmVrdN47XeUEr4uof6n1ZUmrXOnhpQI/jNOyFTA49r9u pM8Q== X-Gm-Message-State: AOJu0YyubnYky8f/2AgyzTJDyFO/VDH7HpLXauQMdSjoyZlkZm3YmQXu Q5nXVmrs/Ao/mkFqNc6LTdMiRjcfYmz3kZ3qjOf9XQb7IFoigIgB/YVPuZCw628= X-Received: by 2002:a05:600c:4691:b0:40e:f154:752 with SMTP id p17-20020a05600c469100b0040ef1540752mr5391678wmo.20.1707323902442; Wed, 07 Feb 2024 08:38:22 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWOTJ4esVaJckcJFrE2pkVh9RazJTeGt3av8oiPaGyDUIvMc4VJ5oqaZ5tCa3BM8uZeFYMPxrQ1xyVLHqFEn6qa5SARefa9pJ5qL555GzP5dh9DKCE1zeJQ47UzXpPEYVLaFCDA/smQoWpD+GHLMZguXFhoZSXuPMsBW3j4JCQ3n8J0SbbSVTktdMHmWTRj9cyAtm/QpON5VaD7RYqy4AC8n0RrRqrxS4ux4is6eApPuPkuCIy3ucmZ1k6bHnLFbYoPFIIrp24fNRF4XjExn/s7eZRZAdiNl8fwLbV3VI34ry3MosOI5SmU8V14cGJaS2sL1voYPm8z4BQiod08YKblO37LwlInE+j+DIhiFInFmHe+cjT79vgauLX3H6DKPlkicMxuXIy6nvgOIl99r9I5kWsib7cLX7XXhm0itfdcnwmu4aNBh+YqVb0EvyAbsuzzw61/YN9POghP1NBE5l34ClIzTyoi5lZJ00p+Hf3xCk9CSjIIs5LOxmkrPD7gGZGYlF49qJRTL6XnBqoMvUbSaMlg8mn5OlcQK+Q1aUUKD9v81sfmcGM0tr69WnUKVkLHsYDTCfU373ZIsWDxVtcZf+0jP30FWAbHfHyH0bP/cLJsUqgjLjw1r8Wb1xPuTgHwi1LgbOHm8O4DOGxP1hvaNaTHGM6dG2EfOLgySUQo5vYtBXQvbNLNvN7TGqnvsLsH22U/WLGATVK7jNwQ4GQHQiCJ/4Wmbr3FK9dbwciDQL3bW+yVZa6GlmQeeYv8C2P0LDavkCzuNoGq/eq0hYwXk3c1uUExTvH5UNUAlUjbM5jlQSu+2hLinU/D75agOpn+Iy5geOmZJgCsqovJUhKt+juyNPkjOzKL922q Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id fl16-20020a05600c0b9000b004101f27737asm1077895wmb.29.2024.02.07.08.38.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 08:38:17 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 13B8A5F949; Wed, 7 Feb 2024 16:38:13 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: devel@lists.libvirt.org, Jiaxun Yang , Daniel Henrique Barboza , Chris Wulff , Weiwei Li , Bin Meng , Thomas Huth , qemu-riscv@nongnu.org, Marek Vasut , Liu Zhiwei , Aleksandar Rikalo , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Alistair Francis , Warner Losh , Paolo Bonzini , Aurelien Jarno , Beraldo Leal , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Max Filippov , =?utf-8?q?Alex_Benn=C3=A9e?= , Ed Maste , Palmer Dabbelt , Li-Wen Hsu , Laurent Vivier , Kyle Evans , Wainer dos Santos Moschetta , Riku Voipio , Ilya Leoshkevich Subject: [PATCH v2 10/14] gdbstub: Expose TARGET_SIGTRAP in a target-agnostic way Date: Wed, 7 Feb 2024 16:38:08 +0000 Message-Id: <20240207163812.3231697-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207163812.3231697-1-alex.bennee@linaro.org> References: <20240207163812.3231697-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: Ilya Leoshkevich The upcoming syscall catchpoint support needs to send SIGTRAP stop packets to GDB. Being able to compile this support only once for all targets is a good thing, and it requires hiding TARGET_SIGTRAP behind a function call. Signed-off-by: Ilya Leoshkevich Message-Id: <20240202152506.279476-2-iii@linux.ibm.com> Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- gdbstub/internals.h | 1 + gdbstub/user-target.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/gdbstub/internals.h b/gdbstub/internals.h index 5c0c725e54c..aeb0d9b5377 100644 --- a/gdbstub/internals.h +++ b/gdbstub/internals.h @@ -136,6 +136,7 @@ void gdb_append_thread_id(CPUState *cpu, GString *buf); int gdb_get_cpu_index(CPUState *cpu); unsigned int gdb_get_max_cpus(void); /* both */ bool gdb_can_reverse(void); /* softmmu, stub for user */ +int gdb_target_sigtrap(void); /* user */ void gdb_create_default_process(GDBState *s); diff --git a/gdbstub/user-target.c b/gdbstub/user-target.c index c4bba4c72c7..b7d4c37cd81 100644 --- a/gdbstub/user-target.c +++ b/gdbstub/user-target.c @@ -418,3 +418,8 @@ void gdb_handle_query_xfer_exec_file(GArray *params, void *user_ctx) ts->bprm->filename + offset); gdb_put_strbuf(); } + +int gdb_target_sigtrap(void) +{ + return TARGET_SIGTRAP; +} From patchwork Wed Feb 7 16:38: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: 770651 Delivered-To: patch@linaro.org Received: by 2002:a5d:40c1:0:b0:33b:4db1:f5b3 with SMTP id b1csp401279wrq; Wed, 7 Feb 2024 08:40:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IEUS5KQTinr14M1tFk8Phi5gl+Z+b3a0NPLEiabEz7Mt4N8KLr30lmHiyiP85DmLB45AGuE X-Received: by 2002:a81:cf04:0:b0:604:3ea:8b5a with SMTP id u4-20020a81cf04000000b0060403ea8b5amr5028406ywi.30.1707324052657; Wed, 07 Feb 2024 08:40:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707324052; cv=none; d=google.com; s=arc-20160816; b=Z+K4qA33g7p1ZhGDH0rqptjqvMWUZT4MHxh+ynv0845/rqd8CcXaM3JhiZqYtRzAtB Ajdsa4t+zv0TRzNHgu9yx7xQp0jNdEphdFeJv2bcq2nZfBglIlUhRZgJz0aejx9iFZud w2DGHNZqYqhPtrCdTQNEWfrLrykpCczApE5O7VMdLbhH6REMKjQ3DEes5FOJjzthuJds ev71lfJbiLMhdOwJVLyQKmjoKOaAr5CJQSI0GEYSO+WgG1WQXvSobMr20CD/VpOnCHj2 ymnp0cqRRAVwtx2X0tYYnI2rkmKYZGcP+XAFwO2hhtHJf+WNsVpJl7N5WoixC28TiE12 vfUw== 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=NZEnJqnRtjHTYADU54FKGw8u/qLIoqp7a6/Lc+0JhOI=; fh=d/Ofhlug2fvzbO2zBRfQ3kosLOrng0DgyFqsQ7MgEkw=; b=CDZnQ+uZ/xIvaLBVtEPkWZv0x8efQ2cbKiQ4GpazWPtYU/gm+T+NKAytK90J5hXGo5 CbA9IC2xrZuYRhG70IewXhVgESUKFSqyRprvrfl/eAb85rULygQQvPZ+vcEhV6JD9UY7 Of25hBe6UGQGyyHrfa6fcAQ/1ZGnIviApN2ndxMqFNcVP71LB+3H5C1FkqLATq6fzK9B UF2ZPLa29KPc4q/YzgPXi1t3si18ZN7MVaJl59oHiMmuRVJrcFjDCO1zxuW2PT+szQNe wxRB6m3nvUpKe4OMqZkG/MSTzCFD4Rfi4Ar96sKbeV+wx2VUVm9HXJ0AZ/5IAbk5DXZu bosg==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gfcUw6Fd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCUzvGUCgJcZWBWaDmVJiDBxJ/WNteeXaMY1k1bQoPXguNwCoIl09quD5mdN+JW5EUasTtaJB/ExjDtvIxewnuzS Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id dv3-20020a05620a1b8300b007859f9aa7b5si1065387qkb.603.2024.02.07.08.40.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Feb 2024 08:40:52 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gfcUw6Fd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXkwT-00030O-F7; Wed, 07 Feb 2024 11:38:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXkwR-0002yg-EB for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:31 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rXkwO-0006CG-Sl for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:31 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-40ff28388a6so7630565e9.1 for ; Wed, 07 Feb 2024 08:38:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707323907; x=1707928707; 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=NZEnJqnRtjHTYADU54FKGw8u/qLIoqp7a6/Lc+0JhOI=; b=gfcUw6FdsXwGE1FD/EB8khiaSdJWBLoVSCkCwzub66Pt9ORycJw6qomC4Ax0KEkTg+ 5pVXQwcuZxwr4HBP0vFIKWf02jbs/vDZ/Zslg+EyWGXoLuhpbBJKR+FfnTBc/Iy09MqB k/Vcl8lSdoG0koikOSBl1HNosyZTkED0pKCUY1qxahZoTCMCb2U/r674Y+v+ezb32kxA Wv3ZbEnZTGYFd8YxQqRerN5ELJR8so8nNUZyVAXvQme0IwOzHt/gvhgM1YSxXmJD/f3Y 4ECXlDQGaprGub9HHWStS46XBRUGsOZQxJYk/Pv+Va8NX25tYLSK3oC3y1sK9dTqk/pV 352A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707323907; x=1707928707; 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=NZEnJqnRtjHTYADU54FKGw8u/qLIoqp7a6/Lc+0JhOI=; b=Rc+oORgAvldGKjsUd/36/udxOjq32YKfCos1CV0JVccCu9m88WLCTeCgWPrasgHUXB KyvVC34gJQNFV+m+ImU1MCTxhopXHw+WM2Zal0Z0gImywsvYX44+9EyEdNL5k17VJZlv 9vV7uqfmFMxR/ehfclzQjfp4ms1E95tKVEUhLSkdS5tzCob2odJTuLn/JmpUDMVgZdOH y7WSI7xZ1JfvL+v6syNc6q11r3ofHeEY1jO6JuUYdsTzQPd9ZMSZNR4Qw9BfCzr+3AkD WWbUn5LyAlHVJyQvz+djbXLipZVPFDBJa7g2eTO4sxu96fy2GodgeOxAwVBPD+TQXtPK wo1w== X-Gm-Message-State: AOJu0Yw0FaBl7ioFoeMh8bDMECloRdFwc3Vbr9RtwwT7vHPxdZXwQRCX rEFA7dM1zkJ3B5bnM93BvJ9bENpd1vn39tOtRuqqFNur1lUMkd0kvJ/q4OHkYsY= X-Received: by 2002:a05:600c:1553:b0:410:2496:ccdd with SMTP id f19-20020a05600c155300b004102496ccddmr522761wmg.27.1707323907446; Wed, 07 Feb 2024 08:38:27 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCX2twQPA/imKU8TXnjh8RXEOe87TDnJV7LjaUystw7Iipdfu4tRqFIR6jmxZLiZvq8iJJbbUyUtf4zHNMB+e5LW+khol3VhtpuFOqOUoMbF+Ko03I6/r0pPjSAi88ffV7sVliFGwb/eZPufsf8tCuUYnjAh3OSskNSFkveT6EDZnMUBxAVjRlepPxNHnShJRn4PAxzXvomj4+CEuuqmNKkaZ2xJGAkNDuCj+6E2siTpTHVmlmd803nIe2OOGdGmF2q6lvmZ6r6bkk62g8fNRCw4JlH14azS1pNP8cC8mQf7FwSN9zcG4lLVKf5B9Ekhrv+o+Itxh1PI5Jro2/byTmwEGc5FRkH1Eb6B6cqzY701LO6UFFaFuh17a86Z3T8+0E8nrrxERyZ8pXL29bE8FYLrqY25Hy8kdElo/ajUHWuovys/uUIbtFVhhUtGBd/3XtAtNgPBlI0Q5X/Md9xsDm60zH/AOhMRye27qoo6Fiprj6T9WjnolNhmvELVKO+G9TFQKJKh0BCWSfjdZbNOIZLZ+4zHTshILfRU+VUcd5VWRuvow+/9w9pbyt4NFOY3hspWqanUGC0lnuDKrrSufHDhu74Xccrhvx9w9mQl0PCYa+HjGCS3rn2RouU7i28kQCH49irLXqLCiB0ewuQHIvGHN6YuNk5xk5chcipTG/0xgjy1P3t/iWKx704X1yCDuwB0yOHbmaA8twCpazeb8Kt0Fe+ReQ8FNk6t6h3dlkV91fTvdgdtSu1Po+NKixtglHHqO+TqKeueteFkLYiJwFWA1gEkgfp+hrHfo4g/YQOFp0Lp+7HiD3yqsny4W6jiFe4qAnoFonlWW4OQwdl+U+pi1MNw8g7pAT5JgiL8 Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id b15-20020a05600010cf00b0033b4e58746asm1809148wrx.69.2024.02.07.08.38.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 08:38:24 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 292D85F7B1; Wed, 7 Feb 2024 16:38:13 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: devel@lists.libvirt.org, Jiaxun Yang , Daniel Henrique Barboza , Chris Wulff , Weiwei Li , Bin Meng , Thomas Huth , qemu-riscv@nongnu.org, Marek Vasut , Liu Zhiwei , Aleksandar Rikalo , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Alistair Francis , Warner Losh , Paolo Bonzini , Aurelien Jarno , Beraldo Leal , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Max Filippov , =?utf-8?q?Alex_Benn=C3=A9e?= , Ed Maste , Palmer Dabbelt , Li-Wen Hsu , Laurent Vivier , Kyle Evans , Wainer dos Santos Moschetta , Riku Voipio , Ilya Leoshkevich Subject: [PATCH v2 11/14] gdbstub: Allow specifying a reason in stop packets Date: Wed, 7 Feb 2024 16:38:09 +0000 Message-Id: <20240207163812.3231697-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207163812.3231697-1-alex.bennee@linaro.org> References: <20240207163812.3231697-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: Ilya Leoshkevich The upcoming syscall catchpoint support needs to send stop packets with an associated reason to GDB. Add an extra parameter to gdb_handlesig() for that, and rename it to gdb_handlesig_reason(). Provide a compatibility wrapper with an old name. Signed-off-by: Ilya Leoshkevich Message-Id: <20240202152506.279476-3-iii@linux.ibm.com> Signed-off-by: Alex Bennée --- include/gdbstub/user.h | 16 ++++++++++++++-- gdbstub/user.c | 5 ++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/include/gdbstub/user.h b/include/gdbstub/user.h index d392e510c59..1fc43e04af5 100644 --- a/include/gdbstub/user.h +++ b/include/gdbstub/user.h @@ -10,9 +10,10 @@ #define GDBSTUB_USER_H /** - * gdb_handlesig() - yield control to gdb + * gdb_handlesig_reason() - yield control to gdb * @cpu: CPU * @sig: if non-zero, the signal number which caused us to stop + * @reason: stop reason for stop reply packet or NULL * * This function yields control to gdb, when a user-mode-only target * needs to stop execution. If @sig is non-zero, then we will send a @@ -24,7 +25,18 @@ * or 0 if no signal should be delivered, ie the signal that caused * us to stop should be ignored. */ -int gdb_handlesig(CPUState *, int); +int gdb_handlesig_reason(CPUState *, int, const char *); + +/** + * gdb_handlesig() - yield control to gdb + * @cpu CPU + * @sig: if non-zero, the signal number which caused us to stop + * @see gdb_handlesig_reason() + */ +static inline int gdb_handlesig(CPUState *cpu, int sig) +{ + return gdb_handlesig_reason(cpu, sig, NULL); +} /** * gdb_signalled() - inform remote gdb of sig exit diff --git a/gdbstub/user.c b/gdbstub/user.c index dbe1d9b8875..63edca131ab 100644 --- a/gdbstub/user.c +++ b/gdbstub/user.c @@ -121,7 +121,7 @@ void gdb_qemu_exit(int code) exit(code); } -int gdb_handlesig(CPUState *cpu, int sig) +int gdb_handlesig_reason(CPUState *cpu, int sig, const char *reason) { char buf[256]; int n; @@ -141,6 +141,9 @@ int gdb_handlesig(CPUState *cpu, int sig) "T%02xthread:", gdb_target_signal_to_gdb(sig)); gdb_append_thread_id(cpu, gdbserver_state.str_buf); g_string_append_c(gdbserver_state.str_buf, ';'); + if (reason) { + g_string_append(gdbserver_state.str_buf, reason); + } gdb_put_strbuf(); gdbserver_state.allow_stop_reply = false; } From patchwork Wed Feb 7 16:38: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: 770648 Delivered-To: patch@linaro.org Received: by 2002:a5d:40c1:0:b0:33b:4db1:f5b3 with SMTP id b1csp401099wrq; Wed, 7 Feb 2024 08:40:27 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXaBuhHcjAl5KYvK0BcSLx6mFhO68IlvT+WAbT3HhQ1+9wdFq260yah1MU8vdNmQJFW843grY2Y1K8ylMDHCoNX X-Google-Smtp-Source: AGHT+IHRE2pcybOStwrSsCOAYESB79fUvaNAimrfYO9Hlyh5yj++KkbMuazYAVivKR0wxO1A+LmL X-Received: by 2002:ac8:59cf:0:b0:42b:fd4a:e13d with SMTP id f15-20020ac859cf000000b0042bfd4ae13dmr7952557qtf.55.1707324027174; Wed, 07 Feb 2024 08:40:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707324027; cv=none; d=google.com; s=arc-20160816; b=nSF36TT0LL+GZ9v3hNiRpqS3ubyoOhGDx8kSl6ugYG1Jn+G3tFbvR9GGa0Ub/+Oy1g ha7B8uj1LLaMSMfkcrHGMFNr4drjpFQEJhoxxSTEMbwYbDNYtMBbF8XdlGxhP7scqdw3 Lx/LpX/SLnodzP400Kmu0etOZ+fBqPBCxnutwxkSdirdjFz3JYc/8Gq3hPWLElp9jk9b td5VZmU5pZfd1cfs2a5R0LvwyepISQwdznr5SUDElsBwEJJtxWjdtk07lL9Y6Tx5qF11 KndX+OMt2e1gDjIVk2+RklO5+LFWXiY1Sn0Q/5U6anv21bjQWomeXkREY9ApT0VZRlju C7Ow== 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=nUnXcCSSh6U29fLbXe/wbWbJ/XTPO8jPvZXYeKxJYts=; fh=Fadbe2upiJavckTMP9F3RVTMIS/vBg5gZ2mu58qIUDY=; b=cIMzEU86JSqEEI1Mf8Y6uldqbcgZtxPTUbwh2YqHHkrbGufeFgP3YhN77ibmQg5ujn rKNki3JRnqY2MFJ1kDjs4ZvRJUz2zGE06Fm0zkeR/7t2JMxZqo29HgReC/Hh87+OWi0K o3gt92GvS878g5mdD1C8IUo+KafOYJVtrgXAL9FfhDKuqWCJq0At4zrQHS10bDol9Ov9 b8aPwhXyJsmbFLNxjVgzUu2H1OHsG0iOK28mcWn2/XhFTEVS2ine+UuQrPe9Hn+f5F/1 Yiq475Acl4GGJsFCnOqGOFPpDdb0sxSLLX66t5hEciq0gyVPuSEUZZLyuxGpAOS8JHL0 uIIA==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dYPKpNZa; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCWVbehYcLYB4lvd8+8R7jOLnPm8KZN/WXwBVZXqM71z8iYM6NHdEHl32lxwmlduHs17S4g+pG64kOiFLsdyBglC Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e19-20020ac85993000000b0042a3ee64327si1479820qte.590.2024.02.07.08.40.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Feb 2024 08:40:27 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dYPKpNZa; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXkwR-0002yd-Bv; Wed, 07 Feb 2024 11:38:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXkwP-0002wi-9B for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:29 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rXkwM-0006BN-KO for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:29 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-40fc22f372cso7350405e9.1 for ; Wed, 07 Feb 2024 08:38:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707323905; x=1707928705; 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=nUnXcCSSh6U29fLbXe/wbWbJ/XTPO8jPvZXYeKxJYts=; b=dYPKpNZat1kg7Bzk79dTrSh7xTWlZIFoV++5iZaestZEIoNvUJVpF5OK1mRVtEVluy rLdi0lYkpY7PPq0pyN4utdzDI0zI6n8ofDCsmQRYN8CpSh8My1m99ShWnuRkcIe7W8EQ fj+QxCv0eIAq1fNAmj4djbNJSKFiYyTRXPMFd45TpZ3fiZriYiNb/fXsF+Wn+bJIggzD syxZdBWg9TJkIxqvwAq9nK11Xk4jMjX/D0vxV9EfntcdwSZmkA2n/bQibSt82FVWLU1+ rp2ZiRYH47yn6IyVRRkzlwYXoL8cYieQw4uuE56IzO1hlDM9/yZAmmS/5XwuCrWgjsZn IHMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707323905; x=1707928705; 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=nUnXcCSSh6U29fLbXe/wbWbJ/XTPO8jPvZXYeKxJYts=; b=CdxpRqCyWwZ/8P3qlk/rVTuBTYUun3zxUxB5iflr8bp5lptoNhf0n55KG34E5cC3MV RvbggMhzUwN3LdvC6OQktnlJFTFFzRGmg3fDnrvvT2wN1ZoUKzZJo9RE75amqOTwGXlk ulRIM4NDGHZuvR0GmpiB57Q1oEZ9ezmgW02xM8+JHXj/21scNnQRhONqlZWpOoFO6N2X oLhmpnb/1CgIplIZ5dSn5EmTVesAoJ8MCUe/ub7sdwuQqB+cWZJ0gGWzToP3fb0FcgOa DphPK4DHw+JPKN1iBkEww+TBqq55Ywi6JxNZhRaTIQn2nxeIGnnT3NnWMQ7LcIyQenOg yh9g== X-Gm-Message-State: AOJu0YyuOF+B9SK1lSptlLXdxXbWNzi/eo9hDJJ/rWOx5O4qCvDFGOv5 QN60x7GqKtfCpVF+JRbRg0mZ/YAQsmVcnDvotg3IUijZm/HvJaXihUe8j6NeVl4= X-Received: by 2002:a05:600c:1910:b0:40e:c6a6:5111 with SMTP id j16-20020a05600c191000b0040ec6a65111mr4417992wmq.11.1707323905332; Wed, 07 Feb 2024 08:38:25 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWhyaD1vupT/FNfVmORb9ZE7cv2foxFCinjPT9uXP8f9AAyFqzRcblYR8DkLUd4MRMpU80Kh9knP9Xp/N34knFALV1YwEDmfa7ufQFAswE8J+cey7zgurjX40sWDb76CMmQcWtgjhFid5dPrZ5F2JaYOv/gOeuJsNN+t0mwV+O98nDgqrr3vwyLp32/1OFZSInOM2CG9HHeV2CTPvZdVgjiruo0DPrSV3mKh/zx2iI1QWEZtR/RHTvC2exI9SZ1vivntZkp/LBWNESzL1xpg0XskBO1mkpcDf4N6XHvg6plb46ZKMlqtC+7x9yodxM8lUmdOMvZSB4cioBZlM4vXpWRmDkDM8Z03bdZYU4ueKRd0YCkV4kdotAwoSOZ7NmhY+B4cBlQSsnO+8VeVCJw3VKwELEOfjAdIPU3E4S47HZYsUAoGierf4mcmpttDPyD3Gqe601N75ZrTi9RiFD0zbekxRnK9NhLq3KjxF8RgGi5Cc9vN1+JgXylYaf0RY+0ivn1hx3SKXnE3cbJo4BNiArQ4JEGvoa8XfYBg2LTky/dTVCUfFQU2j4OK/l4cWDJCty0CONgxKRZxHLPhbCY+kDxa7u/FLQCjkXlzixFKruSeGJ+4y2acbF7QQxx7zPkkp63gM2cQZQzT0lexbqWcJ/hRVXfkM9kxgT4d3jlzF9O70i9EB728P9UP87Ok2RdcRE59YC02MTk3hW5QDMs/8cKlKdjfP06gRSarINiDPiiOd1mwPBx8oawc1HxlAPqZPcZo1pjaqesKNLItT6FGKhoi2IKFo6lDgaM5VOZVMhJxzwSlNvFs0+wBuDqIMJa9j49ehzX0nmZN0MBRaZr8MmTuLCaswIYsTk3GI1l Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id w8-20020a05600c474800b00410219f126bsm779121wmo.37.2024.02.07.08.38.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 08:38:22 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 424755F94A; Wed, 7 Feb 2024 16:38:13 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: devel@lists.libvirt.org, Jiaxun Yang , Daniel Henrique Barboza , Chris Wulff , Weiwei Li , Bin Meng , Thomas Huth , qemu-riscv@nongnu.org, Marek Vasut , Liu Zhiwei , Aleksandar Rikalo , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Alistair Francis , Warner Losh , Paolo Bonzini , Aurelien Jarno , Beraldo Leal , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Max Filippov , =?utf-8?q?Alex_Benn=C3=A9e?= , Ed Maste , Palmer Dabbelt , Li-Wen Hsu , Laurent Vivier , Kyle Evans , Wainer dos Santos Moschetta , Riku Voipio , Ilya Leoshkevich Subject: [PATCH v2 12/14] gdbstub: Add syscall entry/return hooks Date: Wed, 7 Feb 2024 16:38:10 +0000 Message-Id: <20240207163812.3231697-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207163812.3231697-1-alex.bennee@linaro.org> References: <20240207163812.3231697-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: Ilya Leoshkevich The upcoming syscall catchpoint support needs to get control on syscall entry and return. Provide the necessary hooks for that, which are no-ops for now. Signed-off-by: Ilya Leoshkevich Message-Id: <20240202152506.279476-4-iii@linux.ibm.com> Signed-off-by: Alex Bennée --- include/gdbstub/user.h | 13 +++++++++++++ include/user/syscall-trace.h | 7 +++++-- gdbstub/user.c | 8 ++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/include/gdbstub/user.h b/include/gdbstub/user.h index 1fc43e04af5..68b6534130c 100644 --- a/include/gdbstub/user.h +++ b/include/gdbstub/user.h @@ -51,5 +51,18 @@ void gdb_signalled(CPUArchState *as, int sig); */ void gdbserver_fork(CPUState *cs); +/** + * gdb_syscall_entry() - inform gdb of syscall entry and yield control to it + * @cs: CPU + * @num: syscall number + */ +void gdb_syscall_entry(CPUState *cs, int num); + +/** + * gdb_syscall_entry() - inform gdb of syscall return and yield control to it + * @cs: CPU + * @num: syscall number + */ +void gdb_syscall_return(CPUState *cs, int num); #endif /* GDBSTUB_USER_H */ diff --git a/include/user/syscall-trace.h b/include/user/syscall-trace.h index 557f881a79b..b48b2b2d0ae 100644 --- a/include/user/syscall-trace.h +++ b/include/user/syscall-trace.h @@ -11,6 +11,7 @@ #define SYSCALL_TRACE_H #include "exec/user/abitypes.h" +#include "gdbstub/user.h" #include "qemu/plugin.h" #include "trace/trace-root.h" @@ -20,7 +21,7 @@ * could potentially unify the -strace code here as well. */ -static inline void record_syscall_start(void *cpu, int num, +static inline void record_syscall_start(CPUState *cpu, int num, abi_long arg1, abi_long arg2, abi_long arg3, abi_long arg4, abi_long arg5, abi_long arg6, @@ -29,11 +30,13 @@ static inline void record_syscall_start(void *cpu, int num, qemu_plugin_vcpu_syscall(cpu, num, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); + gdb_syscall_entry(cpu, num); } -static inline void record_syscall_return(void *cpu, int num, abi_long ret) +static inline void record_syscall_return(CPUState *cpu, int num, abi_long ret) { qemu_plugin_vcpu_syscall_ret(cpu, num, ret); + gdb_syscall_return(cpu, num); } diff --git a/gdbstub/user.c b/gdbstub/user.c index 63edca131ab..2ba01c17faf 100644 --- a/gdbstub/user.c +++ b/gdbstub/user.c @@ -502,3 +502,11 @@ void gdb_syscall_handling(const char *syscall_packet) gdb_put_packet(syscall_packet); gdb_handlesig(gdbserver_state.c_cpu, 0); } + +void gdb_syscall_entry(CPUState *cs, int num) +{ +} + +void gdb_syscall_return(CPUState *cs, int num) +{ +} From patchwork Wed Feb 7 16:38: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: 770649 Delivered-To: patch@linaro.org Received: by 2002:a5d:40c1:0:b0:33b:4db1:f5b3 with SMTP id b1csp401186wrq; Wed, 7 Feb 2024 08:40:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IEzjpFkiqQoE4gM6SJUUPx0Q6cZpZlkRzpcUztfiKXYmQ9q42OLqsJog3HjYKfd9NLJZwEa X-Received: by 2002:ac8:641:0:b0:42c:69d:5397 with SMTP id e1-20020ac80641000000b0042c069d5397mr6009088qth.40.1707324041451; Wed, 07 Feb 2024 08:40:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707324041; cv=none; d=google.com; s=arc-20160816; b=pp5xnNjTIxiQMR2w5sCWiSPTVoHuti/4CWpypNgK9BtMJb2ONc+bqYbT1Lb13IY+Kd cTKfbAUsBE4LVDlTsuUpTOmnW6LDp3dvFbPCrqtVXTgMB7gVfzaaLe+Gv78cQE4DencA y+uouCLbOJFASQoIX1sr/vfG9+V8RrTs6aFmVe2BebIovFE/zyhpbfE3J7CZZiaPyarZ gmjrbCcE+6DX3UxIvLP1EtnUKmVNVBobnXVGsCLFjVv0dHW8g+igyWTjBz9iutGnyf7k 5Zi3cqVvjBSqih10a7eLBWHBwuVTJm6sI9kLMetgycukJl7BZIEPdA3AqtTzn9yTzewq Ricg== 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=z2vgt/WjJf2HA0KugTv1vBfaaG9X3Kl8endzGiNtDT8=; fh=2ZEbzwK54OW2sC1mmWU3cPp1ecVuS65VOcHZMIhXjNI=; b=Um/b1IHTKj8Ro8vusc8nod7OTivevWLLaD3deSXykKZdOPIzw0c375s5EoX2AzRsAm IS140O8j2c98+uERe/22eP0sxNTvUrQzTujo19t2pxbJKI9jp88KFd5ksQvtR/9CUprk dTAHMsFKzBLZPqW326Z4mYGHbcrTH9rGdwLCIdvsbcT+UUEDrwhDw3WctvkT871ZGfqw mLe6DlnaVm9iXUuLB5fqGsf1RH3O+x51/S+Mwa6Qe9DGLvYlQTXn6lgKp0q6hbvS0buu 4EvX1WcqJQEPgwZGiu0RQX/9GJEyuNsbXPRGpJa3ZGDXbz1l2oZHG+qI5XbudJNMgwjD /tjw==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Rger1u/E"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCWYQ4dGIM0NGz9JxFe/ldPAVVSxq36OWwaWXYJQ16eXp/zBXtn9BT1gL0ncUWzrr3dStfa7hHFXSSg4GIb7Ij4N Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k9-20020ac86049000000b0042c41b119afsi1143071qtm.704.2024.02.07.08.40.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Feb 2024 08:40:41 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Rger1u/E"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXkwT-00030Z-R6; Wed, 07 Feb 2024 11:38:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXkwS-0002zp-Cx for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:32 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rXkwP-0006CO-9M for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:32 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-33b0e5d1e89so735567f8f.0 for ; Wed, 07 Feb 2024 08:38:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707323908; x=1707928708; 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=z2vgt/WjJf2HA0KugTv1vBfaaG9X3Kl8endzGiNtDT8=; b=Rger1u/EA5hB/OPg2o7wlBnAcehbs/KAx/zLTduzfZafJEs6DB9/oc8qVhdW8kvV7c KO4UugWVRYcku7q5HwRZBENFfyD/LVMqFzpXexKtfs71rZn5fihPz8IC1TyqRORti0Yu GuQWU37dV0Qs2X54ore7gJp83PJ3El/56+ZJnSzuf32SSsKuUR0+S7X1lceR6qHTq33n LXGhlzfW7YTHqYqdvVsCQtBnZJ48NSfNTbv38GRYVZ7Maw7+84S2Pie1pmkgWLHfGZ+G 8K0kBlcaBP/yVnH5KDcFpZ5nIex+ZaQS5EJhBuA+L/bRjDy3iS1krD+fvFv3WvbG7S/y RYZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707323908; x=1707928708; 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=z2vgt/WjJf2HA0KugTv1vBfaaG9X3Kl8endzGiNtDT8=; b=hKy4OYw33327U6uMpqSgVF+1S3uG+CzeNxcGpjhQ4bjjKC+r/+HMH0AamllGGsupfH AzzdIe9e27nNQ0K+ZNgiHEuZ3YUUu+1+YQD/hbeDEJWlUQL96FvtBDNhvwj33W07xrlo NRKt15zaQTMnFF4wKOGUrQlQtzJYmwh5Kz355wybuzJe2xOBTE24EuAjR/d6cmISXFE7 mCxigxjqdE4mfn/X4L5q4oWQ5/4MELK1rsWPblsNNYRLzEhMIEyI1w0AS0SIdcILmdoH vsEgntxQoT3Wlxqg3J/efofWHSNJZjujr8qoYWqrXLB2MaMNxueNVrdFmiKrXXc7kABY cOJw== X-Gm-Message-State: AOJu0YzGB/d2RfBxh8BxNIUrvcu7B36tX9do7ma1ZbMI1xQ4wO3NCFiZ 9D+YjOkHRhNAiYSxknJrXxZDrx5/wNXEZSqR7siAUQXCpc/Dsmrxwhm1lMaV+p4= X-Received: by 2002:a5d:4523:0:b0:33b:1ac8:aebe with SMTP id j3-20020a5d4523000000b0033b1ac8aebemr4863574wra.44.1707323907793; Wed, 07 Feb 2024 08:38:27 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUgaPKcBeGwVcF6F+SJ0hnc3uIR62pO2+ap1TjSypdzohrcatPumrhMX0akevBZfKLOfqcrDRzsQIQjrFGyyNlrG7SAcJZXQMoDCcMReckIaeAV8Z//SGrX0AHMjt7RW7q2xOws8W5fKApdCc4o9woSEsq8F98zbeBAUtxWMcBOVjK3rHrxSd2ueaOT6AzEOcpkGhcBUdXtH2uy8Mo82p0Z9SJ/yivEjR5YWtfcJ2M6hnR+SBQ4YhsFWJwurXcSXeJto8KRGLlqZBuaQmLqklmhaJ128nbNu/UomVUd+29BYe9aBe9EfCaL3DL2WiOjeJUEQQ5jbddFRfsWWBWdWvDuV0fm3SqajHpb/1uNbU3NktxQVK8j4aZ+9z+H8PeNPVUytM14riF1MpNEQbs4DLmDJsNTyefVQm9VOfCjZcNBJ5Qrh/NNx8sXqn1F5QLzP/lopJCu0pkqVx/GMmeSHmBOjc//pqStLNe8s2JBtdK43q+2lLwsOvFpL4RZnG6N2X8fd5cvLUIhHyGvGm1aYvC6Wb6a27UoNoCHwmaK89VH/AST6QuZubu2FNFT31j5L9I9+bvV9CxJxZgwrt8MfuQvY2OoFqids2x2v0q1tpzyGmMX6KWNJao940ZKguac0uKBZ0+YKhKQjPS5mlM7/9vC3pXZzU+Z3GgFL9xQ+mf+OF5DxTyciLF/82OZkJ3sM6TU2CSQ4ojpE78WblY33uOt/l3Mr6k/YwoTSDlJ+ZhXBvAb5AgVBFUbBlMVyixS7wCfqP6PRnqeB77Mfm0ZbEX2YugAcUrqEnr+YccYcsthugdgLC4Q/+jBOptYfFbOktfRhhnFwW1P/JlgCtK/QJk4+tPJ1srbDPQ2k61Y Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id y16-20020a5d6150000000b0033b443a7aa7sm1829371wrt.97.2024.02.07.08.38.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 08:38:24 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 5A4ED5F951; Wed, 7 Feb 2024 16:38:13 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: devel@lists.libvirt.org, Jiaxun Yang , Daniel Henrique Barboza , Chris Wulff , Weiwei Li , Bin Meng , Thomas Huth , qemu-riscv@nongnu.org, Marek Vasut , Liu Zhiwei , Aleksandar Rikalo , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Alistair Francis , Warner Losh , Paolo Bonzini , Aurelien Jarno , Beraldo Leal , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Max Filippov , =?utf-8?q?Alex_Benn=C3=A9e?= , Ed Maste , Palmer Dabbelt , Li-Wen Hsu , Laurent Vivier , Kyle Evans , Wainer dos Santos Moschetta , Riku Voipio , Ilya Leoshkevich Subject: [PATCH v2 13/14] gdbstub: Implement catching syscalls Date: Wed, 7 Feb 2024 16:38:11 +0000 Message-Id: <20240207163812.3231697-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207163812.3231697-1-alex.bennee@linaro.org> References: <20240207163812.3231697-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Ilya Leoshkevich GDB supports stopping on syscall entry and exit using the "catch syscall" command. It relies on 3 packets, which are currently not supported by QEMU: * qSupported:QCatchSyscalls+ [1] * QCatchSyscalls: [2] * T05syscall_entry: and T05syscall_return: [3] Implement generation and handling of these packets. [1] https://sourceware.org/gdb/current/onlinedocs/gdb.html/General-Query-Packets.html#qSupported [2] https://sourceware.org/gdb/current/onlinedocs/gdb.html/General-Query-Packets.html#QCatchSyscalls [3] https://sourceware.org/gdb/current/onlinedocs/gdb.html/Stop-Reply-Packets.html Signed-off-by: Ilya Leoshkevich Message-Id: <20240202152506.279476-5-iii@linux.ibm.com> [AJB: GString -> g_strdup_printf] Signed-off-by: Alex Bennée --- gdbstub/internals.h | 1 + gdbstub/gdbstub.c | 9 +++++ gdbstub/user.c | 91 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 101 insertions(+) diff --git a/gdbstub/internals.h b/gdbstub/internals.h index aeb0d9b5377..56b7c13b750 100644 --- a/gdbstub/internals.h +++ b/gdbstub/internals.h @@ -195,6 +195,7 @@ void gdb_handle_v_file_close(GArray *params, void *user_ctx); /* user */ void gdb_handle_v_file_pread(GArray *params, void *user_ctx); /* user */ void gdb_handle_v_file_readlink(GArray *params, void *user_ctx); /* user */ void gdb_handle_query_xfer_exec_file(GArray *params, void *user_ctx); /* user */ +void gdb_handle_set_catch_syscalls(GArray *params, void *user_ctx); /* user */ void gdb_handle_query_attached(GArray *params, void *user_ctx); /* both */ diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index 46d752bbc2c..7e73e916bdc 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -1617,6 +1617,7 @@ static void handle_query_supported(GArray *params, void *user_ctx) if (gdbserver_state.c_cpu->opaque) { g_string_append(gdbserver_state.str_buf, ";qXfer:auxv:read+"); } + g_string_append(gdbserver_state.str_buf, ";QCatchSyscalls+"); #endif g_string_append(gdbserver_state.str_buf, ";qXfer:exec-file:read+"); #endif @@ -1810,6 +1811,14 @@ static const GdbCmdParseEntry gdb_gen_set_table[] = { .schema = "l0" }, #endif +#if defined(CONFIG_USER_ONLY) + { + .handler = gdb_handle_set_catch_syscalls, + .cmd = "CatchSyscalls:", + .cmd_startswith = 1, + .schema = "s0", + }, +#endif }; static void handle_gen_query(GArray *params, void *user_ctx) diff --git a/gdbstub/user.c b/gdbstub/user.c index 2ba01c17faf..14918d1a217 100644 --- a/gdbstub/user.c +++ b/gdbstub/user.c @@ -10,6 +10,7 @@ */ #include "qemu/osdep.h" +#include "qemu/bitops.h" #include "qemu/cutils.h" #include "qemu/sockets.h" #include "exec/hwaddr.h" @@ -21,11 +22,20 @@ #include "trace.h" #include "internals.h" +#define GDB_NR_SYSCALLS 1024 +typedef unsigned long GDBSyscallsMask[BITS_TO_LONGS(GDB_NR_SYSCALLS)]; + /* User-mode specific state */ typedef struct { int fd; char *socket_path; int running_state; + /* + * Store syscalls mask without memory allocation in order to avoid + * implementing synchronization. + */ + bool catch_all_syscalls; + GDBSyscallsMask catch_syscalls_mask; } GDBUserState; static GDBUserState gdbserver_user_state; @@ -503,10 +513,91 @@ void gdb_syscall_handling(const char *syscall_packet) gdb_handlesig(gdbserver_state.c_cpu, 0); } +static bool should_catch_syscall(int num) +{ + if (gdbserver_user_state.catch_all_syscalls) { + return true; + } + if (num < 0 || num >= GDB_NR_SYSCALLS) { + return false; + } + return test_bit(num, gdbserver_user_state.catch_syscalls_mask); +} + void gdb_syscall_entry(CPUState *cs, int num) { + if (should_catch_syscall(num)) { + g_autofree char *reason = g_strdup_printf("syscall_entry:%x;", num); + gdb_handlesig_reason(cs, gdb_target_sigtrap(), reason); + } } void gdb_syscall_return(CPUState *cs, int num) { + if (should_catch_syscall(num)) { + g_autofree char *reason = g_strdup_printf("syscall_return:%x;", num); + gdb_handlesig_reason(cs, gdb_target_sigtrap(), reason); + } +} + +void gdb_handle_set_catch_syscalls(GArray *params, void *user_ctx) +{ + const char *param = get_param(params, 0)->data; + GDBSyscallsMask catch_syscalls_mask; + bool catch_all_syscalls; + unsigned int num; + const char *p; + + /* "0" means not catching any syscalls. */ + if (strcmp(param, "0") == 0) { + gdbserver_user_state.catch_all_syscalls = false; + memset(gdbserver_user_state.catch_syscalls_mask, 0, + sizeof(gdbserver_user_state.catch_syscalls_mask)); + gdb_put_packet("OK"); + return; + } + + /* "1" means catching all syscalls. */ + if (strcmp(param, "1") == 0) { + gdbserver_user_state.catch_all_syscalls = true; + gdb_put_packet("OK"); + return; + } + + /* + * "1;..." means catching only the specified syscalls. + * The syscall list must not be empty. + */ + if (param[0] == '1' && param[1] == ';') { + catch_all_syscalls = false; + memset(catch_syscalls_mask, 0, sizeof(catch_syscalls_mask)); + for (p = ¶m[2];; p++) { + if (qemu_strtoui(p, &p, 16, &num) || (*p && *p != ';')) { + goto err; + } + if (num >= GDB_NR_SYSCALLS) { + /* + * Fall back to reporting all syscalls. Reporting extra + * syscalls is inefficient, but the spec explicitly allows it. + * Keep parsing in case there is a syntax error ahead. + */ + catch_all_syscalls = true; + } else { + set_bit(num, catch_syscalls_mask); + } + if (!*p) { + break; + } + } + gdbserver_user_state.catch_all_syscalls = catch_all_syscalls; + if (!catch_all_syscalls) { + memcpy(gdbserver_user_state.catch_syscalls_mask, + catch_syscalls_mask, sizeof(catch_syscalls_mask)); + } + gdb_put_packet("OK"); + return; + } + +err: + gdb_put_packet("E00"); } From patchwork Wed Feb 7 16:38: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: 770640 Delivered-To: patch@linaro.org Received: by 2002:a5d:40c1:0:b0:33b:4db1:f5b3 with SMTP id b1csp400661wrq; Wed, 7 Feb 2024 08:39:24 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXJ7YQwJuPDA8jU312epSSad96rVtvVY5PSNCDHi5ucD7jLE5VNooscKypGBv5wCbNWLlh0J0dgabC/e/fI0x1M X-Google-Smtp-Source: AGHT+IERNOTiak678LpuDGP/KhMmQmGB+BGyrs34M+Ol1sianHPAZy6imFE78NGsejLGmNvXAF9C X-Received: by 2002:a05:622a:1714:b0:42a:b264:a093 with SMTP id h20-20020a05622a171400b0042ab264a093mr6580620qtk.0.1707323963746; Wed, 07 Feb 2024 08:39:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707323963; cv=none; d=google.com; s=arc-20160816; b=X4LIquGZG9VIFsl730oOTpEn5smiPOB1ovHYgfrMDVrKbe4fDjGu1/DFw77BuFa80g 9QZzZD0jeZ2vF4w5C23MTU3LI0y7AKZ9fZVkAlfvqhcd5+zSmcGxiwXX6eT983+GHfY5 ELlXlq380/H+Ob2iZim6hZTM6iAtmwUXVY/ViXbbHGXp6s28iRFoY3mSV4A3hahwOxfK iLk5tS/CQHAA+w8UBqDzvvJVJ6cnRYCHzqE+19qA8uM6YeYgS+XtmJnljIovG/yvcxaK 30ksbd3ZjQZWfFrDW2muRKiNpyvd+x8Zdg2St38QRgvH4POWohEl/J4pSHz0l3psIYBY vjQA== 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=5KJnAd/m0KGguzc/ly2OcxGET3ckYILVYJ7JRk/PTxI=; fh=o8DXynFTd7dQP2eE9w4iHzQdgjXO7VQaJQ13MlYozvc=; b=ZB1s4v8V9M72U/URXvKadn2XSZLCAeb8r1QIwNWLCRO5lHLzpgCKiSh7XB0/wtYzDl Ys2y8c+PifOwppVOvNHGyrJ46jBn+xl0ePEvU9+pCPWoS/9OpG3CiGYOFNEAz1lNBHjI jHqMiGhKE22/x+41zm0AUIgfxxzSWlnqCU5jvtk9RvTi/3QzzkZ6TOt8ngZwqey1b+82 MinqFPUkXwVvYLWbX7lxzIqgBBNFGSeQ3OCmDdSr2b4QEDNSAMAj2JFM+limhWBwoZF/ iewRvjxh3CMVCE6CvU+ZsJnFuApe3s1tC7ljrXFNAUEHFK/jG38wakXYeHxcgSbOuxF4 Pk0g==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s6PDiUeg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCUQp9PqVdMc7wf/hQtUvs0ql5z7KZML89/BzL8UXGkH+n8KLMc9174N93/3VsdAeXkmlTTLRjsd8LZdvhzfEMvJ Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u8-20020ac858c8000000b0042c44126043si871136qta.441.2024.02.07.08.39.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Feb 2024 08:39:23 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s6PDiUeg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXkwV-00031f-Pk; Wed, 07 Feb 2024 11:38:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXkwS-0002zh-4y for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:32 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rXkwN-0006Bb-91 for qemu-devel@nongnu.org; Wed, 07 Feb 2024 11:38:31 -0500 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-33b0f36b808so658469f8f.3 for ; Wed, 07 Feb 2024 08:38:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707323905; x=1707928705; 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=5KJnAd/m0KGguzc/ly2OcxGET3ckYILVYJ7JRk/PTxI=; b=s6PDiUegFVlSnXH8YTlwNfbdqhWilqYNpzqCzBuNhDAuDdZ361PB+GxrBaJ+Bf0NCK +Jx2dqdVkf+sZSyH84ucV4gmrk8/ZJb1vnyEOI9RM/Z+kk8Au2i8fibQZ11u/D1dDHLi CRsntqg3/qeYd0mEb/Nw+vEUqu3Af4yGqf9zsYF5xpnMjNB9zVyWwI/PA0wT8jz20IPy OV/k2NwtOsrYpfaMLKXUgoX7UM6AEkEm3wEyoRmKbU+xmtsWL+Gsp0ST71XB2swr0wBb WtWTyTRFAfcAkKBOyMMOADVlzrkRq4XMSQAszDePWd3I23YdZuwOTcj5dqxScCW22yAK G42Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707323905; x=1707928705; 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=5KJnAd/m0KGguzc/ly2OcxGET3ckYILVYJ7JRk/PTxI=; b=sN/vR0xl3kRSRPzDffVvu3sCkDfcZh5y1YJqLtfX1+bOk1un8WvZGePhj/WEZ9GRcf aaWBPjmiJhKecMC7eFycZSCHoVpxlMjPntUna7J9i9vGVZxm4Sk1Yp6r0XFIiItF0q9i LllpMoDkIUxfF34iXd4MVrnPqzxrCGbwr2QfPmzziBrlGFIecwMyinuzN3hQuehrUQKj OXLyny90OqXYiaLUXrc2jhAiYFcUgjp6D82e/Y1Ydwu1QOexR02plGPTHQ1MGyvb6ntC DUzgmfmTz0qkbhn/CqRmHYOgVtvjIy1auxvyj4tDgbOcFJfNjofJPt4IuMRNXe/Gptd9 DI2Q== X-Gm-Message-State: AOJu0Ywt6FX4YuVtBdjFUeYVSIlHv4O6VE7ygo/JlTmbv5CsJ+MG4nga qJ2pfI5j4K22LdyRAAZfjUQtyEAp09qCk9Df+cLjPsCLJyottQ2wuTGtpcwSjmI= X-Received: by 2002:adf:ecc3:0:b0:33b:37f6:2388 with SMTP id s3-20020adfecc3000000b0033b37f62388mr4149932wro.58.1707323905659; Wed, 07 Feb 2024 08:38:25 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCV4xwNCVOQMPGULI/JYjc6IgG/O8Um2nQJ+6HOUuNEu2CqPr5Rj+E8wUXYIkPZTciNs9c6zu7wk7b8BE2gYNUeRQi0ZpqinY9LeYQ7f83qubpvSdlIu4Er9c43b/1nFBYCM5uBx6UMWHFSO9EbAFxMjAU3KjnCOKXhT6JwUqyyXyqItny7G4xcN3oyD2w4vXkzSWYukbrABOzyoD2VYXmRe7eocIEZJ14esXqKuhT/4fDVJ2XdF7bxQj2nTHOfK08IGGqzhC34hwmpx+DpERXic05oZzvHGRBWBMGGlxt9Sr5HcVfSh5jQgoK5Qj/AfvI5N6Tt335AWI1K2SyhF51uvBHVkPUPGpIe9kEHk+hN7M973woNexzYMWktqqpO9txLjplLtesr/nzEHBZf7S+tUnfdt+aYovEuC4lKqczw9DhRRgxJVwImupnAO39r/lYxdmedXtua0tcXmCF/gkjc+ePOLNzs14abo1bARa9jeV0LHUHak1eoB/PDKmhrMMHeAVTXPQnNPTtXAW5ihNlWsiH6KHEk90HU5Eihr3J6yqk7tDHnaqMMBMCtqr7JGCrd2FFOMQZQ9q8t0pIghRiQnqM+a2dbNc3ApnqdwqEerI+cNLV5BUwCd951FCc8nJeQ1ekXFUzYaSJqiBwicOedgCbsh/xoPjamBV91MGC3uZ+oLrqi3SRzEkIhmPpNU4br0gz6Qw/PcD1fBigdQTYLeBdenL07LrjJTOng7k/CPm/x1eiIryBHf6hcebcGYDNALygoWTxWKqeaOMN5FkfY6Tzv9sZBeiTRoZl7dWHm34KP1eUyzZDbUEmGxW6tsn7rSXWr1Tgmrj89eRduEMcg8ewcDfIEZ25MfklRv Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id d11-20020adff2cb000000b0033b278cf5fesm1852996wrp.102.2024.02.07.08.38.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 08:38:24 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 761775F9CF; Wed, 7 Feb 2024 16:38:13 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: devel@lists.libvirt.org, Jiaxun Yang , Daniel Henrique Barboza , Chris Wulff , Weiwei Li , Bin Meng , Thomas Huth , qemu-riscv@nongnu.org, Marek Vasut , Liu Zhiwei , Aleksandar Rikalo , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Alistair Francis , Warner Losh , Paolo Bonzini , Aurelien Jarno , Beraldo Leal , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Max Filippov , =?utf-8?q?Alex_Benn=C3=A9e?= , Ed Maste , Palmer Dabbelt , Li-Wen Hsu , Laurent Vivier , Kyle Evans , Wainer dos Santos Moschetta , Riku Voipio , Ilya Leoshkevich Subject: [PATCH v2 14/14] tests/tcg: Add the syscall catchpoint gdbstub test Date: Wed, 7 Feb 2024 16:38:12 +0000 Message-Id: <20240207163812.3231697-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207163812.3231697-1-alex.bennee@linaro.org> References: <20240207163812.3231697-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 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: Ilya Leoshkevich Check that adding/removing syscall catchpoints works. Reviewed-by: Alex Bennée Signed-off-by: Ilya Leoshkevich Message-Id: <20240202152506.279476-6-iii@linux.ibm.com> Signed-off-by: Alex Bennée --- tests/tcg/multiarch/catch-syscalls.c | 51 ++++++++++++++++++ tests/tcg/multiarch/Makefile.target | 10 +++- tests/tcg/multiarch/gdbstub/catch-syscalls.py | 53 +++++++++++++++++++ 3 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 tests/tcg/multiarch/catch-syscalls.c create mode 100644 tests/tcg/multiarch/gdbstub/catch-syscalls.py diff --git a/tests/tcg/multiarch/catch-syscalls.c b/tests/tcg/multiarch/catch-syscalls.c new file mode 100644 index 00000000000..d1ff1936a7a --- /dev/null +++ b/tests/tcg/multiarch/catch-syscalls.c @@ -0,0 +1,51 @@ +/* + * Test GDB syscall catchpoints. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#define _GNU_SOURCE +#include +#include + +const char *catch_syscalls_state = "start"; + +void end_of_main(void) +{ +} + +int main(void) +{ + int ret = EXIT_FAILURE; + char c0 = 'A', c1; + int fd[2]; + + catch_syscalls_state = "pipe2"; + if (pipe2(fd, 0)) { + goto out; + } + + catch_syscalls_state = "write"; + if (write(fd[1], &c0, sizeof(c0)) != sizeof(c0)) { + goto out_close; + } + + catch_syscalls_state = "read"; + if (read(fd[0], &c1, sizeof(c1)) != sizeof(c1)) { + goto out_close; + } + + catch_syscalls_state = "check"; + if (c0 == c1) { + ret = EXIT_SUCCESS; + } + +out_close: + catch_syscalls_state = "close"; + close(fd[0]); + close(fd[1]); + +out: + catch_syscalls_state = "end"; + end_of_main(); + return ret; +} diff --git a/tests/tcg/multiarch/Makefile.target b/tests/tcg/multiarch/Makefile.target index 315a2e13588..e10951a8016 100644 --- a/tests/tcg/multiarch/Makefile.target +++ b/tests/tcg/multiarch/Makefile.target @@ -108,13 +108,21 @@ run-gdbstub-prot-none: prot-none --bin $< --test $(MULTIARCH_SRC)/gdbstub/prot-none.py, \ accessing PROT_NONE memory) +run-gdbstub-catch-syscalls: catch-syscalls + $(call run-test, $@, $(GDB_SCRIPT) \ + --gdb $(GDB) \ + --qemu $(QEMU) --qargs "$(QEMU_OPTS)" \ + --bin $< --test $(MULTIARCH_SRC)/gdbstub/catch-syscalls.py, \ + hitting a syscall catchpoint) + else run-gdbstub-%: $(call skip-test, "gdbstub test $*", "need working gdb with $(patsubst -%,,$(TARGET_NAME)) support") endif EXTRA_RUNS += run-gdbstub-sha1 run-gdbstub-qxfer-auxv-read \ run-gdbstub-proc-mappings run-gdbstub-thread-breakpoint \ - run-gdbstub-registers run-gdbstub-prot-none + run-gdbstub-registers run-gdbstub-prot-none \ + run-gdbstub-catch-syscalls # ARM Compatible Semi Hosting Tests # diff --git a/tests/tcg/multiarch/gdbstub/catch-syscalls.py b/tests/tcg/multiarch/gdbstub/catch-syscalls.py new file mode 100644 index 00000000000..ccce35902fb --- /dev/null +++ b/tests/tcg/multiarch/gdbstub/catch-syscalls.py @@ -0,0 +1,53 @@ +"""Test GDB syscall catchpoints. + +SPDX-License-Identifier: GPL-2.0-or-later +""" +from test_gdbstub import main, report + + +def check_state(expected): + """Check the catch_syscalls_state value""" + actual = gdb.parse_and_eval("catch_syscalls_state").string() + report(actual == expected, "{} == {}".format(actual, expected)) + + +def run_test(): + """Run through the tests one by one""" + gdb.Breakpoint("main") + gdb.execute("continue") + + # Check that GDB stops for pipe2/read calls/returns, but not for write. + gdb.execute("delete") + try: + gdb.execute("catch syscall pipe2 read") + except gdb.error as exc: + exc_str = str(exc) + if "not supported on this architecture" in exc_str: + print("SKIP: {}".format(exc_str)) + return + raise + for _ in range(2): + gdb.execute("continue") + check_state("pipe2") + for _ in range(2): + gdb.execute("continue") + check_state("read") + + # Check that deletion works. + gdb.execute("delete") + gdb.Breakpoint("end_of_main") + gdb.execute("continue") + check_state("end") + + # Check that catch-all works (libc should at least call exit). + gdb.execute("delete") + gdb.execute("catch syscall") + gdb.execute("continue") + gdb.execute("delete") + gdb.execute("continue") + + exitcode = int(gdb.parse_and_eval("$_exitcode")) + report(exitcode == 0, "{} == 0".format(exitcode)) + + +main(run_test)