From owner-dev-commits-src-all@freebsd.org Mon May 17 17:06:52 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3B6F164DA46; Mon, 17 May 2021 17:06:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FkQXX1BYSz4cc5; Mon, 17 May 2021 17:06:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 11FCF7E12; Mon, 17 May 2021 17:06:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 14HH6ptl021362; Mon, 17 May 2021 17:06:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 14HH6paS021361; Mon, 17 May 2021 17:06:51 GMT (envelope-from git) Date: Mon, 17 May 2021 17:06:51 GMT Message-Id: <202105171706.14HH6paS021361@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 4224dbf4c7c4 - main - xen: Remove leftover bits missed in commit ac3ede5371 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4224dbf4c7c497130150eafb0442f5306389e068 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2021 17:06:52 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4224dbf4c7c497130150eafb0442f5306389e068 commit 4224dbf4c7c497130150eafb0442f5306389e068 Author: Mark Johnston AuthorDate: 2021-05-17 17:05:58 +0000 Commit: Mark Johnston 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