On 6/12/22 15:32, Philippe Mathieu-Daudé wrote:
On 26/5/21 20:15, Richard Henderson wrote:
On 5/17/21 4:11 AM, Philippe Mathieu-Daudé wrote:
--- a/include/exec/hwaddr.h
+++ b/include/exec/sysemu/hwaddr.h
@@ -1,8 +1,9 @@
/* Define hwaddr if it exists. */
-#ifndef HWADDR_H
-#define HWADDR_H
+#ifndef EXEC_SYSEMU_HWADDR_H
+#define EXEC_SYSEMU_HWADDR_H
+#ifndef CONFIG_USER_ONLY
#define HWADDR_BITS 64
/* hwaddr is the type of a physical address (its size can
@@ -23,4 +24,6 @@ typedef struct MemMapEntry {
hwaddr size;
} MemMapEntry;
+#endif /* !CONFIG_USER_ONLY */
+
#endif
Why no #error on this one, unlike the next patch.
Because many files in user emulation include "exec/hwaddr.h" :(
See for example gdbstub/user.c:
int gdb_breakpoint_insert(CPUState *cs, int type, hwaddr addr, hwaddr len)
I suppose we should change the two hwaddr by vaddr:
/**
* vaddr:
* Type wide enough to contain any #target_ulong virtual address.
*/