mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
memory: remove qemu_get_ram_fd, qemu_set_ram_fd, qemu_ram_block_host_ptr
Remove direct uses of ram_addr_t and optimize memory_region_{get,set}_fd now that a MemoryRegion knows its RAMBlock directly. Reviewed-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
063143d5b1
commit
4ff87573df
6 changed files with 37 additions and 52 deletions
|
@ -666,6 +666,17 @@ static inline bool memory_region_is_rom(MemoryRegion *mr)
|
|||
*/
|
||||
int memory_region_get_fd(MemoryRegion *mr);
|
||||
|
||||
/**
|
||||
* memory_region_set_fd: Mark a RAM memory region as backed by a
|
||||
* file descriptor.
|
||||
*
|
||||
* This function is typically used after memory_region_init_ram_ptr().
|
||||
*
|
||||
* @mr: the memory region being queried.
|
||||
* @fd: the file descriptor that backs @mr.
|
||||
*/
|
||||
void memory_region_set_fd(MemoryRegion *mr, int fd);
|
||||
|
||||
/**
|
||||
* memory_region_get_ram_ptr: Get a pointer into a RAM memory region.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue