diff options
| author | Dr. David Alan Gilbert | 2016-09-29 21:09:37 +0200 |
|---|---|---|
| committer | Juan Quintela | 2016-10-13 17:23:53 +0200 |
| commit | 863e9621c51a7544f1a2ae78387749145adaf450 (patch) | |
| tree | 9afdd1b75ec05b47c7f9c25e89ddb887a15e5a6f /include/exec | |
| parent | Postcopy vs xbzrle: Don't send xbzrle pages once in postcopy [for 2.8] (diff) | |
| download | qemu-863e9621c51a7544f1a2ae78387749145adaf450.tar.gz qemu-863e9621c51a7544f1a2ae78387749145adaf450.tar.xz qemu-863e9621c51a7544f1a2ae78387749145adaf450.zip | |
RAMBlocks: Store page size
Store the page size in each RAMBlock, we need it later.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'include/exec')
| -rw-r--r-- | include/exec/cpu-common.h | 1 | ||||
| -rw-r--r-- | include/exec/ram_addr.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 869ba41b0c..cffdc130e6 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 2a9465da11..54d7108a9e 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) |
