Skip to content

Commit f20065b

Browse files
Li Zhonggregkh
authored andcommitted
KVM: PPC: Book 3S: XICS: correct the real mode ICP rejecting counter
[ Upstream commit 37451bc95dee0e666927d6ffdda302dbbaaae6fa ] Some counters are added in Commit 6e0365b ("KVM: PPC: Book3S HV: Add ICP real mode counters"), to provide some performance statistics to determine whether further optimizing is needed for real mode functions. The n_reject counter counts how many times ICP rejects an irq because of priority in real mode. The redelivery of an lsi that is still asserted after eoi doesn't fall into this category, so the increasement there is removed. Also, it needs to be increased in icp_rm_deliver_irq() if it rejects another one. Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com> Signed-off-by: Paul Mackerras <paulus@ozlabs.org> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 2393241 commit f20065b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

arch/powerpc/kvm/book3s_hv_rm_xics.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ static void icp_rm_deliver_irq(struct kvmppc_xics *xics, struct kvmppc_icp *icp,
280280
*/
281281
if (reject && reject != XICS_IPI) {
282282
arch_spin_unlock(&ics->lock);
283+
icp->n_reject++;
283284
new_irq = reject;
284285
goto again;
285286
}
@@ -611,10 +612,8 @@ int kvmppc_rm_h_eoi(struct kvm_vcpu *vcpu, unsigned long xirr)
611612
state = &ics->irq_state[src];
612613

613614
/* Still asserted, resend it */
614-
if (state->asserted) {
615-
icp->n_reject++;
615+
if (state->asserted)
616616
icp_rm_deliver_irq(xics, icp, irq);
617-
}
618617

619618
if (!hlist_empty(&vcpu->kvm->irq_ack_notifier_list)) {
620619
icp->rm_action |= XICS_RM_NOTIFY_EOI;

0 commit comments

Comments
 (0)