Revision c8135d9a target-i386/helper2.c
b/target-i386/helper2.c | ||
---|---|---|
348 | 348 |
page_size = 4096; |
349 | 349 |
virt_addr = addr & ~0xfff; |
350 | 350 |
} |
351 |
|
|
351 | 352 |
/* the page can be put in the TLB */ |
352 | 353 |
prot = PROT_READ; |
353 |
if (is_user) { |
|
354 |
if (pte & PG_RW_MASK) |
|
355 |
prot |= PROT_WRITE; |
|
356 |
} else { |
|
357 |
if (!(env->cr[0] & CR0_WP_MASK) || !(pte & PG_USER_MASK) || |
|
358 |
(pte & PG_RW_MASK)) |
|
359 |
prot |= PROT_WRITE; |
|
354 |
if (pte & PG_DIRTY_MASK) { |
|
355 |
/* only set write access if already dirty... otherwise wait |
|
356 |
for dirty access */ |
|
357 |
if (is_user) { |
|
358 |
if (pte & PG_RW_MASK) |
|
359 |
prot |= PROT_WRITE; |
|
360 |
} else { |
|
361 |
if (!(env->cr[0] & CR0_WP_MASK) || !(pte & PG_USER_MASK) || |
|
362 |
(pte & PG_RW_MASK)) |
|
363 |
prot |= PROT_WRITE; |
|
364 |
} |
|
360 | 365 |
} |
361 | 366 |
|
362 | 367 |
do_mapping: |
Also available in: Unified diff