From 863e9621c51a7544f1a2ae78387749145adaf450 Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Thu, 29 Sep 2016 20:09:37 +0100 Subject: RAMBlocks: Store page size Store the page size in each RAMBlock, we need it later. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- include/exec/cpu-common.h | 1 + include/exec/ram_addr.h | 1 + 2 files changed, 2 insertions(+) (limited to 'include') diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 869ba41..cffdc13 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -63,6 +63,7 @@ RAMBlock *qemu_ram_block_from_host(void *ptr, bool round_offset, void qemu_ram_set_idstr(RAMBlock *block, const char *name, DeviceState *dev); void qemu_ram_unset_idstr(RAMBlock *block); const char *qemu_ram_get_idstr(RAMBlock *rb); +size_t qemu_ram_pagesize(RAMBlock *block); void cpu_physical_memory_rw(hwaddr addr, uint8_t *buf, int len, int is_write); diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index 2a9465d..54d7108 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -36,6 +36,7 @@ struct RAMBlock { /* RCU-enabled, writes protected by the ramlist lock */ QLIST_ENTRY(RAMBlock) next; int fd; + size_t page_size; }; static inline bool offset_in_ramblock(RAMBlock *b, ram_addr_t offset) -- cgit v1.1