From patchwork Wed Dec 7 17:41:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 13067465 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 20EACC352A1 for ; Wed, 7 Dec 2022 17:42:33 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2yQS-0004dO-8o; Wed, 07 Dec 2022 12:41:44 -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 1p2yQQ-0004cu-6w for qemu-devel@nongnu.org; Wed, 07 Dec 2022 12:41:42 -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 1p2yQO-0001o4-GW for qemu-devel@nongnu.org; Wed, 07 Dec 2022 12:41:41 -0500 Received: by mail-wm1-x334.google.com with SMTP id n9-20020a05600c3b8900b003d0944dba41so1613102wms.4 for ; Wed, 07 Dec 2022 09:41:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=HprJgxpG2xWV0l1kcFBdaZiE2sB4TDOLYNMLAL73SA4=; b=nCmn0kA4q53OJwwr/afzFMrpn4JqrHcOCXhhWEQz9tS60mFP08JAjhfQI0rUCYyq7Y BAn56lddQ5m4PSHbyRiN1RMkl7blEcfRYeO6jkWa+E39tQ0QOHoP++P6IIjhNHNIQitK rEbO8NgwUjWBvUBIorzjPFUuorswpULfJgj0/eqCJMIbElTar74bZiJZfsUulXph/YiR LJIlgjDKXxv2QE10F9Fap1glaajxKAhe+lCJ4hMaQ9LaSXRDxd5no5JzPpMgdcz9Pm+H XBEqleyu/6svC+dfh+C0cacXCCaJkNh+fYarDK1vh09VFAuwvbe24NDOWcNIxv1c3OB1 hd3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=HprJgxpG2xWV0l1kcFBdaZiE2sB4TDOLYNMLAL73SA4=; b=XkBqYDTJvFCH9J47P5+Q4tCki6LYuM9gk8n12Y1rVfkpyeT8wsx4DmF0tT4zP6W69f TYAKnQFvfnf538xrX9cKTOuReJFFAej7+2/BVZv7lx7M6dZH2fkCPx55mPS2/CEMzNVU uDy1wZ9gUNZxiHG1CPjE6jAqcwmtJOR+hcWSx4zKCWRE45XNzIMTjw1ldfsJ2+G97pVc JN/iByTNWL0Y4z//XpG/jC3Gd6VSOjm2A48wejtoZ04NgL25feXt4yQGuBAx+LE5vmxa kjYWuCDUReKQnGgd3EMsQP8EhSPs0pNb69inRoaFlB+TxKIfFMyh9LHkpvJjKNUED/17 stuw== X-Gm-Message-State: ANoB5pk6kSyNHpM3NM8IdZbSRo8j7qHNIMB42RcPHBiVaqL456ddof7l XeSF9Oe3miamf9xKFxDxBaj4IbWDTeGgHDgs0q8= X-Google-Smtp-Source: AA0mqf4kowpRLozhNa42OXs7AX4FjZCJgcAdfWv/dInE44Jmd1NHzMmiJ7Y2m+1wPMY4SNfLftfDoA== X-Received: by 2002:a05:600c:1907:b0:3cf:7981:9a7 with SMTP id j7-20020a05600c190700b003cf798109a7mr66799556wmq.87.1670434898527; Wed, 07 Dec 2022 09:41:38 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id z5-20020a05600c0a0500b003b4cba4ef71sm3063858wmp.41.2022.12.07.09.41.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Dec 2022 09:41:38 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Stafford Horne , =?utf-8?q?Alex_Benn=C3=A9e?= , Yoshinori Sato , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Marek Vasut , Laurent Vivier , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Yanan Wang , Mark Cave-Ayland , Fabiano Rosas , Daniel Henrique Barboza , Richard Henderson , Paolo Bonzini , Marcel Apfelbaum , Max Filippov , Greg Kurz , Artyom Tarasenko , Anton Johansson , qemu-ppc@nongnu.org, Chris Wulff , "Edgar E. Iglesias" , David Gibson Subject: [PATCH-for-8.0 1/4] cputlb: Restrict SavedIOTLB to system emulation Date: Wed, 7 Dec 2022 18:41:26 +0100 Message-Id: <20221207174129.77593-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221207174129.77593-1-philmd@linaro.org> References: <20221207174129.77593-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@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, SPF_PASS=-0.001 autolearn=unavailable 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Commit 2f3a57ee47 ("cputlb: ensure we save the IOTLB data in case of reset") added the SavedIOTLB structure -- which is system emulation specific -- in the generic CPUState structure. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/cputlb.c | 4 ++-- include/hw/core/cpu.h | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 6f1c00682b..0ea96fbcdf 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -1395,7 +1395,7 @@ static uint64_t io_readx(CPUArchState *env, CPUTLBEntryFull *full, static void save_iotlb_data(CPUState *cs, MemoryRegionSection *section, hwaddr mr_offset) { -#ifdef CONFIG_PLUGIN +#if defined(CONFIG_PLUGIN) && !defined(CONFIG_USER_ONLY) SavedIOTLB *saved = &cs->saved_iotlb; saved->section = section; saved->mr_offset = mr_offset; @@ -1699,7 +1699,7 @@ tb_page_addr_t get_page_addr_code_hostp(CPUArchState *env, target_ulong addr, return qemu_ram_addr_from_host_nofail(p); } -#ifdef CONFIG_PLUGIN +#if defined(CONFIG_PLUGIN) && !defined(CONFIG_USER_ONLY) /* * Perform a TLB lookup and populate the qemu_plugin_hwaddr structure. * This should be a hot path as we will have just looked this path up diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 8830546121..bc3229ae13 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -222,7 +222,7 @@ struct CPUWatchpoint { QTAILQ_ENTRY(CPUWatchpoint) entry; }; -#ifdef CONFIG_PLUGIN +#if defined(CONFIG_PLUGIN) && !defined(CONFIG_USER_ONLY) /* * For plugins we sometime need to save the resolved iotlb data before * the memory regions get moved around by io_writex. @@ -406,9 +406,11 @@ struct CPUState { #ifdef CONFIG_PLUGIN GArray *plugin_mem_cbs; +#if !defined(CONFIG_USER_ONLY) /* saved iotlb data from io_writex */ SavedIOTLB saved_iotlb; -#endif +#endif /* !CONFIG_USER_ONLY */ +#endif /* CONFIG_PLUGIN */ /* TODO Move common fields from CPUArchState here. */ int cpu_index; From patchwork Wed Dec 7 17:41:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 13067467 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7060DC352A1 for ; Wed, 7 Dec 2022 17:42:52 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2yQW-0004gj-SO; Wed, 07 Dec 2022 12:41:48 -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 1p2yQV-0004dt-F0 for qemu-devel@nongnu.org; Wed, 07 Dec 2022 12:41:47 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p2yQT-0001ol-Qn for qemu-devel@nongnu.org; Wed, 07 Dec 2022 12:41:47 -0500 Received: by mail-wm1-x32c.google.com with SMTP id p13-20020a05600c468d00b003cf8859ed1bso1616381wmo.1 for ; Wed, 07 Dec 2022 09:41:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=J5B6vDbFr2pk0CR4IzEviq/2sUbcV4f8oxGB7SYBHu8=; b=dvBcbiDFNmEiNHSYU0n7hzKF+tbxKOmppgPgU7/uN5amTMB+ea3Yug/IeP6T6IqcW0 1tC6uw++qALtsXpAxfoFERdQ/Pt7XBkpXg9woogM0YDjdjVTKaFqsSLfr0W9gKPld4ed vtDIlPCSK3Ftvp87Jq0RZr1Zyttc62GUm6Nobu6SRGxm1hIIZ57Xmd/z12QNISMUsyF4 RiwfkPUBeW/5Y00u8GUJKcZVJ1U4XOAmLmlO870D1lOGNiHNY0MC4qh45j4jT55/ggy8 pWM98HPBwJMq7abRlgKFN9EvRh6PVtDdtuRE0XOFxv4ziGRfa0svKv8lVthnI3yQAbwS i7kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=J5B6vDbFr2pk0CR4IzEviq/2sUbcV4f8oxGB7SYBHu8=; b=tIxZN1yAilcWVE7NiaB/7MfPkMy7S2RbxkSS5YNvbvCX7xLNPCrZhM+qqc+TFq+TAO LOPLJ7J+/15LhmpwFfwtrfT2Exyb8ajWCrzV+VRqd1ziF6/ozUEtGXmZI6H8zrdvZm2i KQK+NmHFBoJx78PblgtxQtnN6Fe7+8wAv7DR6kGINKhtxhyrb2YNTTNRkOhjVN8168st HUIB//ptfnLXLnPbNOiEr0PowNM492jMGrTETnS69Oqsw7VCu7KH9PNvTXxxYJd4LyNd 7bGVtDufXOKLmG3ZRo5jfSeknKhfZe9orpihDLtYCs2uJbzvvcRAQxaHtDKoW7c1A5eH AaoQ== X-Gm-Message-State: ANoB5pl69yd+P8+SZGKd4dTBtPJibPBtY1+ijc6DsV1x0tmj4Oy77L4S 0nkzrh67rJeMMUeqhGmtsX8WFSOLJqJZ890q4gU= X-Google-Smtp-Source: AA0mqf4i/t38pK4+O+hAvlPNuUNdfqhbD/+a4JcLmYEN4Rj28AOjOkxueP0TxC3YcuUxno4mWmb+JQ== X-Received: by 2002:a7b:ce0e:0:b0:3d1:cae5:efe9 with SMTP id m14-20020a7bce0e000000b003d1cae5efe9mr10723461wmc.158.1670434904326; Wed, 07 Dec 2022 09:41:44 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id n20-20020a05600c3b9400b003cfd10a33afsm2846992wms.11.2022.12.07.09.41.42 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Dec 2022 09:41:43 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Stafford Horne , =?utf-8?q?Alex_Benn=C3=A9e?= , Yoshinori Sato , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Marek Vasut , Laurent Vivier , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Yanan Wang , Mark Cave-Ayland , Fabiano Rosas , Daniel Henrique Barboza , Richard Henderson , Paolo Bonzini , Marcel Apfelbaum , Max Filippov , Greg Kurz , Artyom Tarasenko , Anton Johansson , qemu-ppc@nongnu.org, Chris Wulff , "Edgar E. Iglesias" , David Gibson Subject: [PATCH-for-8.0 2/4] gdbstub: Use vaddr type for generic insert/remove_breakpoint() API Date: Wed, 7 Dec 2022 18:41:27 +0100 Message-Id: <20221207174129.77593-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221207174129.77593-1-philmd@linaro.org> References: <20221207174129.77593-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Both insert/remove_breakpoint() handlers are used in system and user emulation. We can not use the 'hwaddr' type on user emulation, we have to use 'vaddr' which is defined as "wide enough to contain any #target_ulong virtual address". Signed-off-by: Philippe Mathieu-Daudé --- gdbstub/internals.h | 6 ++++-- include/sysemu/accel-ops.h | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/gdbstub/internals.h b/gdbstub/internals.h index eabb0341d1..b23999f951 100644 --- a/gdbstub/internals.h +++ b/gdbstub/internals.h @@ -9,9 +9,11 @@ #ifndef _INTERNALS_H_ #define _INTERNALS_H_ +#include "exec/cpu-common.h" + bool gdb_supports_guest_debug(void); -int gdb_breakpoint_insert(CPUState *cs, int type, hwaddr addr, hwaddr len); -int gdb_breakpoint_remove(CPUState *cs, int type, hwaddr addr, hwaddr len); +int gdb_breakpoint_insert(CPUState *cs, int type, vaddr addr, vaddr len); +int gdb_breakpoint_remove(CPUState *cs, int type, vaddr addr, vaddr len); void gdb_breakpoint_remove_all(CPUState *cs); #endif /* _INTERNALS_H_ */ diff --git a/include/sysemu/accel-ops.h b/include/sysemu/accel-ops.h index 8cc7996def..30690c71bd 100644 --- a/include/sysemu/accel-ops.h +++ b/include/sysemu/accel-ops.h @@ -10,7 +10,7 @@ #ifndef ACCEL_OPS_H #define ACCEL_OPS_H -#include "exec/hwaddr.h" +#include "exec/cpu-common.h" #include "qom/object.h" #define ACCEL_OPS_SUFFIX "-ops" @@ -48,8 +48,8 @@ struct AccelOpsClass { /* gdbstub hooks */ bool (*supports_guest_debug)(void); - int (*insert_breakpoint)(CPUState *cpu, int type, hwaddr addr, hwaddr len); - int (*remove_breakpoint)(CPUState *cpu, int type, hwaddr addr, hwaddr len); + int (*insert_breakpoint)(CPUState *cpu, int type, vaddr addr, vaddr len); + int (*remove_breakpoint)(CPUState *cpu, int type, vaddr addr, vaddr len); void (*remove_all_breakpoints)(CPUState *cpu); }; From patchwork Wed Dec 7 17:41:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 13067469 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2D790C352A1 for ; Wed, 7 Dec 2022 17:43:25 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2yQd-0004mc-3e; Wed, 07 Dec 2022 12:41:55 -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 1p2yQb-0004lY-N3 for qemu-devel@nongnu.org; Wed, 07 Dec 2022 12:41:53 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p2yQZ-0001pc-LM for qemu-devel@nongnu.org; Wed, 07 Dec 2022 12:41:53 -0500 Received: by mail-wr1-x433.google.com with SMTP id bx10so29192517wrb.0 for ; Wed, 07 Dec 2022 09:41:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=/wW9LiFCKARmD4hRBz59RrV0Rj+GlZgz9wI66xG8a8k=; b=ZuQYvQZ57M+RPvJSxIlpK42hQIasrTkRbGc1sUqxHEoECZ4N8dm7C5h9FerjWXyD7E vT17s28Yo8FCiThWu+HMwNTZGU5RPDVfBL6kKdqrQXh1gsVtfyjgmvNtar6kF5hrzrZn rCccgvsfDQ+xcPTZiN03uYJGsYZ85ZcfdWKa+Zusqaf5J6cUDXh72Vlz/Fu1Kt7p39/x OKHlh0Cw0IHaqOU3JVVBHuNSiLl6iMG3MrtPrjvToVGDASfiF/1gZA3VBrLt+h4M8LfV qfSTE4rcVq20Kz7qaQdOv0m8W/XxIiYpm9aaWfbVhvd3fUkXfuNXs7yqLsyXmxonEfOO vxwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=/wW9LiFCKARmD4hRBz59RrV0Rj+GlZgz9wI66xG8a8k=; b=6UrK6nWbJdbbWL3fwhCfLo/iANwfAql/08hrHeG0cgnbuwFoO85F1f+nyUAib/CMJF MoC2dzWF2VUWB6v6KebBhQXjsODA3i20CH/SiwvFaiNVGr7fKTC1lnveLeFfKz0SYsTm KCRRi+huu0QXo8KjRRwqT5SEi41JqlxMO5SOGP5P3XjCXvzKZTljX6QAoOUmRB9o+hOE 4QIj/b3StR2idjTqPScbxVWeAshDNAw/0eLOAraSMw/ksYf9/Y1Jqx3LD0cwO6rzefnE GJqSu3Fi/jxUBSBZ/M30VBWXzpG8Xyq7pmZxFuvwpWjYtoAD2zuzsZ7C36DzQ6cdF68g a/Zg== X-Gm-Message-State: ANoB5pncn4/Sua7zjg/fnEqpHkXWkc+O0zyojrRR1H0XHdeHXzV1I58h ugX7k9neNG1HgiawT9S7W7TFNrdFXKg1oQ0g2A0= X-Google-Smtp-Source: AA0mqf4xs1PGDzN5GRvKvnkq+2uMf0QMWHMyIZMOgzCfcIKDpcSR2SgkmXmLEMhIzFWornp/W9W5ow== X-Received: by 2002:adf:dfc7:0:b0:242:5122:fea6 with SMTP id q7-20020adfdfc7000000b002425122fea6mr11182173wrn.387.1670434909926; Wed, 07 Dec 2022 09:41:49 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id n13-20020a05600c4f8d00b003cfd64b6be1sm3548335wmq.27.2022.12.07.09.41.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Dec 2022 09:41:49 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Stafford Horne , =?utf-8?q?Alex_Benn=C3=A9e?= , Yoshinori Sato , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Marek Vasut , Laurent Vivier , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Yanan Wang , Mark Cave-Ayland , Fabiano Rosas , Daniel Henrique Barboza , Richard Henderson , Paolo Bonzini , Marcel Apfelbaum , Max Filippov , Greg Kurz , Artyom Tarasenko , Anton Johansson , qemu-ppc@nongnu.org, Chris Wulff , "Edgar E. Iglesias" , David Gibson Subject: [PATCH-for-8.0 3/4] target/cpu: Restrict cpu_get_phys_page_debug() handlers to sysemu Date: Wed, 7 Dec 2022 18:41:28 +0100 Message-Id: <20221207174129.77593-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221207174129.77593-1-philmd@linaro.org> References: <20221207174129.77593-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.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=unavailable 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org cpu_get_phys_page_debug() is a system-emulation specific handler. Signed-off-by: Philippe Mathieu-Daudé --- target/alpha/cpu.h | 2 +- target/cris/cpu.h | 3 +-- target/hppa/cpu.h | 2 +- target/m68k/cpu.h | 2 +- target/nios2/cpu.h | 2 +- target/openrisc/cpu.h | 3 ++- target/ppc/cpu.h | 2 +- target/rx/cpu.h | 2 +- target/rx/helper.c | 4 ++-- target/sh4/cpu.h | 2 +- target/sparc/cpu.h | 3 ++- target/xtensa/cpu.h | 2 +- 12 files changed, 15 insertions(+), 14 deletions(-) diff --git a/target/alpha/cpu.h b/target/alpha/cpu.h index d0abc949a8..5e67304d81 100644 --- a/target/alpha/cpu.h +++ b/target/alpha/cpu.h @@ -276,9 +276,9 @@ extern const VMStateDescription vmstate_alpha_cpu; void alpha_cpu_do_interrupt(CPUState *cpu); bool alpha_cpu_exec_interrupt(CPUState *cpu, int int_req); +hwaddr alpha_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); #endif /* !CONFIG_USER_ONLY */ void alpha_cpu_dump_state(CPUState *cs, FILE *f, int flags); -hwaddr alpha_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); int alpha_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int alpha_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); diff --git a/target/cris/cpu.h b/target/cris/cpu.h index e6776f25b1..71fa1f96e0 100644 --- a/target/cris/cpu.h +++ b/target/cris/cpu.h @@ -193,12 +193,11 @@ bool cris_cpu_exec_interrupt(CPUState *cpu, int int_req); bool cris_cpu_tlb_fill(CPUState *cs, vaddr address, int size, MMUAccessType access_type, int mmu_idx, bool probe, uintptr_t retaddr); +hwaddr cris_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); #endif void cris_cpu_dump_state(CPUState *cs, FILE *f, int flags); -hwaddr cris_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); - int crisv10_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int cris_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int cris_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h index 6f3b6beecf..b595ef25a9 100644 --- a/target/hppa/cpu.h +++ b/target/hppa/cpu.h @@ -322,11 +322,11 @@ static inline void cpu_hppa_change_prot_id(CPUHPPAState *env) { } void cpu_hppa_change_prot_id(CPUHPPAState *env); #endif -hwaddr hppa_cpu_get_phys_page_debug(CPUState *cs, vaddr addr); int hppa_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int hppa_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); void hppa_cpu_dump_state(CPUState *cs, FILE *f, int); #ifndef CONFIG_USER_ONLY +hwaddr hppa_cpu_get_phys_page_debug(CPUState *cs, vaddr addr); bool hppa_cpu_tlb_fill(CPUState *cs, vaddr address, int size, MMUAccessType access_type, int mmu_idx, bool probe, uintptr_t retaddr); diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h index 3a9cfe2f33..68ed531fc3 100644 --- a/target/m68k/cpu.h +++ b/target/m68k/cpu.h @@ -176,9 +176,9 @@ struct ArchCPU { #ifndef CONFIG_USER_ONLY void m68k_cpu_do_interrupt(CPUState *cpu); bool m68k_cpu_exec_interrupt(CPUState *cpu, int int_req); +hwaddr m68k_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); #endif /* !CONFIG_USER_ONLY */ void m68k_cpu_dump_state(CPUState *cpu, FILE *f, int flags); -hwaddr m68k_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); int m68k_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int m68k_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); diff --git a/target/nios2/cpu.h b/target/nios2/cpu.h index f85581ee56..2f43b67a8f 100644 --- a/target/nios2/cpu.h +++ b/target/nios2/cpu.h @@ -262,7 +262,6 @@ void nios2_tcg_init(void); void nios2_cpu_do_interrupt(CPUState *cs); void dump_mmu(CPUNios2State *env); void nios2_cpu_dump_state(CPUState *cpu, FILE *f, int flags); -hwaddr nios2_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); G_NORETURN void nios2_cpu_do_unaligned_access(CPUState *cpu, vaddr addr, MMUAccessType access_type, int mmu_idx, uintptr_t retaddr); @@ -288,6 +287,7 @@ static inline int cpu_mmu_index(CPUNios2State *env, bool ifetch) } #ifndef CONFIG_USER_ONLY +hwaddr nios2_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); bool nios2_cpu_tlb_fill(CPUState *cs, vaddr address, int size, MMUAccessType access_type, int mmu_idx, bool probe, uintptr_t retaddr); diff --git a/target/openrisc/cpu.h b/target/openrisc/cpu.h index 1d5efa5ca2..31a4ae5ad3 100644 --- a/target/openrisc/cpu.h +++ b/target/openrisc/cpu.h @@ -312,7 +312,6 @@ struct ArchCPU { void cpu_openrisc_list(void); void openrisc_cpu_dump_state(CPUState *cpu, FILE *f, int flags); -hwaddr openrisc_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); int openrisc_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int openrisc_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); void openrisc_translate_init(void); @@ -321,6 +320,8 @@ int print_insn_or1k(bfd_vma addr, disassemble_info *info); #define cpu_list cpu_openrisc_list #ifndef CONFIG_USER_ONLY +hwaddr openrisc_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); + bool openrisc_cpu_tlb_fill(CPUState *cs, vaddr address, int size, MMUAccessType access_type, int mmu_idx, bool probe, uintptr_t retaddr); diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 81d4263a07..6a7a8634da 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -1346,12 +1346,12 @@ static inline bool vhyp_cpu_in_nested(PowerPCCPU *cpu) #endif /* CONFIG_USER_ONLY */ void ppc_cpu_dump_state(CPUState *cpu, FILE *f, int flags); -hwaddr ppc_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); int ppc_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int ppc_cpu_gdb_read_register_apple(CPUState *cpu, GByteArray *buf, int reg); int ppc_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); int ppc_cpu_gdb_write_register_apple(CPUState *cpu, uint8_t *buf, int reg); #ifndef CONFIG_USER_ONLY +hwaddr ppc_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); void ppc_gdb_gen_spr_xml(PowerPCCPU *cpu); const char *ppc_gdb_get_dynamic_xml(CPUState *cs, const char *xml_name); #endif diff --git a/target/rx/cpu.h b/target/rx/cpu.h index 5655dffeff..555d230f24 100644 --- a/target/rx/cpu.h +++ b/target/rx/cpu.h @@ -123,11 +123,11 @@ const char *rx_crname(uint8_t cr); #ifndef CONFIG_USER_ONLY void rx_cpu_do_interrupt(CPUState *cpu); bool rx_cpu_exec_interrupt(CPUState *cpu, int int_req); +hwaddr rx_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); #endif /* !CONFIG_USER_ONLY */ void rx_cpu_dump_state(CPUState *cpu, FILE *f, int flags); int rx_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int rx_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); -hwaddr rx_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); void rx_translate_init(void); void rx_cpu_list(void); diff --git a/target/rx/helper.c b/target/rx/helper.c index f34945e7e2..dad5fb4976 100644 --- a/target/rx/helper.c +++ b/target/rx/helper.c @@ -144,9 +144,9 @@ bool rx_cpu_exec_interrupt(CPUState *cs, int interrupt_request) return false; } -#endif /* !CONFIG_USER_ONLY */ - hwaddr rx_cpu_get_phys_page_debug(CPUState *cs, vaddr addr) { return addr; } + +#endif /* !CONFIG_USER_ONLY */ diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h index 727b829598..02bfd612ea 100644 --- a/target/sh4/cpu.h +++ b/target/sh4/cpu.h @@ -214,7 +214,6 @@ struct ArchCPU { void superh_cpu_dump_state(CPUState *cpu, FILE *f, int flags); -hwaddr superh_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); int superh_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int superh_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); G_NORETURN void superh_cpu_do_unaligned_access(CPUState *cpu, vaddr addr, @@ -225,6 +224,7 @@ void sh4_translate_init(void); void sh4_cpu_list(void); #if !defined(CONFIG_USER_ONLY) +hwaddr superh_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); bool superh_cpu_tlb_fill(CPUState *cs, vaddr address, int size, MMUAccessType access_type, int mmu_idx, bool probe, uintptr_t retaddr); diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index e478c5eb16..ed0069d0b1 100644 --- a/target/sparc/cpu.h +++ b/target/sparc/cpu.h @@ -569,10 +569,11 @@ struct ArchCPU { #ifndef CONFIG_USER_ONLY extern const VMStateDescription vmstate_sparc_cpu; + +hwaddr sparc_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); #endif void sparc_cpu_do_interrupt(CPUState *cpu); -hwaddr sparc_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); int sparc_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int sparc_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); G_NORETURN void sparc_cpu_do_unaligned_access(CPUState *cpu, vaddr addr, diff --git a/target/xtensa/cpu.h b/target/xtensa/cpu.h index 579adcb769..b7a54711a6 100644 --- a/target/xtensa/cpu.h +++ b/target/xtensa/cpu.h @@ -576,9 +576,9 @@ void xtensa_cpu_do_transaction_failed(CPUState *cs, hwaddr physaddr, vaddr addr, unsigned size, MMUAccessType access_type, int mmu_idx, MemTxAttrs attrs, MemTxResult response, uintptr_t retaddr); +hwaddr xtensa_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); #endif void xtensa_cpu_dump_state(CPUState *cpu, FILE *f, int flags); -hwaddr xtensa_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); void xtensa_count_regs(const XtensaConfig *config, unsigned *n_regs, unsigned *n_core_regs); int xtensa_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); From patchwork Wed Dec 7 17:41:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 13067466 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EDBFAC352A1 for ; Wed, 7 Dec 2022 17:42:47 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2yQk-0004oR-Ey; Wed, 07 Dec 2022 12:42:02 -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 1p2yQi-0004nb-5s for qemu-devel@nongnu.org; Wed, 07 Dec 2022 12:42:00 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p2yQf-0001qO-P5 for qemu-devel@nongnu.org; Wed, 07 Dec 2022 12:41:59 -0500 Received: by mail-wm1-x333.google.com with SMTP id h8-20020a1c2108000000b003d1efd60b65so1583425wmh.0 for ; Wed, 07 Dec 2022 09:41:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=ZuF4jChtlBjy8dKWVe0vYW0pjpjwZ/qKs1pftyTULhE=; b=SWdz9S6GTpIenAcILzP3y+oCJ/lzotkU8ZgyPSAEvGhy4ywM2Z9mP6ZcAQk648axNz s8DaHB1Pr6WSeSHn50RQOFPmG+xRqPkNqRLpstUvbPTAb/OWgljplMqudc0K009kzEzp XN/JF1vtuvwpXD9Fjtza+ac6wA+6jP5A/huFwQwsKWkk/Nf9QCdTYXgR5U+Rha8x+RfS y125jO09kT3gwHy9I8TVcsXXcmkw4RT56HVQ/hmzeTSamWXH3ie69TjxOI7LI2uf8mmM w6oMRgGI6Yx3HWH3GFSADPSR0JhTD9zoDcnue9tyvwU13g5yW5D8g3TamIELD4zA4lDT WU2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=ZuF4jChtlBjy8dKWVe0vYW0pjpjwZ/qKs1pftyTULhE=; b=drUWlHXCpEzHq/Q0qkasDY2PpnoE6ot1gIr90UCfVFTQ5Yx1vS0BKCOwCOgBURiPdo btt0+HA8xv6WBEq+jp10LLB7T8wpILMHs3pcUAGpN5ivsw0gVNwbiX02oJbNUAaU2wfe qqP/kGkLpYbtsLokqD7bwKM2JC7i3H3+pNOTH40DDci67PrVSDCGyhzFoHn7NUXYce9W EOvqLgad0dGdDTLgtt9GqZ/5ViindpGK9wjWKbLK/XAD5568Fcwh0QHgB7+FAZIKLPUH BfiHUO/+z7E/LSsvb0rgxrANboFvidOzxyRvMHfv5Vn0tTKnaWOclSNdeUJuKbsh+52d voYA== X-Gm-Message-State: ANoB5plBywfsjV2dcGZxdQxWvONwh6KMZbRwVG7H+DyEJi/b/5hwKQIf vMMC0zvDIJZ5rx/3ciD6H7nVgqoYliOni2ik4qQ= X-Google-Smtp-Source: AA0mqf5NEUZJ+Ic35k42n8JSQpTo4xgjqzw/oUBWagKHR7ZAISkiph5pwC/V13IGSV43+XPP/88NGA== X-Received: by 2002:a7b:cd18:0:b0:3cf:a359:de90 with SMTP id f24-20020a7bcd18000000b003cfa359de90mr57232322wmj.122.1670434915922; Wed, 07 Dec 2022 09:41:55 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id b40-20020a05600c4aa800b003cf6a55d8e8sm2317046wmp.7.2022.12.07.09.41.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Dec 2022 09:41:55 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Stafford Horne , =?utf-8?q?Alex_Benn=C3=A9e?= , Yoshinori Sato , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Marek Vasut , Laurent Vivier , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Yanan Wang , Mark Cave-Ayland , Fabiano Rosas , Daniel Henrique Barboza , Richard Henderson , Paolo Bonzini , Marcel Apfelbaum , Max Filippov , Greg Kurz , Artyom Tarasenko , Anton Johansson , qemu-ppc@nongnu.org, Chris Wulff , "Edgar E. Iglesias" , David Gibson Subject: [PATCH-for-8.0 4/4] target/sparc: Cleanup around sparc_cpu_do_unaligned_access() Date: Wed, 7 Dec 2022 18:41:29 +0100 Message-Id: <20221207174129.77593-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221207174129.77593-1-philmd@linaro.org> References: <20221207174129.77593-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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=unavailable 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Commit caac44a52a ("target/sparc: Make sparc_cpu_tlb_fill sysemu only") restricted mmu_helper.c to system emulation. Checking whether CONFIG_USER_ONLY is defined is now pointless. Signed-off-by: Philippe Mathieu-Daudé --- target/sparc/mmu_helper.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/sparc/mmu_helper.c b/target/sparc/mmu_helper.c index 919448a494..a7e51e4b7d 100644 --- a/target/sparc/mmu_helper.c +++ b/target/sparc/mmu_helper.c @@ -924,7 +924,6 @@ hwaddr sparc_cpu_get_phys_page_debug(CPUState *cs, vaddr addr) return phys_addr; } -#ifndef CONFIG_USER_ONLY G_NORETURN void sparc_cpu_do_unaligned_access(CPUState *cs, vaddr addr, MMUAccessType access_type, int mmu_idx, @@ -942,4 +941,3 @@ G_NORETURN void sparc_cpu_do_unaligned_access(CPUState *cs, vaddr addr, cpu_raise_exception_ra(env, TT_UNALIGNED, retaddr); } -#endif /* !CONFIG_USER_ONLY */