qemu/target-i386
Dave Hansen 502c8e86ea 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>
(cherry picked from commit ba03584f4f)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2016-08-05 16:56:11 -05:00
..
arch_dump.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
arch_memory_mapping.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
bpt_helper.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
cc_helper_template.h target-i386: Implement BLSR, BLSMSK, BLSI 2013-02-18 15:52:05 -08:00
cc_helper.c target-i386: Perform set/reset_inhibit_irq inline 2016-02-13 07:59:59 +11:00
cpu-qom.h all: Clean up includes 2016-02-23 12:43:05 +00:00
cpu.c Fix some typos found by codespell 2016-08-05 16:14:47 -05:00
cpu.h Fix some typos found by codespell 2016-08-05 16:14:47 -05:00
excp_helper.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
fpu_helper.c target-i386: implement PKE for TCG 2016-03-24 14:01:08 +01:00
gdbstub.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
helper.c target-i386: check for PKU even for non-writable pages 2016-04-08 00:07:56 +02:00
helper.h target-i386: implement PKE for TCG 2016-03-24 14:01:08 +01:00
hyperv.c event-notifier: Add "is_external" parameter 2016-04-22 16:43:56 +02:00
hyperv.h target-i386/hyperv: Hyper-V SynIC SINT routing and vcpu exit 2015-12-17 15:24:34 +01:00
int_helper.c target-i386: Implement FSGSBASE 2016-02-15 14:50:00 +11:00
kvm_i386.h kvm: x86: add support for KVM_CAP_SPLIT_IRQCHIP 2015-12-17 17:33:47 +01:00
kvm-stub.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
kvm.c target-i386: assert that KVM_GET/SET_MSRS can set all requested MSRs 2016-04-05 11:46:52 +02:00
machine.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
Makefile.objs target-i386: Enable control registers for MPX 2016-02-13 07:59:59 +11:00
mem_helper.c target-i386: Update BNDSTATUS for exceptions raised by BOUND 2016-02-15 14:50:00 +11:00
misc_helper.c target-i386: implement PKE for TCG 2016-03-24 14:01:08 +01:00
monitor.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
mpx_helper.c * Asynchronous dump-guest-memory from Peter 2016-02-25 15:30:57 +00:00
ops_sse_header.h target-i386: Rename struct XMMReg to ZMMReg 2016-01-21 12:47:15 -02:00
ops_sse.h target-i386: Rename XMM_[BWLSDQ] helpers to ZMM_* 2016-01-21 12:47:16 -02:00
seg_helper.c target-i386: Rewrite gen_enter inline 2016-02-09 15:46:54 +01:00
shift_helper_template.h target-i386: compute eflags outside rcl/rcr helper 2013-02-18 15:03:56 -08:00
smm_helper.c target-i386: Enable control registers for MPX 2016-02-13 07:59:59 +11:00
svm_helper.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
svm.h Use new macro QEMU_PACKED for packed structures 2011-09-03 10:45:59 +00:00
TODO target-i386: fix {min,max}{pd,ps,sd,ss} SSE2 instructions 2012-01-11 09:55:28 +01:00
translate.c target-i386: fix typo in xsetbv implementation 2016-08-05 16:56:11 -05:00