From nobody Wed Nov 27 04:48:17 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=1700745582; cv=none; d=zohomail.com; s=zohoarc; b=Bycik2P9pQH7z38QKUA3c+dkPtT6X7IsmzYPaS+aZ2Qq9d5n2pMNnatrdf2hqhALEvn3cdVAm/R9GFYzJ4vqYWcJY7DfjNiDCHtEDGuofQ2Rar11dxmNdR+8MKWDjkz4RYNVZfCK77bcZB2831wDNjDeqwjD8/mFiScTy/ZBPUw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700745582; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Q/6bSnEglw6m4h+xy81DshF8cBTlnGobxHKJ/G0Fy98=; b=QFVvND63vFLYOGFyL4qIm4R8jHGxiFRhs4BktT+sjdjqrKsjFBj8Rbykgzd48ktWwgwSmWuOIs0r/a8l30oUqFXrFnUz1u+HONuZ67UWIRd8oiz/KcWAQGs9whXTfXuSyybh3XVhg/fKcAO18RbjBpFRQRjDzIiR/rwHiS2rse8= 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 1700745582306493.214626901462; Thu, 23 Nov 2023 05:19:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r69bu-0004W2-7R; Thu, 23 Nov 2023 08:19:14 -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 1r69br-0004Vb-Vp for qemu-devel@nongnu.org; Thu, 23 Nov 2023 08:19:12 -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 1r69bp-0002yu-8i for qemu-devel@nongnu.org; Thu, 23 Nov 2023 08:19:11 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-40b34563987so5009075e9.1 for ; Thu, 23 Nov 2023 05:19:08 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id m8-20020a05600c4f4800b0040b347d90d0sm2670786wmq.12.2023.11.23.05.19.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 05:19:07 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id D799C5F756; Thu, 23 Nov 2023 13:19:06 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700745548; x=1701350348; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Q/6bSnEglw6m4h+xy81DshF8cBTlnGobxHKJ/G0Fy98=; b=vLX6dbsKl2wnw7bBzyLdxe5qsxAV24qPDMkvDKAYDFGhA7guwj1z8txH0j7LBNUzQL UAXCshQcFrpdwWbz8p8SLOmjMCRVxsvWmdXp5WF0/US7cCNL2LgRNPBTy0bO7zOSPgrY Pwu0c1K6ytW4v7pVJxjZ/nVxTxGHRlqK6F941KIH9AKoV9nvOHWwgVXhDyQUT8ALWini o2YezQRnG+rlMHCA9eXsdXKVuvqtETMZ/GiaxUVd+ecjVvaY8kMD1246Efn3cqMzRS9K KLu8flg0u1Uc5/jCqjCUaIOmRUVVPpAjdluEtrKvrX1WK0KiQXML2yH8jW+OV+zBNsv2 5jYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700745548; x=1701350348; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Q/6bSnEglw6m4h+xy81DshF8cBTlnGobxHKJ/G0Fy98=; b=o8DPioQrXT/Qhn9+O0drA/H8F2V65jiIE6maL5qoRPjZ3/I8emWoGacAYcFRcBv8bS p4Yos3WHF9XzmZMfLso+/g3LB6grnc1bWdCXGzc3mwtJyenTwtk1L8j/hblHG0dogn6X Q1sWTuPPaWmtZw1XNXNOSegcjlajxNfbeuMslSDLrzMrcTbQ7KvDeGXi1/vt2PAM8kEK tL7nmZQ8wJfle9YLxr9rA+Q1V1cD8qxLbXmWWb01WCB4aEbja2gYT9Ro7qlAui9EXywA z9gNexpdE2kuAm8WdemBE7hVkT+WCCr5rJEPk+63pC3F6BDiTIyW1xkx1xnGi/dZV7FU 2VPw== X-Gm-Message-State: AOJu0Ywfm0xQdXa/WTTL7GztFJSS/Zq/1Eh4KpjZnT1S3NYvp1NSq+Jh VXHpgfHNxFGzdIYiF9S6cNtK7Q== X-Google-Smtp-Source: AGHT+IF3DtgBjkiHK6aHC+6M+iozIJryjIFPU5H8IWtW5obyAgGO9SKeAhIj45jJ3k9qm+OwCg0/Gg== X-Received: by 2002:a05:600c:3587:b0:3fe:1fd9:bedf with SMTP id p7-20020a05600c358700b003fe1fd9bedfmr2380526wmq.11.1700745547696; Thu, 23 Nov 2023 05:19:07 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Luis Machado , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [RFC PATCH] gdbstub: use a better signal when we halt for IO reasons Date: Thu, 23 Nov 2023 13:19:05 +0000 Message-Id: <20231123131905.2640498-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 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::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=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: 1700745583581100001 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 Cc: Luis Machado --- 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