File tree Expand file tree Collapse file tree 4 files changed +11
-31
lines changed Expand file tree Collapse file tree 4 files changed +11
-31
lines changed Original file line number Diff line number Diff line change @@ -2761,20 +2761,15 @@ void kvm_arch_irq_bypass_del_producer(struct irq_bypass_consumer *cons,
2761
2761
kvm_vgic_v4_unset_forwarding (irqfd -> kvm , prod -> irq );
2762
2762
}
2763
2763
2764
- bool kvm_arch_irqfd_route_changed (struct kvm_kernel_irq_routing_entry * old ,
2765
- struct kvm_kernel_irq_routing_entry * new )
2766
- {
2767
- if (old -> type != KVM_IRQ_ROUTING_MSI ||
2768
- new -> type != KVM_IRQ_ROUTING_MSI )
2769
- return true;
2770
-
2771
- return memcmp (& old -> msi , & new -> msi , sizeof (new -> msi ));
2772
- }
2773
-
2774
2764
void kvm_arch_update_irqfd_routing (struct kvm_kernel_irqfd * irqfd ,
2775
2765
struct kvm_kernel_irq_routing_entry * old ,
2776
2766
struct kvm_kernel_irq_routing_entry * new )
2777
2767
{
2768
+ if (old -> type == KVM_IRQ_ROUTING_MSI &&
2769
+ new -> type == KVM_IRQ_ROUTING_MSI &&
2770
+ !memcmp (& old -> msi , & new -> msi , sizeof (new -> msi )))
2771
+ return ;
2772
+
2778
2773
/*
2779
2774
* Remapping the vLPI requires taking the its_lock mutex to resolve
2780
2775
* the new translation. We're in spinlock land at this point, so no
Original file line number Diff line number Diff line change @@ -610,17 +610,12 @@ void kvm_arch_update_irqfd_routing(struct kvm_kernel_irqfd *irqfd,
610
610
struct kvm_kernel_irq_routing_entry * old ,
611
611
struct kvm_kernel_irq_routing_entry * new )
612
612
{
613
- kvm_pi_update_irte (irqfd , new );
614
- }
615
-
616
- bool kvm_arch_irqfd_route_changed (struct kvm_kernel_irq_routing_entry * old ,
617
- struct kvm_kernel_irq_routing_entry * new )
618
- {
619
- if (old -> type != KVM_IRQ_ROUTING_MSI ||
620
- new -> type != KVM_IRQ_ROUTING_MSI )
621
- return true;
613
+ if (old -> type == KVM_IRQ_ROUTING_MSI &&
614
+ new -> type == KVM_IRQ_ROUTING_MSI &&
615
+ !memcmp (& old -> msi , & new -> msi , sizeof (new -> msi )))
616
+ return ;
622
617
623
- return !! memcmp ( & old -> msi , & new -> msi , sizeof ( new -> msi ) );
618
+ kvm_pi_update_irte ( irqfd , new );
624
619
}
625
620
626
621
#ifdef CONFIG_KVM_IOAPIC
Original file line number Diff line number Diff line change @@ -2413,8 +2413,6 @@ void kvm_arch_irq_bypass_start(struct irq_bypass_consumer *);
2413
2413
void kvm_arch_update_irqfd_routing (struct kvm_kernel_irqfd * irqfd ,
2414
2414
struct kvm_kernel_irq_routing_entry * old ,
2415
2415
struct kvm_kernel_irq_routing_entry * new );
2416
- bool kvm_arch_irqfd_route_changed (struct kvm_kernel_irq_routing_entry * ,
2417
- struct kvm_kernel_irq_routing_entry * );
2418
2416
#endif /* CONFIG_HAVE_KVM_IRQ_BYPASS */
2419
2417
2420
2418
#ifdef CONFIG_HAVE_KVM_INVALID_WAKEUPS
Original file line number Diff line number Diff line change @@ -291,13 +291,6 @@ void __weak kvm_arch_update_irqfd_routing(struct kvm_kernel_irqfd *irqfd,
291
291
{
292
292
293
293
}
294
-
295
- bool __attribute__((weak )) kvm_arch_irqfd_route_changed (
296
- struct kvm_kernel_irq_routing_entry * old ,
297
- struct kvm_kernel_irq_routing_entry * new )
298
- {
299
- return true;
300
- }
301
294
#endif
302
295
303
296
static int
@@ -616,8 +609,7 @@ void kvm_irq_routing_update(struct kvm *kvm)
616
609
irqfd_update (kvm , irqfd );
617
610
618
611
#if IS_ENABLED (CONFIG_HAVE_KVM_IRQ_BYPASS )
619
- if (irqfd -> producer &&
620
- kvm_arch_irqfd_route_changed (& old , & irqfd -> irq_entry ))
612
+ if (irqfd -> producer )
621
613
kvm_arch_update_irqfd_routing (irqfd , & old , & irqfd -> irq_entry );
622
614
#endif
623
615
}
You can’t perform that action at this time.
0 commit comments