Remove unneeded overrides of the segment registers in the inner trap

frame upon segment register load fault. The doreti procedure does not
load segment registers when returning to the kernel frame, and current
values in the segment descriptor cache already allow the kernel mode
to run, not modified by faulted loaded.

Suggested by:	bde
Tested by:	pho
MFC after:	1 week
This commit is contained in:
kib 2010-05-12 10:29:06 +00:00
parent ee02e5dd0e
commit 7b04e359b0

View File

@ -488,22 +488,18 @@ trap(struct trapframe *frame)
}
if (frame->tf_rip == (long)ld_ds) {
frame->tf_rip = (long)ds_load_fault;
frame->tf_ds = _udatasel;
goto out;
}
if (frame->tf_rip == (long)ld_es) {
frame->tf_rip = (long)es_load_fault;
frame->tf_es = _udatasel;
goto out;
}
if (frame->tf_rip == (long)ld_fs) {
frame->tf_rip = (long)fs_load_fault;
frame->tf_fs = _ufssel;
goto out;
}
if (frame->tf_rip == (long)ld_gs) {
frame->tf_rip = (long)gs_load_fault;
frame->tf_gs = _ugssel;
goto out;
}
if (frame->tf_rip == (long)ld_gsbase) {