vm: Fix vm cloning.

Change-Id: I996410ab1b9628cde797d9e5dd73ed07f13a884b
This commit is contained in:
Cristiano Giuffrida 2014-12-20 18:14:27 +01:00 committed by David van Moolenbroek
parent 37489f8a24
commit 0be084004f

View file

@ -168,11 +168,13 @@ static int rs_memctl_make_vm_instance(struct vmproc *new_vm_vmp)
*/
flags = 0;
verify = FALSE;
r = pt_ptalloc_in_range(&this_vm_vmp->vm_pt, 0, 0, flags, verify);
r = pt_ptalloc_in_range(&this_vm_vmp->vm_pt,
kernel_boot_info.freepde_start, ARCH_VM_DIR_ENTRIES, flags, verify);
if(r != OK) {
return r;
}
r = pt_ptalloc_in_range(&new_vm_vmp->vm_pt, 0, 0, flags, verify);
r = pt_ptalloc_in_range(&new_vm_vmp->vm_pt,
kernel_boot_info.freepde_start, ARCH_VM_DIR_ENTRIES, flags, verify);
if(r != OK) {
return r;
}