[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen stable-4.16] iommu/amd-vi: fix assert comparing boolean to enum



commit d5eda5dfaa49cccb47b7940efe0534593d73592e
Author:     Roger Pau Monné <roger.pau@xxxxxxxxxx>
AuthorDate: Tue May 23 15:02:50 2023 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue May 23 15:02:50 2023 +0200

    iommu/amd-vi: fix assert comparing boolean to enum
    
    Or else when iommu_intremap is set to iommu_intremap_full the assert
    triggers.
    
    Fixes: 1ba66a870eba ('AMD/IOMMU: without XT, x2APIC needs to be forced into 
physical mode')
    Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    master commit: 4c507d8a6b6e8be90881a335b0a66eb28e0f7737
    master date: 2023-05-12 09:35:36 +0200
---
 xen/drivers/passthrough/amd/pci_amd_iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/drivers/passthrough/amd/pci_amd_iommu.c 
b/xen/drivers/passthrough/amd/pci_amd_iommu.c
index 4792b34bc2..e5e0f00402 100644
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
@@ -240,7 +240,7 @@ static int __must_check amd_iommu_setup_domain_device(
          */
         if ( dte->it_root )
             ASSERT(dte->int_ctl == IOMMU_DEV_TABLE_INT_CONTROL_TRANSLATED);
-        ASSERT(dte->iv == iommu_intremap);
+        ASSERT(dte->iv == !!iommu_intremap);
         ASSERT(dte->ex == ivrs_dev->dte_allow_exclusion);
         ASSERT(dte->sys_mgt == MASK_EXTR(ivrs_dev->device_flags,
                                          ACPI_IVHD_SYSTEM_MGMT));
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.16



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.