qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH qom-next 48/59] target-i386: Pass X86CPU to cpu_x86_


From: Andreas Färber
Subject: [Qemu-devel] [PATCH qom-next 48/59] target-i386: Pass X86CPU to cpu_x86_load_seg_cache_sipi()
Date: Wed, 23 May 2012 05:08:11 +0200

Simplifies the call in apic_sipi() again and needed for moving halted
field to CPUState.

Signed-off-by: Andreas Färber <address@hidden>
---
 hw/apic.c         |    2 +-
 target-i386/cpu.h |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/hw/apic.c b/hw/apic.c
index b14635d..2f642b0 100644
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -495,7 +495,7 @@ void apic_sipi(DeviceState *d)
 
     if (!s->wait_for_sipi)
         return;
-    cpu_x86_load_seg_cache_sipi(&s->cpu->env, s->sipi_vector);
+    cpu_x86_load_seg_cache_sipi(s->cpu, s->sipi_vector);
     s->wait_for_sipi = 0;
 }
 
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index 5169bb0..36e7911 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -854,9 +854,11 @@ static inline void cpu_x86_load_seg_cache(CPUX86State *env,
     }
 }
 
-static inline void cpu_x86_load_seg_cache_sipi(CPUX86State *env,
+static inline void cpu_x86_load_seg_cache_sipi(X86CPU *cpu,
                                                int sipi_vector)
 {
+    CPUX86State *env = &cpu->env;
+
     env->eip = 0;
     cpu_x86_load_seg_cache(env, R_CS, sipi_vector << 8,
                            sipi_vector << 12,
-- 
1.7.7




reply via email to

[Prev in Thread] Current Thread [Next in Thread]