qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 02/11] exec: Restrict hwaddr.h to sysemu/


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 02/11] exec: Restrict hwaddr.h to sysemu/
Date: Tue, 6 Dec 2022 15:40:45 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.5.1

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.
 */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]