X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/39236c6e673c41db228275375ab7fdb0f837b292..d26ffc64f583ab2d29df48f13518685602bc8832:/osfmk/i386/cpu.c diff --git a/osfmk/i386/cpu.c b/osfmk/i386/cpu.c index fc9fcc43e..84cf06615 100644 --- a/osfmk/i386/cpu.c +++ b/osfmk/i386/cpu.c @@ -155,7 +155,7 @@ cpu_exit_wait( * a timeout if long-running interrupt were to occur here. */ intrs_enabled = ml_set_interrupts_enabled(FALSE); - simple_lock(&x86_topo_lock); + mp_safe_spin_lock(&x86_topo_lock); /* Set a generous timeout of several seconds (in TSC ticks) */ tsc_timeout = rdtsc64() + (10ULL * 1000 * 1000 * 1000); while ((cdp->lcpu.state != LCPU_HALT) @@ -167,7 +167,7 @@ cpu_exit_wait( if (rdtsc64() > tsc_timeout) panic("cpu_exit_wait(%d) timeout", cpu); ml_set_interrupts_enabled(FALSE); - simple_lock(&x86_topo_lock); + mp_safe_spin_lock(&x86_topo_lock); } simple_unlock(&x86_topo_lock); ml_set_interrupts_enabled(intrs_enabled); @@ -185,8 +185,8 @@ cpu_machine_init( ml_init_interrupt(); #if CONFIG_VMX - /* for every CPU, get the VT specs */ - vmx_get_specs(); + /* initialize VMX for every CPU */ + vmx_cpu_init(); #endif } @@ -199,7 +199,7 @@ cpu_processor_alloc(boolean_t is_boot_cpu) if (is_boot_cpu) return &processor_master; - ret = kmem_alloc(kernel_map, (vm_offset_t *) &proc, sizeof(*proc)); + ret = kmem_alloc(kernel_map, (vm_offset_t *) &proc, sizeof(*proc), VM_KERN_MEMORY_OSFMK); if (ret != KERN_SUCCESS) return NULL;