[PATCH] accel: remove unnecessary #ifdefs

Paolo Bonzini posted 1 patch 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260625175643.1635827-1-pbonzini@redhat.com
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>
accel/accel-irq.c | 14 --------------
1 file changed, 14 deletions(-)
[PATCH] accel: remove unnecessary #ifdefs
Posted by Paolo Bonzini 1 month ago
Based-on: <20260417105618.3621-1-magnuskulke@linux.microsoft.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 accel/accel-irq.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/accel/accel-irq.c b/accel/accel-irq.c
index 4303e10e408..830be27c7f9 100644
--- a/accel/accel-irq.c
+++ b/accel/accel-irq.c
@@ -19,11 +19,9 @@
 
 int accel_irqchip_add_msi_route(AccelRouteChange *c, int vector, PCIDevice *dev)
 {
-#ifdef CONFIG_MSHV_IS_POSSIBLE
     if (mshv_msi_via_irqfd_enabled()) {
         return mshv_irqchip_add_msi_route(c, vector, dev);
     }
-#endif
     if (kvm_enabled()) {
         return kvm_irqchip_add_msi_route(c, vector, dev);
     }
@@ -32,11 +30,9 @@ int accel_irqchip_add_msi_route(AccelRouteChange *c, int vector, PCIDevice *dev)
 
 int accel_irqchip_update_msi_route(int vector, MSIMessage msg, PCIDevice *dev)
 {
-#ifdef CONFIG_MSHV_IS_POSSIBLE
     if (mshv_msi_via_irqfd_enabled()) {
         return mshv_irqchip_update_msi_route(vector, msg, dev);
     }
-#endif
     if (kvm_enabled()) {
         return kvm_irqchip_update_msi_route(kvm_state, vector, msg, dev);
     }
@@ -53,11 +49,9 @@ void accel_irqchip_commit_route_changes(AccelRouteChange *c)
 
 void accel_irqchip_commit_routes(void)
 {
-#ifdef CONFIG_MSHV_IS_POSSIBLE
     if (mshv_msi_via_irqfd_enabled()) {
         mshv_irqchip_commit_routes(mshv_state);
     }
-#endif
     if (kvm_enabled()) {
         kvm_irqchip_commit_routes(kvm_state);
     }
@@ -65,11 +59,9 @@ void accel_irqchip_commit_routes(void)
 
 void accel_irqchip_release_virq(int virq)
 {
-#ifdef CONFIG_MSHV_IS_POSSIBLE
     if (mshv_msi_via_irqfd_enabled()) {
         mshv_irqchip_release_virq(mshv_state, virq);
     }
-#endif
     if (kvm_enabled()) {
         kvm_irqchip_release_virq(kvm_state, virq);
     }
@@ -78,11 +70,9 @@ void accel_irqchip_release_virq(int virq)
 int accel_irqchip_add_irqfd_notifier_gsi(EventNotifier *n, EventNotifier *rn,
                                          int virq)
 {
-#ifdef CONFIG_MSHV_IS_POSSIBLE
     if (mshv_msi_via_irqfd_enabled()) {
         return mshv_irqchip_add_irqfd_notifier_gsi(n, rn, virq);
     }
-#endif
     if (kvm_enabled()) {
         return kvm_irqchip_add_irqfd_notifier_gsi(kvm_state, n, rn, virq);
     }
@@ -91,11 +81,9 @@ int accel_irqchip_add_irqfd_notifier_gsi(EventNotifier *n, EventNotifier *rn,
 
 int accel_irqchip_remove_irqfd_notifier_gsi(EventNotifier *n, int virq)
 {
-#ifdef CONFIG_MSHV_IS_POSSIBLE
     if (mshv_msi_via_irqfd_enabled()) {
         return mshv_irqchip_remove_irqfd_notifier_gsi(n, virq);
     }
-#endif
     if (kvm_enabled()) {
         return kvm_irqchip_remove_irqfd_notifier_gsi(kvm_state, n, virq);
     }
@@ -104,14 +92,12 @@ int accel_irqchip_remove_irqfd_notifier_gsi(EventNotifier *n, int virq)
 
 inline AccelRouteChange accel_irqchip_begin_route_changes(void)
 {
-#ifdef CONFIG_MSHV_IS_POSSIBLE
     if (mshv_msi_via_irqfd_enabled()) {
         return (AccelRouteChange) {
             .accel = ACCEL(mshv_state),
             .changes = 0,
         };
     }
-#endif
     if (kvm_enabled()) {
         return (AccelRouteChange) {
             .accel = ACCEL(kvm_state),
-- 
2.54.0