mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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 <avi@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
80a1ea3748
commit
7a8499e88b
2 changed files with 7 additions and 0 deletions
2
memory.h
2
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue