linux/arch/mips/kvm
James Hogan b4caa5be15 KVM: MIPS: Make ERET handle ERL before EXL
[ Upstream commit ede5f3e7b5 ]

The ERET instruction to return from exception is used for returning from
exception level (Status.EXL) and error level (Status.ERL). If both bits
are set however we should be returning from ERL first, as ERL can
interrupt EXL, for example when an NMI is taken. KVM however checks EXL
first.

Fix the order of the checks to match the pseudocode in the instruction
set manual.

Fixes: e685c689f3 ("KVM/MIPS32: Privileged instruction/target branch emulation.")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Radim Krčmář <rkrcmar@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
Cc: <stable@vger.kernel.org> # 3.10.x-
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
History 2016-11-23 23:02:28 -05:00
..
00README.txt KVM/MIPS32: Release notes and KVM module Makefile 2013-05-08 03:55:35 +02:00
callback.c MIPS: KVM: Rename files to remove the prefix "kvm_" and "kvm_mips_" 2014-06-30 16:52:03 +02:00
commpage.c MIPS: KVM: Skip memory cleaning in kvm_mips_commpage_init() 2014-06-30 16:52:03 +02:00
commpage.h MIPS: KVM: Rename files to remove the prefix "kvm_" and "kvm_mips_" 2014-06-30 16:52:03 +02:00
dyntrans.c MIPS: KVM: Rename files to remove the prefix "kvm_" and "kvm_mips_" 2014-06-30 16:52:03 +02:00
emulate.c KVM: MIPS: Make ERET handle ERL before EXL 2016-11-23 23:02:28 -05:00
interrupt.c MIPS: KVM: Rename files to remove the prefix "kvm_" and "kvm_mips_" 2014-06-30 16:52:03 +02:00
interrupt.h MIPS: KVM: Fix modular KVM under QEMU 2016-07-11 11:16:28 -04:00
Kconfig MIPS: kvm: Kconfig: Drop HAVE_KVM dependency from VIRTUALIZATION 2013-07-19 12:45:57 +02:00
locore.S MIPS: KVM: Fix modular KVM under QEMU 2016-07-11 11:16:28 -04:00
Makefile MIPS: KVM: Rename files to remove the prefix "kvm_" and "kvm_mips_" 2014-06-30 16:52:03 +02:00
mips.c MIPS: KVM: Fix modular KVM under QEMU 2016-07-11 11:16:28 -04:00
opcode.h MIPS: KVM: Rename files to remove the prefix "kvm_" and "kvm_mips_" 2014-06-30 16:52:03 +02:00
stats.c MIPS: KVM: Rename files to remove the prefix "kvm_" and "kvm_mips_" 2014-06-30 16:52:03 +02:00
tlb.c MIPS: KVM: Check for pfn noslot case 2016-09-17 20:46:58 -04:00
trace.h KVM: MIPS: Fix trace event to save PC directly 2015-03-14 15:37:22 -04:00
trap_emul.c MIPS: KVM: Fix timer IRQ race when writing CP0_Compare 2016-06-06 19:11:02 -04:00