From nobody Wed Nov 27 04:44:04 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1701423531; cv=none; d=zohomail.com; s=zohoarc; b=KZ6VnBh8X9cqQqf/cwcWnOsL+SwVnE26tvpTwudrBqD+sBu2Y5PNNnORIfpccY2mwZ/skR27C4Osgkg9UD1XO8FOWatfT1lhOWr3TimHN/otnVHahq+a00HkQcrFPVKOjwcGQXgxom+EicqXlQztIEGv5eZLs0pxKX00vmN5gXA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701423531; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=JqE1WlTC8iW99lEPTJa1X2LXMjo5z4bbux1ltP+LwY0=; b=OMDd+cDXyb446ThIdbGE2xZ4plRj8bgsmsytPSYtJpe6hkZe4mvs+PIa1kes0dtFqsA2ZBvlFfQQH/fumKsmrCWKdSNdp/btErQSobbBvbCXsDhcQhSfYPWEPHmk5uxBKLBiuEzEpfZtJPwaL8J5inSl1RMzAgjFNcXDPS1wP8g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1701423531329782.7325251138338; Fri, 1 Dec 2023 01:38:51 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r8zwu-0003mE-Ee; Fri, 01 Dec 2023 04:36:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r8zwt-0003lW-Hk for qemu-devel@nongnu.org; Fri, 01 Dec 2023 04:36:39 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r8zwq-00044c-IA for qemu-devel@nongnu.org; Fri, 01 Dec 2023 04:36:39 -0500 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-32fdc5be26dso1341582f8f.2 for ; Fri, 01 Dec 2023 01:36:35 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id w18-20020a5d6092000000b003142e438e8csm3690050wrt.26.2023.12.01.01.36.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 01:36:34 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 015925FB61; Fri, 1 Dec 2023 09:36:34 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701423395; x=1702028195; 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=JqE1WlTC8iW99lEPTJa1X2LXMjo5z4bbux1ltP+LwY0=; b=jYG0BzAUW8y2xu8GKnwNVwu56t5I4Vg6uNrXisDywfWAm9vmo9g0d9511zhWvqCL9U 5H+rXrx/z0InyyDPEnd+nkJXcOHCXaCDC9J9GpJyPNTONiUqs+qQqs9bXdjbxQGMnpJo pLIUZXc0idPd/8UgVcBd8tUmG1HjfkO1CVqXi3DbEDNz5tdNvEl1lLGRqXF7A2T7BzSc lxJOYkx245b4V3gZg2Raz3UU+MrLGa/D4puX2EVyPJCtto6pYDXk58JJnFcSvHATnrzJ MzD9/dcjjBZDkPoaQHIIXHGPL/9dHMq3GgEO1+F0sB87thOqWV/fd4SQKYu4w2S7L0KL xxUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701423395; x=1702028195; 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=JqE1WlTC8iW99lEPTJa1X2LXMjo5z4bbux1ltP+LwY0=; b=dgT/IYeuNbdKgdngy32i0OfasNBFTTHuT1C9sP+fWeTAdVSH9gizvKDYS/5BbnRHLO AkgQZVReyKheRqkZyxrAYsA+ROjiu7Js6O6mpzvrNB/sAFnMnDzAwqcOWcOwH/k1dCsU WX1vk8C0Uf3tocmtEItq5CQKAGf2wqh3JEOL4ZiVwmDU4ajrAaGXVWcVXa7ZZcf5uEya AjKTV+l87EaaJk17fgF4WMfnynN0BNDq0B6R6bMFizWsKtABkbLMVjokeiL7Hg0eJSAd lUwZGC7ua9rZFnKNFKy5MUIl0tu05S3hDafzi57QIIerK5BHUWn4/4extw5Yu1K1kryD Z2Dw== X-Gm-Message-State: AOJu0Yz/P3LYfjTFnHGTg3H/zxxsmkO2587FGKhaEPJRwuOROPmAEXqY FZhX6He/+giWPndo/qD4V451Bw== X-Google-Smtp-Source: AGHT+IER/CKsUSEWIkP6vRxQYgrFsmUbwNnLxNvGU7RfJ6gGg8Fak4smXm6eRbHa+tV2NC5C7EidZQ== X-Received: by 2002:adf:efc4:0:b0:333:2fd2:8130 with SMTP id i4-20020adfefc4000000b003332fd28130mr545320wrp.77.1701423394671; Fri, 01 Dec 2023 01:36:34 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Eric Farman , Peter Maydell , Leif Lindholm , Beraldo Leal , Andrew Jeffery , Paolo Bonzini , Marcin Juszkiewicz , Pavel Dovgalyuk , Thomas Huth , qemu-arm@nongnu.org, Radoslaw Biernacki , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Yoshinori Sato , Eric Auger , Halil Pasic , qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Christian Borntraeger , Aurelien Jarno , Cleber Rosa , Joel Stanley , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Luis Machado , Richard Henderson Subject: [PATCH v2 1/7] gdbstub: use a better signal when we halt for IO reasons Date: Fri, 1 Dec 2023 09:36:27 +0000 Message-Id: <20231201093633.2551497-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231201093633.2551497-1-alex.bennee@linaro.org> References: <20231201093633.2551497-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1701423532642000001 The gdb description GDB_SIGNAL_IO is "I/O possible" and by default gdb will try and restart the guest, getting us nowhere. Report GDB_SIGNAL_STOP instead which should at least halt the session at the failure point. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Luis Machado Reviewed-by: Richard Henderson --- gdbstub/internals.h | 1 + gdbstub/system.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gdbstub/internals.h b/gdbstub/internals.h index 465c24b36e..5c0c725e54 100644 --- a/gdbstub/internals.h +++ b/gdbstub/internals.h @@ -24,6 +24,7 @@ enum { GDB_SIGNAL_TRAP =3D 5, GDB_SIGNAL_ABRT =3D 6, GDB_SIGNAL_ALRM =3D 14, + GDB_SIGNAL_STOP =3D 17, GDB_SIGNAL_IO =3D 23, GDB_SIGNAL_XCPU =3D 24, GDB_SIGNAL_UNKNOWN =3D 143 diff --git a/gdbstub/system.c b/gdbstub/system.c index 783ac140b9..83fd452800 100644 --- a/gdbstub/system.c +++ b/gdbstub/system.c @@ -183,7 +183,7 @@ static void gdb_vm_state_change(void *opaque, bool runn= ing, RunState state) break; case RUN_STATE_IO_ERROR: trace_gdbstub_hit_io_error(); - ret =3D GDB_SIGNAL_IO; + ret =3D GDB_SIGNAL_STOP; break; case RUN_STATE_WATCHDOG: trace_gdbstub_hit_watchdog(); --=20 2.39.2