Re: [PATCH 30/37] include/exec: Drop ifndef CONFIG_USER_ONLY from cpu-common.h

2025-03-13 Thread Pierrick Bouvier

On 3/12/25 20:45, Richard Henderson wrote:

We were hiding a number of declarations from user-only,
although it hurts nothing to allow them.

Signed-off-by: Richard Henderson 
---
  include/exec/cpu-common.h | 6 --
  1 file changed, 6 deletions(-)

diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h
index be032e1a49..9b83fd7ac8 100644
--- a/include/exec/cpu-common.h
+++ b/include/exec/cpu-common.h
@@ -9,9 +9,7 @@
  #define CPU_COMMON_H
  
  #include "exec/vaddr.h"

-#ifndef CONFIG_USER_ONLY
  #include "exec/hwaddr.h"
-#endif
  #include "hw/core/cpu.h"
  #include "tcg/debug-assert.h"
  #include "exec/page-protection.h"
@@ -40,8 +38,6 @@ int cpu_get_free_index(void);
  void tcg_iommu_init_notifier_list(CPUState *cpu);
  void tcg_iommu_free_notifier_list(CPUState *cpu);
  
-#if !defined(CONFIG_USER_ONLY)

-
  enum device_endian {
  DEVICE_NATIVE_ENDIAN,
  DEVICE_BIG_ENDIAN,
@@ -176,8 +172,6 @@ int ram_block_discard_range(RAMBlock *rb, uint64_t start, 
size_t length);
  int ram_block_discard_guest_memfd_range(RAMBlock *rb, uint64_t start,
  size_t length);
  
-#endif

-
  /* Returns: 0 on success, -1 on error */
  int cpu_memory_rw_debug(CPUState *cpu, vaddr addr,
  void *ptr, size_t len, bool is_write);


Reviewed-by: Pierrick Bouvier 




[PATCH 30/37] include/exec: Drop ifndef CONFIG_USER_ONLY from cpu-common.h

2025-03-12 Thread Richard Henderson
We were hiding a number of declarations from user-only,
although it hurts nothing to allow them.

Signed-off-by: Richard Henderson 
---
 include/exec/cpu-common.h | 6 --
 1 file changed, 6 deletions(-)

diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h
index be032e1a49..9b83fd7ac8 100644
--- a/include/exec/cpu-common.h
+++ b/include/exec/cpu-common.h
@@ -9,9 +9,7 @@
 #define CPU_COMMON_H
 
 #include "exec/vaddr.h"
-#ifndef CONFIG_USER_ONLY
 #include "exec/hwaddr.h"
-#endif
 #include "hw/core/cpu.h"
 #include "tcg/debug-assert.h"
 #include "exec/page-protection.h"
@@ -40,8 +38,6 @@ int cpu_get_free_index(void);
 void tcg_iommu_init_notifier_list(CPUState *cpu);
 void tcg_iommu_free_notifier_list(CPUState *cpu);
 
-#if !defined(CONFIG_USER_ONLY)
-
 enum device_endian {
 DEVICE_NATIVE_ENDIAN,
 DEVICE_BIG_ENDIAN,
@@ -176,8 +172,6 @@ int ram_block_discard_range(RAMBlock *rb, uint64_t start, 
size_t length);
 int ram_block_discard_guest_memfd_range(RAMBlock *rb, uint64_t start,
 size_t length);
 
-#endif
-
 /* Returns: 0 on success, -1 on error */
 int cpu_memory_rw_debug(CPUState *cpu, vaddr addr,
 void *ptr, size_t len, bool is_write);
-- 
2.43.0