summaryrefslogtreecommitdiff
path: root/ddb
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2016-12-24 01:30:22 +0100
committerRichard Braun <rbraun@sceen.net>2016-12-24 01:30:22 +0100
commit023401c5b97023670a44059a60eb2a3a11c8a929 (patch)
tree9e4fc6286d8545275dab9ba2140bb98bf7ab19b5 /ddb
parenteb07428ffb0009085fcd01dd1b79d9953af8e0ad (diff)
VM: rework map entry wiring
First, user wiring is removed, simply because it has never been used. Second, make the VM system track wiring requests to better handle protection. This change makes it possible to wire entries with VM_PROT_NONE protection without actually reserving any page for them until protection changes, and even make those pages pageable if protection is downgraded to VM_PROT_NONE. * ddb/db_ext_symtab.c: Update call to vm_map_pageable. * i386/i386/user_ldt.c: Likewise. * ipc/mach_port.c: Likewise. * vm/vm_debug.c (mach_vm_region_info): Update values returned as appropriate. * vm/vm_map.c (vm_map_entry_copy): Update operation as appropriate. (vm_map_setup): Update member names as appropriate. (vm_map_find_entry): Update to account for map member variable changes. (vm_map_enter): Likewise. (vm_map_entry_inc_wired): New function. (vm_map_entry_reset_wired): Likewise. (vm_map_pageable_scan): Likewise. (vm_map_protect): Update wired access, call vm_map_pageable_scan. (vm_map_pageable_common): Rename to ... (vm_map_pageable): ... and rewrite to use vm_map_pageable_scan. (vm_map_entry_delete): Fix unwiring. (vm_map_copy_overwrite): Replace inline code with a call to vm_map_entry_reset_wired. (vm_map_copyin_page_list): Likewise. (vm_map_print): Likewise. Also print map size and wired size. (vm_map_copyout_page_list): Update to account for map member variable changes. * vm/vm_map.h (struct vm_map_entry): Remove `user_wired_count' member, add `wired_access' member. (struct vm_map): Rename `user_wired' member to `size_wired'. (vm_map_pageable_common): Remove function. (vm_map_pageable_user): Remove macro. (vm_map_pageable): Replace macro with function declaration. * vm/vm_user.c (vm_wire): Update call to vm_map_pageable.
Diffstat (limited to 'ddb')
-rw-r--r--ddb/db_ext_symtab.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ddb/db_ext_symtab.c b/ddb/db_ext_symtab.c
index cafb0c4c..e1bdfd8b 100644
--- a/ddb/db_ext_symtab.c
+++ b/ddb/db_ext_symtab.c
@@ -106,7 +106,8 @@ host_load_symbol_table(
(void) vm_map_pageable(kernel_map,
symtab_start,
round_page(symtab_end),
- VM_PROT_READ|VM_PROT_WRITE);
+ VM_PROT_READ|VM_PROT_WRITE,
+ TRUE, TRUE);
/*
* Discard the original copy object