Changed pagefault delivery to VM
this patch changes the way pagefaults are delivered to VM. It adopts the same model as the out-of-quantum messages sent by kernel to a scheduler. - everytime a userspace pagefault occurs, kernel creates a message which is sent to VM on behalf of the faulting process - the process is blocked on delivery to VM in the standard IPC code instead of waiting in a spacial in-kernel queue (stack) and is not runnable until VM tell kernel that the pagefault is resolved and is free to clear the RTS_PAGEFAULT flag. - VM does not need call kernel and poll the pagefault information which saves many (1/2?) calls and kernel calls that return "no more data" - VM notification by kernel does not need to use signals - each entry in proc table is by 12 bytes smaller (~3k save)
This commit is contained in:
@@ -12,22 +12,6 @@ PUBLIC int sys_vmctl(endpoint_t who, int param, u32_t value)
|
||||
return(r);
|
||||
}
|
||||
|
||||
PUBLIC int sys_vmctl_get_pagefault_i386(endpoint_t *who, u32_t *cr2, u32_t *err)
|
||||
{
|
||||
message m;
|
||||
int r;
|
||||
|
||||
m.SVMCTL_WHO = SELF;
|
||||
m.SVMCTL_PARAM = VMCTL_GET_PAGEFAULT;
|
||||
r = _kernel_call(SYS_VMCTL, &m);
|
||||
if(r == OK) {
|
||||
*who = m.SVMCTL_PF_WHO;
|
||||
*cr2 = m.SVMCTL_PF_I386_CR2;
|
||||
*err = m.SVMCTL_PF_I386_ERR;
|
||||
}
|
||||
return(r);
|
||||
}
|
||||
|
||||
PUBLIC int sys_vmctl_get_cr3_i386(endpoint_t who, u32_t *cr3)
|
||||
{
|
||||
message m;
|
||||
|
||||
Reference in New Issue
Block a user