From nobody Sun Apr 28 23:40:20 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1529676704862431.910969661585; Fri, 22 Jun 2018 07:11:44 -0700 (PDT) Received: from localhost ([::1]:34267 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMmn-00056h-3h for importer@patchew.org; Fri, 22 Jun 2018 10:11:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWMOL-0002Qe-FU for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:46:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWMOH-00065D-KT for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:46:21 -0400 Received: from mail-qt0-x244.google.com ([2607:f8b0:400d:c0d::244]:38826) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWMOH-000657-GC for qemu-devel@nongnu.org; Fri, 22 Jun 2018 09:46:17 -0400 Received: by mail-qt0-x244.google.com with SMTP id e11-v6so5349299qtp.5 for ; Fri, 22 Jun 2018 06:46:17 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id m190-v6sm526161qkf.89.2018.06.22.06.46.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jun 2018 06:46:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=TMEXv0v25MuOkhGzO8Mc7t46tvtJ5z0J/CV7eZo/96E=; b=lVO9sEE2Nwg8ahXPXeBNB/Hg4BSa/nEghZFDJJj17GkQgJVninJrxyJi8fP8qyFA2k kCgZFbJz5BBd2dxwY8XMkwlkOEJJQ2C/Z7Ys1f8OiVa6RgdfB0yFVKTmWzB8VlJ+9p05 PaFzmW9LTr65CtxGoNsSuRsGo+0IyRI2WZuucCh2yes9s8gwbimyzS9JIRdfLiLutmFj wMmcJgDMJf3suDqv0NqbYrz/8qpVeqdLFyBPwhu1Ps5bDJIDLlfirQXevp2pHt7pv2UW xLiMpLWRbn0ZvhSLbiQcQtHd1jFooSsXEx1ToZAHdDvXNC6uTOy80D+2/jo5qt1sD0t7 K3sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=TMEXv0v25MuOkhGzO8Mc7t46tvtJ5z0J/CV7eZo/96E=; b=T4qejpTWEvmD8w31DRdPB1ENBwembb6u9hISDGkpaurNsOOGNfcCTqhpWgCxEkw6mU cZfho2Rp39SwPVxO39Ea23ZKMeGvn+SlJBZ9GkCPMwF33dJMtjL8hMZ6vQhtWhC8vnAz bC2cEaW9Zzuf0y3fAw3A84nAgvHnFdpi3ZUt77WTuvBFVFEY8hbCIn/Le3z8Vjyd6ibm xp25m+x89yT5U3qDA6uKhQfYw3ZDl1An9OdrK4Pa4fpvLv6fwtrheHmeH6Akde+j+eev WtU1Ryzl6Gj2AZ/Dp8topUXZR1z+GlcsLKBTcaJ61Srz7AkHuW+4mXqtuIZpNOR51h4c rxLg== X-Gm-Message-State: APt69E1ypZb4l0xL3xEj+Bm+8VmjOe6OW4hd8b3motrnP8etu7/f8E1c 4AQoFqzscolU+s53CywZhbc= X-Google-Smtp-Source: ADUXVKKtjqish1uNKJqaxerCZmGdpvM/ACjFwwtgPnMW1yKyFdf5dOY+uGKcQoY6UFwO37GluIZo1A== X-Received: by 2002:ac8:2659:: with SMTP id v25-v6mr1370814qtv.77.1529675176957; Fri, 22 Jun 2018 06:46:16 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Paolo Bonzini , Richard Henderson , Thomas Huth Date: Fri, 22 Jun 2018 10:46:10 -0300 Message-Id: <20180622134610.23713-1-f4bug@amsat.org> X-Mailer: git-send-email 2.18.0.rc2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::244 Subject: [Qemu-devel] [RFC PATCH] exec: Move hw_error() to the CPU namespace X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Crosthwaite , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 hw_error() is only meant for CPU errors (since it dumps the CPU state). Suggested-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- Thomas, do you think this is the correct place for this function? $ git grep hw_error hw/ | wc -l 145 work to do... Patchew will throw many errors :) Change suggested here: http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg06478.html include/exec/cpu-all.h | 9 +++++++++ include/hw/hw.h | 2 -- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 7fa726b8e3..467026da1b 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -345,4 +345,13 @@ int cpu_memory_rw_debug(CPUState *cpu, target_ulong ad= dr, =20 int cpu_exec(CPUState *cpu); =20 +/** + * hw_error: + * @fmt: printf-style format string + * @args: optional arguments for format string + * + * Report a CPU hardware error, dump the CPUs state, finally abort. + */ +void QEMU_NORETURN hw_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2); + #endif /* CPU_ALL_H */ diff --git a/include/hw/hw.h b/include/hw/hw.h index ab4950c312..65fa6d32f8 100644 --- a/include/hw/hw.h +++ b/include/hw/hw.h @@ -15,6 +15,4 @@ #include "qemu/module.h" #include "sysemu/reset.h" =20 -void QEMU_NORETURN hw_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2); - #endif --=20 2.18.0.rc2