Thanks for your reply, Jan. I managed to get forward from the 'hang'
condition. There were several misdefinitions on my root-cell configuration.
Now I get the root-cell started sometimes, but more often I get two types
of issues after enable command. Any help or ideas where to continue my
debugging would be greatly appreciated. Please, see the issues explained
below.

Thanks,
-tommi

+++++++++++++++++++++++++++++++++

1. Terminal hangs
-- After the enable command for the root cell, jailhouse gets started but
then the terminal goes unresponsive. Below, example log, where I give ls
cmd, which then causes terminal to go unresponsive...:
















*root@stm32mp1:~# modprobe jailhouse[ 1315.034414] jailhouse: loading
out-of-tree module taints kernel.root@stm32mp1:~# jailhouse enable
~/jailhouse/configs/arm/itron_stm32mp157.cellInitializing Jailhouse
hypervisor v0.12 (314-gc7a1b697-dirty) on CPU 0Code location:
0xf0000040Page pool usage after early setup: mem 28/1514, remap
0/131072Initializing processors: CPU 0... OK CPU 1... OKInitializing unit:
irqchipInitializing unit: PCIPage pool usage after late setup: mem 50/1514,
remap 5/131072[0] Activating hypervisor[ 1355.352714] The Jailhouse is
opening.root@stm32mp1:~# ls*

2. Issue with setting CPU clock
-- The second issue I see is related to i2c bus and system clock. Terminal
starts printing error statements infinitely after Jailhouse opening. Below,
is a snippet of an example logs.








*[   85.322027] The Jailhouse is opening.[   85.322648] stm32f7-i2c
5c002000.i2c: failed to prepare_enable clockroot@stm32mp1:~# [   85.339233]
cpu cpu0: _set_opp_voltage: failed to set voltage (1350000 1350000 1350000
mV): -22[   85.350413] cpufreq: __target_index: Failed to change cpu
frequency: -22[   85.357706] cpu cpu0: _set_opp_voltage: failed to set
voltage (1350000 1350000 1350000 mV): -22[   85.365124] cpufreq:
__target_index: Failed to change cpu frequency: -22[   85.381985] cpu cpu0:
_set_opp_voltage: failed to set voltage (1350000 1350000 1350000 mV): -22*-
- -
+++++++++++++++++++++++++++++++++


ma 2. tammik. 2023 klo 2.17 Jan Kiszka ([email protected]) kirjoitti:

> On 13.12.22 20:33, Tommi Parkkila wrote:
> > Hi all - I am trying to configure and deploy Jailhouse on STM32MP1 w/
> > dual Cortex-A7. I get Jailhouse built and installed on target, and
> > kernel module installed successfully, but when enabling Jailhouse the
> > whole system hangs and restarts after several seconds by WDT. I have
> > hunted the last executed line of code to:
> >
> > /err = entry(cpu);/
> >
> > on /jailhouse/driver/main.c::enter_hypervisor(). The process tries the
> > both CPUs and both hangs. Here are some debug prints I added about the
> > jailhouse header data before the entry call, if they help any: (/number
> > inside [ ] is cpu-id/)
> >
> > /[  280.734679] - [1] header.core_size               = 0x16000
> > [  280.734687] - [1] header.percpu_size             = 0x4000
> > [  280.738521] - [0] header.core_size               = 0x16000
> > [  280.742961] - [1] header.entry                   = 0x3720
> > [  280.747400] - [0] header.percpu_size             = 0x4000
> > [  280.751840] - [1] entry                          = 0xF0003720
> > [  280.755775] - [0] header.entry                   = 0x3720
> > [  280.760215] - [1] header.console_page            = 0x10000
> > [  280.764049] - [0] entry                          = 0xF0003720
> > [  280.767986] - [1] header.gcov_info_head          = 0x0
> > [  280.772627] - [0] header.console_page            = 0x10000
> > [  280.776462] - [1] header.max_cpus                = 2
> > [  280.780902] - [0] header.gcov_info_head          = 0x0
> > [  280.785443] - [1] header.online_cpus             = 2
> > [  280.789278] - [0] header.max_cpus                = 2
> > [  280.793718] - [1] header.debug_console_base      = 0xDF96D000
> > [  280.797653] - [0] header.online_cpus             = 2
> > [  280.801488] - [1] header.arm_linux_hyp_vectors     = 0xC0114BE0
> > [  280.806935] - [0] header.debug_console_base      = 0xDF96D000
> > [  280.810871] - [1] header.arm_linux_hyp_abi       = 1
> > [  280.816419] - [0] header.arm_linux_hyp_vectors     = 0xC0114BE0
> > [  280.826307] - [0] header.arm_linux_hyp_abi       = 1/
> >
> > Where and how should I start looking for the issue? All and any help
> > will be highly appreciated. Below, a snapshot of memory region
> > allocation in kernel device tree and a snapshot of jailhouse root-cell
> > configuration that I use as an argument when enabling jailhouse.
>
> Did you enable the debug UART properly already? That will give you
> fairly early output from Jailhouse and possibly hints on where it fails
> - or at least where it still passes by.
>
> If the hang is actually much earlier, you could instrument the entry
> code, make entry() return early with a special error to see if this path
> is taken at least.
>
> Jan
>
> --
> Siemens AG, Technology
> Competence Center Embedded Linux
>
>

-- 
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/CAP8Rr63c3LS3Z_OU201aSokZ8NCUdoeXeAMGZ%3DQu4d-TMV%2BwVQ%40mail.gmail.com.

Reply via email to