hw: Remove 'exec/exec-all.h' header when unused
cover hw: Remove 'exec/exec-all.h' header when unused
Philippe Mathieu-Daudé (4):
hw/ppc/spapr_hcall: Remove unused 'exec/exec-all.h' included header hw/misc/mips_itu: Remove unnecessary 'exec/exec-all.h' header hw/s390x/ipl: Remove unused 'exec/exec-all.h' included header
target: Restrict 'sysemu/reset.h' to system emulation
hw/misc/mips_itu.c | 3 ++- hw/ppc/spapr_hcall.c | 1 - hw/s390x/ipl.c | 1 - target/i386/cpu.c | 2 +- target/loongarch/cpu.c | 2 ++ 5 files changed, 5 insertions(+), 4 deletions(-)
Signature · 1 line
2.41.0
PATCH 1/4 hw/ppc/spapr_hcall: Remove unused 'exec/exec-all.h' included header
--- hw/ppc/spapr_hcall.c | 1 - 1 file changed, 1 deletion(-)
hw/ppc/spapr_hcall.c +0 -1
@@ -8,7 +8,6 @@#include "qemu/main-loop.h" #include "qemu/module.h" #include "qemu/error-report.h" -#include "exec/exec-all.h" #include "exec/tb-flush.h" #include "helper_regs.h" #include "hw/ppc/ppc.h"
Signature · 1 line
2.41.0
Re: [PATCH 1/4] hw/ppc/spapr_hcall: Remove unused 'exec/exec-all.h' included header
Quoted 10 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/ppc/spapr_hcall.c | 1 - 1 file changed, 1 deletion(-)hw/ppc/spapr_hcall.c +0
-0
hw/ppc/spapr_hcall.c line 13
Quoted 7 lines
hw/ppc/spapr_hcall.c +0
-1@@ -8,7 +8,6 @@#include "qemu/main-loop.h" #include "qemu/module.h" #include "qemu/error-report.h" -#include "exec/exec-all.h" #include "exec/tb-flush.h" #include "helper_regs.h" #include "hw/ppc/ppc.h"
Re: [PATCH 1/4] hw/ppc/spapr_hcall: Remove unused 'exec/exec-all.h' included header
In reply to Philippe Mathieu-DaudéQuoted 4 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé<[email protected]>--- hw/ppc/spapr_hcall.c | 1 - 1 file changed, 1 deletion(-)
r~
PATCH 2/4 hw/misc/mips_itu: Remove unnecessary 'exec/exec-all.h' header
In reply to Philippe Mathieu-Daudémips_itu.c only requires declarations from "hw/core/cpu.h" and "cpu.h". Avoid including the huge "exec/exec-all.h" header.
--- hw/misc/mips_itu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
hw/misc/mips_itu.c +2 -1
@@ -22,9 +22,10 @@#include "qemu/log.h" #include "qemu/module.h" #include "qapi/error.h" -#include "exec/exec-all.h" +#include "hw/core/cpu.h" #include "hw/misc/mips_itu.h" #include "hw/qdev-properties.h" +#include "target/mips/cpu.h" #define ITC_TAG_ADDRSPACE_SZ (ITC_ADDRESSMAP_NUM * 8)/* Initialize as 4kB area to fit all 32 cells with default 128B grain.
Signature · 1 line
2.41.0
Re: [PATCH 2/4] hw/misc/mips_itu: Remove unnecessary 'exec/exec-all.h' header
Quoted 14 lines · Philippe Mathieu-Daudé
mips_itu.conly requires declarations from "hw/core/cpu.h" and "cpu.h". Avoid including the huge "exec/exec-all.h" header.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/misc/mips_itu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)hw/misc/mips_itu.c +0
-0@@ -22,9 +22,10 @@#include "qemu/log.h"
hw/misc/mips_itu.c line 31
Quoted 10 lines
hw/misc/mips_itu.c +2
-1#include "qemu/module.h" #include "qapi/error.h" -#include "exec/exec-all.h" +#include "hw/core/cpu.h" #include "hw/misc/mips_itu.h" #include "hw/qdev-properties.h" +#include "target/mips/cpu.h" #define ITC_TAG_ADDRSPACE_SZ (ITC_ADDRESSMAP_NUM * 8)/* Initialize as 4kB area to fit all 32 cells with default 128B grain.
PATCH 3/4 hw/s390x/ipl: Remove unused 'exec/exec-all.h' included header
In reply to Philippe Mathieu-Daudé--- hw/s390x/ipl.c | 1 - 1 file changed, 1 deletion(-)
hw/s390x/ipl.c +0 -1
@@ -35,7 +35,6 @@#include "qemu/cutils.h" #include "qemu/option.h" #include "standard-headers/linux/virtio_ids.h" -#include "exec/exec-all.h" #define KERN_IMAGE_START 0x010000UL#define LINUX_MAGIC_ADDR 0x010008UL
Signature · 1 line
2.41.0
Re: [PATCH 3/4] hw/s390x/ipl: Remove unused 'exec/exec-all.h' included header
Am 12.12.23 um 12:36 schrieb Philippe Mathieu-Daudé:
Quoted 10 lines
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/s390x/ipl.c | 1 - 1 file changed, 1 deletion(-)hw/s390x/ipl.c +0
-0
hw/s390x/ipl.c line 38
Quoted 4 lines
hw/s390x/ipl.c +0
-1@@ -35,7 +35,6 @@#include "qemu/cutils.h" #include "qemu/option.h" #include "standard-headers/linux/virtio_ids.h" -#include "exec/exec-all.h"
Philippe,
This include came with
commit a30fb811cbe940020a498d2cdac9326cac38b4d9
Author: David Hildenbrand <[email protected]> AuthorDate: Tue Apr 24 12:18:59 2018 +0200 Commit: Cornelia Huck <[email protected]> CommitDate: Mon May 14 17:10:02 2018 +0200
s390x: refactor reset/reipl handling
And I think one reason was
cpu_loop_exit
This is still part of ipl.c
a30fb811cbe (David Hildenbrand 2018-04-24 12:18:59 +0200 664) /* as this is triggered by a CPU, make sure to exit the loop */
a30fb811cbe (David Hildenbrand 2018-04-24 12:18:59 +0200 665) if (tcg_enabled()) {
a30fb811cbe (David Hildenbrand 2018-04-24 12:18:59 +0200 666) cpu_loop_exit(cs);
a30fb811cbe (David Hildenbrand 2018-04-24 12:18:59 +0200 667) }So why do you think exec-all.h is unused?
Re: [PATCH 3/4] hw/s390x/ipl: Remove unused 'exec/exec-all.h' included header
Quoted 45 lines · Christian Borntraeger
Am 12.12.23 um 12:36 schrieb Philippe Mathieu-Daudé:
Quoted 10 lines
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
hw/s390x/ipl.c| 1 -1 file changed, 1 deletion(-)hw/s390x/ipl.c +0
-0hw/s390x/ipl.c line 38
Quoted 4 lines
hw/s390x/ipl.c +0
-1@@ -35,7 +35,6 @@ #include "qemu/cutils.h" #include "qemu/option.h" #include "standard-headers/linux/virtio_ids.h" -#include "exec/exec-all.h" Philippe,
This include came with
commita30fb811cbe940020a498d2cdac9326cac38b4d9
Author: David Hildenbrand <[email protected]>
AuthorDate: Tue Apr 24 12:18:59 2018 +0200
Commit: Cornelia Huck <[email protected]>
CommitDate: Mon May 14 17:10:02 2018 +0200s390x: refactor reset/reipl handling
And I think one reason was
cpu_loop_exitThis is still part of
ipl.c
a30fb811cbe(David Hildenbrand 2018-04-24 12:18:59 +0200 664) /* as this is triggered by a CPU, make sure to exit the loop */a30fb811cbe(David Hildenbrand 2018-04-24 12:18:59 +0200 665) if (tcg_enabled()) {a30fb811cbe(David Hildenbrand 2018-04-24 12:18:59 +0200 666)cpu_loop_exit(cs);a30fb811cbe(David Hildenbrand 2018-04-24 12:18:59 +0200 667) }
Quoted 3 lines
So why do you think
exec-all.his unused?
I think because that got moved out of exec-all.h a few months ago, via
commit 3549118b498873c84b442bc280a5edafbb61e0a4
Author: Philippe Mathieu-Daudé <[email protected]> Date: Thu Sep 14 20:57:08 2023 +0200
exec: Move cpu_loop_foo() target agnostic functions to 'cpu-common.h'
While these functions are not TCG specific, they are not target specific. Move them to "exec/cpu-common.h" so their callers don't have to be tainted as target specific.
Re: [PATCH 3/4] hw/s390x/ipl: Remove unused 'exec/exec-all.h' included header
Am 12.12.23 um 16:28 schrieb Eric Farman:
Quoted 10 lines
Quoted 3 lines
So why do you think
exec-all.his unused?I think because that got moved out of
exec-all.ha few months ago, viacommit
3549118b498873c84b442bc280a5edafbb61e0a4Author: Philippe Mathieu-Daudé <[email protected]> Date: Thu Sep 14 20:57:08 2023 +0200
Quoted 7 lines
exec: Move
cpu_loop_foo()target agnostic functions to 'cpu-common.h'While these functions are not TCG specific, they are not target specific. Move them to "
exec/cpu-common.h" so their callers don't have to be tainted as target specific.
Ah right, I was looking at an old QEMU version....
Re: [PATCH 3/4] hw/s390x/ipl: Remove unused 'exec/exec-all.h' included header
Quoted 13 lines · Christian Borntraeger
Am 12.12.23 um 16:28 schrieb Eric Farman:
Quoted 12 lines
Quoted 1 line
So why do you think
exec-all.his unused?I think because that got moved out of
exec-all.ha few months ago, viacommit
3549118b498873c84b442bc280a5edafbb61e0a4
Author: Philippe Mathieu-Daudé <[email protected]> Date: Thu Sep 14 20:57:08 2023 +0200exec: Move
cpu_loop_foo()target agnostic functions to 'cpu-common.h'
While these functions are not TCG specific, they are not target specific. Move them to "exec/cpu-common.h" so their callers don't have to be tainted as target specific.
Indeed, thanks Eric for justifying this patch.
Quoted 1 line
Ah right, I was looking at an old QEMU version....
FYI I tried to clarify a bit these header patterns here:
https://lore.kernel.org/qemu-devel/[email protected]/
Re: [PATCH 3/4] hw/s390x/ipl: Remove unused 'exec/exec-all.h' included header
In reply to Philippe Mathieu-DaudéQuoted 6 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
hw/s390x/ipl.c | 1 -1 file changed, 1 deletion(-)
Yup, this appears no longer relevant since commit 3549118b4988
PATCH 4/4 target: Restrict 'sysemu/reset.h' to system emulation
In reply to Philippe Mathieu-DaudévCPU "reset" is only possible with system emulation.
--- target/i386/cpu.c | 2 +- target/loongarch/cpu.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
target/i386/cpu.c +1 -1
@@ -24,7 +24,6 @@#include "qemu/hw-version.h" #include "cpu.h" #include "tcg/helper-tcg.h" -#include "sysemu/reset.h" #include "sysemu/hvf.h" #include "hvf/hvf-i386.h" #include "kvm/kvm_i386.h"
@@ -37,6 +36,7 @@#include "hw/qdev-properties.h" #include "hw/i386/topology.h" #ifndef CONFIG_USER_ONLY +#include "sysemu/reset.h" #include "qapi/qapi-commands-machine-target.h" #include "exec/address-spaces.h" #include "hw/boards.h"
target/loongarch/cpu.c +2 -0
@@ -17,7 +17,9 @@#include "internals.h" #include "fpu/softfloat-helpers.h" #include "cpu-csr.h" +#ifndef CONFIG_USER_ONLY #include "sysemu/reset.h" +#endif #include "tcg/tcg.h" #include "vec.h"
Signature · 1 line
2.41.0
Re: [PATCH 4/4] target: Restrict 'sysemu/reset.h' to system emulation
Quoted 9 lines · Philippe Mathieu-Daudé
vCPU "reset" is only possible with system emulation.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>Reviewed-by Warner Losh <[email protected]>Reviewed-by Song Gao <[email protected]>--- target/i386/cpu.c | 2 +- target/loongarch/cpu.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
Re: [PATCH 4/4] target: Restrict 'sysemu/reset.h' to system emulation
In reply to Philippe Mathieu-DaudéQuoted 11 lines · Philippe Mathieu-Daudé
Date: Tue, 12 Dec 2023 12:36:40 +0100
From: Philippe Mathieu-Daudé <[email protected]>
Subject: [PATCH 4/4] target: Restrict 'sysemu/reset.h' to system emulation
X-Mailer: git-send-email 2.41.0vCPU "reset" is only possible with system emulation.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>Reviewed-by Warner Losh <[email protected]>Reviewed-by Song Gao <[email protected]>---
Quoted 42 lines
target/i386/cpu.c | 2 +- target/loongarch/cpu.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)target/i386/cpu.c +1
-1@@ -24,7 +24,6 @@#include "qemu/hw-version.h" #include "cpu.h" #include "tcg/helper-tcg.h" -#include "sysemu/reset.h" #include "sysemu/hvf.h" #include "hvf/hvf-i386.h" #include "kvm/kvm_i386.h" @@ -37,6 +36,7 @@#include "hw/qdev-properties.h" #include "hw/i386/topology.h" #ifndef CONFIG_USER_ONLY +#include "sysemu/reset.h" #include "qapi/qapi-commands-machine-target.h" #include "exec/address-spaces.h" #include "hw/boards.h" target/loongarch/cpu.c +2
-0@@ -17,7 +17,9 @@#include "internals.h" #include "fpu/softfloat-helpers.h" #include "cpu-csr.h" +#ifndef CONFIG_USER_ONLY #include "sysemu/reset.h" +#endif #include "tcg/tcg.h" #include "vec.h" Signature · 1 line
2.41.0
Quoted 5 lines · Philippe Mathieu-Daudé
Philippe Mathieu-Daudé (4):
hw/ppc/spapr_hcall: Remove unused 'exec/exec-all.h' included header hw/misc/mips_itu: Remove unnecessary 'exec/exec-all.h' header hw/s390x/ipl: Remove unused 'exec/exec-all.h' included header
target: Restrict 'sysemu/reset.h' to system emulation
Thanks Thomas for also merging these :)