File tree Expand file tree Collapse file tree 1 file changed +4
-21
lines changed Expand file tree Collapse file tree 1 file changed +4
-21
lines changed Original file line number Diff line number Diff line change @@ -83,28 +83,11 @@ void kvm_deliver_intr(struct kvm_vcpu *vcpu)
83
83
unsigned long * pending = & vcpu -> arch .irq_pending ;
84
84
unsigned long * pending_clr = & vcpu -> arch .irq_clear ;
85
85
86
- if (!(* pending ) && !(* pending_clr ))
87
- return ;
88
-
89
- if (* pending_clr ) {
90
- priority = __ffs (* pending_clr );
91
- while (priority <= INT_IPI ) {
92
- kvm_irq_clear (vcpu , priority );
93
- priority = find_next_bit (pending_clr ,
94
- BITS_PER_BYTE * sizeof (* pending_clr ),
95
- priority + 1 );
96
- }
97
- }
86
+ for_each_set_bit (priority , pending_clr , INT_IPI + 1 )
87
+ kvm_irq_clear (vcpu , priority );
98
88
99
- if (* pending ) {
100
- priority = __ffs (* pending );
101
- while (priority <= INT_IPI ) {
102
- kvm_irq_deliver (vcpu , priority );
103
- priority = find_next_bit (pending ,
104
- BITS_PER_BYTE * sizeof (* pending ),
105
- priority + 1 );
106
- }
107
- }
89
+ for_each_set_bit (priority , pending , INT_IPI + 1 )
90
+ kvm_irq_deliver (vcpu , priority );
108
91
}
109
92
110
93
int kvm_pending_timer (struct kvm_vcpu * vcpu )
You can’t perform that action at this time.
0 commit comments