]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: nVMX: Fix vmx_check_nested_events() return value in case an event was reinjected...
authorLiran Alon <liran.alon@oracle.com>
Sun, 5 Nov 2017 14:07:43 +0000 (16:07 +0200)
committerKrish Sadhukhan <krish.sadhukhan@oracle.com>
Mon, 11 Dec 2017 18:43:00 +0000 (13:43 -0500)
commit84310a408279ca55b7bc7de43eae6847a03058fa
tree900a0b443d3005c8c07b3ef3e4bbce96b541fa73
parent39b1ac85c013e3dcf9967ab5cb4638d998a72615
KVM: nVMX: Fix vmx_check_nested_events() return value in case an event was reinjected to L2

vmx_check_nested_events() should return -EBUSY only in case there is a
pending L1 event which requires a VMExit from L2 to L1 but such a
VMExit is currently blocked. Such VMExits are blocked either
because nested_run_pending=1 or an event was reinjected to L2.
vmx_check_nested_events() should return 0 in case there are no
pending L1 events which requires a VMExit from L2 to L1 or if
a VMExit from L2 to L1 was done internally.

However, upstream commit which introduced blocking in case an event was
reinjected to L2 (commit acc9ab601327 ("KVM: nVMX: Fix pending events
injection")) contains a bug: It returns -EBUSY even if there are no
pending L1 events which requires VMExit from L2 to L1.

This commit fix this issue.

Fixes: acc9ab601327 ("KVM: nVMX: Fix pending events injection")
Signed-off-by: Liran Alon <liran.alon@oracle.com>
Reviewed-by: Nikita Leshenko <nikita.leshchenko@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
(cherry picked from commit 917dc6068bc12a2dafffcf0e9d405ddb1b8780cb)
Orabug: 27200329
Signed-off-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Acked-by: Liran Alon <liran.alon@oracle.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
arch/x86/kvm/vmx.c