summary refs log tree commit diff stats
path: root/include
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2014-12-15 22:55:32 +0200
committerMichael S. Tsirkin <mst@redhat.com>2015-01-08 13:17:54 +0200
commit9b8424d5735278ca382f11adc7c63072b632ab83 (patch)
treea7320e19b3418258eebda8d2b2164e9a9b830d3a /include
parentc8d6f66ae7d0ce5f3622c19e29a2333d28dc1e9a (diff)
downloadfocaccia-qemu-9b8424d5735278ca382f11adc7c63072b632ab83.tar.gz
focaccia-qemu-9b8424d5735278ca382f11adc7c63072b632ab83.zip
exec: split length -> used_length/max_length
This patch allows us to distinguish between two
length values for each block:
    max_length - length of memory block that was allocated
    used_length - length of block used by QEMU/guest

Currently, we set used_length - max_length, unconditionally.
Follow-up patches allow used_length <= max_length.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/exec/cpu-all.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index 62f558103d..6f2130eab2 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -303,7 +303,8 @@ typedef struct RAMBlock {
     struct MemoryRegion *mr;
     uint8_t *host;
     ram_addr_t offset;
-    ram_addr_t length;
+    ram_addr_t used_length;
+    ram_addr_t max_length;
     uint32_t flags;
     char idstr[256];
     /* Reads can take either the iothread or the ramlist lock.