| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
 Re: [PATCH 16/20] cpus: Restrict cpu_common_post_load() code to TCG
 
To: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>, qemu-devel@xxxxxxxxxxFrom: Richard Henderson <richard.henderson@xxxxxxxxxx>Date: Sun, 26 Jan 2025 13:16:56 -0800Cc: Peter Maydell <peter.maydell@xxxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, qemu-arm@xxxxxxxxxx, Igor Mammedov <imammedo@xxxxxxxxxx>, Alex Bennée <alex.bennee@xxxxxxxxxx>, kvm@xxxxxxxxxxxxxxx, qemu-ppc@xxxxxxxxxx, qemu-riscv@xxxxxxxxxx, David Hildenbrand <david@xxxxxxxxxx>, qemu-s390x@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxxDelivery-date: Sun, 26 Jan 2025 21:17:05 +0000List-id: Xen developer discussion <xen-devel.lists.xenproject.org> 
 
On 1/23/25 15:44, Philippe Mathieu-Daudé wrote:
 
CPU_INTERRUPT_EXIT was removed in commit 3098dba01c7
("Use a dedicated function to request exit from execution
loop"), tlb_flush() and tb_flush() are related to TCG
accelerator.
Signed-off-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>
---
  cpu-target.c | 33 +++++++++++++++++++--------------
  1 file changed, 19 insertions(+), 14 deletions(-)
diff --git a/cpu-target.c b/cpu-target.c
index a2999e7c3c0..c05ef1ff096 100644
--- a/cpu-target.c
+++ b/cpu-target.c
@@ -45,22 +45,27 @@
  #ifndef CONFIG_USER_ONLY
  static int cpu_common_post_load(void *opaque, int version_id)
  {
-    CPUState *cpu = opaque;
+#ifdef CONFIG_TCG
+    if (tcg_enabled()) {
 
Why do you need both ifdef and tcg_enabled()?  I would have thought just 
tcg_enabled().
Are there declarations that are (unnecessarily?) protected?
r~
 
 |