History | View | Annotate | Download (37.1 kB)
memory: cpu_physical_memory_mask_dirty_range() always clears a single flag
Document it
Signed-off-by: Juan Quintela <quintela@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>Reviewed-by: Orit Wasserman <owasserm@redhat.com>
memory: use bit 2 for migration
For historical reasons it was bit 3. Once there, create a constant toknow the number of clients.
memory: split dirty bitmap into three
After all the previous patches, spliting the bitmap gets direct.
Note: For some reason, I have to move DIRTY_MEMORY_* definitions tothe beginning of memory.h to make compilation work.
Signed-off-by: Juan Quintela <quintela@redhat.com>...
memory: Change MemoryRegion priorities from unsigned to signed
When memory regions overlap, priority can be used to specifywhich of them takes priority. By making the priority values signedrather than unsigned, we make it more convenient to implementa situation where one "background" region should appear only...
memory: move MemoryListener declaration earlier
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
exec: move listener from AddressSpaceDispatch to AddressSpace
This will help having two copies of AddressSpaceDispatch during therecreation of the radix tree (one being built, and one that is completeand will be protected by RCU). We do not want to have to unregister and...
exec: separate current radix tree from the one being built
This same treatment previously done to phys_node_map and phys_sectionsis now applied to the dispatch field of AddressSpace. Topology updatesuse as->next_dispatch while accesses use as->dispatch....
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
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>
ioport: Switch dispatching to memory core layer
The current ioport dispatcher is a complex beast, mostly due to theneed to deal with old portio interface users. But we can overcome itwithout converting all portio users by embedding the required baseaddress of a MemoryRegionPortio access into that data structure. That...
ioport: Remove unused old dispatching services
Remove unused ioport_register and isa_unassign_ioport along witheverything that only those services used.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
ioport: Move portio types to ioport.h
This decouples memory.h from ioport.h, concentrating all portio relatedtypes in a single header.
memory: add owner argument to initialization functions
hwaddr: Make hwaddr type usable beyond softmmu
While not normally needed for *-user, it can safely be used there sincealways based on uint64_t, to avoid ifdeffery.
To avoid accidental uses, move the guards from exec/hwaddr.h to itsinclusion sites. No need for them in include/hw/....
memory: give name to every AddressSpace
The "info mtree" command in QEMU console prints only "memory" and "I/O" address spaces while there are actually a lot more other AddressSpacestructs created by PCI and VIO devices. Those devices do not normallyhave names and therefore not present in "info mtree" output....
memory: make section size a 128-bit integer
So far, the size of all regions passed to listeners could fit in 64 bits,because artificial regions (containers and aliases) are eliminated bythe memory core, leaving only device regions which have reasonable sizes...
memory: iommu support
Add a new memory region type that translates addresses it is given,then forwards them to a target address space. This is similar toan alias, except that the mapping is more flexible than a lineartranslation and trucation, and also less efficient since the...
memory: Add iommu map/unmap notifiers
This patch adds a NotifierList to MemoryRegions which represent IOMMUsallowing other parts of the code to register interest in mappings orunmappings from the IOMMU. All IOMMU implementations will need to callmemory_region_notify_iommu() to inform those waiting on the notifier list,...
exec: return MemoryRegion from address_space_translate
Only address_space_translate_for_iotlb needs to return the section.Every caller of address_space_translate now uses only section->mr,return it directly.
Revert "memory: limit sections in the radix tree to the actual address space size"
This reverts commit 86a8623692b1b559a419a92eb8b6897c221bca74.
memory: add return value to address_space_rw/read/write
Reviewed-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
memory: add address_space_access_valid
The old-style IOMMU lets you check whether an access is valid in agiven DMAContext. There is no equivalent for AddressSpace in thememory API, implement it with a lookup of the dispatch tree.
Reviewed-by: Richard Henderson <rth@twiddle.net>...
memory: add address_space_translate
Using phys_page_find to translate an AddressSpace to a MemoryRegionSectionis unwieldy. It requires to pass the page index rather than the address,and later memory_region_section_addr has to be called. Replacememory_region_section_addr with a function that does all of it: call...
memory: limit sections in the radix tree to the actual address space size
The radix tree is statically sized to fit TARGET_PHYS_ADDR_SPACE_BITS.If a larger memory region is registered, it will overflow.
Fix by limiting any section in the radix tree to the supported size....
memory: make memory_global_sync_dirty_bitmap take an AddressSpace
Since this is a MemoryListener operation, it only makes senseon an AddressSpace granularity.
Suggested-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
memory: Rename readable flag to romd_mode
"Readable" is a very unfortunate name for this flag because even arom_device region will always be readable from the guest POV. Whatdiffers is the mapping, just like the comments had to explain already.Also, readable could currently be understood as being a generic region...
memory: allow memory_region_find() to run on non-root memory regions
memory_region_find() is similar to registering a MemoryListener andchecking for the MemoryRegionSections that come from a particularregion. There is no reason for this to be limited to a root memory...
memory: move core typedefs to qemu/typedefs.h
memory: introduce memory_region_test_and_clear_dirty
This function avoids having to do two calls, one to test the dirty bit, andother to reset it.
Signed-off-by: Juan Quintela <quintela@redhat.com>
misc: move include files to include/qemu/
exec: move include files to include/exec/