Patch "KVM: x86: emulator: Return to user-mode on L1 CPL=0 emulation failure" has been added to the 3.18-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
KVM: x86: emulator: Return to user-mode on L1 CPL=0 emulation failure
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
kvm-x86-emulator-return-to-user-mode-on-l1-cpl-0-emulation-failure.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Thu Feb 1 14:48:12 CET 2018
From: Liran Alon <[email protected]>
Date: Sun, 5 Nov 2017 16:56:33 +0200
Subject: KVM: x86: emulator: Return to user-mode on L1 CPL=0 emulation failure
From: Liran Alon <[email protected]>
[ Upstream commit 1f4dcb3b213235e642088709a1c54964d23365e9 ]
On this case, handle_emulation_failure() fills kvm_run with internal-error information which it expects to be delivered to user-mode for further processing.
However, the code reports a wrong return-value which makes KVM to never return to user-mode on this scenario.
userspace")
--- arch/x86/kvm/x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/x86.c +1 -1
@@ -5109,7 +5109,7 @@ static int handle_emulation_failure(stru vcpu->run->exit_reason =KVM_EXIT_INTERNAL_ERROR ; vcpu->run->internal.suberror =KVM_INTERNAL_ERROR_EMULATION ; vcpu->run->internal.ndata =0 ; - r =EMULATE_FAIL ; + r =EMULATE_USER_EXIT ; }kvm_queue_exception (vcpu,UD_VECTOR );
Patches currently in stable-queue which might be from [email protected] are
queue-3.18/kvm-x86-don-t-re-execute-instruction-when-not-passing-cr2-value.patch queue-3.18/kvm-x86-emulator-return-to-user-mode-on-l1-cpl-0-emulation-failure.patch