Retire write-only PCB_FULLCTX pcb flag on amd64.
Reminded by: Petr Salinger <Petr.Salinger seznam cz> Tested by: pho MFC after: 1 week
This commit is contained in:
parent
a10b0e67d9
commit
0f0170e66a
@ -380,7 +380,6 @@ IDTVEC(fast_syscall)
|
||||
movq %rsp,%rdi
|
||||
call syscall
|
||||
movq PCPU(CURPCB),%rax
|
||||
andq $~PCB_FULLCTX,PCB_FLAGS(%rax)
|
||||
MEXITCOUNT
|
||||
jmp doreti
|
||||
|
||||
|
@ -161,7 +161,6 @@ ASSYM(PCB_SIZE, sizeof(struct pcb));
|
||||
ASSYM(PCB_DBREGS, PCB_DBREGS);
|
||||
ASSYM(PCB_32BIT, PCB_32BIT);
|
||||
ASSYM(PCB_GS32BIT, PCB_GS32BIT);
|
||||
ASSYM(PCB_FULLCTX, PCB_FULLCTX);
|
||||
|
||||
ASSYM(COMMON_TSS_RSP0, offsetof(struct amd64tss, tss_rsp0));
|
||||
|
||||
|
@ -492,7 +492,6 @@ sigreturn(td, uap)
|
||||
#endif
|
||||
|
||||
kern_sigprocmask(td, SIG_SETMASK, &ucp->uc_sigmask, NULL, 0);
|
||||
td->td_pcb->pcb_flags |= PCB_FULLCTX;
|
||||
td->td_pcb->pcb_full_iret = 1;
|
||||
return (EJUSTRETURN);
|
||||
}
|
||||
@ -1908,7 +1907,6 @@ set_regs(struct thread *td, struct reg *regs)
|
||||
tp->tf_gs = regs->r_gs;
|
||||
tp->tf_flags = TF_HASSEGS;
|
||||
}
|
||||
td->td_pcb->pcb_flags |= PCB_FULLCTX;
|
||||
return (0);
|
||||
}
|
||||
|
||||
@ -2095,7 +2093,6 @@ set_mcontext(struct thread *td, const mcontext_t *mcp)
|
||||
td->td_pcb->pcb_fsbase = mcp->mc_fsbase;
|
||||
td->td_pcb->pcb_gsbase = mcp->mc_gsbase;
|
||||
}
|
||||
td->td_pcb->pcb_flags |= PCB_FULLCTX;
|
||||
td->td_pcb->pcb_full_iret = 1;
|
||||
return (0);
|
||||
}
|
||||
|
@ -347,7 +347,6 @@ cpu_set_syscall_retval(struct thread *td, int error)
|
||||
*/
|
||||
td->td_frame->tf_rip -= td->td_frame->tf_err;
|
||||
td->td_frame->tf_r10 = td->td_frame->tf_rcx;
|
||||
td->td_pcb->pcb_flags |= PCB_FULLCTX;
|
||||
break;
|
||||
|
||||
case EJUSTRETURN:
|
||||
|
@ -207,7 +207,6 @@ ia32_set_mcontext(struct thread *td, const struct ia32_mcontext *mcp)
|
||||
tp->tf_rflags = rflags;
|
||||
tp->tf_rsp = mcp->mc_esp;
|
||||
tp->tf_ss = mcp->mc_ss;
|
||||
td->td_pcb->pcb_flags |= PCB_FULLCTX;
|
||||
td->td_pcb->pcb_full_iret = 1;
|
||||
return (0);
|
||||
}
|
||||
@ -743,7 +742,7 @@ ia32_setregs(struct thread *td, struct image_params *imgp, u_long stack)
|
||||
fpstate_drop(td);
|
||||
|
||||
/* Return via doreti so that we can change to a different %cs */
|
||||
pcb->pcb_flags |= PCB_FULLCTX | PCB_32BIT;
|
||||
pcb->pcb_flags |= PCB_32BIT;
|
||||
pcb->pcb_flags &= ~PCB_GS32BIT;
|
||||
td->td_pcb->pcb_full_iret = 1;
|
||||
td->td_retval[1] = 0;
|
||||
|
@ -73,7 +73,6 @@ struct pcb {
|
||||
#define PCB_USERFPUINITDONE 0x10 /* fpu user state is initialized */
|
||||
#define PCB_GS32BIT 0x20 /* linux gs switch */
|
||||
#define PCB_32BIT 0x40 /* process has 32 bit context (segs etc) */
|
||||
#define PCB_FULLCTX 0x80 /* full context restore on sysret */
|
||||
|
||||
uint16_t pcb_initial_fpucw;
|
||||
|
||||
|
@ -870,7 +870,7 @@ exec_linux_setregs(struct thread *td, struct image_params *imgp, u_long stack)
|
||||
fpstate_drop(td);
|
||||
|
||||
/* Return via doreti so that we can change to a different %cs */
|
||||
pcb->pcb_flags |= PCB_FULLCTX | PCB_32BIT;
|
||||
pcb->pcb_flags |= PCB_32BIT;
|
||||
pcb->pcb_flags &= ~PCB_GS32BIT;
|
||||
td->td_retval[1] = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user