From nobody Wed Nov 27 04:51:51 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=1701443683; cv=none; d=zohomail.com; s=zohoarc; b=YrLirhpkz43WVFaHAbd4dIXc2QmG+3a3adWGCmyUoUDjyPGclczNchcksb5W0fCFKJQPh7evLdUhn4JPD9QYLjznffhx2a9ryAmrJWqnnPBgPllgHsl65ntLZBA+kevUOmCtbJROf1piHOIJnxdI6xV+nwjh8MEG2IL0Mq7eTQc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701443683; 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=57x23omuVrExXgPDfxrIdHt1R1VqyRD4qvLTNT8D6tI=; b=b6W00mQWlxMuDgUGiIrV1+N2f5DavDPGR7GWfv2K7yI+zjFghpf+NVtGlMWkNrssiEfJEI2hUXCZm6QHETjy1d2YXYL2PYg7DkbtIaaV6sc6fEh3iAY0V4w3htg6CggdDpjSNmflLc9h9NOSDZt+VZVD+SMaRNAH8/GgP44Iwdo= 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 1701443683155832.4497151850567; Fri, 1 Dec 2023 07:14:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r95Cq-000583-3H; Fri, 01 Dec 2023 10:13:28 -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 1r95CX-00052l-HA for qemu-devel@nongnu.org; Fri, 01 Dec 2023 10:13:09 -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 1r95CS-00053c-3m for qemu-devel@nongnu.org; Fri, 01 Dec 2023 10:13:09 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-40b538d5c4eso17076035e9.1 for ; Fri, 01 Dec 2023 07:13:00 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id v10-20020adfe4ca000000b00332f95ab451sm4390896wrm.58.2023.12.01.07.12.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 07:12:56 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 00BB45FB61; Fri, 1 Dec 2023 15:12:29 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701443580; x=1702048380; 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=57x23omuVrExXgPDfxrIdHt1R1VqyRD4qvLTNT8D6tI=; b=eIKZVJhUzGBzmdGVEfWRhAZe+jQQWaxG5pHOSFyZBZsRCqmD2hmxF/P96rprv+H+T2 FBrlNtKQAfnMg6Il9UlW4V+kUHjdK63RrpYrPpjColwcyKqSJ16ie0H1OQYCyIYSy+IX JE3UbMYxhkxawEd14J/nSfWlxKjalrdyRe2g0wvVGqWQX9kVldW1pEUX2cWu/OS5fLsY ut0C7VEbpbNfKXTmqsdcZi0Sby65PD0RdtLs97ie2DwoilL/1FJYZZbZI6JSgg+r5bwX ZJjkS2H9RiC87Lm09mOu6B1/QU54guumXrEeUH+MSVJtAiEdyqxEgwpfnO2TsfLcePNs iv6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701443580; x=1702048380; 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=57x23omuVrExXgPDfxrIdHt1R1VqyRD4qvLTNT8D6tI=; b=Xg2wNJbcV/1x1N8Pfg1m8VWXOfuue7XCKPAFA7/kg9LQOtZZwvL4JMz7R+m/u0DiOe YajROpmfEUUISacZ3Yk6zTAmWsvx99tBAtEBGznzjKJHNXBCelCvEtG6adWfqp3Q0neB SczBuGG3xePzlbflY0IeiZcRBYVUXKOuXuDm9FUJPi6ZbJTupddRlrWNDKYoXInAfc1Z E2shA3OeRcruDa7gi+I0WFKvrGPBCwovFTCHwvkzc9O59nuaQN2toOeRXCTmdy4uYjaZ by/k/nHUx31L4hxVk16ch94N8FecyLT7eecwG6SBkRICVC3n8uVUnJneHHVzenQlP/pA BRIA== X-Gm-Message-State: AOJu0YxliCxYdmEQ4N9ldC1YESuYNdIy5FV956kqncmUKtIvvlfxPQxI FSCYA+carQJRETZEgbVJ+2HCfg== X-Google-Smtp-Source: AGHT+IGG6uiBxj1FeOOcjK4MvU5HBQ+rVuiZEPQlv41LIbyZGclfq0hWmbiVzBK5Hrkssi5OBAEJ6Q== X-Received: by 2002:adf:f48d:0:b0:333:2fd2:4add with SMTP id l13-20020adff48d000000b003332fd24addmr896006wro.89.1701443579792; Fri, 01 Dec 2023 07:12:59 -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 , Richard Henderson , Stefan Hajnoczi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 1/6] gdbstub: use a better signal when we halt for IO reasons Date: Fri, 1 Dec 2023 15:12:23 +0000 Message-Id: <20231201151228.2610209-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231201151228.2610209-1-alex.bennee@linaro.org> References: <20231201151228.2610209-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::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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1701443683606000001 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. Reviewed-by: Luis Machado Reviewed-by: Richard Henderson Acked-by: Stefan Hajnoczi Signed-off-by: Alex Benn=C3=A9e Message-Id: <20231201093633.2551497-2-alex.bennee@linaro.org> 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