diff options
author | Igor Mammedov <imammedo@redhat.com> | 2014-10-31 16:38:37 +0000 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2014-11-23 12:11:30 +0200 |
commit | a2b257d6212ade772473f86bf0637480b2578a7e (patch) | |
tree | b4b86c7b8887920f8bff0b3e8ca498b574d64f00 /memory.c | |
parent | 92a37a04d6e034b73ea1ba4825ba4d5860f0a810 (diff) | |
download | qemu-a2b257d6212ade772473f86bf0637480b2578a7e.zip qemu-a2b257d6212ade772473f86bf0637480b2578a7e.tar.gz qemu-a2b257d6212ade772473f86bf0637480b2578a7e.tar.bz2 |
memory: expose alignment used for allocating RAM as MemoryRegion API
introduce memory_region_get_alignment() that returns
underlying memory block alignment or 0 if it's not
relevant/implemented for backend.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'memory.c')
-rw-r--r-- | memory.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1749,6 +1749,11 @@ ram_addr_t memory_region_get_ram_addr(MemoryRegion *mr) return mr->ram_addr; } +uint64_t memory_region_get_alignment(const MemoryRegion *mr) +{ + return mr->align; +} + static int cmp_flatrange_addr(const void *addr_, const void *fr_) { const AddrRange *addr = addr_; |