Toggle preemption while faulting pages
Change-Id: I74201061bb3e7c7c4032e3884658ace87cb85948
This commit is contained in:
committed by
Masamichi Takagi
parent
3e254c06bf
commit
d370e9241f
@@ -718,9 +718,11 @@ static int syscall_packet_handler(struct ihk_ikc_channel_desc *c,
|
||||
dkprintf("remote page fault,pid=%d,va=%lx,reason=%x\n",
|
||||
thread->proc->pid, packet->fault_address,
|
||||
packet->fault_reason|PF_POPULATE);
|
||||
preempt_disable();
|
||||
pckt.err = page_fault_process_vm(thread->vm,
|
||||
(void *)packet->fault_address,
|
||||
packet->fault_reason|PF_POPULATE);
|
||||
preempt_enable();
|
||||
|
||||
#ifdef PROFILE_ENABLE
|
||||
if (thread->profile) {
|
||||
|
||||
@@ -2816,6 +2816,7 @@ int populate_process_memory(struct process_vm *vm, void *start, size_t len)
|
||||
uintptr_t addr;
|
||||
|
||||
end = (uintptr_t)start + len;
|
||||
preempt_disable();
|
||||
for (addr = (uintptr_t)start; addr < end; addr += PAGE_SIZE) {
|
||||
error = page_fault_process_vm(vm, (void *)addr, reason);
|
||||
if (error) {
|
||||
@@ -2829,6 +2830,7 @@ int populate_process_memory(struct process_vm *vm, void *start, size_t len)
|
||||
|
||||
error = 0;
|
||||
out:
|
||||
preempt_enable();
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user