aboutsummaryrefslogtreecommitdiff
path: root/bsd-user
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2014-04-29 16:38:59 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2014-05-13 13:12:40 +0200
commit7848c8d19f8556666df25044bbd5d8b29439c368 (patch)
tree250b284ca81228ae073c19938cfefde8a008a26c /bsd-user
parentfd460606fd6f356ddcf424558ed67664e8d46eb4 (diff)
target-i386: the x86 CPL is stored in CS.selector - auto update hflags accordingly.
Instead of manually calling cpu_x86_set_cpl() when the CPL changes, check for CPL changes on calls to cpu_x86_load_seg_cache(R_CS). Every location that called cpu_x86_set_cpl() also called cpu_x86_load_seg_cache(R_CS), so cpu_x86_set_cpl() is no longer required. This fixes the SMM handler code as it was not setting/restoring the CPL level manually. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'bsd-user')
-rw-r--r--bsd-user/main.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/bsd-user/main.c b/bsd-user/main.c
index f81ba55af8..9f895b4ddb 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -1003,8 +1003,6 @@ int main(int argc, char **argv)
cpu->opaque = ts;
#if defined(TARGET_I386)
- cpu_x86_set_cpl(env, 3);
-
env->cr[0] = CR0_PG_MASK | CR0_WP_MASK | CR0_PE_MASK;
env->hflags |= HF_PE_MASK;
if (env->features[FEAT_1_EDX] & CPUID_SSE) {