aboutsummaryrefslogtreecommitdiff
path: root/target-i386/shift_helper_template.h
diff options
context:
space:
mode:
authorBill Paul <wpaul@windriver.com>2015-03-09 15:48:01 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2015-03-10 11:18:24 +0100
commitac57622985220de064059971f9ccb00905e9bd04 (patch)
tree0a50e0158c2c9b073881b8d2661ee90384bb8143 /target-i386/shift_helper_template.h
parentae071cc851d7150d3a9950c642570830bb85729e (diff)
x86: fix SS selector in SYSRET
According to my reading of the Intel documentation, the SYSRET instruction is supposed to force the RPL bits of the %ss register to 3 when returning to user mode. The actual sequence is: SS.Selector <-- (IA32_STAR[63:48]+8) OR 3; (* RPL forced to 3 *) However, the code in helper_sysret() leaves them at 0 (in other words, the "OR 3" part of the above sequence is missing). It does set the privilege level bits of %cs correctly though. This has caused me trouble with some of my VxWorks development: code that runs okay on real hardware will crash on QEMU, unless I apply the patch below. Signed-off-by: Bill Paul <wpaul@windriver.com> Message-Id: <201503091548.01462.wpaul@windriver.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target-i386/shift_helper_template.h')
0 files changed, 0 insertions, 0 deletions