From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Eduardo Habkost" <eduardo@habkost.net>,
"Stafford Horne" <shorne@gmail.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Yoshinori Sato" <ysato@users.sourceforge.jp>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Marek Vasut" <marex@denx.de>,
"Laurent Vivier" <laurent@vivier.eu>,
"Cédric Le Goater" <clg@kaod.org>,
"Yanan Wang" <wangyanan55@huawei.com>,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
"Fabiano Rosas" <farosas@linux.ibm.com>,
"Daniel Henrique Barboza" <danielhb413@gmail.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Max Filippov" <jcmvbkbc@gmail.com>, "Greg Kurz" <groug@kaod.org>,
"Artyom Tarasenko" <atar4qemu@gmail.com>,
"Anton Johansson" <anjo@rev.ng>,
qemu-ppc@nongnu.org, "Chris Wulff" <crwulff@gmail.com>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
"David Gibson" <david@gibson.dropbear.id.au>
Subject: [PATCH-for-8.0 1/4] cputlb: Restrict SavedIOTLB to system emulation
Date: Wed, 7 Dec 2022 18:41:26 +0100 [thread overview]
Message-ID: <20221207174129.77593-2-philmd@linaro.org> (raw)
In-Reply-To: <20221207174129.77593-1-philmd@linaro.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é <philmd@linaro.org>
---
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;
--
2.38.1
next prev parent reply other threads:[~2022-12-07 17:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-07 17:41 [PATCH-for-8.0 0/4] target/cpu: System/User cleanups around hwaddr/vaddr Philippe Mathieu-Daudé
2022-12-07 17:41 ` Philippe Mathieu-Daudé [this message]
2022-12-08 8:40 ` [PATCH-for-8.0 1/4] cputlb: Restrict SavedIOTLB to system emulation Alex Bennée
2022-12-08 10:00 ` Philippe Mathieu-Daudé
2022-12-07 17:41 ` [PATCH-for-8.0 2/4] gdbstub: Use vaddr type for generic insert/remove_breakpoint() API Philippe Mathieu-Daudé
2022-12-07 18:08 ` Fabiano Rosas
2022-12-07 18:17 ` Philippe Mathieu-Daudé
2022-12-07 18:23 ` Peter Maydell
2022-12-07 18:27 ` Philippe Mathieu-Daudé
2022-12-07 20:15 ` Peter Maydell
2022-12-08 9:59 ` Philippe Mathieu-Daudé
2022-12-07 17:41 ` [PATCH-for-8.0 3/4] target/cpu: Restrict cpu_get_phys_page_debug() handlers to sysemu Philippe Mathieu-Daudé
2022-12-07 17:41 ` [PATCH-for-8.0 4/4] target/sparc: Cleanup around sparc_cpu_do_unaligned_access() Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221207174129.77593-2-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=anjo@rev.ng \
--cc=atar4qemu@gmail.com \
--cc=clg@kaod.org \
--cc=crwulff@gmail.com \
--cc=danielhb413@gmail.com \
--cc=david@gibson.dropbear.id.au \
--cc=edgar.iglesias@gmail.com \
--cc=eduardo@habkost.net \
--cc=farosas@linux.ibm.com \
--cc=groug@kaod.org \
--cc=jcmvbkbc@gmail.com \
--cc=laurent@vivier.eu \
--cc=marcel.apfelbaum@gmail.com \
--cc=marex@denx.de \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=shorne@gmail.com \
--cc=wangyanan55@huawei.com \
--cc=ysato@users.sourceforge.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).