{
int ret;
- /*
- * Devices assigned to untrusted domains (here assumed to be any domU)
- * can attempt to send arbitrary LAPIC/MSI messages. We are unprotected
- * by the root complex unless interrupt remapping is enabled.
- */
- if ( (target != hardware_domain) && !iommu_intremap )
- untrusted_msi = true;
-
/*
* If the device belongs to the hardware domain, and it has RMRR, don't
* remove it from the hardware domain, because BIOS may use RMRR at
if ( !has_arch_pdevs(target) )
vmx_pi_hooks_assign(target);
+ /*
+ * Devices assigned to untrusted domains (here assumed to be any domU)
+ * can attempt to send arbitrary LAPIC/MSI messages. We are unprotected
+ * by the root complex unless interrupt remapping is enabled.
+ */
+ if ( !iommu_intremap && !is_hardware_domain(target) &&
+ !is_system_domain(target) )
+ untrusted_msi = true;
+
ret = domain_context_mapping(target, devfn, pdev);
if ( ret )
{