* [PATCH 0/2] target/i386/helper: Minor #ifdef'ry simplifications
@ 2023-06-02 22:46 Philippe Mathieu-Daudé
2023-06-02 22:46 ` [PATCH 1/2] target/i386/helper: Remove do_cpu_sipi() stub for user-mode emulation Philippe Mathieu-Daudé
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-06-02 22:46 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé
Not very interesting code shuffle, but this was in
the way of another big cleanup. So sending apart.
BTW this file isn't covered in MAINTAINERS:
$ ./scripts/get_maintainer.pl -f target/i386/helper.c
get_maintainer.pl: No maintainers found
Philippe Mathieu-Daudé (2):
target/i386/helper: Remove do_cpu_sipi() stub for user-mode emulation
target/i386/helper: Shuffle do_cpu_init()
target/i386/cpu.h | 3 ++-
target/i386/helper.c | 15 ++++-----------
2 files changed, 6 insertions(+), 12 deletions(-)
--
2.38.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] target/i386/helper: Remove do_cpu_sipi() stub for user-mode emulation
2023-06-02 22:46 [PATCH 0/2] target/i386/helper: Minor #ifdef'ry simplifications Philippe Mathieu-Daudé
@ 2023-06-02 22:46 ` Philippe Mathieu-Daudé
2023-06-02 22:46 ` [PATCH 2/2] target/i386/helper: Shuffle do_cpu_init() Philippe Mathieu-Daudé
2023-06-03 3:43 ` [PATCH 0/2] target/i386/helper: Minor #ifdef'ry simplifications Richard Henderson
2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-06-02 22:46 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé
Since commit 604664726f ("target/i386: Restrict cpu_exec_interrupt()
handler to sysemu"), do_cpu_sipi() isn't called anymore on user
emulation. Remove the now pointless stub.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/i386/cpu.h | 3 ++-
target/i386/helper.c | 3 ---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 7201a71de8..cd047e0410 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -2285,7 +2285,6 @@ static inline void cpu_get_tb_cpu_state(CPUX86State *env, target_ulong *pc,
}
void do_cpu_init(X86CPU *cpu);
-void do_cpu_sipi(X86CPU *cpu);
#define MCE_INJECT_BROADCAST 1
#define MCE_INJECT_UNCOND_AO 2
@@ -2419,6 +2418,8 @@ void x86_cpu_set_default_version(X86CPUVersion version);
#ifndef CONFIG_USER_ONLY
+void do_cpu_sipi(X86CPU *cpu);
+
#define APIC_DEFAULT_ADDRESS 0xfee00000
#define APIC_SPACE_SIZE 0x100000
diff --git a/target/i386/helper.c b/target/i386/helper.c
index 36bf2107e7..792c8eb45e 100644
--- a/target/i386/helper.c
+++ b/target/i386/helper.c
@@ -611,9 +611,6 @@ void do_cpu_sipi(X86CPU *cpu)
void do_cpu_init(X86CPU *cpu)
{
}
-void do_cpu_sipi(X86CPU *cpu)
-{
-}
#endif
#ifndef CONFIG_USER_ONLY
--
2.38.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] target/i386/helper: Shuffle do_cpu_init()
2023-06-02 22:46 [PATCH 0/2] target/i386/helper: Minor #ifdef'ry simplifications Philippe Mathieu-Daudé
2023-06-02 22:46 ` [PATCH 1/2] target/i386/helper: Remove do_cpu_sipi() stub for user-mode emulation Philippe Mathieu-Daudé
@ 2023-06-02 22:46 ` Philippe Mathieu-Daudé
2023-06-03 3:43 ` [PATCH 0/2] target/i386/helper: Minor #ifdef'ry simplifications Richard Henderson
2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-06-02 22:46 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé
Move the #ifdef'ry inside do_cpu_init() instead of
declaring an empty stub for user emulation.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/i386/helper.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/target/i386/helper.c b/target/i386/helper.c
index 792c8eb45e..89aa696c6d 100644
--- a/target/i386/helper.c
+++ b/target/i386/helper.c
@@ -580,9 +580,9 @@ int cpu_x86_get_descr_debug(CPUX86State *env, unsigned int selector,
return 1;
}
-#if !defined(CONFIG_USER_ONLY)
void do_cpu_init(X86CPU *cpu)
{
+#if !defined(CONFIG_USER_ONLY)
CPUState *cs = CPU(cpu);
CPUX86State *env = &cpu->env;
CPUX86State *save = g_new(CPUX86State, 1);
@@ -601,19 +601,15 @@ void do_cpu_init(X86CPU *cpu)
kvm_arch_do_init_vcpu(cpu);
}
apic_init_reset(cpu->apic_state);
+#endif /* CONFIG_USER_ONLY */
}
+#ifndef CONFIG_USER_ONLY
+
void do_cpu_sipi(X86CPU *cpu)
{
apic_sipi(cpu->apic_state);
}
-#else
-void do_cpu_init(X86CPU *cpu)
-{
-}
-#endif
-
-#ifndef CONFIG_USER_ONLY
void cpu_load_efer(CPUX86State *env, uint64_t val)
{
--
2.38.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] target/i386/helper: Minor #ifdef'ry simplifications
2023-06-02 22:46 [PATCH 0/2] target/i386/helper: Minor #ifdef'ry simplifications Philippe Mathieu-Daudé
2023-06-02 22:46 ` [PATCH 1/2] target/i386/helper: Remove do_cpu_sipi() stub for user-mode emulation Philippe Mathieu-Daudé
2023-06-02 22:46 ` [PATCH 2/2] target/i386/helper: Shuffle do_cpu_init() Philippe Mathieu-Daudé
@ 2023-06-03 3:43 ` Richard Henderson
2 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2023-06-03 3:43 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
On 6/2/23 15:46, Philippe Mathieu-Daudé wrote:
> Not very interesting code shuffle, but this was in
> the way of another big cleanup. So sending apart.
>
> BTW this file isn't covered in MAINTAINERS:
>
> $ ./scripts/get_maintainer.pl -f target/i386/helper.c
> get_maintainer.pl: No maintainers found
>
> Philippe Mathieu-Daudé (2):
> target/i386/helper: Remove do_cpu_sipi() stub for user-mode emulation
> target/i386/helper: Shuffle do_cpu_init()
>
> target/i386/cpu.h | 3 ++-
> target/i386/helper.c | 15 ++++-----------
> 2 files changed, 6 insertions(+), 12 deletions(-)
>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-06-03 3:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-02 22:46 [PATCH 0/2] target/i386/helper: Minor #ifdef'ry simplifications Philippe Mathieu-Daudé
2023-06-02 22:46 ` [PATCH 1/2] target/i386/helper: Remove do_cpu_sipi() stub for user-mode emulation Philippe Mathieu-Daudé
2023-06-02 22:46 ` [PATCH 2/2] target/i386/helper: Shuffle do_cpu_init() Philippe Mathieu-Daudé
2023-06-03 3:43 ` [PATCH 0/2] target/i386/helper: Minor #ifdef'ry simplifications Richard Henderson
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).