Revision e1e84ba0 exec.c
b/exec.c | ||
---|---|---|
892 | 892 |
qemu_mutex_unlock(&ram_list.mutex); |
893 | 893 |
} |
894 | 894 |
|
895 |
#if defined(__linux__) && !defined(TARGET_S390X)
|
|
895 |
#ifdef __linux__
|
|
896 | 896 |
|
897 | 897 |
#include <sys/vfs.h> |
898 | 898 |
|
... | ... | |
995 | 995 |
block->fd = fd; |
996 | 996 |
return area; |
997 | 997 |
} |
998 |
#else |
|
999 |
static void *file_ram_alloc(RAMBlock *block, |
|
1000 |
ram_addr_t memory, |
|
1001 |
const char *path) |
|
1002 |
{ |
|
1003 |
fprintf(stderr, "-mem-path not supported on this host\n"); |
|
1004 |
exit(1); |
|
1005 |
} |
|
998 | 1006 |
#endif |
999 | 1007 |
|
1000 | 1008 |
static ram_addr_t find_ram_offset(ram_addr_t size) |
... | ... | |
1128 | 1136 |
xen_ram_alloc(new_block->offset, size, mr); |
1129 | 1137 |
} else { |
1130 | 1138 |
if (mem_path) { |
1131 |
#if defined (__linux__) && !defined(TARGET_S390X) |
|
1139 |
if (phys_mem_alloc != qemu_anon_ram_alloc) { |
|
1140 |
/* |
|
1141 |
* file_ram_alloc() needs to allocate just like |
|
1142 |
* phys_mem_alloc, but we haven't bothered to provide |
|
1143 |
* a hook there. |
|
1144 |
*/ |
|
1145 |
fprintf(stderr, |
|
1146 |
"-mem-path not supported with this accelerator\n"); |
|
1147 |
exit(1); |
|
1148 |
} |
|
1132 | 1149 |
new_block->host = file_ram_alloc(new_block, size, mem_path); |
1133 |
#else |
|
1134 |
fprintf(stderr, "-mem-path option unsupported\n"); |
|
1135 |
exit(1); |
|
1136 |
#endif |
|
1137 | 1150 |
} |
1138 | 1151 |
if (!new_block->host) { |
1139 | 1152 |
new_block->host = phys_mem_alloc(size); |
Also available in: Unified diff