diff options
Diffstat (limited to 'include/exec/memory.h')
-rw-r--r-- | include/exec/memory.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/exec/memory.h b/include/exec/memory.h index 0f07159bb4..9bbd247c38 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -656,8 +656,13 @@ int memory_region_get_fd(MemoryRegion *mr); * memory_region_get_ram_ptr: Get a pointer into a RAM memory region. * * Returns a host pointer to a RAM memory region (created with - * memory_region_init_ram() or memory_region_init_ram_ptr()). Use with - * care. + * memory_region_init_ram() or memory_region_init_ram_ptr()). + * + * Use with care; by the time this function returns, the returned pointer is + * not protected by RCU anymore. If the caller is not within an RCU critical + * section and does not hold the iothread lock, it must have other means of + * protecting the pointer, such as a reference to the region that includes + * the incoming ram_addr_t. * * @mr: the memory region being queried. */ |