Revision 868bb33f exec.c

b/exec.c
2953 2953
                abort();
2954 2954
            }
2955 2955
#else
2956
            if (xen_mapcache_enabled()) {
2956
            if (xen_enabled()) {
2957 2957
                xen_ram_alloc(new_block->offset, size);
2958 2958
            } else {
2959 2959
                new_block->host = qemu_vmalloc(size);
......
3019 3019
#if defined(TARGET_S390X) && defined(CONFIG_KVM)
3020 3020
                munmap(block->host, block->length);
3021 3021
#else
3022
                if (xen_mapcache_enabled()) {
3022
                if (xen_enabled()) {
3023 3023
                    xen_invalidate_map_cache_entry(block->host);
3024 3024
                } else {
3025 3025
                    qemu_vfree(block->host);
......
3112 3112
                QLIST_REMOVE(block, next);
3113 3113
                QLIST_INSERT_HEAD(&ram_list.blocks, block, next);
3114 3114
            }
3115
            if (xen_mapcache_enabled()) {
3115
            if (xen_enabled()) {
3116 3116
                /* We need to check if the requested address is in the RAM
3117 3117
                 * because we don't want to map the entire memory in QEMU.
3118 3118
                 * In that case just map until the end of the page.
......
3143 3143

  
3144 3144
    QLIST_FOREACH(block, &ram_list.blocks, next) {
3145 3145
        if (addr - block->offset < block->length) {
3146
            if (xen_mapcache_enabled()) {
3146
            if (xen_enabled()) {
3147 3147
                /* We need to check if the requested address is in the RAM
3148 3148
                 * because we don't want to map the entire memory in QEMU.
3149 3149
                 * In that case just map until the end of the page.
......
3169 3169
 * but takes a size argument */
3170 3170
void *qemu_ram_ptr_length(target_phys_addr_t addr, target_phys_addr_t *size)
3171 3171
{
3172
    if (xen_mapcache_enabled())
3172
    if (xen_enabled()) {
3173 3173
        return xen_map_cache(addr, *size, 1);
3174
    else {
3174
    } else {
3175 3175
        RAMBlock *block;
3176 3176

  
3177 3177
        QLIST_FOREACH(block, &ram_list.blocks, next) {
......
3200 3200
    RAMBlock *block;
3201 3201
    uint8_t *host = ptr;
3202 3202

  
3203
    if (xen_mapcache_enabled()) {
3203
    if (xen_enabled()) {
3204 3204
        *ram_addr = xen_ram_addr_from_mapcache(ptr);
3205 3205
        return 0;
3206 3206
    }
......
4115 4115
                access_len -= l;
4116 4116
            }
4117 4117
        }
4118
        if (xen_mapcache_enabled()) {
4118
        if (xen_enabled()) {
4119 4119
            xen_invalidate_map_cache_entry(buffer);
4120 4120
        }
4121 4121
        return;

Also available in: Unified diff