vmassert(caller->p_vmrequest.vmresult != VMSUSPEND);
RTS_LOCK_UNSET(caller, RTS_VMREQUEST);
if(caller->p_vmrequest.vmresult != OK) {
+#if DEBUG_VMASSERT
printf("virtual_copy: returning VM error %d\n",
caller->p_vmrequest.vmresult);
+#endif
NOREC_RETURN(virtualcopy, caller->p_vmrequest.vmresult);
}
}
target = proc_addr(proc_nr);
p->p_vmrequest.vmresult = m_ptr->SVMCTL_VALUE;
vmassert(p->p_vmrequest.vmresult != VMSUSPEND);
+#if DEBUG_VMASSERT
if(p->p_vmrequest.vmresult != OK)
kprintf("SYSTEM: VM replied %d to mem request\n",
p->p_vmrequest.vmresult);
-
-#if 0
printf("memreq reply: vm request sent by: %s / %d about %d; 0x%lx-0x%lx, wr %d, stack: %s ",
p->p_name, p->p_endpoint, p->p_vmrequest.who,
p->p_vmrequest.start,
while(len > 0) {
int r;
if(!(region = map_lookup(vmp, mem))) {
+#if VERBOSE
map_printmap(vmp);
printf("VM: do_memory: memory doesn't exist\n");
+#endif
r = EFAULT;
} else if(!(region->flags & VR_WRITABLE) && wrflag) {
+#if VERBOSE
printf("VM: do_memory: write to unwritable map\n");
+#endif
r = EFAULT;
} else {
vir_bytes offset, sublen;
}
if(r != OK) {
+#if VERBOSE
printf("VM: memory range 0x%lx-0x%lx not available in %d\n",
arch_map2vir(vmp, mem), arch_map2vir(vmp, mem+len),
vmp->vm_endpoint);
+#endif
return r;
}
}
#define SANITYCHECKS 0
#define VMSTATS 0
+/* How noisy are we supposed to be? */
+#define VERBOSE 0
+
/* Minimum stack region size - 64MB. */
#define MINSTACKREGION (64*1024*1024)