aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/exec/cpu-all.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index c085804aed..62f558103d 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -313,6 +313,13 @@ typedef struct RAMBlock {
int fd;
} RAMBlock;
+static inline void *ramblock_ptr(RAMBlock *block, ram_addr_t offset)
+{
+ assert(offset < block->length);
+ assert(block->host);
+ return (char *)block->host + offset;
+}
+
typedef struct RAMList {
QemuMutex mutex;
/* Protected by the iothread lock. */