git: 4224dbf4c7c4 - main - xen: Remove leftover bits missed in commit ac3ede5371
Mark Johnston
markj at FreeBSD.org
Mon May 17 17:06:52 UTC 2021
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=4224dbf4c7c497130150eafb0442f5306389e068
commit 4224dbf4c7c497130150eafb0442f5306389e068
Author: Mark Johnston <markj at FreeBSD.org>
AuthorDate: 2021-05-17 17:05:58 +0000
Commit: Mark Johnston <markj at FreeBSD.org>
CommitDate: 2021-05-17 17:06:44 +0000
xen: Remove leftover bits missed in commit ac3ede5371
Fixes: ac3ede5371 ("x86/xen: remove PVHv1 code")
Reviewed by: royger
Differential Revision: https://reviews.freebsd.org/D30316
---
sys/x86/xen/pv.c | 69 --------------------------------------------------------
1 file changed, 69 deletions(-)
diff --git a/sys/x86/xen/pv.c b/sys/x86/xen/pv.c
index c6dfff511c0c..254ca4002bda 100644
--- a/sys/x86/xen/pv.c
+++ b/sys/x86/xen/pv.c
@@ -95,10 +95,6 @@ uint64_t hammer_time_xen(vm_paddr_t);
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 @@ hammer_time_xen(vm_paddr_t start_info_paddr)
}
/*-------------------------------- 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
More information about the dev-commits-src-main
mailing list