From patchwork Thu Jan 9 17:05:58 2025 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: 855973 Delivered-To: patch@linaro.org Received: by 2002:adf:8b05:0:b0:385:e875:8a9e with SMTP id n5csp1335085wra; Thu, 9 Jan 2025 09:08:43 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUbVQQAhZMzIiQxH/aIYrFRBSmvklwE1M7z4oexZ+X2b5uHeVhgqUnWMt1T/Dzp6SlxGLe8eg==@linaro.org X-Google-Smtp-Source: AGHT+IH91yaDoPaONd3Svew+bgrFNggYakZqvCBEOMRrE/yhrDkj0w6xZHdKaOfi9MAxnMt7Vd4B X-Received: by 2002:a05:690c:3511:b0:6ef:aae1:ac51 with SMTP id 00721157ae682-6f5312dd398mr55551147b3.27.1736442522855; Thu, 09 Jan 2025 09:08:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736442522; cv=none; d=google.com; s=arc-20240605; b=Got4zSoedXMOHZS4wBA0t3KIWYILuiaONNPWATmuOGTLFwEp85ak+EjGq8zQd6tTR8 WMENoWQ5AhnBeuUMJP23ICKxKsVqSIkEMEHA18otyMm9EFpweWjVD7Gbb8zQkUwUkFIS TKU0EiRHwHHgXOsH+FERcaCnHpKHdgKMu0TVSGUVt/spc+lWlwppiQnrSY+GvskIhutb DzQmSflXJTXI0fpLLoe+IUecBwZQNOlOXufW9uQ/mc6l6ZgyHDl3p43qBvJsFVX4om9O n696WMX2oqHG2UVlqe8HZouDG8Oiy3n9uukVNq2kNBTcnd0whH4f2UqCpS+UJ7dB0RjR IKug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=5mmFjWAfoOONUODYkZWtQO2ol/JE4H/G6qm2dOWJg5o=; fh=FS+JTz/k+Dh1PAd9s6lkEQMFdt/HYT5+zFPDR3GvHJ0=; b=MxMgDf+qYKYbr5cTpG9a7lp3Z4tx3eGURLQ+2TEapvB9o6X0HtiW4x3HAwSetF37Ys 6rJC+Fb7imjO8LGm6fhUFPMEj1SDzEFHaoNVPJAYrtOTkvYZspoOPxOuhoq/BsORY95b btKSAfgBec7k5rJku0yC/LpquEzu+fAgxs6S1SAZD06ctTshRzUdc7gcT8QCbNOQtWnD 1oPo4AZVOXidWF270+ekfsCfoM617ww3MH+NVGwgG6qQ2ZrPeUi1RpvfzZeHhq5vjfSy OiN5faz4Ny0LW19KEvfmwHyCNHxLKTXKvuCJRnyQuc2Qpv4n3aV7sI5TGfVkU7xumd+n I81w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AAlp7CF2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 00721157ae682-6f546d7c59esi11270717b3.445.2025.01.09.09.08.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Jan 2025 09:08:42 -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=AAlp7CF2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVvzR-0004hV-F2; Thu, 09 Jan 2025 12:06:37 -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 1tVvzG-0004gn-Ef for qemu-devel@nongnu.org; Thu, 09 Jan 2025 12:06:27 -0500 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tVvzE-0006y0-Q4 for qemu-devel@nongnu.org; Thu, 09 Jan 2025 12:06:26 -0500 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-ab2c9b8aecaso130628166b.0 for ; Thu, 09 Jan 2025 09:06:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736442383; x=1737047183; 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=5mmFjWAfoOONUODYkZWtQO2ol/JE4H/G6qm2dOWJg5o=; b=AAlp7CF2ogawLXaWhHYZoAiD4ioyZPQdtodMo/Fm6tbRPEoWWuewV4PNBCLNBmo07g 2p+AJFjCi+UCyNo9K7Ivsu34HgkvjBWmi8XXmKBTCblS9G1NxD75fbHIhMqRxFzO3PGU fWLuCftslFyhq8S90olI6rtWY0iZxSx2rKRBa9B+WQMZBFlbu9O5JhwpzRZnXS3ammb8 Gz4FHy4SOjMqZD2Uj1kxnPPvJXEdizmYBuqz71dsR8/8bOhPViOeU16wk+KJzPBsB/Qr eYs52OG70XZWiExBsH2nWcO0WOeUcWmx0eIBnnbbmT6N7PK6LFMXB9vTOsPQc8ulULow IhAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736442383; x=1737047183; 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=5mmFjWAfoOONUODYkZWtQO2ol/JE4H/G6qm2dOWJg5o=; b=rCo7GNBHFuicngK+il2i0krEqt1dru7JjP1It/e3RcwwdNrzO4AIhGF88Bh3Q8myDV rOXU20hhumoSYUgS+XYqCA748N/jdW2b9WHIwE08uWHqiNu1WsXvdtA1DGn3BV9TVg8N +Esp72s4nQexwMWJeI50vyKSLFSLYdqGN74t420cVtUXInKmLaAzISC6L9IoGGfThtJ9 q2Hv/5oJuJrDd8mzXSHK5GsLhgHWuUVtNaIMwQWo+RFyzlheFtHFFJ/K0chMUeOsf7bQ xQsmeDIybmpXn9+0S9dtT+wwKXzuYzWvpRz+ngdqWJ3A8MeA55bl15k5J9Ta5lnMSyKQ ujXg== X-Gm-Message-State: AOJu0YzvfxqAZQyy4HUEPIlvOhezFbBPKHkwXMFh4yDAjz/8kAjEGaKW G4fzFTB+RkAfDbK9QfZg9SHFDS1TY4LWztoam2woZxHmSquVs4lTC3geaUOkscg= X-Gm-Gg: ASbGncvgOjhxhF0jf6u0k7fY8sWIM4LTQijb32dbRTYsIhBenx7E3Ijx4iq+URX5rE7 e1LDJBPtClz+RbVofS6FlSfs8tGtTCcHKf5P7HwNlxWtedBJd52KC/LYozxeW6a6nshkt7dzQPq I5iaeWw8YwT2vcCs8Xl3xY4D1ZVAD8ySpvEs2jglb50jyZ9qgReb3goyU6Mv0/ZNcngRpkn3o0x 8EYcfrw+5yyYPws1Hg3CsrJtbXWhcI5QDgdBJ4SfO6ikONmfMNFjUw= X-Received: by 2002:a17:907:7286:b0:aac:61b:a079 with SMTP id a640c23a62f3a-ab2ab6bede4mr623988866b.40.1736442383261; Thu, 09 Jan 2025 09:06:23 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab2c90dcbe2sm88985166b.78.2025.01.09.09.06.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jan 2025 09:06:21 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id E0BBD5F915; Thu, 9 Jan 2025 17:06:19 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: "Dr. David Alan Gilbert" , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= , Thomas Huth , Mahmoud Mandour , Alexandre Iooss , Richard Henderson , Paolo Bonzini , Laurent Vivier , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH 01/22] semihosting: add guest_error logging for failed opens Date: Thu, 9 Jan 2025 17:05:58 +0000 Message-Id: <20250109170619.2271193-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250109170619.2271193-1-alex.bennee@linaro.org> References: <20250109170619.2271193-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x635.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This usually indicates the semihosting call was expecting to find something but didn't. Signed-off-by: Alex Bennée Reviewed-by: Pierrick Bouvier --- semihosting/syscalls.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/semihosting/syscalls.c b/semihosting/syscalls.c index c40348f996..f6451d9bb0 100644 --- a/semihosting/syscalls.c +++ b/semihosting/syscalls.c @@ -7,6 +7,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "gdbstub/syscalls.h" #include "semihosting/guestfd.h" @@ -287,6 +288,7 @@ static void host_open(CPUState *cs, gdb_syscall_complete_cb complete, ret = open(p, host_flags, mode); if (ret < 0) { + qemu_log_mask(LOG_GUEST_ERROR, "%s: failed to open %s\n", __func__, p); complete(cs, -1, errno); } else { int guestfd = alloc_guestfd();