File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -388,21 +388,16 @@ void kvm_scan_ioapic_routes(struct kvm_vcpu *vcpu,
388388 kvm -> arch .nr_reserved_ioapic_pins );
389389 for (i = 0 ; i < nr_ioapic_pins ; ++ i ) {
390390 hlist_for_each_entry (entry , & table -> map [i ], link ) {
391- u32 dest_id , dest_mode ;
392- bool level ;
391+ struct kvm_lapic_irq irq ;
393392
394393 if (entry -> type != KVM_IRQ_ROUTING_MSI )
395394 continue ;
396- dest_id = (entry -> msi .address_lo >> 12 ) & 0xff ;
397- dest_mode = (entry -> msi .address_lo >> 2 ) & 0x1 ;
398- level = entry -> msi .data & MSI_DATA_TRIGGER_LEVEL ;
399- if (level && kvm_apic_match_dest (vcpu , NULL , 0 ,
400- dest_id , dest_mode )) {
401- u32 vector = entry -> msi .data & 0xff ;
402-
403- __set_bit (vector ,
404- ioapic_handled_vectors );
405- }
395+
396+ kvm_set_msi_irq (entry , & irq );
397+
398+ if (irq .level && kvm_apic_match_dest (vcpu , NULL , 0 ,
399+ irq .dest_id , irq .dest_mode ))
400+ __set_bit (irq .vector , ioapic_handled_vectors );
406401 }
407402 }
408403 srcu_read_unlock (& kvm -> irq_srcu , idx );
You can’t perform that action at this time.
0 commit comments