kernel: use MF_KCALL_RESUME instead of RTS_VMREQUEST for memcopy retry.
solves tracker item 499, submitted by Roman Ignatov.
This commit is contained in:
		
							parent
							
								
									9fd2d72ce8
								
							
						
					
					
						commit
						545054c608
					
				@ -570,6 +570,8 @@ PRIVATE void vm_suspend(struct proc *caller, const struct proc *target,
 | 
			
		||||
	 */								
 | 
			
		||||
	assert(!RTS_ISSET(caller, RTS_VMREQUEST));
 | 
			
		||||
	assert(!RTS_ISSET(target, RTS_VMREQUEST));
 | 
			
		||||
	assert(!(caller->p_misc_flags & MF_KCALL_RESUME));
 | 
			
		||||
	assert(!(target->p_misc_flags & MF_KCALL_RESUME));
 | 
			
		||||
 | 
			
		||||
	RTS_SET(caller, RTS_VMREQUEST);
 | 
			
		||||
 | 
			
		||||
@ -819,9 +821,8 @@ int vmcheck;			/* if nonzero, can return VMSUSPEND */
 | 
			
		||||
  if(vm_running) {
 | 
			
		||||
	int r;
 | 
			
		||||
 | 
			
		||||
	if(caller && RTS_ISSET(caller, RTS_VMREQUEST)) {
 | 
			
		||||
	if(caller && (caller->p_misc_flags & MF_KCALL_RESUME)) {
 | 
			
		||||
		assert(caller->p_vmrequest.vmresult != VMSUSPEND);
 | 
			
		||||
		RTS_UNSET(caller, RTS_VMREQUEST);
 | 
			
		||||
		if(caller->p_vmrequest.vmresult != OK) {
 | 
			
		||||
	  		return caller->p_vmrequest.vmresult;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
@ -591,11 +591,14 @@ PUBLIC void kernel_call_resume(struct proc *caller)
 | 
			
		||||
			caller->p_rts_flags, caller->p_misc_flags);
 | 
			
		||||
	 */
 | 
			
		||||
 | 
			
		||||
	/* re-execute the kernel call, with MF_KCALL_RESUME still set so
 | 
			
		||||
	 * the call knows this is a retry.
 | 
			
		||||
	 */
 | 
			
		||||
	result = kernel_call_dispatch(caller, &caller->p_vmrequest.saved.reqmsg);
 | 
			
		||||
	/*
 | 
			
		||||
	 * we are resuming the kernel call so we have to remove this flag so it
 | 
			
		||||
	 * can be set again
 | 
			
		||||
	 */
 | 
			
		||||
	caller->p_misc_flags &= ~MF_KCALL_RESUME;
 | 
			
		||||
	result = kernel_call_dispatch(caller, &caller->p_vmrequest.saved.reqmsg);
 | 
			
		||||
	kernel_call_finish(caller, &caller->p_vmrequest.saved.reqmsg, result);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user