From patchwork Fri Jan 17 13:42:20 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: 858170 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:cc8:b0:385:e875:8a9e with SMTP id dq8csp704482wrb; Fri, 17 Jan 2025 05:43:45 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUXmyWTl+aWaIyjZUXyaHHGXnyf1Mym1uYv4s61xtXMzZWw3obi/lDMx7cRBQqzPNjVbqFhiw==@linaro.org X-Google-Smtp-Source: AGHT+IFeFblwKHdtkFGbkKaPrsZLCFLr0bv7KIsPMZ2WLoDC3LMX0RPTrNCeFUd+cVbPPHvY+g/6 X-Received: by 2002:ac8:5814:0:b0:46a:2876:d667 with SMTP id d75a77b69052e-46e12a56144mr41537751cf.18.1737121425109; Fri, 17 Jan 2025 05:43:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737121425; cv=none; d=google.com; s=arc-20240605; b=eatm+bIk4jDDCCAwNY5AK+3f4YemY3aX5Jn+Rg6TIJ6EvFoPIBVAAQRXz+HbL2F/Vj FXgWLsyhXRn8b7ZNz0lZK/+YTaK8ngzQUhL+IQpzfo3ki0JvKXS/L1gdBWEz/JzMZTvG 8pX7Z474mWO+aXF1VdbG6R1Yk9PRpvSGErIQKcjCClfwfNIcq8yUT9JBa8wGv+aPfS3m tGs3cGuOtqu9cLKzTA41yzUHWnVTjeWYzsRnYN3oPF0CFB63Wqgzje4AMRlW/CWuJJHz 4iSlVM4yuA9Q2bR+ctnOObTbpDyWKNYUpvWx6wFMBVkc5rE3zsbGzJfciom+m/OIxk/U iORw== 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=SPhUiahc8AcG/DudZ+NnvJ9oGMqaRHCp9nDZpFVSZuQ=; fh=Gx9DtyNvQGBGx72Z12no3KggLYwBGD0Je53Cblw8uQs=; b=di2/h+/nRNpi7klMI/D0pMUmzMYUgWmloWRWbABAD/o2ftpSYfqF3DjOYIyAZsgCR4 35lNd6ZUUTe7A1pveEK1oM+qe4MubCZXXqYEs9Md2p3UHPg2E3FKD/xSQT6HDBno2LZb vNCPY2noCo4bJMstV+Spd/uI+fWvT2R/lvy3StVpX4ArsVob2OE+yjxS8A8G7KQR+nFD Vz8V7PpFj2wYVY6HKAL8lt2tIrZi9dRLtnUGQwxEU5qHs24iBsGBoxg7r4waiHxl0AxZ hioC84Ln5RcKC4tw/ghhoTHYnG6vyZHaFeW+bk3CbR0avlS2gqaNY2B+dVtTWrb70zI+ UhkQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QYRYaxln; 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 d75a77b69052e-46e102f2926si24198071cf.13.2025.01.17.05.43.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jan 2025 05:43: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=QYRYaxln; 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 1tYmd4-00014b-Ha; Fri, 17 Jan 2025 08:43:18 -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 1tYmcu-0000x9-JF for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:08 -0500 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYmcq-0002CP-7w for qemu-devel@nongnu.org; Fri, 17 Jan 2025 08:43:06 -0500 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-aa67ac42819so328466466b.0 for ; Fri, 17 Jan 2025 05:43:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737121378; x=1737726178; 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=SPhUiahc8AcG/DudZ+NnvJ9oGMqaRHCp9nDZpFVSZuQ=; b=QYRYaxlnaVtvi9VsrJl6JYzdghVQlTuNtC5Rrqe5skykCMHTWbbKQ31mhVgDthvY1b ylzNOv4rxFJbmgtTLQ90NKH88YsiYG/o8iVP604iQRI4kRYy2Vq9Ti72QN2iMwF/iC0U xBZpS5H1hJVK1yxUv3x9auZP3+wV01wkPw82nWB3MqTfhES/LwKAk4X/edJMwVbu87Rg 5AXvS+E1E9OXV69xEH+2jVsJLhJ3crA/3nq3PjZMPF27oGsjhE8JrmctLFdjnnIuDSOx Wu9C9YSTfEfSLs2Qr9B4wHQiuAhC/99vauOqIiqJHyX4Z85LAfLTZ7xJiMNkRwfcGX0m K4qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121378; x=1737726178; 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=SPhUiahc8AcG/DudZ+NnvJ9oGMqaRHCp9nDZpFVSZuQ=; b=l1uPKAGEr1tUS0JPE8u4YtYU0d+UhrKo3ARFpKlCQj4S3SgyEqHZ+PcV5Az2LuwNZn 4miFtGdV+z2FtUnJWFfDYJPxVmOPvQ5uzSe1n6bKpsFO20m8HolXfQHvEI99alwRqYjl WZQb39dRVJuIRtqUNBCabCU5/TDbQCynUdMlSMIc90pZps/sjTgGxrQbUbU2HvjNereu PPmzixPpfbz8hnYwRe60jAVBq3Nfz5wxnAQtXCOfSzojGkcXcqRBBKEH6bVTMRLSI/70 J7gS0F8otAAZ42qBtDN5AUkOyeMGR+xpG2jR4YsvawNDA/1YeVIa/CkAi5dgIqffHKMg GsXw== X-Gm-Message-State: AOJu0YwUteDWWV3lijE4HDX7BiJPANmtQJSwuNA9QrzBuTj9ZvlQ9mZ1 JaChwOJPFuci0ikiM3jLc8DX5gpHXAilNxQoyT+VnDO4eJVghE2lgY5eAJTHij7m2bi0pJ9fmFG AnWw= X-Gm-Gg: ASbGncsiTP0blQlFEv0xVf+Dvaelkv4QxBSCrHa0pTX+LfgX9nNKmDtQto94zIW47n+ zyKKM/4N695Imh9BZBJVleFfBsgaFif1AnD+WcH0/2g8xdkHti5StgktgZ946RxVnVeW0E8mYCk xbXaHq3ECqYGJX81KICr5XaF4iFl462deWmkG3FmJfOCMW6bQoK5SH4x6XgwHpKI5asPjjVSyCM z1+hOl+PBIf8jmfdnFQfFR/DIFMBTuJPMAEVfM9mpf1iySuHdldKwc= X-Received: by 2002:a17:906:6a20:b0:aac:23f4:f971 with SMTP id a640c23a62f3a-ab38b1b45e1mr280462566b.33.1737121378166; Fri, 17 Jan 2025 05:42:58 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab384f22fd2sm171481766b.110.2025.01.17.05.42.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:42:57 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id F1D386084C; Fri, 17 Jan 2025 13:42:56 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier Subject: [PULL 01/37] semihosting: add guest_error logging for failed opens Date: Fri, 17 Jan 2025 13:42:20 +0000 Message-Id: <20250117134256.2079356-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250117134256.2079356-1-alex.bennee@linaro.org> References: <20250117134256.2079356-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62a.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. Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-2-alex.bennee@linaro.org> 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();