Page MenuHomeFreeBSD

D30316.diff
No OneTemporary

D30316.diff

diff --git a/sys/x86/xen/pv.c b/sys/x86/xen/pv.c
--- a/sys/x86/xen/pv.c
+++ b/sys/x86/xen/pv.c
@@ -95,10 +95,6 @@
static caddr_t xen_pvh_parse_preload_data(uint64_t);
static void xen_pvh_parse_memmap(caddr_t, vm_paddr_t *, int *);
-#ifdef SMP
-static int xen_pv_start_all_aps(void);
-#endif
-
/*---------------------------- Extern Declarations ---------------------------*/
#ifdef SMP
/* Variables used by amd64 mp_machdep to start APs */
@@ -208,71 +204,6 @@
}
/*-------------------------------- PV specific -------------------------------*/
-#ifdef SMP
-static bool
-start_xen_ap(int cpu)
-{
- struct vcpu_guest_context *ctxt;
- int ms, cpus = mp_naps;
- const size_t stacksize = kstack_pages * PAGE_SIZE;
-
- /* allocate and set up an idle stack data page */
- bootstacks[cpu] = (void *)kmem_malloc(stacksize, M_WAITOK | M_ZERO);
- doublefault_stack = (char *)kmem_malloc(PAGE_SIZE, M_WAITOK | M_ZERO);
- mce_stack = (char *)kmem_malloc(PAGE_SIZE, M_WAITOK | M_ZERO);
- nmi_stack = (char *)kmem_malloc(PAGE_SIZE, M_WAITOK | M_ZERO);
- dbg_stack = (void *)kmem_malloc(PAGE_SIZE, M_WAITOK | M_ZERO);
- dpcpu = (void *)kmem_malloc(DPCPU_SIZE, M_WAITOK | M_ZERO);
-
- bootSTK = (char *)bootstacks[cpu] + kstack_pages * PAGE_SIZE - 8;
- bootAP = cpu;
-
- ctxt = malloc(sizeof(*ctxt), M_TEMP, M_WAITOK | M_ZERO);
-
- ctxt->flags = VGCF_IN_KERNEL;
- ctxt->user_regs.rip = (unsigned long) init_secondary;
- ctxt->user_regs.rsp = (unsigned long) bootSTK;
-
- /* Set the AP to use the same page tables */
- ctxt->ctrlreg[3] = KPML4phys;
-
- if (HYPERVISOR_vcpu_op(VCPUOP_initialise, cpu, ctxt))
- panic("unable to initialize AP#%d", cpu);
-
- free(ctxt, M_TEMP);
-
- /* Launch the vCPU */
- if (HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL))
- panic("unable to start AP#%d", cpu);
-
- /* Wait up to 5 seconds for it to start. */
- for (ms = 0; ms < 5000; ms++) {
- if (mp_naps > cpus)
- return (true);
- DELAY(1000);
- }
-
- return (false);
-}
-
-static int
-xen_pv_start_all_aps(void)
-{
- int cpu;
-
- mtx_init(&ap_boot_mtx, "ap boot", NULL, MTX_SPIN);
-
- for (cpu = 1; cpu < mp_ncpus; cpu++) {
- /* attempt to start the Application Processor */
- if (!start_xen_ap(cpu))
- panic("AP #%d failed to start!", cpu);
-
- CPU_SET(cpu, &all_cpus); /* record AP in CPU map */
- }
-
- return (mp_naps);
-}
-#endif /* SMP */
/*
* When booted as a PVH guest FreeBSD needs to avoid using the RSDP address

File Metadata

Mime Type
text/plain
Expires
Tue, Jan 14, 3:49 AM (20 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15790751
Default Alt Text
D30316.diff (2 KB)

Event Timeline