File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -235,15 +235,13 @@ void switch_process(unsigned int pid){
235
235
for (int j = 0 ;j < NR_PTES_PER_PAGE ;j ++ ){
236
236
if (current -> pagetable .outer_ptes [i ]-> ptes [j ].valid ){
237
237
238
- if (current -> pagetable .outer_ptes [i ]-> ptes [j ].writable == false){//쓰기모드 아닌거
239
- child -> pagetable .outer_ptes [i ]-> ptes [j ].private = false;
240
- current -> pagetable .outer_ptes [i ]-> ptes [j ].private = false;
241
- }
238
+ if (current -> pagetable .outer_ptes [i ]-> ptes [j ].writable == true)//쓰기모드 아닌거
239
+ current -> pagetable .outer_ptes [i ]-> ptes [j ].private = true;
242
240
else {
243
241
child -> pagetable .outer_ptes [i ]-> ptes [j ].private = true;
244
242
current -> pagetable .outer_ptes [i ]-> ptes [j ].private = true;
245
243
}
246
-
244
+
247
245
child -> pagetable .outer_ptes [i ]-> ptes [j ].writable = false;//CoW
248
246
current -> pagetable .outer_ptes [i ]-> ptes [j ].writable = false;//CoW
249
247
@@ -253,6 +251,9 @@ void switch_process(unsigned int pid){
253
251
child -> pagetable .outer_ptes [i ]-> ptes [j ].pfn =
254
252
current -> pagetable .outer_ptes [i ]-> ptes [j ].pfn ;
255
253
254
+ child -> pagetable .outer_ptes [i ]-> ptes [j ].private =
255
+ current -> pagetable .outer_ptes [i ]-> ptes [j ].private ;
256
+
256
257
mapcounts [child -> pagetable .outer_ptes [i ]-> ptes [j ].pfn ]++ ;
257
258
}
258
259
}//for i
You can’t perform that action at this time.
0 commit comments