From 3ba01239bfe626e2eea2c0faabae3165219dbb2c Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Thu, 16 Apr 2026 10:29:14 +0200 Subject: [PATCH] VT-d: avoid multi-message-MSI check for HPET MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Acked-by: Roger Pau Monné --- xen/drivers/passthrough/vtd/intremap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/drivers/passthrough/vtd/intremap.c b/xen/drivers/passthrough/vtd/intremap.c index afa8eb3756..dd2788efd7 100644 --- 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 )