iommu/amd-vi: fix assert comparing boolean to enum
PATCH 1/1 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é <[email protected]>
--- xen/drivers/passthrough/amd/pci_amd_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/drivers/passthrough/amd/pci_amd_iommu.c +1 -1
@@ -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 ));
Signature · 1 line
2.40.0
Quoted 5 lines · Roger Pau Monne
Or else when
iommu_intremapis set toiommu_intremap_fullthe assert triggers.Fixes 1ba66a870eba ('AMD/IOMMU: without XT, x2APIC needs to be forced into physical mode')Signed-off-by Roger Pau Monné <[email protected]>
Reviewed-by Jan Beulich <[email protected]>
Quoted 7 lines · Jan Beulich
Quoted 5 lines · Roger Pau Monne
Or else when
iommu_intremapis set toiommu_intremap_fullthe assert triggers.Fixes 1ba66a870eba ('AMD/IOMMU: without XT, x2APIC needs to be forced into physical mode')Signed-off-by Roger Pau Monné <[email protected]>Reviewed-by Jan Beulich <[email protected]>
It occurs to me that this might be related to the reports we're still getting of some problems on these systems...
~Andrew