summaryrefslogtreecommitdiffstats
path: root/memory.h
Commit message (Collapse)AuthorAgeFilesLines
* memory: simple memory tree printerBlue Swirl2011-10-021-0/+2
| | | | | | | | Add a monitor command 'info mtree' to show the memory hierarchy much like /proc/iomem in Linux. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* memory: implement memory_region_set_readonly()Avi Kivity2011-09-251-0/+1
| | | | | | | The property is inheritable, but only if set to true. This is so that memory routers can mark sections of RAM as read-only via aliases. Signed-off-by: Avi Kivity <avi@redhat.com>
* memory: add opaque parameter to memory_region_init_rom_device()Avi Kivity2011-08-261-0/+1
| | | | | | The MemoryRegionOps callbacks expect it. Signed-off-by: Avi Kivity <avi@redhat.com>
* memory: add API for creating ROM/device regionsAvi Kivity2011-08-121-0/+34
| | | | | | | | ROM/device regions act as mapped RAM for reads, can I/O memory for writes. This allow emulation of flash devices. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* memory: reclaim resources when a memory region is destroyed for goodAvi Kivity2011-08-121-0/+1
| | | | | Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* memory: rename PORTIO_END to PORTIO_END_OF_LISTAvi Kivity2011-08-081-1/+1
| | | | | | | For consistency with other _END_OF_LIST macros. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* memory: transaction APIAvi Kivity2011-07-291-0/+8
| | | | | | | | | | | | Allow changes to the memory hierarchy to be accumulated and made visible all at once. This reduces computational effort, especially when an accelerator (e.g. kvm) is involved. Useful when a single register update causes multiple changes to an address space. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* memory: add ioeventfd supportAvi Kivity2011-07-291-0/+45
| | | | | | | | | | As with the rest of the memory API, the caller associates an eventfd with an address, and the memory API takes care of registering or unregistering when the address is made visible or invisible to the guest. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* memory: add backward compatibility for old mmio registrationAvi Kivity2011-07-291-0/+10
| | | | | | | | This eases the transition to the new API. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* memory: add backward compatibility for old portio registrationAvi Kivity2011-07-291-0/+17
| | | | | | Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* memory: I/O address space supportAvi Kivity2011-07-291-0/+2
| | | | | | | | Allow registering I/O ports via the same mechanism as mmio ranges. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* memory: late initialization of ram_addrAvi Kivity2011-07-291-0/+1
| | | | | | | | | | | | | For non-RAM memory regions, we cannot tell whether this is an I/O region or an MMIO region. Since the qemu backing registration is different for the two, we have to defer initialization until we know which address space we are in. These shenanigans will be removed once the backing registration is unified with the memory API. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* memory: rename MemoryRegion::has_ram_addr to ::terminatesAvi Kivity2011-07-291-1/+1
| | | | | | | | I/O regions will not have ram_addrs, so this is a better name. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* memory: implement dirty trackingAvi Kivity2011-07-291-0/+1
| | | | | | | | | Currently dirty tracking is implemented by passing through all calls to the underlying cpu_physical_memory_*() calls. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Hierarchical memory region APIAvi Kivity2011-07-291-0/+385
The memory API separates the attributes of a memory region (its size, how reads or writes are handled, dirty logging, and coalescing) from where it is mapped and whether it is enabled. This allows a device to configure a memory region once, then hand it off to its parent bus to map it according to the bus configuration. Hierarchical registration also allows a device to compose a region out of a number of sub-regions with different properties; for example some may be RAM while others may be MMIO. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud