Hi Jan,

On Fri, May 13, 2022 at 4:33 PM Jan Kiszka <[email protected]> wrote:
>
> On 13.05.22 17:20, Lad, Prabhakar wrote:
> > On Fri, May 13, 2022 at 1:18 PM Jan Kiszka <[email protected]> wrote:
> >>
> >> On 13.05.22 13:32, Lad, Prabhakar wrote:
> >>>> Could it be that arm_dcaches_flush was a red herring? Maybe we are
> >>>> actually crashing on hvc in arch_entry, and that because of Linux not
> >>>> starting in HVC mode, thus no hypervisor take-over stub being installed.
> >>>>
> >>>> Could you share the boot log of the kernel?
> >>>>
> >>> Attached is the complete log.
> >>>
> >>
> >> "CPU: All CPU(s) started at EL1"
> >>
> >> As suspected. Must be EL2 or HYP. Reconfigure your firmware to enable that.
> >>
> > Argh my bad, I've now enabled it to start in EL2 mode (attached are
> > the complete logs). Now I see the below panic,
> >
> > [   33.920507] jailhouse: loading out-of-tree module taints kernel.
> > Reading configuration set:
> >   Root cell:     Renesas RZ/V2L SMARC (renesas-r9a07g054l2.cell)
> > Overlapping memory regions inside cell: None
> > Overlapping memory regions with hypervisor: None
> > Missing resource interceptions for architecture arm64: None
> > [   34.741847] Bad mode in Synchronous Abort handler detected on CPU0,
> > code 0x5a000000 -- HVC (AArch64)
> > [   34.741850] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G           O
> >   5.10.112-cip6+ #13
> > [   34.741853] Hardware name: Renesas SMARC EVK based on r9a07g054l2 (DT)
> > [   34.741855] pstate: 20400089 (nzCv daIf +PAN -UAO -TCO BTYPE=--)
> > [   34.741857] pc : 0xffff800013004868
> > [   34.741859] lr : 0xffff80001300484c
> > [   34.741860] sp : ffff8000118cbed0
> > [   34.741862] x29: ffff8000118cbed0 x28: ffff800011632f80
> > [   34.741869] x27: ffff800011632f80 x26: ffff8000118cc000
> > [   34.741873] x25: ffff8000118c8000 x24: ffff80001162a344
> > [   34.741877] x23: 0000000000000000 x22: 0000000000000000
> > [   34.741881] x21: ffff800013000000 x20: ffff800013004800
> > [   34.741885] x19: ffff800008c17000 x18: 0000000000000001
> > [   34.741889] x17: ffff800008c11828 x16: 0000000000000000
> > [   34.741893] x15: 0000ffffc004b800 x14: 000000001004b800
> > [   34.741897] x13: 0000ffffc0200000 x12: 00000000b6f00000
> > [   34.741900] x11: ffff0000f6d00000 x10: ffff8000118cbed0
> > [   34.741904] x9 : ffff8000118cbed0 x8 : 3062333564203a68
> > [   34.741908] x7 : 0000000000000000 x6 : ffff00007fc6caa0
> > [   34.741912] x5 : ffff00007fc6caa0 x4 : 000000000000003f
> > [   34.741916] x3 : 0000000000000040 x2 : 0000000000000002
> > [   34.741920] x1 : 00000000b6f05000 x0 : 0000000000000000
> > [   34.741924] Kernel panic - not syncing: bad mode
> > [   34.741927] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G           O
> >   5.10.112-cip6+ #13
> > [   34.741929] Hardware name: Renesas SMARC EVK based on r9a07g054l2 (DT)
> > [   34.741930] Call trace:
> > [   34.741932]  dump_backtrace+0x0/0x1c0
> > [   34.741934]  show_stack+0x18/0x68
> > [   34.741935]  dump_stack+0xd8/0x134
> > [   34.741937]  panic+0x180/0x398
> > [   34.741939]  bad_mode+0x8c/0x90
> > [   34.741940]  el1_inv+0x3c/0x60
> > [   34.741942]  el1_sync_handler+0xac/0xe0
> > [   34.741943]  el1_sync+0x84/0x140
> > [   34.741945]  0xffff800013004868
> > [   34.741947]  flush_smp_call_function_queue+0xf8/0x268
> > [   34.741949]  generic_smp_call_function_single_interrupt+0x14/0x20
> > [   34.741950]  ipi_handler+0x8c/0x158
> > [   34.741952]  handle_percpu_devid_fasteoi_ipi+0x74/0x88
> > [   34.741953]  generic_handle_irq+0x30/0x48
> > [   34.741955]  __handle_domain_irq+0x60/0xb8
> > [   34.741957]  gic_handle_irq+0x58/0x128
> > [   34.741958]  el1_irq+0xc8/0x180
> > [   34.741960]  arch_cpu_idle+0x18/0x28
> > [   34.741961]  default_idle_call+0x24/0x5c
> > [   34.741963]  do_idle+0x1ec/0x288
> > [   34.741964]  cpu_startup_entry+0x24/0x68
> > [   34.741966]  rest_init+0xd8/0xe8
> > [   34.741967]  arch_call_rest_init+0x10/0x1c
> > [   34.741969]  start_kernel+0x4b0/0x4e8
> > [   34.981086] SMP: stopping secondary CPUs
> > [   34.981088] Kernel Offset: disabled
> > [   34.981090] CPU features: 0x0040026,2a00aa38
> > [   34.981091] Memory Limit: none
> > [   34.981094] Bad mode in Synchronous Abort handler detected on CPU1,
> > code 0x5a000000 -- HVC (AArch64)
> > [   34.981097] CPU: 1 PID: 232 Comm: jailhouse Tainted: G           O
> >     5.10.112-cip6+ #13
> > [   34.981099] Hardware name: Renesas SMARC EVK based on r9a07g054l2 (DT)
> > [   34.981101] pstate: 20400089 (nzCv daIf +PAN -UAO -TCO BTYPE=--)
> > [   34.981103] pc : 0xffff800013004868
> > [   34.981104] lr : 0xffff80001300484c
> > [   34.981106] sp : ffff800011f93b30
> > [   34.981107] x29: ffff800011f93b30 x28: 0000000000000000
> > [   34.981111] x27: ffff800013000000 x26: ffff800008c17000
> > [   34.981115] x25: ffff800008c17000 x24: 0000000000000002
> > [   34.981119] x23: 0000000000000870 x22: 0000000000000001
> > [   34.981123] x21: ffff800013000000 x20: ffff800013004800
> > [   34.981127] x19: ffff800008c17000 x18: 0000000000000001
> > [   34.981131] x17: ffff800008c11828 x16: 0000000000000001
> > [   34.981135] x15: 0000ffffc004b800 x14: 000000001004b800
> > [   34.981139] x13: 0000ffffc0200000 x12: 00000000b6f00000
> > [   34.981143] x11: ffff0000f6d00000 x10: ffff8000116996c8
> > [   34.981147] x9 : ffff800011699720 x8 : 0000000000017fe8
> > [   34.981151] x7 : 0000000000000000 x6 : ffff00007fc82aa0
> > [   34.981155] x5 : ffff00007fc82aa0 x4 : 000000000000003f
> > [   34.981159] x3 : 0000000000000040 x2 : 0000000000000002
> > [   34.981163] x1 : 00000000b6f05000 x0 : 0000000000000000
> >
>
> Please validate first if KVM is working in your setup. I suspect there
> are still things wrong that are unrelated to Jailhouse.
>
Enabling KVM and virtualization, I get the below messages:

root@smarc-rzg2l:~# dmesg | grep -i kvm
[    0.514230] kvm [1]: IPA Size Limit: 40 bits
[    0.514383] kvm [1]: GICv3: no GICV resource entry
[    0.514471] kvm [1]: disabling GICv2 emulation
[    0.514627] kvm [1]: GIC system register CPU interface enabled
[    0.515036] kvm [1]: vgic interrupt IRQ9
[    0.515663] kvm [1]: VHE mode initialized successfully

Is this suffice or do you want me to run anything specific?

Cheers,
Prabhakar

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/CA%2BV-a8t9brsw1fu_x9ou7uHOYxhO8AjuKiLfW%2B1MJ6tw%3DA%3Df%3DA%40mail.gmail.com.

Reply via email to