summary refs log tree commit diff stats
path: root/include/system/memory.h
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-09-29 14:36:19 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-10-07 03:37:04 +0200
commit839976e9da4b577aca284847b7e965332f2ca687 (patch)
tree45dcc51535b54bd56c9ba4459a561cd3764a6405 /include/system/memory.h
parent7d4c9d2cb89818ef800718a4f462b34a21ee65cb (diff)
downloadfocaccia-qemu-839976e9da4b577aca284847b7e965332f2ca687.tar.gz
focaccia-qemu-839976e9da4b577aca284847b7e965332f2ca687.zip
system/memory: Factor address_space_is_io() out
Factor address_space_is_io() out of cpu_physical_memory_is_io().

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251002084203.63899-3-philmd@linaro.org>
Diffstat (limited to 'include/system/memory.h')
-rw-r--r--include/system/memory.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/system/memory.h b/include/system/memory.h
index 08daf0fc59..f222743b6f 100644
--- a/include/system/memory.h
+++ b/include/system/memory.h
@@ -3047,6 +3047,15 @@ static inline MemoryRegion *address_space_translate(AddressSpace *as,
 bool address_space_access_valid(AddressSpace *as, hwaddr addr, hwaddr len,
                                 bool is_write, MemTxAttrs attrs);
 
+/**
+ * address_space_is_io: check whether an guest physical addresses
+ *                      whithin an address space is I/O memory.
+ *
+ * @as: #AddressSpace to be accessed
+ * @addr: address within that address space
+ */
+bool address_space_is_io(AddressSpace *as, hwaddr addr);
+
 /* address_space_map: map a physical memory region into a host virtual address
  *
  * May map a subset of the requested range, given by and returned in @plen.