diff options
| author | Andrew Oates <aoates@google.com> | 2018-08-19 14:17:25 -0400 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-08-23 18:46:25 +0200 |
| commit | 0aca060526d3ff9632aaed66e8611814580c13de (patch) | |
| tree | 6264ac3354f7978299d7934c1b0715f0eda7006a /include/qemu/rcu_queue.h | |
| parent | 692fbdf9f4c6f6bafd0b3a4d4f94973effd3bbae (diff) | |
| download | focaccia-qemu-0aca060526d3ff9632aaed66e8611814580c13de.tar.gz focaccia-qemu-0aca060526d3ff9632aaed66e8611814580c13de.zip | |
target-i386: Fix lcall/ljmp to call gate in IA-32e mode
Currently call gates are always treated as 32-bit gates. In IA-32e mode (either compatibility or 64-bit submode), system segment descriptors are always 64-bit. Treating them as 32-bit has the expected unfortunate effect: only the lower 32 bits of the offset are loaded, the stack pointer is truncated, a bad new stack pointer is loaded from the TSS (if switching privilege levels), etc. This change adds support for 64-bit call gate to the lcall and ljmp instructions. Additionally, there should be a check for non-canonical stack pointers, but I've omitted that since there doesn't seem to be checks for non-canonical addresses in this code elsewhere. I've left the raise_exception_err_ra lines unwapped at 80 columns to match the style in the rest of the file. Signed-off-by: Andrew Oates <aoates@google.com> Message-Id: <20180819181725.34098-1-andrew@andrewoates.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qemu/rcu_queue.h')
0 files changed, 0 insertions, 0 deletions