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.

Regards,
Tommi

*Kernel Version: 5.15.24*

//// KERNEL DEVICE TREE SNAPSHOT - START /////
*........*







*reserved-memory {        jailhouse: jailhouse@fe000000 {            reg = 
<0xfe000000 0x1000000>;            no-map;            status = "okay";      
  };    };*
*...........*



*&jailhouse {    contiguous-area = <&jailhouse>;};*
*...........*
//// KERNEL DEVICE TREE SNAPSHOT - END /////


//// ROOT CELL CONFIGURATION - START /////






















































































































*/* * Jailhouse, a Linux-based partitioning hypervisor * * Test 
configuration for Banana Pi board (A20 dual-core Cortex-A7, 1G RAM) * 
https://banana-pi.org/en/banana-pi-sbcs/4.html * Copyright (c) Siemens AG, 
2014 * * Authors: *  Jan Kiszka <[email protected]> * * This work is 
licensed under the terms of the GNU GPL, version 2.  See * the COPYING file 
in the top-level directory. *  * MODIFIED FOR STM32MP157 */#include 
<jailhouse/types.h>#include <jailhouse/cell-config.h>struct {    struct 
jailhouse_system header;    __u64 cpus[1];    struct jailhouse_memory 
mem_regions[127];    struct jailhouse_irqchip irqchips[1];    struct 
jailhouse_pci_device pci_devices[1];} __attribute__((packed)) config = {    
.header = {        .signature = JAILHOUSE_SYSTEM_SIGNATURE,        
.revision = JAILHOUSE_CONFIG_REVISION,        .flags = 
JAILHOUSE_SYS_VIRTUAL_DEBUG_CONSOLE,        .hypervisor_memory = {          
   /* STM32MP157 */            .phys_start = 0xfe000000,            .size = 
0x1000000,        },        .debug_console = {            /* UART-4 
STM32MP157 */            .address = 0x40010000,            .size = 0x400,  
          /* .clock_reg = 0x01c2006c, */            /* .gate_nr = 16 */    
        /* .divider = 0x0d, */            .type = JAILHOUSE_CON_TYPE_8250,  
          .flags = JAILHOUSE_CON_ACCESS_MMIO |                
 JAILHOUSE_CON_REGDIST_4,        },        .platform_info = {            
/// Commented below as they are in emtrion's root cell confs            // 
.pci_mmconfig_base = 0x2000000,            // .pci_mmconfig_end_bus = 0,    
        // .pci_is_virtual = 1,            .arm = {                /* 
STM32MP157 */                .gic_version = 2,                .gicd_base = 
0xA0021000,                .gicc_base = 0xA0022000,                
.gich_base = 0xA0024000,                .gicv_base = 0xA0026000,            
    .maintenance_irq = 25,            },        },        .root_cell = {    
        .name = "STM32MP1-Root",            .cpu_set_size = 
sizeof(config.cpus),            .num_memory_regions = 
ARRAY_SIZE(config.mem_regions),            .num_irqchips = 
ARRAY_SIZE(config.irqchips),            .num_pci_devices = 
ARRAY_SIZE(config.pci_devices),            .vpci_irq_base = 108,        },  
  },    /* STM32MP157 */    .cpus = {        0x2,    },    .mem_regions = 
{        /* IVSHMEM shared memory region - STM32MP157 */        /* - This 
macro creates four shared memory regions with a total size of 0x100000 
(1M), see cell-config.h*/        /* - Created and reserved a continous 
memory region in kernel device tree for this one as well. */        /* - 
Placed the memory region before hypervisor region. */        
JAILHOUSE_SHMEM_NET_REGIONS(0xfdf00000, 0),        ......................  
      ......................        /* RAM - STM32MP157 */ {            
.phys_start = 0xC0000000,            .virt_start = 0xC0000000,            
.size = 0x3df00000,            .flags = JAILHOUSE_MEM_READ | 
JAILHOUSE_MEM_WRITE |                JAILHOUSE_MEM_EXECUTE,        },    
},    .irqchips = {        /* GIC STM32MP157*/ {            .address = 
0xA0021000,            .pin_base = 32,            .pin_bitmap = {          
      0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff            },        
},    },    .pci_devices = {        {            .type = 
JAILHOUSE_PCI_TYPE_IVSHMEM,            .bdf = 1 << 3,            .bar_mask 
= JAILHOUSE_IVSHMEM_BAR_MASK_INTX,            .shmem_regions_start = 0,    
        .shmem_dev_id = 0,            .shmem_peers = 2,            
.shmem_protocol = JAILHOUSE_SHMEM_PROTO_VETH,        },    },};*
////  ROOT CELL CONFIGURATION - END /////

-- 
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/bfb4732c-21e8-4a5d-8a0d-382041e7554cn%40googlegroups.com.

Reply via email to