mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 12:09:58 +00:00
kvm: x86: Remove obsolete SS.RPL/DPL aligment
This seems to date back to the days KVM didn't support real mode. The check is no longer needed and, even worse, is corrupting the guest state in case SS.RPL != DPL. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
acaa75507b
commit
3980e3024b
@ -780,13 +780,6 @@ static int kvm_put_sregs(CPUState *env)
|
||||
set_seg(&sregs.fs, &env->segs[R_FS]);
|
||||
set_seg(&sregs.gs, &env->segs[R_GS]);
|
||||
set_seg(&sregs.ss, &env->segs[R_SS]);
|
||||
|
||||
if (env->cr[0] & CR0_PE_MASK) {
|
||||
/* force ss cpl to cs cpl */
|
||||
sregs.ss.selector = (sregs.ss.selector & ~3) |
|
||||
(sregs.cs.selector & 3);
|
||||
sregs.ss.dpl = sregs.ss.selector & 3;
|
||||
}
|
||||
}
|
||||
|
||||
set_seg(&sregs.tr, &env->tr);
|
||||
|
Loading…
Reference in New Issue
Block a user