#define VMCTL_MEMREQ_REPLY 15
#define VMCTL_INCSP 16
#define VMCTL_STACKTRACE 17
+#define VMCTL_NOPAGEZERO 18
/*===========================================================================*
* Messages for the Reincarnation Server *
#define SPROFILE 1 /* statistical profiling */
#define CPROFILE 0 /* call profiling */
+/* Compile kernel so that first page of code and data can be unmapped. */
+#define VM_KERN_NOPAGEZERO 1
+
#endif /* _CONFIG_H */
u32_t entry;
unsigned pages;
struct proc* rp;
+ struct proc *sys = proc_addr(SYSTEM);
if (!vm_size)
minix_panic("i386_vm_init: no space for page tables", NO_NUM);
I386_VM_PRESENT;
if (phys_mem >= vm_mem_high)
entry= 0;
+#if VM_KERN_NOPAGEZERO
+ if (phys_mem == (sys->p_memmap[T].mem_phys << CLICK_SHIFT) ||
+ phys_mem == (sys->p_memmap[D].mem_phys << CLICK_SHIFT)) {
+ entry = 0;
+ }
+#endif
phys_put32(vm_pt_base + p*I386_VM_PT_ENT_SIZE, entry);
}
vmassert(vm_running);
+
/* If caller has had a reply to this request, return it. */
if(RTS_ISSET(caller, VMREQUEST)) {
if(caller->p_vmrequest.who == target->p_endpoint) {
target->p_name, target->p_endpoint, v, wrfl, flags, phys);
}
- if(checkonly)
+ if(checkonly) {
return VMSUSPEND;
+ }
/* This range is not OK for this process. Set parameters
* of the request and notify VM about the pending request.
/* Connect caller on vmrequest wait queue. */
caller->p_vmrequest.nextrequestor = vmrequest;
vmrequest = caller;
- soft_notify(VM_PROC_NR);
+ if(!caller->p_vmrequest.nextrequestor) {
+ int n = 0;
+ struct proc *vmr;
+ for(vmr = vmrequest; vmr; vmr = vmr->p_vmrequest.nextrequestor)
+ n++;
+ soft_notify(VM_PROC_NR);
+#if 0
+ kprintf("(%d) ", n);
+ kprintf("%d/%d ",
+ caller->p_endpoint, target->p_endpoint);
+ util_stacktrace();
+#endif
+ }
#if 0
kprintf("SYSTEM: vm_checkrange: range bad for "