Xen kernel fails to boot, d0v1 triple fault looks like the cuplrit
Pratyush Yadav
pratiy0100 at gmail.com
Wed May 23 14:58:11 UTC 2018
Hi,
On Wed, May 23, 2018 at 1:45 PM, Roger Pau Monné <roger.pau at citrix.com> wrote:
> It's too early for the logs to be stored anywhere. The point where you
> get the crash is when the APs are started, which is way before FreeBSD
> starts proving for disk devices.
>
> Can you please try the patch below?
>
> Thanks, Roger.
> ---8<---
> diff --git a/sys/x86/xen/pv.c b/sys/x86/xen/pv.c
> index 54184898e9bf..52391e2e7c08 100644
> --- a/sys/x86/xen/pv.c
> +++ b/sys/x86/xen/pv.c
> @@ -113,6 +113,7 @@ static int xen_pv_start_all_aps(void);
> extern char *doublefault_stack;
> extern char *mce_stack;
> extern char *nmi_stack;
> +extern char *dbg_stack;
> #endif
>
> /*
> @@ -329,6 +330,8 @@ start_xen_ap(int cpu)
> (char *)kmem_malloc(kernel_arena, PAGE_SIZE, M_WAITOK | M_ZERO);
> nmi_stack =
> (char *)kmem_malloc(kernel_arena, PAGE_SIZE, M_WAITOK | M_ZERO);
> + dbg_stack =
> + (void *)kmem_malloc(kernel_arena, PAGE_SIZE, M_WAITOK | M_ZERO);
> dpcpu =
> (void *)kmem_malloc(kernel_arena, DPCPU_SIZE, M_WAITOK | M_ZERO);
>
I think we have different pv.c files. For me, line 113 is:
/* Xen init_ops implementation. */
The declarations of doublefault_stach, mce_stack, etc are in line 101.
Similarly, line 329 for me is:
{
in function xen_pv_parse_symtab(void). The declarations your diff
mentions in line 329 are in line 224.
This is in sync with the official repository [0]. Maybe you have
modifications that are not yet upstream?
Anyway, I manually made the changes. It still does not boot (I used
make kernel -DKERNFAST, but I don't think that should make a
difference).
Regards,
Pratyush Yadav
[0] https://github.com/freebsd/freebsd/blob/master/sys/x86/xen/pv.c
More information about the freebsd-xen
mailing list