exec: simplify destruction of the phys map
Do not bother visiting the radix tree when an address space is destroyed.After the previous patch, this has become a pointless exercise. Whencalled from address_space_destroy_dispatch, all you're doing is zeroing...
memory: add getter for owner
Whenever memory regions are accessed outside the BQL, they need to bepreserved against hot-unplug. MemoryRegions actually do not have theirown reference count; they piggyback on a QOM object, their "owner".The owner is set at creation time, and there is a function to retrieve...
memory: add ref/unref
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
memory: introduce memory_region_present
This new API will avoid having too many memory_region_ref/unrefin paths that currently use memory_region_find.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
memory: add ref/unref calls
Add ref/unref calls at the following places:
- places where memory regions are stashed by a listener and used outside the BQL (including in Xen or KVM).
- memory_region_find callsites
- creation of aliases and containers (only the aliased/contained...
exec: check MRU in qemu_ram_addr_from_host
This function is not used outside the iothread mutex, so itcan use ram_list.mru_block.
exec: move qemu_ram_addr_from_host_nofail to cputlb.c
After the next patch it would not be used elsewhere anyway. Also,the _nofail and the standard versions of this function return differentthings, which is confusing. Removing the function from the public headers...
ioport: Move portio types to ioport.h
This decouples memory.h from ioport.h, concentrating all portio relatedtypes in a single header.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
memory: add owner argument to initialization functions
memory: destroy phys_sections one by one
phys_sections_clear is invoked after the dispatch tree has beendestroyed. This leaves a window where phys_sections_nb > 0 but thesubpages are not valid anymore, which is a recipe for use-after-freebugs.
Move the destruction of subpages in phys_sections_clear. We will...
View all revisions | View revisions
Also available in: Atom