diff options
author | Neel Natu <neel@FreeBSD.org> | 2013-01-21 01:33:10 +0000 |
---|---|---|
committer | Neel Natu <neel@FreeBSD.org> | 2013-01-21 01:33:10 +0000 |
commit | e3f0800bd1cef1d934f088e413aa09d1137dd081 (patch) | |
tree | 7dc7faaac1be6ed990853ef763bac8828d56d735 /sys/amd64/vmm/vmm.c | |
parent | 6f91e2520b1fba96cc8b61fd3e86fe9e358fb92b (diff) | |
download | src-e3f0800bd1cef1d934f088e413aa09d1137dd081.tar.gz src-e3f0800bd1cef1d934f088e413aa09d1137dd081.zip |
Postpone vmm module initialization until after SMP is initialized - particularly
that 'smp_started != 0'.
This is required because the VT-x initialization calls smp_rendezvous()
to set the CR4_VMXE bit on all the cpus.
With this change we can preload vmm.ko from the loader.
Reported by: alfred@, sbruno@
Obtained from: NetApp
Notes
Notes:
svn path=/head/; revision=245704
Diffstat (limited to 'sys/amd64/vmm/vmm.c')
-rw-r--r-- | sys/amd64/vmm/vmm.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c index a4dea79bb924..d0e64276b4c5 100644 --- a/sys/amd64/vmm/vmm.c +++ b/sys/amd64/vmm/vmm.c @@ -249,11 +249,15 @@ static moduledata_t vmm_kmod = { }; /* - * Execute the module load handler after the pci passthru driver has had - * a chance to claim devices. We need this information at the time we do - * iommu initialization. + * vmm initialization has the following dependencies: + * + * - iommu initialization must happen after the pci passthru driver has had + * a chance to attach to any passthru devices (after SI_SUB_CONFIGURE). + * + * - VT-x initialization requires smp_rendezvous() and therefore must happen + * after SMP is fully functional (after SI_SUB_SMP). */ -DECLARE_MODULE(vmm, vmm_kmod, SI_SUB_CONFIGURE + 1, SI_ORDER_ANY); +DECLARE_MODULE(vmm, vmm_kmod, SI_SUB_SMP + 1, SI_ORDER_ANY); MODULE_VERSION(vmm, 1); SYSCTL_NODE(_hw, OID_AUTO, vmm, CTLFLAG_RW, NULL, NULL); |