Skip to content

Commit

Permalink
KVM: x86: Remove guest mode check from kvm_check_nested_events
Browse files Browse the repository at this point in the history
A survey of the callsites reveals that they all ensure the vCPU is in
guest mode before calling kvm_check_nested_events. Remove this dead
code so that the only negative value this function returns (at the
moment) is -EBUSY.

Signed-off-by: Jim Mattson <jmattson@google.com>
Message-Id: <20210604172611.281819-2-jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
Jim Mattson authored and Paolo Bonzini committed Jun 17, 2021
1 parent efe5854 commit d82ee28
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -8625,9 +8625,6 @@ static void update_cr8_intercept(struct kvm_vcpu *vcpu)

int kvm_check_nested_events(struct kvm_vcpu *vcpu)
{
if (WARN_ON_ONCE(!is_guest_mode(vcpu)))
return -EIO;

if (kvm_check_request(KVM_REQ_TRIPLE_FAULT, vcpu)) {
kvm_x86_ops.nested_ops->triple_fault(vcpu);
return 1;
Expand Down

0 comments on commit d82ee28

Please sign in to comment.