aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2010-12-27 15:57:35 +0100
committerMarcelo Tosatti <mtosatti@redhat.com>2011-01-21 14:05:22 -0200
commit3980e3024b2d1677a9910de5e35d22d5d8392522 (patch)
tree4cce01a6ba63cfed083ffe05d74d9ab0e641a3bd
parentacaa75507b34f7b588924a09c76c6848d209e08c (diff)
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>
-rw-r--r--target-i386/kvm.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index ee7bdf8012..7e5982b132 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -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);