target-i386: the x86 CPL is stored in CS.selector - auto update hflags accordingly.
commit7848c8d19f8556666df25044bbd5d8b29439c368
authorKevin O'Connor <kevin@koconnor.net>
Tue, 29 Apr 2014 20:38:59 +0000 (29 16:38 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 13 May 2014 11:12:40 +0000 (13 13:12 +0200)
tree250b284ca81228ae073c19938cfefde8a008a26c
parentfd460606fd6f356ddcf424558ed67664e8d46eb4
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>
bsd-user/main.c
linux-user/main.c
target-i386/cpu.h
target-i386/seg_helper.c
target-i386/svm_helper.c