From owner-freebsd-xen@freebsd.org Mon May 21 09:03:28 2018 Return-Path: Delivered-To: freebsd-xen@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73792EEA34C for ; Mon, 21 May 2018 09:03:28 +0000 (UTC) (envelope-from prvs=6724271a8=roger.pau@citrix.com) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [185.25.65.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.citrix.com", Issuer "DigiCert SHA2 Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 06BBD74F76; Mon, 21 May 2018 09:03:25 +0000 (UTC) (envelope-from prvs=6724271a8=roger.pau@citrix.com) X-IronPort-AV: E=Sophos;i="5.49,426,1520899200"; d="scan'208";a="73449245" Date: Mon, 21 May 2018 11:03:10 +0200 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Pratyush Yadav CC: , Akshay Jaggi , Edward Napierala Subject: Re: Xen kernel fails to boot, d0v1 triple fault looks like the cuplrit Message-ID: <20180521090310.c46eexnwe4c7w62x@MacBook-Pro-de-Roger.local> References: <20180519081030.qhzyjdrpwcekmcac@MacBook-Pro-de-Roger.local> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180323 X-ClientProxiedBy: AMSPEX02CAS01.citrite.net (10.69.22.112) To AMSPEX02CL02.citrite.net (10.69.22.126) X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 09:03:28 -0000 Please try to avoid top posting. On Sat, May 19, 2018 at 03:45:41PM +0530, Pratyush Yadav wrote: > Hi, > > The line is > > /usr/src/sys/amd64/amd64/mp_machdep.c:307 Hm, it seems like dbg_stack is not properly allocated. Can you please try the above debug patch and paste the boot log? ---8<--- diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 301461420874..8854242b4bf5 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -304,6 +304,7 @@ init_secondary(void) /* Save the per-cpu pointer for use by the DB# handler. */ np = ((struct nmi_pcpu *) &dbg_stack[PAGE_SIZE]) - 1; +printf("ID %d dbg_stack: %p per-cpu: %p\n", cpu, dbg_stack, np); np->np_pcpu = (register_t) pc; wrmsr(MSR_FSBASE, 0); /* User value */ @@ -403,6 +404,7 @@ native_start_all_aps(void) M_WAITOK | M_ZERO); dbg_stack = (char *)kmem_malloc(kernel_arena, PAGE_SIZE, M_WAITOK | M_ZERO); +printf("allocated dbg_stack: %p\n", dbg_stack); dpcpu = (void *)kmem_malloc(kernel_arena, DPCPU_SIZE, M_WAITOK | M_ZERO);