From 7a8499e88bffff66d90300d4f2018c938543b1cf Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Wed, 8 Feb 2012 17:01:23 +0200 Subject: memory: add a readonly attribute to MemoryRegionSection .readonly cannot be obtained from the MemoryRegion, since it is inherited from aliases (so you can have a MemoryRegion mapped RW at one address and RO at another). Record it in a MemoryRegionSection for listeners. Signed-off-by: Avi Kivity Reviewed-by: Richard Henderson --- memory.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'memory.h') diff --git a/memory.h b/memory.h index 84bb67c..1d99cee 100644 --- a/memory.h +++ b/memory.h @@ -160,6 +160,7 @@ typedef struct MemoryRegionSection MemoryRegionSection; * @size: the size of the section; will not exceed @mr's boundaries * @offset_within_address_space: the address of the first byte of the section * relative to the region's address space + * @readonly: writes to this section are ignored */ struct MemoryRegionSection { MemoryRegion *mr; @@ -167,6 +168,7 @@ struct MemoryRegionSection { target_phys_addr_t offset_within_region; uint64_t size; target_phys_addr_t offset_within_address_space; + bool readonly; }; typedef struct MemoryListener MemoryListener; -- cgit v1.1