From 810169ad20a19c6cb557dd42e8aa23dfba42a4f9 Mon Sep 17 00:00:00 2001 From: Alexander Merritt Date: Fri, 1 Nov 2019 00:06:10 -0700 Subject: [PATCH] HV: initialize IOMMU before PCI device discovery In later patches we use information from DMAR tables to guide discovery and initialization of PCI devices. Tracked-On: #4134 Signed-off-by: Alexander Merritt Reviewed-by: Eddie Dong --- hypervisor/arch/x86/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hypervisor/arch/x86/cpu.c b/hypervisor/arch/x86/cpu.c index 29df60c1b..f8b881130 100644 --- a/hypervisor/arch/x86/cpu.c +++ b/hypervisor/arch/x86/cpu.c @@ -224,12 +224,12 @@ void init_pcpu_post(uint16_t pcpu_id) timer_init(); setup_notification(); setup_posted_intr_notification(); - init_pci_pdev_list(); if (init_iommu() != 0) { panic("failed to initialize iommu!"); } + init_pci_pdev_list(); /* init_iommu must come before this */ ptdev_init(); if (init_sgx() != 0) {