[PATCH] VT-d: avoid multi-message-MSI check for HPET

Jan Beulich posted 1 patch 6 hours ago
Failed in applying to current master (apply log)
[PATCH] VT-d: avoid multi-message-MSI check for HPET
Posted by Jan Beulich 6 hours ago
Having this immediately below a PCI-dev vs HPET conditional is (mildly)
confusing. Move that if() into the body of the earlier one.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/drivers/passthrough/vtd/intremap.c
+++ b/xen/drivers/passthrough/vtd/intremap.c
@@ -513,13 +513,13 @@ static int msi_msg_to_remap_entry(
 
         if ( rc )
             return rc;
+
+        if ( msi_desc->msi_attrib.type == PCI_CAP_ID_MSI )
+            nr = msi_desc->msi.nvec;
     }
     else
         set_hpet_source_id(msi_desc->hpet_id, &new_ire);
 
-    if ( msi_desc->msi_attrib.type == PCI_CAP_ID_MSI )
-        nr = msi_desc->msi.nvec;
-
     spin_lock_irqsave(&iommu->intremap.lock, flags);
 
     if ( msg == NULL )