From 9b8424d5735278ca382f11adc7c63072b632ab83 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Mon, 15 Dec 2014 22:55:32 +0200 Subject: 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 Reviewed-by: Paolo Bonzini --- include/exec/cpu-all.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 62f5581..6f2130e 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. -- cgit v1.1