Skip to content

Commit 6342c50

Browse files
davidhildenbrandbonzini
authored andcommitted
KVM: nVMX: vmx_complete_nested_posted_interrupt() can't fail
vmx_complete_nested_posted_interrupt() can't fail, let's turn it into a void function. Signed-off-by: David Hildenbrand <david@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 42cf014 commit 6342c50

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

arch/x86/kvm/vmx.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4953,7 +4953,7 @@ static bool vmx_get_enable_apicv(void)
49534953
return enable_apicv;
49544954
}
49554955

4956-
static int vmx_complete_nested_posted_interrupt(struct kvm_vcpu *vcpu)
4956+
static void vmx_complete_nested_posted_interrupt(struct kvm_vcpu *vcpu)
49574957
{
49584958
struct vcpu_vmx *vmx = to_vmx(vcpu);
49594959
int max_irr;
@@ -4964,13 +4964,13 @@ static int vmx_complete_nested_posted_interrupt(struct kvm_vcpu *vcpu)
49644964
vmx->nested.pi_pending) {
49654965
vmx->nested.pi_pending = false;
49664966
if (!pi_test_and_clear_on(vmx->nested.pi_desc))
4967-
return 0;
4967+
return;
49684968

49694969
max_irr = find_last_bit(
49704970
(unsigned long *)vmx->nested.pi_desc->pir, 256);
49714971

49724972
if (max_irr == 256)
4973-
return 0;
4973+
return;
49744974

49754975
vapic_page = kmap(vmx->nested.virtual_apic_page);
49764976
__kvm_apic_update_irr(vmx->nested.pi_desc->pir, vapic_page);
@@ -4983,7 +4983,6 @@ static int vmx_complete_nested_posted_interrupt(struct kvm_vcpu *vcpu)
49834983
vmcs_write16(GUEST_INTR_STATUS, status);
49844984
}
49854985
}
4986-
return 0;
49874986
}
49884987

49894988
static inline bool kvm_vcpu_trigger_posted_interrupt(struct kvm_vcpu *vcpu)
@@ -10695,7 +10694,8 @@ static int vmx_check_nested_events(struct kvm_vcpu *vcpu, bool external_intr)
1069510694
return 0;
1069610695
}
1069710696

10698-
return vmx_complete_nested_posted_interrupt(vcpu);
10697+
vmx_complete_nested_posted_interrupt(vcpu);
10698+
return 0;
1069910699
}
1070010700

1070110701
static u32 vmx_get_preemption_timer_value(struct kvm_vcpu *vcpu)

0 commit comments

Comments
 (0)