diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2011-06-21 22:59:09 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2011-07-17 01:54:24 +0200 |
commit | 868bb33faa643c7ee291bb308a829122b72d4845 (patch) | |
tree | e646309f8df4ff0666a8e872a87c30220ace1e55 /exec.c | |
parent | e41d7c691ad7f4ad78573f72048eecb16f78974a (diff) |
xen: Fold CONFIG_XEN_MAPCACHE into CONFIG_XEN
Xen won't be enabled if there is no backend support available for the
host. And that also means the map cache will work. So drop the separate
config switch and move the required stubs over to xen-stub.c.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -2953,7 +2953,7 @@ ram_addr_t qemu_ram_alloc_from_ptr(DeviceState *dev, const char *name, abort(); } #else - if (xen_mapcache_enabled()) { + if (xen_enabled()) { xen_ram_alloc(new_block->offset, size); } else { new_block->host = qemu_vmalloc(size); @@ -3019,7 +3019,7 @@ void qemu_ram_free(ram_addr_t addr) #if defined(TARGET_S390X) && defined(CONFIG_KVM) munmap(block->host, block->length); #else - if (xen_mapcache_enabled()) { + if (xen_enabled()) { xen_invalidate_map_cache_entry(block->host); } else { qemu_vfree(block->host); @@ -3112,7 +3112,7 @@ void *qemu_get_ram_ptr(ram_addr_t addr) QLIST_REMOVE(block, next); QLIST_INSERT_HEAD(&ram_list.blocks, block, next); } - if (xen_mapcache_enabled()) { + if (xen_enabled()) { /* We need to check if the requested address is in the RAM * because we don't want to map the entire memory in QEMU. * In that case just map until the end of the page. @@ -3143,7 +3143,7 @@ void *qemu_safe_ram_ptr(ram_addr_t addr) QLIST_FOREACH(block, &ram_list.blocks, next) { if (addr - block->offset < block->length) { - if (xen_mapcache_enabled()) { + if (xen_enabled()) { /* We need to check if the requested address is in the RAM * because we don't want to map the entire memory in QEMU. * In that case just map until the end of the page. @@ -3169,9 +3169,9 @@ void *qemu_safe_ram_ptr(ram_addr_t addr) * but takes a size argument */ void *qemu_ram_ptr_length(target_phys_addr_t addr, target_phys_addr_t *size) { - if (xen_mapcache_enabled()) + if (xen_enabled()) { return xen_map_cache(addr, *size, 1); - else { + } else { RAMBlock *block; QLIST_FOREACH(block, &ram_list.blocks, next) { @@ -3200,7 +3200,7 @@ int qemu_ram_addr_from_host(void *ptr, ram_addr_t *ram_addr) RAMBlock *block; uint8_t *host = ptr; - if (xen_mapcache_enabled()) { + if (xen_enabled()) { *ram_addr = xen_ram_addr_from_mapcache(ptr); return 0; } @@ -4115,7 +4115,7 @@ void cpu_physical_memory_unmap(void *buffer, target_phys_addr_t len, access_len -= l; } } - if (xen_mapcache_enabled()) { + if (xen_enabled()) { xen_invalidate_map_cache_entry(buffer); } return; |