Skip to content
Commit a3cbdb50 authored by Aneesh Kumar K.V (Arm)'s avatar Aneesh Kumar K.V (Arm) Committed by Steven Price
Browse files

cpu: vmexit: Handle KVM_EXIT_UNKNOWN exit reason correctly



The return value for the KVM_RUN ioctl is confusing and has led to
errors in different kernel exit handlers. A return value of 0 indicates
a return to the VMM, whereas a return value of 1 indicates resuming
execution in the guest. Some handlers mistakenly return 0 to force a
return to the guest.

This worked in kvmtool because the exit_reason defaulted to
0 (KVM_EXIT_UNKNOWN), and kvmtool did not error out on an unknown exit
reason. However, forcing a KVM panic on an unknown exit reason would
help catch these bugs early.

Signed-off-by: default avatarAneesh Kumar K.V (Arm) <aneesh.kumar@kernel.org>
parent f4100cba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment