There's no point in registering the internal MSI-X table intercept
functions on all domains - it is sufficient to do so once a domain gets
an MSI-X capable device assigned.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
rtc_init(d);
- msixtbl_init(d);
-
register_portio_handler(d, 0xe9, 1, hvm_print_line);
if ( hvm_tsc_scaling_supported )
void msixtbl_init(struct domain *d)
{
- if ( !has_vlapic(d) )
+ if ( !has_hvm_container_domain(d) || !has_vlapic(d) ||
+ d->arch.hvm_domain.msixtbl_list.next )
return;
INIT_LIST_HEAD(&d->arch.hvm_domain.msixtbl_list);
struct msixtbl_entry *entry, *temp;
unsigned long flags;
- if ( !has_vlapic(d) )
+ if ( !d->arch.hvm_domain.msixtbl_list.next )
return;
/* msixtbl_list_lock must be acquired with irq_disabled for check_lock() */
goto done;
}
+ if ( pdev->msix )
+ msixtbl_init(d);
+
pdev->fault.count = 0;
if ( (rc = hd->platform_ops->assign_device(d, devfn, pci_to_dev(pdev), flag)) )