Statistics
| Branch: | Revision:

root / memory.h @ 93148aa5

History | View | Annotate | Download (25.3 kB)

# Date Author Comment
a2d33521 03/05/2012 05:40 pm Avi Kivity

memory: fix I/O port aliases

Commit e58ac72b6a0 ("ioport: change portio_list not to use
memory_region_set_offset()") started using aliases of I/O memory
regions. Since the IORange used for the I/O was contained in the
target region, the alias information (specifically, the offset...

7376e582 02/29/2012 01:44 pm Avi Kivity

memory: allow MemoryListeners to observe a specific address space

Ignore any regions not belonging to a specified address space.

Signed-off-by: Avi Kivity <>

50c1e149 02/29/2012 01:44 pm Avi Kivity

memory: support stateless memory listeners

Current memory listeners are incremental; that is, they are expected to
maintain their own state, and receive callbacks for changes to that state.

This patch adds support for stateless listeners; these work by receiving...

2b50aa1f 02/29/2012 01:44 pm Avi Kivity

memory: remove memory_region_set_offset()

memory_region_set_offset() complicates the API, and has been deprecated
since its introduction. Now that it is no longer used, remove it.

Signed-off-by: Avi Kivity <>
Reviewed-by: Richard Henderson <>

72e22d2f 02/29/2012 01:44 pm Avi Kivity

memory: switch memory listeners to a QTAILQ

This allows reverse iteration, which in turns allows consistent ordering
among multiple listeners:

l1->add
l2->add
l2->del
l1->del

Signed-off-by: Avi Kivity <>
Reviewed-by: Richard Henderson <>

80a1ea37 02/29/2012 01:44 pm Avi Kivity

memory: move ioeventfd ops to MemoryListener

This way the accelerator (kvm) can handle them directly.

Signed-off-by: Avi Kivity <>
Reviewed-by: Richard Henderson <>

7a8499e8 02/29/2012 01:44 pm Avi Kivity

memory: add a readonly attribute to MemoryRegionSection

.readonly cannot be obtained from the MemoryRegion, since it is
inherited from aliases (so you can have a MemoryRegion mapped RW
at one address and RO at another). Record it in a MemoryRegionSection...

cd7a45c9 02/04/2012 02:45 pm Blue Swirl

memory: change dirty getting API to take a size

Instead of each device knowing or guessing the guest page size,
just pass the desired size of dirtied memory area.

Signed-off-by: Blue Swirl <>

fd4aa979 01/25/2012 08:32 pm Blue Swirl

memory: change dirty setting APIs to take a size

Instead of each target knowing or guessing the guest page size,
just pass the desired size of dirtied memory area.

Signed-off-by: Blue Swirl <>

1660e72d 01/19/2012 01:14 pm Jan Kiszka

memory: Introduce memory_region_init_reservation

Introduce a memory region type that can reserve I/O space. Such regions
are useful for modeling I/O that is only handled outside of QEMU, i.e.
in the context of an accelerator like KVM.

Any access to such a region from QEMU is a bug, but could theoretically...

dabdf394 01/13/2012 12:36 pm Stefan Weil

Spelling fixes in comments and documentation

Codespell detected these new spelling issues.

Signed-off-by: Stefan Weil <>
Signed-off-by: Stefan Hajnoczi <>

b3b00c78 01/04/2012 01:34 pm Avi Kivity

Remove IO_MEM_SUBPAGE

Replace with a MemoryRegion flag.

Signed-off-by: Avi Kivity <>
Reviewed-by: Richard Henderson <>

75c578dc 01/04/2012 01:34 pm Avi Kivity

Drop IO_MEM_ROMD

Unlike ->readonly, ->readable is not inherited from aliase, so we can simply
query the memory region.

Signed-off-by: Avi Kivity <>
Reviewed-by: Richard Henderson <>

26a83ad0 01/04/2012 01:34 pm Avi Kivity

memory: remove MemoryRegion::backend_registered

backend_registered was used to lazify the process of registering an
mmio region, since the it is different for the I/O address space and
the memory address space. However, it also makes registration dependent...

c5705a77 01/04/2012 01:34 pm Avi Kivity

vmstate, memory: decouple vmstate from memory API

Currently creating a memory region automatically registers it for
live migration. This differs from other state (which is enumerated
in a VMStateDescription structure) and ties the live migration code
into the memory core....

8991c79b 01/04/2012 01:34 pm Avi Kivity

memory: introduce memory_region_name()

Trivial accessor for the name attribute.

Signed-off-by: Avi Kivity <>

e34911c4 12/20/2011 02:14 pm Avi Kivity

memory: temporarily add memory_region_get_ram_addr()

This is a layering violation, but needed while the code contains
naked calls to qemu_get_ram_ptr() and the like.

Signed-off-by: Avi Kivity <>

e2177955 12/20/2011 02:14 pm Avi Kivity

memory: introduce memory_region_find()

Given an address space (represented by the top-level memory region),
returns the memory region that maps a given range. Useful for implementing
DMA.

The implementation is a simplistic binary search. Once we have a tree...

86e775c6 12/20/2011 02:14 pm Avi Kivity

memory: replace cpu_physical_sync_dirty_bitmap() with a memory API

The function is still used as the implementation.

Signed-off-by: Avi Kivity <>

7664e80c 12/20/2011 02:14 pm Avi Kivity

memory: add API for observing updates to the physical memory map

Add an API that allows a client to observe changes in the global
memory map:
- region added (possibly with logging enabled)
- region removed (possibly with logging enabled)
- logging started on a region...

8ea9252a 12/20/2011 02:14 pm Avi Kivity

memory: add memory_region_is_ram()

Signed-off-by: Avi Kivity <>

ce7923da 12/20/2011 02:14 pm Avi Kivity

memory: add memory_region_is_rom()

Signed-off-by: Avi Kivity <>

55043ba3 12/20/2011 02:14 pm Avi Kivity

memory: add memory_region_is_logging()

Signed-off-by: Avi Kivity <>

cde7fc31 12/19/2011 05:12 pm Anthony Liguori

Merge remote-tracking branch 'qemu-kvm/memory/mutators' into staging

Conflicts:
memory.h

69ddaf66 12/06/2011 12:10 pm Ademar de Souza Reis Jr

memory: minor documentation fixes/enhancements

Fix typos and minor documentation errors in both memory.h and
docs/memory.txt.

Also add missing documentation formatting tags to transaction
functions.

Reviewed-by: Stefan Weil <>
Signed-off-by: Ademar de Souza Reis Jr <>...

4703359e 12/05/2011 12:04 pm Avi Kivity

memory: introduce memory_region_set_alias_offset()

Add an API to update an alias offset of an active alias. This can be
used to simplify implementation of dynamic memory banks.

Signed-off-by: Avi Kivity <>

2282e1af 12/04/2011 07:19 pm Avi Kivity

memory: introduce memory_region_set_address()

Allow changing the address of a memory region while it is
in the memory hierarchy.

Signed-off-by: Avi Kivity <>

6bba19ba 12/04/2011 07:00 pm Avi Kivity

memory: introduce memory_region_set_enabled()

This allows users to disable a memory region without removing
it from the hierarchy, simplifying the implementation of
memory routers.

Signed-off-by: Avi Kivity <>

897fa7cf 11/24/2011 06:32 pm Avi Kivity

memory: add MemoryRegionOps::valid.accepts

MemoryRegionOps::valid tries to declaratively specify which transactions
are accepted by the device/bus, however it is not completely generic. Add
a callback for special cases.

Signed-off-by: Avi Kivity <>

08dafab4 10/16/2011 02:19 pm Avi Kivity

memory: use 128-bit integers for sizes and intermediates

Since the memory API supports 64-bit buses, it needs a larger type to represent
intermediate results.

Signed-off-by: Avi Kivity <>

314e2987 10/02/2011 05:27 pm Blue Swirl

memory: simple memory tree printer

Add a monitor command 'info mtree' to show the memory hierarchy
much like /proc/iomem in Linux.

Signed-off-by: Blue Swirl <>
Signed-off-by: Avi Kivity <>

fb1cd6f9 09/25/2011 02:48 pm Avi Kivity

memory: implement memory_region_set_readonly()

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 <>

75f5941c 08/26/2011 12:35 am Avi Kivity

memory: add opaque parameter to memory_region_init_rom_device()

The MemoryRegionOps callbacks expect it.

Signed-off-by: Avi Kivity <>

d0a9b5bc 08/12/2011 04:31 pm Avi Kivity

memory: add API for creating ROM/device regions

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 <>
Signed-off-by: Anthony Liguori <>

545e92e0 08/12/2011 04:31 pm Avi Kivity

memory: reclaim resources when a memory region is destroyed for good

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

2dd30228 08/08/2011 06:15 pm Avi Kivity

memory: rename PORTIO_END to PORTIO_END_OF_LIST

For consistency with other _END_OF_LIST macros.

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

14a3c10a 07/29/2011 04:25 pm Avi Kivity

memory: rename MemoryRegion::has_ram_addr to ::terminates

I/O regions will not have ram_addrs, so this is a better name.

Reviewed-by: Anthony Liguori <>
Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

16ef61c9 07/29/2011 04:25 pm Avi Kivity

memory: late initialization of ram_addr

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...

658b2224 07/29/2011 04:25 pm Avi Kivity

memory: I/O address space support

Allow registering I/O ports via the same mechanism as mmio ranges.

Reviewed-by: Anthony Liguori <>
Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

627a0e90 07/29/2011 04:25 pm Avi Kivity

memory: add backward compatibility for old portio registration

Reviewed-by: Anthony Liguori <>
Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

74901c3b 07/29/2011 04:25 pm Avi Kivity

memory: add backward compatibility for old mmio registration

This eases the transition to the new API.

Reviewed-by: Anthony Liguori <>
Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

3e9d69e7 07/29/2011 04:25 pm Avi Kivity

memory: add ioeventfd support

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 <>...

4ef4db86 07/29/2011 04:25 pm Avi Kivity

memory: transaction API

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...

093bc2cd 07/29/2011 04:25 pm Avi Kivity

Hierarchical memory region API

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...

5a583347 07/29/2011 04:25 pm Avi Kivity

memory: implement dirty tracking

Currently dirty tracking is implemented by passing through
all calls to the underlying cpu_physical_memory_*() calls.

Reviewed-by: Anthony Liguori <>
Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>