Revision 50a9569b
b/cpu-all.h | ||
---|---|---|
716 | 716 |
/* original state of the write flag (used when tracking self-modifying |
717 | 717 |
code */ |
718 | 718 |
#define PAGE_WRITE_ORG 0x0010 |
719 |
#define PAGE_RESERVED 0x0020 |
|
719 | 720 |
|
720 | 721 |
void page_dump(FILE *f); |
721 | 722 |
int page_get_flags(target_ulong address); |
b/exec.c | ||
---|---|---|
209 | 209 |
qemu_host_page_mask = ~(qemu_host_page_size - 1); |
210 | 210 |
l1_phys_map = qemu_vmalloc(L1_SIZE * sizeof(void *)); |
211 | 211 |
memset(l1_phys_map, 0, L1_SIZE * sizeof(void *)); |
212 |
|
|
213 |
#if !defined(_WIN32) && defined(CONFIG_USER_ONLY) |
|
214 |
{ |
|
215 |
long long startaddr, endaddr; |
|
216 |
FILE *f; |
|
217 |
int n; |
|
218 |
|
|
219 |
f = fopen("/proc/self/maps", "r"); |
|
220 |
if (f) { |
|
221 |
do { |
|
222 |
n = fscanf (f, "%llx-%llx %*[^\n]\n", &startaddr, &endaddr); |
|
223 |
if (n == 2) { |
|
224 |
page_set_flags(TARGET_PAGE_ALIGN(startaddr), |
|
225 |
TARGET_PAGE_ALIGN(endaddr), |
|
226 |
PAGE_RESERVED); |
|
227 |
} |
|
228 |
} while (!feof(f)); |
|
229 |
fclose(f); |
|
230 |
} |
|
231 |
} |
|
232 |
#endif |
|
212 | 233 |
} |
213 | 234 |
|
214 | 235 |
static inline PageDesc *page_find_alloc(unsigned int index) |
b/linux-user/mmap.c | ||
---|---|---|
162 | 162 |
'start'. If 'start' == 0, then a default start address is used. |
163 | 163 |
Return -1 if error. |
164 | 164 |
*/ |
165 |
/* XXX: should mark pages used by the host as reserved to be sure not
|
|
165 |
/* page_init() marks pages used by the host as reserved to be sure not
|
|
166 | 166 |
to use them. */ |
167 | 167 |
static abi_ulong mmap_find_vma(abi_ulong start, abi_ulong size) |
168 | 168 |
{ |
Also available in: Unified diff