* [PATCH v2 0/9] target/misc: Header cleanups around "cpu.h"
@ 2022-12-17 17:28 Philippe Mathieu-Daudé
2022-12-17 17:28 ` [PATCH v2 1/9] target/alpha: Remove obsolete STATUS document Philippe Mathieu-Daudé
` (8 more replies)
0 siblings, 9 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-12-17 17:28 UTC (permalink / raw)
To: qemu-devel
Cc: Max Filippov, Richard Henderson, Bin Meng, kvm, qemu-ppc,
Greg Kurz, Daniel Henrique Barboza, Bernhard Beschow, qemu-riscv,
Song Gao, Artyom Tarasenko, Paolo Bonzini, Palmer Dabbelt,
Mark Cave-Ayland, Laurent Vivier, Alistair Francis,
Cédric Le Goater, David Gibson, Xiaojuan Yang,
Philippe Mathieu-Daudé
These patches are part of a big refactor cleanup
around "cpu.h". Most changes should be trivial IMHO.
Since v1:
- dropped patches including "cpu.h" in multiply included 'helper.h'
- dropped Hexagon patch
- better split sysemu fields in RISC-V's CPUArchState
Bernhard Beschow (1):
target/loongarch/cpu: Remove unused "sysbus.h" header
Philippe Mathieu-Daudé (8):
target/alpha: Remove obsolete STATUS document
target/loongarch/cpu: Restrict "memory.h" header to sysemu
target/ppc/internal: Restrict MMU declarations to sysemu
target/ppc/kvm: Remove unused "sysbus.h" header
target/riscv/cpu: Move Floating-Point fields closer
target/riscv/cpu: Restrict some sysemu-specific fields from
CPUArchState
target/sparc/sysemu: Remove pointless CONFIG_USER_ONLY guard
target/xtensa/cpu: Include missing "memory.h" header
target/alpha/STATUS | 28 ----------------------------
target/loongarch/cpu.h | 3 ++-
target/ppc/internal.h | 5 +++++
target/ppc/kvm.c | 1 -
target/riscv/cpu.h | 23 +++++++++++++----------
target/sparc/mmu_helper.c | 2 --
target/xtensa/cpu.c | 3 +++
7 files changed, 23 insertions(+), 42 deletions(-)
delete mode 100644 target/alpha/STATUS
--
2.38.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 1/9] target/alpha: Remove obsolete STATUS document
2022-12-17 17:28 [PATCH v2 0/9] target/misc: Header cleanups around "cpu.h" Philippe Mathieu-Daudé
@ 2022-12-17 17:28 ` Philippe Mathieu-Daudé
2022-12-17 18:29 ` Richard Henderson
2022-12-17 17:29 ` [PATCH v2 2/9] target/loongarch/cpu: Remove unused "sysbus.h" header Philippe Mathieu-Daudé
` (7 subsequent siblings)
8 siblings, 1 reply; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-12-17 17:28 UTC (permalink / raw)
To: qemu-devel
Cc: Max Filippov, Richard Henderson, Bin Meng, kvm, qemu-ppc,
Greg Kurz, Daniel Henrique Barboza, Bernhard Beschow, qemu-riscv,
Song Gao, Artyom Tarasenko, Paolo Bonzini, Palmer Dabbelt,
Mark Cave-Ayland, Laurent Vivier, Alistair Francis,
Cédric Le Goater, David Gibson, Xiaojuan Yang,
Philippe Mathieu-Daudé
Likely out of sync: last update is from 2008
(commit d1412eb240), 12 years ago.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/alpha/STATUS | 28 ----------------------------
1 file changed, 28 deletions(-)
delete mode 100644 target/alpha/STATUS
diff --git a/target/alpha/STATUS b/target/alpha/STATUS
deleted file mode 100644
index 6c9744569e..0000000000
--- a/target/alpha/STATUS
+++ /dev/null
@@ -1,28 +0,0 @@
-(to be completed)
-
-Alpha emulation structure:
-cpu.h : CPU definitions globally exported
-exec.h : CPU definitions used only for translated code execution
-helper.c : helpers that can be called either by the translated code
- or the QEMU core, including the exception handler.
-op_helper.c : helpers that can be called only from TCG
-helper.h : TCG helpers prototypes
-translate.c : Alpha instructions to micro-operations translator
-
-Code translator status:
-The Alpha CPU instruction emulation should be quite complete with the
-limitation that the VAX floating-point load and stores are not tested.
-The 4 MMU modes are implemented.
-
-Linux user mode emulation status:
-a few programs start to run. Most crash at a certain point, dereferencing a
-NULL pointer. It seems that the UNIQUE register is not initialized properly.
-It may appear that old executables, not relying on TLS support, run but
-this is to be proved...
-
-Full system emulation status:
-* Alpha PALCode emulation is in a very early stage and is not sufficient
- to run any real OS. The alpha-softmmu target is not enabled for now.
-* no hardware platform description is implemented
-* there might be problems in the Alpha PALCode dedicated instructions
- that would prevent to use a native PALCode image.
--
2.38.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 2/9] target/loongarch/cpu: Remove unused "sysbus.h" header
2022-12-17 17:28 [PATCH v2 0/9] target/misc: Header cleanups around "cpu.h" Philippe Mathieu-Daudé
2022-12-17 17:28 ` [PATCH v2 1/9] target/alpha: Remove obsolete STATUS document Philippe Mathieu-Daudé
@ 2022-12-17 17:29 ` Philippe Mathieu-Daudé
2022-12-17 17:29 ` [PATCH v2 3/9] target/loongarch/cpu: Restrict "memory.h" header to sysemu Philippe Mathieu-Daudé
` (6 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-12-17 17:29 UTC (permalink / raw)
To: qemu-devel
Cc: Max Filippov, Richard Henderson, Bin Meng, kvm, qemu-ppc,
Greg Kurz, Daniel Henrique Barboza, Bernhard Beschow, qemu-riscv,
Song Gao, Artyom Tarasenko, Paolo Bonzini, Palmer Dabbelt,
Mark Cave-Ayland, Laurent Vivier, Alistair Francis,
Cédric Le Goater, David Gibson, Xiaojuan Yang,
Philippe Mathieu-Daudé, Philippe Mathieu-Daudé
From: Bernhard Beschow <shentey@gmail.com>
The cpu is used in both user and system emulation context while
sysbus.h is system-only. Remove it since it's not needed anyway.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/loongarch/cpu.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h
index e15c633b0b..c8612f5466 100644
--- a/target/loongarch/cpu.h
+++ b/target/loongarch/cpu.h
@@ -13,7 +13,6 @@
#include "hw/registerfields.h"
#include "qemu/timer.h"
#include "exec/memory.h"
-#include "hw/sysbus.h"
#include "cpu-csr.h"
#define IOCSRF_TEMP 0
--
2.38.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 3/9] target/loongarch/cpu: Restrict "memory.h" header to sysemu
2022-12-17 17:28 [PATCH v2 0/9] target/misc: Header cleanups around "cpu.h" Philippe Mathieu-Daudé
2022-12-17 17:28 ` [PATCH v2 1/9] target/alpha: Remove obsolete STATUS document Philippe Mathieu-Daudé
2022-12-17 17:29 ` [PATCH v2 2/9] target/loongarch/cpu: Remove unused "sysbus.h" header Philippe Mathieu-Daudé
@ 2022-12-17 17:29 ` Philippe Mathieu-Daudé
2022-12-17 17:29 ` [PATCH v2 4/9] target/ppc/internal: Restrict MMU declarations " Philippe Mathieu-Daudé
` (5 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-12-17 17:29 UTC (permalink / raw)
To: qemu-devel
Cc: Max Filippov, Richard Henderson, Bin Meng, kvm, qemu-ppc,
Greg Kurz, Daniel Henrique Barboza, Bernhard Beschow, qemu-riscv,
Song Gao, Artyom Tarasenko, Paolo Bonzini, Palmer Dabbelt,
Mark Cave-Ayland, Laurent Vivier, Alistair Francis,
Cédric Le Goater, David Gibson, Xiaojuan Yang,
Philippe Mathieu-Daudé
Missed in 0093b9a5ee ("target/loongarch: Adjust functions
and structure to support user-mode") while cleaning commit
f84a2aacf5 ("target/loongarch: Add LoongArch IOCSR instruction").
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/loongarch/cpu.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h
index c8612f5466..2f17ac6b47 100644
--- a/target/loongarch/cpu.h
+++ b/target/loongarch/cpu.h
@@ -12,7 +12,9 @@
#include "fpu/softfloat-types.h"
#include "hw/registerfields.h"
#include "qemu/timer.h"
+#ifndef CONFIG_USER_ONLY
#include "exec/memory.h"
+#endif
#include "cpu-csr.h"
#define IOCSRF_TEMP 0
--
2.38.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 4/9] target/ppc/internal: Restrict MMU declarations to sysemu
2022-12-17 17:28 [PATCH v2 0/9] target/misc: Header cleanups around "cpu.h" Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2022-12-17 17:29 ` [PATCH v2 3/9] target/loongarch/cpu: Restrict "memory.h" header to sysemu Philippe Mathieu-Daudé
@ 2022-12-17 17:29 ` Philippe Mathieu-Daudé
2022-12-17 17:29 ` [PATCH v2 5/9] target/ppc/kvm: Remove unused "sysbus.h" header Philippe Mathieu-Daudé
` (4 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-12-17 17:29 UTC (permalink / raw)
To: qemu-devel
Cc: Max Filippov, Richard Henderson, Bin Meng, kvm, qemu-ppc,
Greg Kurz, Daniel Henrique Barboza, Bernhard Beschow, qemu-riscv,
Song Gao, Artyom Tarasenko, Paolo Bonzini, Palmer Dabbelt,
Mark Cave-Ayland, Laurent Vivier, Alistair Francis,
Cédric Le Goater, David Gibson, Xiaojuan Yang,
Philippe Mathieu-Daudé
The 'hwaddr' type is only available / meaningful on system emulation.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/ppc/internal.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/target/ppc/internal.h b/target/ppc/internal.h
index 337a362205..901bae6d39 100644
--- a/target/ppc/internal.h
+++ b/target/ppc/internal.h
@@ -242,9 +242,12 @@ static inline int prot_for_access_type(MMUAccessType access_type)
g_assert_not_reached();
}
+#ifndef CONFIG_USER_ONLY
+
/* PowerPC MMU emulation */
typedef struct mmu_ctx_t mmu_ctx_t;
+
bool ppc_xlate(PowerPCCPU *cpu, vaddr eaddr, MMUAccessType access_type,
hwaddr *raddrp, int *psizep, int *protp,
int mmu_idx, bool guest_visible);
@@ -266,6 +269,8 @@ struct mmu_ctx_t {
int nx; /* Non-execute area */
};
+#endif /* !CONFIG_USER_ONLY */
+
/* Common routines used by software and hardware TLBs emulation */
static inline int pte_is_valid(target_ulong pte0)
{
--
2.38.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 5/9] target/ppc/kvm: Remove unused "sysbus.h" header
2022-12-17 17:28 [PATCH v2 0/9] target/misc: Header cleanups around "cpu.h" Philippe Mathieu-Daudé
` (3 preceding siblings ...)
2022-12-17 17:29 ` [PATCH v2 4/9] target/ppc/internal: Restrict MMU declarations " Philippe Mathieu-Daudé
@ 2022-12-17 17:29 ` Philippe Mathieu-Daudé
2022-12-17 18:30 ` Richard Henderson
2022-12-17 17:29 ` [PATCH v2 6/9] target/riscv/cpu: Move Floating-Point fields closer Philippe Mathieu-Daudé
` (3 subsequent siblings)
8 siblings, 1 reply; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-12-17 17:29 UTC (permalink / raw)
To: qemu-devel
Cc: Max Filippov, Richard Henderson, Bin Meng, kvm, qemu-ppc,
Greg Kurz, Daniel Henrique Barboza, Bernhard Beschow, qemu-riscv,
Song Gao, Artyom Tarasenko, Paolo Bonzini, Palmer Dabbelt,
Mark Cave-Ayland, Laurent Vivier, Alistair Francis,
Cédric Le Goater, David Gibson, Xiaojuan Yang,
Philippe Mathieu-Daudé
Nothing requires SysBus declarations here.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/ppc/kvm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
index 7c25348b7b..78f6fc50cd 100644
--- a/target/ppc/kvm.c
+++ b/target/ppc/kvm.c
@@ -32,7 +32,6 @@
#include "sysemu/device_tree.h"
#include "mmu-hash64.h"
-#include "hw/sysbus.h"
#include "hw/ppc/spapr.h"
#include "hw/ppc/spapr_cpu_core.h"
#include "hw/hw.h"
--
2.38.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 6/9] target/riscv/cpu: Move Floating-Point fields closer
2022-12-17 17:28 [PATCH v2 0/9] target/misc: Header cleanups around "cpu.h" Philippe Mathieu-Daudé
` (4 preceding siblings ...)
2022-12-17 17:29 ` [PATCH v2 5/9] target/ppc/kvm: Remove unused "sysbus.h" header Philippe Mathieu-Daudé
@ 2022-12-17 17:29 ` Philippe Mathieu-Daudé
2022-12-17 18:32 ` Richard Henderson
2022-12-17 17:29 ` [PATCH v2 7/9] target/riscv/cpu: Restrict some sysemu-specific fields from CPUArchState Philippe Mathieu-Daudé
` (2 subsequent siblings)
8 siblings, 1 reply; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-12-17 17:29 UTC (permalink / raw)
To: qemu-devel
Cc: Max Filippov, Richard Henderson, Bin Meng, kvm, qemu-ppc,
Greg Kurz, Daniel Henrique Barboza, Bernhard Beschow, qemu-riscv,
Song Gao, Artyom Tarasenko, Paolo Bonzini, Palmer Dabbelt,
Mark Cave-Ayland, Laurent Vivier, Alistair Francis,
Cédric Le Goater, David Gibson, Xiaojuan Yang,
Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/riscv/cpu.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h
index fc1f72e5c3..05fafebff7 100644
--- a/target/riscv/cpu.h
+++ b/target/riscv/cpu.h
@@ -143,7 +143,6 @@ typedef struct PMUCTRState {
struct CPUArchState {
target_ulong gpr[32];
target_ulong gprh[32]; /* 64 top bits of the 128-bit registers */
- uint64_t fpr[32]; /* assume both F and D extensions */
/* vector coprocessor state. */
uint64_t vreg[32 * RV_VLEN_MAX / 64] QEMU_ALIGNED(16);
@@ -158,7 +157,10 @@ struct CPUArchState {
target_ulong load_res;
target_ulong load_val;
+ /* Floating-Point state */
+ uint64_t fpr[32]; /* assume both F and D extensions */
target_ulong frm;
+ float_status fp_status;
target_ulong badaddr;
target_ulong bins;
@@ -372,8 +374,6 @@ struct CPUArchState {
target_ulong cur_pmmask;
target_ulong cur_pmbase;
- float_status fp_status;
-
/* Fields from here on are preserved across CPU reset. */
QEMUTimer *stimer; /* Internal timer for S-mode interrupt */
QEMUTimer *vstimer; /* Internal timer for VS-mode interrupt */
--
2.38.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 7/9] target/riscv/cpu: Restrict some sysemu-specific fields from CPUArchState
2022-12-17 17:28 [PATCH v2 0/9] target/misc: Header cleanups around "cpu.h" Philippe Mathieu-Daudé
` (5 preceding siblings ...)
2022-12-17 17:29 ` [PATCH v2 6/9] target/riscv/cpu: Move Floating-Point fields closer Philippe Mathieu-Daudé
@ 2022-12-17 17:29 ` Philippe Mathieu-Daudé
2022-12-17 18:00 ` Philippe Mathieu-Daudé
2022-12-17 17:29 ` [PATCH v2 8/9] target/sparc/sysemu: Remove pointless CONFIG_USER_ONLY guard Philippe Mathieu-Daudé
2022-12-17 17:29 ` [PATCH v2 9/9] target/xtensa/cpu: Include missing "memory.h" header Philippe Mathieu-Daudé
8 siblings, 1 reply; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-12-17 17:29 UTC (permalink / raw)
To: qemu-devel
Cc: Max Filippov, Richard Henderson, Bin Meng, kvm, qemu-ppc,
Greg Kurz, Daniel Henrique Barboza, Bernhard Beschow, qemu-riscv,
Song Gao, Artyom Tarasenko, Paolo Bonzini, Palmer Dabbelt,
Mark Cave-Ayland, Laurent Vivier, Alistair Francis,
Cédric Le Goater, David Gibson, Xiaojuan Yang,
Philippe Mathieu-Daudé
The 'hwaddr' type is only available / meaningful on system emulation.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/riscv/cpu.h | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h
index 05fafebff7..71ea1bb411 100644
--- a/target/riscv/cpu.h
+++ b/target/riscv/cpu.h
@@ -370,7 +370,7 @@ struct CPUArchState {
uint64_t menvcfg;
target_ulong senvcfg;
uint64_t henvcfg;
-#endif
+
target_ulong cur_pmmask;
target_ulong cur_pmbase;
@@ -388,6 +388,7 @@ struct CPUArchState {
uint64_t kvm_timer_compare;
uint64_t kvm_timer_state;
uint64_t kvm_timer_frequency;
+#endif
};
OBJECT_DECLARE_CPU_TYPE(RISCVCPU, RISCVCPUClass, RISCV_CPU)
@@ -553,12 +554,20 @@ bool riscv_cpu_virt_enabled(CPURISCVState *env);
void riscv_cpu_set_virt_enabled(CPURISCVState *env, bool enable);
bool riscv_cpu_two_stage_lookup(int mmu_idx);
int riscv_cpu_mmu_index(CPURISCVState *env, bool ifetch);
+#ifndef CONFIG_USER_ONLY
+hwaddr riscv_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
G_NORETURN void riscv_cpu_do_unaligned_access(CPUState *cs, vaddr addr,
MMUAccessType access_type, int mmu_idx,
uintptr_t retaddr);
bool riscv_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
MMUAccessType access_type, int mmu_idx,
bool probe, uintptr_t retaddr);
+void riscv_cpu_do_transaction_failed(CPUState *cs, hwaddr physaddr,
+ vaddr addr, unsigned size,
+ MMUAccessType access_type,
+ int mmu_idx, MemTxAttrs attrs,
+ MemTxResult response, uintptr_t retaddr);
+#endif
char *riscv_isa_string(RISCVCPU *cpu);
void riscv_cpu_list(void);
@@ -566,12 +575,6 @@ void riscv_cpu_list(void);
#define cpu_mmu_index riscv_cpu_mmu_index
#ifndef CONFIG_USER_ONLY
-void riscv_cpu_do_transaction_failed(CPUState *cs, hwaddr physaddr,
- vaddr addr, unsigned size,
- MMUAccessType access_type,
- int mmu_idx, MemTxAttrs attrs,
- MemTxResult response, uintptr_t retaddr);
-hwaddr riscv_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
bool riscv_cpu_exec_interrupt(CPUState *cs, int interrupt_request);
void riscv_cpu_swap_hypervisor_regs(CPURISCVState *env);
int riscv_cpu_claim_interrupts(RISCVCPU *cpu, uint64_t interrupts);
--
2.38.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 8/9] target/sparc/sysemu: Remove pointless CONFIG_USER_ONLY guard
2022-12-17 17:28 [PATCH v2 0/9] target/misc: Header cleanups around "cpu.h" Philippe Mathieu-Daudé
` (6 preceding siblings ...)
2022-12-17 17:29 ` [PATCH v2 7/9] target/riscv/cpu: Restrict some sysemu-specific fields from CPUArchState Philippe Mathieu-Daudé
@ 2022-12-17 17:29 ` Philippe Mathieu-Daudé
2022-12-17 17:29 ` [PATCH v2 9/9] target/xtensa/cpu: Include missing "memory.h" header Philippe Mathieu-Daudé
8 siblings, 0 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-12-17 17:29 UTC (permalink / raw)
To: qemu-devel
Cc: Max Filippov, Richard Henderson, Bin Meng, kvm, qemu-ppc,
Greg Kurz, Daniel Henrique Barboza, Bernhard Beschow, qemu-riscv,
Song Gao, Artyom Tarasenko, Paolo Bonzini, Palmer Dabbelt,
Mark Cave-Ayland, Laurent Vivier, Alistair Francis,
Cédric Le Goater, David Gibson, Xiaojuan Yang,
Philippe Mathieu-Daudé
Commit caac44a52a ("target/sparc: Make sparc_cpu_tlb_fill sysemu
only") restricted mmu_helper.c to system emulation. Checking
whether CONFIG_USER_ONLY is defined is now pointless.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/sparc/mmu_helper.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/target/sparc/mmu_helper.c b/target/sparc/mmu_helper.c
index 919448a494..a7e51e4b7d 100644
--- a/target/sparc/mmu_helper.c
+++ b/target/sparc/mmu_helper.c
@@ -924,7 +924,6 @@ hwaddr sparc_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)
return phys_addr;
}
-#ifndef CONFIG_USER_ONLY
G_NORETURN void sparc_cpu_do_unaligned_access(CPUState *cs, vaddr addr,
MMUAccessType access_type,
int mmu_idx,
@@ -942,4 +941,3 @@ G_NORETURN void sparc_cpu_do_unaligned_access(CPUState *cs, vaddr addr,
cpu_raise_exception_ra(env, TT_UNALIGNED, retaddr);
}
-#endif /* !CONFIG_USER_ONLY */
--
2.38.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 9/9] target/xtensa/cpu: Include missing "memory.h" header
2022-12-17 17:28 [PATCH v2 0/9] target/misc: Header cleanups around "cpu.h" Philippe Mathieu-Daudé
` (7 preceding siblings ...)
2022-12-17 17:29 ` [PATCH v2 8/9] target/sparc/sysemu: Remove pointless CONFIG_USER_ONLY guard Philippe Mathieu-Daudé
@ 2022-12-17 17:29 ` Philippe Mathieu-Daudé
8 siblings, 0 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-12-17 17:29 UTC (permalink / raw)
To: qemu-devel
Cc: Max Filippov, Richard Henderson, Bin Meng, kvm, qemu-ppc,
Greg Kurz, Daniel Henrique Barboza, Bernhard Beschow, qemu-riscv,
Song Gao, Artyom Tarasenko, Paolo Bonzini, Palmer Dabbelt,
Mark Cave-Ayland, Laurent Vivier, Alistair Francis,
Cédric Le Goater, David Gibson, Xiaojuan Yang,
Philippe Mathieu-Daudé
Under system emulation, xtensa_cpu_initfn() calls
memory_region_init_io(), itself declared in "exec/memory.h".
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/xtensa/cpu.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c
index 09923301c4..879710f8d1 100644
--- a/target/xtensa/cpu.c
+++ b/target/xtensa/cpu.c
@@ -35,6 +35,9 @@
#include "qemu/module.h"
#include "migration/vmstate.h"
#include "hw/qdev-clock.h"
+#ifndef CONFIG_USER_ONLY
+#include "exec/memory.h"
+#endif
static void xtensa_cpu_set_pc(CPUState *cs, vaddr value)
--
2.38.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v2 7/9] target/riscv/cpu: Restrict some sysemu-specific fields from CPUArchState
2022-12-17 17:29 ` [PATCH v2 7/9] target/riscv/cpu: Restrict some sysemu-specific fields from CPUArchState Philippe Mathieu-Daudé
@ 2022-12-17 18:00 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-12-17 18:00 UTC (permalink / raw)
To: qemu-devel
Cc: Max Filippov, Richard Henderson, Bin Meng, kvm, qemu-ppc,
Greg Kurz, Daniel Henrique Barboza, Bernhard Beschow, qemu-riscv,
Song Gao, Artyom Tarasenko, Paolo Bonzini, Palmer Dabbelt,
Mark Cave-Ayland, Laurent Vivier, Alistair Francis,
Cédric Le Goater, David Gibson, Xiaojuan Yang
On 17/12/22 18:29, Philippe Mathieu-Daudé wrote:
> The 'hwaddr' type is only available / meaningful on system emulation.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> target/riscv/cpu.h | 17 ++++++++++-------
> 1 file changed, 10 insertions(+), 7 deletions(-)
>
> diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h
> index 05fafebff7..71ea1bb411 100644
> --- a/target/riscv/cpu.h
> +++ b/target/riscv/cpu.h
> @@ -370,7 +370,7 @@ struct CPUArchState {
> uint64_t menvcfg;
> target_ulong senvcfg;
> uint64_t henvcfg;
> -#endif
> +
> target_ulong cur_pmmask;
> target_ulong cur_pmbase;
>
> @@ -388,6 +388,7 @@ struct CPUArchState {
> uint64_t kvm_timer_compare;
> uint64_t kvm_timer_state;
> uint64_t kvm_timer_frequency;
> +#endif
> };
Sorry this patch is not complete, as various of these fields are
in use in common emulation code (so build fails on linux-user) :/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 1/9] target/alpha: Remove obsolete STATUS document
2022-12-17 17:28 ` [PATCH v2 1/9] target/alpha: Remove obsolete STATUS document Philippe Mathieu-Daudé
@ 2022-12-17 18:29 ` Richard Henderson
0 siblings, 0 replies; 14+ messages in thread
From: Richard Henderson @ 2022-12-17 18:29 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
On 12/17/22 09:28, Philippe Mathieu-Daudé wrote:
> Likely out of sync: last update is from 2008
> (commit d1412eb240), 12 years ago.
>
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> ---
> target/alpha/STATUS | 28 ----------------------------
> 1 file changed, 28 deletions(-)
> delete mode 100644 target/alpha/STATUS
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 5/9] target/ppc/kvm: Remove unused "sysbus.h" header
2022-12-17 17:29 ` [PATCH v2 5/9] target/ppc/kvm: Remove unused "sysbus.h" header Philippe Mathieu-Daudé
@ 2022-12-17 18:30 ` Richard Henderson
0 siblings, 0 replies; 14+ messages in thread
From: Richard Henderson @ 2022-12-17 18:30 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
On 12/17/22 09:29, Philippe Mathieu-Daudé wrote:
> Nothing requires SysBus declarations here.
>
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> ---
> target/ppc/kvm.c | 1 -
> 1 file changed, 1 deletion(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 6/9] target/riscv/cpu: Move Floating-Point fields closer
2022-12-17 17:29 ` [PATCH v2 6/9] target/riscv/cpu: Move Floating-Point fields closer Philippe Mathieu-Daudé
@ 2022-12-17 18:32 ` Richard Henderson
0 siblings, 0 replies; 14+ messages in thread
From: Richard Henderson @ 2022-12-17 18:32 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
On 12/17/22 09:29, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> ---
> target/riscv/cpu.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2022-12-17 18:32 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-17 17:28 [PATCH v2 0/9] target/misc: Header cleanups around "cpu.h" Philippe Mathieu-Daudé
2022-12-17 17:28 ` [PATCH v2 1/9] target/alpha: Remove obsolete STATUS document Philippe Mathieu-Daudé
2022-12-17 18:29 ` Richard Henderson
2022-12-17 17:29 ` [PATCH v2 2/9] target/loongarch/cpu: Remove unused "sysbus.h" header Philippe Mathieu-Daudé
2022-12-17 17:29 ` [PATCH v2 3/9] target/loongarch/cpu: Restrict "memory.h" header to sysemu Philippe Mathieu-Daudé
2022-12-17 17:29 ` [PATCH v2 4/9] target/ppc/internal: Restrict MMU declarations " Philippe Mathieu-Daudé
2022-12-17 17:29 ` [PATCH v2 5/9] target/ppc/kvm: Remove unused "sysbus.h" header Philippe Mathieu-Daudé
2022-12-17 18:30 ` Richard Henderson
2022-12-17 17:29 ` [PATCH v2 6/9] target/riscv/cpu: Move Floating-Point fields closer Philippe Mathieu-Daudé
2022-12-17 18:32 ` Richard Henderson
2022-12-17 17:29 ` [PATCH v2 7/9] target/riscv/cpu: Restrict some sysemu-specific fields from CPUArchState Philippe Mathieu-Daudé
2022-12-17 18:00 ` Philippe Mathieu-Daudé
2022-12-17 17:29 ` [PATCH v2 8/9] target/sparc/sysemu: Remove pointless CONFIG_USER_ONLY guard Philippe Mathieu-Daudé
2022-12-17 17:29 ` [PATCH v2 9/9] target/xtensa/cpu: Include missing "memory.h" header Philippe Mathieu-Daudé
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).