mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
KVM: VMX: Improve error reporting during invalid guest state emulation
If instruction emulation fails, report it properly to userspace. Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
de87dcddc7
commit
de5f70e0c6
1 changed files with 5 additions and 1 deletions
|
@ -4996,8 +4996,12 @@ static int handle_invalid_guest_state(struct kvm_vcpu *vcpu)
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (err != EMULATE_DONE)
|
||||
if (err != EMULATE_DONE) {
|
||||
vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
|
||||
vcpu->run->internal.suberror = KVM_INTERNAL_ERROR_EMULATION;
|
||||
vcpu->run->internal.ndata = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (signal_pending(current))
|
||||
goto out;
|
||||
|
|
Loading…
Reference in a new issue