iommu/amd-vi: fix assert comparing boolean to enum

Or else when iommu_intremap is set to iommu_intremap_full the assert
triggers.

Fixes: 1ba66a870e ('AMD/IOMMU: without XT, x2APIC needs to be forced into physical mode')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 4c507d8a6b
master date: 2023-05-12 09:35:36 +0200
This commit is contained in:
Roger Pau Monné authored and Jan Beulich committed 2023-05-23 15:02:50 +02:00
1 parent d6608d571f
commit d5eda5dfaa
1 file changed
+1 -1
+1 -1
View File
@@ -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));
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.