qemu-e2k/target-i386
Dave Hansen ba03584f4f target-i386: fix typo in xsetbv implementation
QEMU 2.6 added support for the XSAVE family of instructions, which
includes the XSETBV instruction which allows setting the XCR0
register.

But, when booting Linux kernels with XSAVE support enabled, I was
getting very early crashes where the instruction pointer was set
to 0x3.  I tracked it down to a jump instruction generated by this:

        gen_jmp_im(s->pc - pc_start);

where s->pc is pointing to the instruction after XSETBV and pc_start
is pointing _at_ XSETBV.  Subtract the two and you get 0x3.  Whoops.

The fix is to replace this typo with the pattern found everywhere
else in the file when folks want to end the translation buffer.

Richard Henderson confirmed that this is a bug and that this is the
correct fix.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: qemu-stable@nongnu.org
Cc: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-08-02 12:03:58 +02:00
..
arch_dump.c
arch_memory_mapping.c
bpt_helper.c cpu-exec: Rename cpu_resume_from_signal() to cpu_loop_exit_noexc() 2016-06-09 15:55:02 +01:00
cc_helper_template.h
cc_helper.c
cpu-qom.h
cpu.c target-i386: Add x86_cpu_unrealizefn() 2016-07-20 12:02:20 -03:00
cpu.h target-i386: Add support for UMIP and RDPID CPUID bits 2016-07-20 12:02:18 -03:00
excp_helper.c cpu: move exec-all.h inclusion out of cpu.h 2016-05-19 16:42:29 +02:00
fpu_helper.c coccinelle: Remove unnecessary variables for function return value 2016-06-20 16:38:13 +02:00
gdbstub.c
helper.c target-i386: Move user-mode exception actions out of user-exec.c 2016-06-09 15:55:02 +01:00
helper.h
hyperv.c
hyperv.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
int_helper.c cpu: move exec-all.h inclusion out of cpu.h 2016-05-19 16:42:29 +02:00
kvm_i386.h
kvm-stub.c
kvm.c pc, pci, virtio: new features, cleanups, fixes 2016-07-21 20:12:37 +01:00
machine.c target-i386: kvm: Add basic Intel LMCE support 2016-07-07 15:25:16 -03:00
Makefile.objs
mem_helper.c Fix confusing argument names in some common functions 2016-07-12 13:06:08 +01:00
misc_helper.c cpu: move exec-all.h inclusion out of cpu.h 2016-05-19 16:42:29 +02:00
monitor.c
mpx_helper.c cpu: move exec-all.h inclusion out of cpu.h 2016-05-19 16:42:29 +02:00
ops_sse_header.h
ops_sse.h
seg_helper.c target-i386: Add comment about do_interrupt_user() next_eip argument 2016-06-09 15:55:02 +01:00
shift_helper_template.h
smm_helper.c
svm_helper.c cpu: move exec-all.h inclusion out of cpu.h 2016-05-19 16:42:29 +02:00
svm.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
TODO
trace-events kvm-irqchip: x86: add msi route notify fn 2016-07-21 20:44:19 +03:00
translate.c target-i386: fix typo in xsetbv implementation 2016-08-02 12:03:58 +02:00