From nobody Mon Feb 9 04:03:33 2026 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584317424; cv=none; d=zohomail.com; s=zohoarc; b=R6cIwIM/8pZr+/S4vz5ozEeho+TRONH2QyfSX0jfPsXo4j92I+tcMVPnwsZBz5V4qaKOd8Ve0wJ/83wZRWTLbMYTzzqbN+ecTec3TGwU1i16wmv6b6u2XYBZY4OcysGEDg4H8fKhg01L3KK1L3PKKAD1lbupmWPZ+JoX8WmqcT8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584317424; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=QIpLs9OctqCuKos7ZiUUzN2VPTQfmDm1r4MzNZjOnFQ=; b=j28iGFqM2LtOrpbsi2VnBaTV3MNugbooz3Srf+VzyPYXjmww6IJqBOIUQRbQArYRslmy9RV7kCNTTDFBMF8+9yOI3Vu+RbdOu0XDNBXNyFY07QxWIZcMncrjSBQAbEapOfqb+JqIy+jS898bEjBTfTu/VBMfQMYtDi+QClMgv4o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584317424571427.6154134212146; Sun, 15 Mar 2020 17:10:24 -0700 (PDT) Received: from localhost ([::1]:60562 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jDdKp-0006xz-AR for importer@patchew.org; Sun, 15 Mar 2020 20:10:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45339) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jDd9i-0003oH-Hi for qemu-devel@nongnu.org; Sun, 15 Mar 2020 19:58:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jDd9f-00045a-BM for qemu-devel@nongnu.org; Sun, 15 Mar 2020 19:58:53 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:21648 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jDd9f-00043b-6n for qemu-devel@nongnu.org; Sun, 15 Mar 2020 19:58:51 -0400 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-412-UK6YRZgBP-iVjpdHgUNKVw-1; Sun, 15 Mar 2020 19:58:27 -0400 Received: by mail-wm1-f69.google.com with SMTP id a23so5014557wmm.8 for ; Sun, 15 Mar 2020 16:58:27 -0700 (PDT) Received: from localhost.localdomain (191.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.191]) by smtp.gmail.com with ESMTPSA id p10sm90850559wrx.81.2020.03.15.16.58.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Mar 2020 16:58:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584316730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QIpLs9OctqCuKos7ZiUUzN2VPTQfmDm1r4MzNZjOnFQ=; b=YnBHgvM5k64AoOpqfTBJRQTWy8sYp96qEOVsYs7pOfEGhI/d7l3snQ92C1AQ33s7WPzd+p vrgaO6r6L03xgavih1A6c36zr8eHyN76Rmu2yPezglMdkvH4PQNoATwGkzqNyULtMQ9+b9 gomih7Gs+063d90VWytck6MgGMjzAKE= X-MC-Unique: UK6YRZgBP-iVjpdHgUNKVw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uY3oKl3eAdfHR0fz6PQrp/bV3LAJ2aY0H7iSeuB//0A=; b=YmS9XcQVI41JENx9F0fxM6nCQNaqfde5vJNub4XbsfYGYyjEIWCYTZP6slD0qQNlsO Sjzqmvdb6t7D/CQlm+cX3YZOZSQulXMOBseoaxW2L+X0NEHCgboIn/IVOPJLS0jv1g66 WqCn8qt832iEvDVaRRoRARpkT9utkvOsu3jUDsOMjmO53zK/oZXwslZq2XmzVyvBul6e DJNZCfypScvtJoO1bV74aGpC34jP4GmZtOl7tGRbpuhJUw+6sTgZtPIoibv44lyawy/B nhtY8Z1a1ndvluZdjMPfekLl/kRRHyuPdmEp+ebiVT58gCZ7qW7pcURBMUfJEFQmNwGO Jm4A== X-Gm-Message-State: ANhLgQ2AgZMQtBi53d1Q20w0quK9hSmcrwAAEzH50l9hNyY3UAP92Kio Idr+PfkcPTipY/Y0DH6X0l9vMFQZfgByxoLpHzapd3n1Gc3ITqF3EWg1v9ppxY2IyRyhhUJN1s5 z3zlqkPcH5DATazc= X-Received: by 2002:a1c:80d3:: with SMTP id b202mr9850983wmd.16.1584316706062; Sun, 15 Mar 2020 16:58:26 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuFSZ8a1xPKoAUJpUTBbcg8KqBFak+jSDu0iodws8OyRXOif1AhfUVCzYL+udH7kIdblowc1w== X-Received: by 2002:a1c:80d3:: with SMTP id b202mr9850950wmd.16.1584316705755; Sun, 15 Mar 2020 16:58:25 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 12/12] hw/core: Restrict CpuClass::get_crash_info() to system-mode Date: Mon, 16 Mar 2020 00:57:16 +0100 Message-Id: <20200315235716.28448-13-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200315235716.28448-1-philmd@redhat.com> References: <20200315235716.28448-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , Cornelia Huck , Richard Henderson , Laurent Vivier , qemu-s390x@nongnu.org, Alistair Francis , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/core/cpu.h | 7 ++++++- hw/core/cpu.c | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 73e9a869a4..48ab5ec3ed 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -492,6 +492,8 @@ bool cpu_paging_enabled(const CPUState *cpu); void cpu_get_memory_mapping(CPUState *cpu, MemoryMappingList *list, Error **errp); =20 +#if !defined(CONFIG_USER_ONLY) + /** * cpu_write_elf64_note: * @f: pointer to a function that writes memory to a file @@ -541,6 +543,8 @@ int cpu_write_elf32_qemunote(WriteCoreDumpFunction f, C= PUState *cpu, */ GuestPanicInformation *cpu_get_crash_info(CPUState *cpu); =20 +#endif /* !CONFIG_USER_ONLY */ + /** * CPUDumpFlags: * @CPU_DUMP_CODE: @@ -634,7 +638,8 @@ static inline int cpu_asidx_from_attrs(CPUState *cpu, M= emTxAttrs attrs) } return ret; } -#endif + +#endif /* CONFIG_USER_ONLY */ =20 /** * cpu_list_add: diff --git a/hw/core/cpu.c b/hw/core/cpu.c index fe65ca62ac..debdd7e670 100644 --- a/hw/core/cpu.c +++ b/hw/core/cpu.c @@ -209,6 +209,7 @@ static bool cpu_common_exec_interrupt(CPUState *cpu, in= t int_req) return false; } =20 +#if !defined(CONFIG_USER_ONLY) GuestPanicInformation *cpu_get_crash_info(CPUState *cpu) { CPUClass *cc =3D CPU_GET_CLASS(cpu); @@ -219,6 +220,7 @@ GuestPanicInformation *cpu_get_crash_info(CPUState *cpu) } return res; } +#endif =20 void cpu_dump_state(CPUState *cpu, FILE *f, int flags) { --=20 2.21.1