Hello, I'm trying to apply cache coloring to Linux and Erika. As root cell Linux cannot be colored, i intend to use colored Linux in a non-root cell and colored Erika in another non-root cell (the system stays as: Linux in root cell, Linux and Erika in non-root cells).
The problem that is occuring to me is when i issue the command: jailhouse cell linux ultra96-linux-demo.cell Image -i rootfs.cpio -c "console=ttyS0, 115200" The error is the following: root@xilinx-ultra96-reva-2018_2:~# jailhouse cell linux ultra96-linux-demo.cell Image -d inmate-zynqmp-zcu102-2.dtb -i rootfs.cpio -c "console=ttyS0, 115200" [ 127.150370] python invoked oom-killer: gfp_mask=0x16080c0(GFP_KERNEL|__GFP_ZERO|__GFP_NOTRACK), nodemask=(null), order=0, oom_score_adj=0 [ 127.162750] CPU: 3 PID: 2733 Comm: python Tainted: G O 4.14.0-xilinx-v2018.2 #3 [ 127.171145] Hardware name: ZynqMP ZCU100 RevC (DT) [ 127.175920] Call trace: [ 127.178365] [<ffffff8008088c58>] dump_backtrace+0x0/0x368 [ 127.183734] [<ffffff8008088fd4>] show_stack+0x14/0x20 [ 127.188773] [<ffffff8008a18cf8>] dump_stack+0x9c/0xbc [ 127.193807] [<ffffff800813b430>] dump_header.isra.6+0x7c/0x194 [ 127.199619] [<ffffff800813aaa0>] oom_kill_process+0x280/0x500 [ 127.205348] [<ffffff800813b050>] out_of_memory+0xe0/0x3e8 [ 127.210730] [<ffffff80081400c0>] __alloc_pages_nodemask+0xa20/0xad8 [ 127.216982] [<ffffff8008163cf4>] __pte_alloc+0x2c/0x130 [ 127.222188] [<ffffff8008167b10>] __handle_mm_fault+0x678/0xb90 [ 127.228003] [<ffffff8008168080>] handle_mm_fault+0x58/0xa0 [ 127.233472] [<ffffff80080954b8>] do_page_fault+0x188/0x400 [ 127.238939] [<ffffff800809576c>] do_translation_fault+0x3c/0x48 [ 127.244842] [<ffffff80080812c4>] do_mem_abort+0x3c/0xa0 [ 127.250049] Exception stack(0xffffff800d23bb90 to 0xffffff800d23bcd0) [ 127.256473] bb80: 0000007fba7ff034 ffffffc00b702000 [ 127.264285] bba0: ffffffffffffffc0 ffffff800d23be18 0000000000000000 0000007fba800034 [ 127.272097] bbc0: 0000007fba7ffff4 52800026f9001e7f aa1403e1aa1603e3 2a1903e5aa1303e0 [ 127.279909] bbe0: d28000022a1703e4 97ffe99eb90077a6 f9401e63f00057bb 912a836190003980 [ 127.287721] bc00: f9003fa19129e000 0000000000000000 0000000000000000 0000007f95f45240 [ 127.295533] bc20: 0000000000000010 ffffffc00b701000 0000000000001000 0000000000001000 [ 127.303345] bc40: ffffff800d23bde0 0000000041db6000 ffffffc04d604a00 0000000000041db7 [ 127.311157] bc60: ffffffc048231368 ffffffc04d604a98 0000000000001000 ffffff800d23bcd0 [ 127.318969] bc80: ffffff80084179b4 ffffff800d23bcd0 ffffff8008a16f58 0000000080000145 [ 127.326781] bca0: ffffff800d23bcc0 ffffff8008135f94 0000008000000000 0000000000000000 [ 127.334592] bcc0: ffffff800d23bcd0 ffffff8008a16f58 [ 127.339453] [<ffffff8008082f14>] el1_da+0x24/0x84 [ 127.344143] [<ffffff8008a16f58>] __arch_copy_to_user+0x1d8/0x220 [ 127.350131] [<ffffff8008138eb0>] generic_file_read_iter+0x2d0/0x888 [ 127.356383] [<ffffff8008225e24>] ext4_file_read_iter+0x3c/0x58 [ 127.362198] [<ffffff800819aac4>] __vfs_read+0xac/0x108 [ 127.367317] [<ffffff800819aba8>] vfs_read+0x88/0x168 [ 127.372263] [<ffffff800819b230>] SyS_read+0x48/0xb0 [ 127.377123] Exception stack(0xffffff800d23bec0 to 0xffffff800d23c000) [ 127.383547] bec0: 0000000000000004 0000007f78a49034 0000000044f90000 0000007fbe193000 [ 127.391359] bee0: 0000000024b47f90 0000007f78a49034 d503201fd503201f d503201fd503201f [ 127.399171] bf00: 000000000000003f d503201fd503201f d503201fd503201f d503201fd503201f [ 127.406983] bf20: d503201fd503201f d503201fd503201f 0000000000000004 00000000044f9123 [ 127.414795] bf40: 0000007fbe30c478 0000007fbe0a44d0 0000000000000000 0000000000000004 [ 127.422607] bf60: 0000007fbe18b5c0 0000000044f90201 0000000000000bd0 0000000044f91201 [ 127.430419] bf80: 0000007fbe18ad38 0000007f78a49034 0000007fbdc3f938 00000000249922f0 [ 127.438231] bfa0: 00000000249922f0 0000007feb4ffa30 0000007fbe0b0074 0000007feb4ffa30 [ 127.446043] bfc0: 0000007fbe102740 0000000020000000 0000000000000004 000000000000003f [ 127.453855] bfe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [ 127.461667] [<ffffff80080837b0>] el0_svc_naked+0x24/0x28 [ 127.466996] Mem-Info: [ 127.469235] active_anon:294134 inactive_anon:1174 isolated_anon:0 [ 127.469235] active_file:313 inactive_file:1514 isolated_file:0 [ 127.469235] unevictable:447 dirty:3 writeback:0 unstable:0 [ 127.469235] slab_reclaimable:1745 slab_unreclaimable:4538 [ 127.469235] mapped:2301 shmem:1216 pagetables:1274 bounce:0 [ 127.469235] free:68319 free_pcp:54 free_cma:64609 [ 127.502659] Node 0 active_anon:1176536kB inactive_anon:4696kB active_file:1288kB inactive_file:6636kB unevictable:1788kB isolated(anon):0kB isolated(file):0kB mapped:9588kB dirty:12kB writeback:0kB shmem:4864kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 0kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no [ 127.530260] DMA free:272284kB min:22528kB low:28160kB high:33792kB active_anon:1176540kB inactive_anon:4696kB active_file:1340kB inactive_file:6984kB unevictable:1788kB writepending:12kB present:1556480kB managed:1507504kB mlocked:1788kB kernel_stack:3968kB pagetables:5096kB bounce:0kB free_pcp:112kB local_pcp:0kB free_cma:257868kB [ 127.559597] lowmem_reserve[]: 0 0 0 [ 127.563055] DMA: 512*4kB (UMEC) 208*8kB (UMEC) 110*16kB (UMEC) 65*32kB (UMEC) 33*64kB (UMEC) 17*128kB (UMEC) 7*256kB (UMEC) 4*512kB (UMC) 4*1024kB (UMEC) 3*2048kB (UEC) 62*4096kB (C) = 279872kB [ 127.580247] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB [ 127.588662] 1700 total pagecache pages [ 127.592395] 0 pages in swap cache [ 127.595693] Swap cache stats: add 0, delete 0, find 0/0 [ 127.600900] Free swap = 0kB [ 127.603763] Total swap = 0kB [ 127.606628] 389120 pages RAM [ 127.609492] 0 pages HighMem/MovableOnly [ 127.613312] 12244 pages reserved [ 127.616516] 65536 pages cma reserved [ 127.620083] [ pid ] uid tgid total_vm rss nr_ptes nr_pmds swapents oom_score_adj name [ 127.628624] [ 1785] 0 1785 2819 589 6 3 0 -1000 udevd [ 127.637188] [ 2074] 0 2074 831 290 5 3 0 0 inetd [ 127.645779] [ 2086] 0 2086 2734 347 5 3 0 0 ultra96-power-b [ 127.655241] [ 2091] 0 2091 42979 3749 20 4 0 0 python [ 127.663922] [ 2114] 0 2114 2528 392 8 3 0 0 wpa_supplicant [ 127.673296] [ 2140] 0 2140 2528 419 8 3 0 0 wpa_supplicant [ 127.682671] [ 2145] 0 2145 773 23 5 3 0 0 udhcpd [ 127.691350] [ 2155] 0 2155 773 25 5 3 0 0 udhcpc [ 127.700030] [ 2172] 999 2172 828 355 6 3 0 0 dbus-daemon [ 127.709144] [ 2180] 0 2180 849 32 6 3 0 0 xinit [ 127.717738] [ 2188] 0 2188 608 35 5 3 0 0 dropbear [ 127.726594] [ 2189] 0 2189 22883 1288 15 3 0 0 Xorg [ 127.735098] [ 2195] 997 2195 583 271 5 3 0 0 rpcbind [ 127.743865] [ 2208] 0 2208 464 338 5 3 0 -1000 watchdog [ 127.752717] [ 2215] 994 2215 768 435 5 3 0 0 rpc.statd [ 127.761658] [ 2220] 0 2220 1157 182 6 3 0 0 bluetoothd [ 127.770685] [ 2227] 996 2227 926 164 5 3 0 0 distccd [ 127.779452] [ 2228] 996 2228 926 50 5 3 0 0 distccd [ 127.788218] [ 2242] 995 2242 18202 382 9 3 0 0 ntpd [ 127.796724] [ 2246] 0 2246 773 18 5 3 0 0 syslogd [ 127.805491] [ 2250] 0 2250 773 19 5 3 0 0 klogd [ 127.814092] [ 2260] 0 2260 503 22 5 3 0 0 xinetd [ 127.822765] [ 2265] 998 2265 973 349 6 3 0 0 avahi-daemon [ 127.831966] [ 2266] 998 2266 942 215 5 3 0 0 avahi-daemon [ 127.841166] [ 2272] 0 2272 1386 342 6 3 0 0 ofonod [ 127.849847] [ 2290] 0 2290 23947 479 9 3 0 0 tcf-agent [ 127.858788] [ 2295] 0 2295 753 301 5 3 0 0 start_getty [ 127.867902] [ 2296] 0 2296 753 322 5 3 0 0 start_getty [ 127.877016] [ 2297] 0 2297 995 418 6 3 0 0 login [ 127.885609] [ 2298] 0 2298 773 51 5 3 0 0 getty [ 127.894202] [ 2299] 996 2299 926 50 5 3 0 0 distccd [ 127.902969] [ 2300] 996 2300 926 50 5 3 0 0 distccd [ 127.911736] [ 2303] 0 2303 1993 497 8 3 0 0 matchbox-window [ 127.921197] [ 2308] 0 2308 1102 234 8 3 0 0 dbus-launch [ 127.930311] [ 2309] 0 2309 798 355 6 3 0 0 dbus-daemon [ 127.939425] [ 2316] 0 2316 57427 489 13 3 0 0 at-spi-bus-laun [ 127.948888] [ 2324] 0 2324 753 332 5 3 0 0 launch-ultra96- [ 127.958348] [ 2339] 0 2339 690455 6747 145 7 0 0 chromium-bin [ 127.967548] [ 2344] 0 2344 7709 1680 19 3 0 0 matchbox-deskto [ 127.977009] [ 2345] 0 2345 7738 1534 18 3 0 0 matchbox-panel [ 127.986387] [ 2346] 0 2346 485 93 5 3 0 0 cat [ 127.994804] [ 2347] 0 2347 485 91 5 3 0 0 cat [ 128.003223] [ 2351] 996 2351 926 50 5 3 0 0 distccd [ 128.011989] [ 2355] 0 2355 798 331 7 3 0 0 dbus-daemon [ 128.021104] [ 2358] 0 2358 2052 436 8 3 0 0 gconfd-2 [ 128.029957] [ 2361] 0 2361 103877 901 14 3 0 0 pulseaudio [ 128.038984] [ 2362] 996 2362 926 50 5 3 0 0 distccd [ 128.047754] [ 2364] 0 2364 39310 214 11 3 0 0 at-spi2-registr [ 128.057216] [ 2367] 0 2367 4554 390 13 3 0 0 settings-daemon [ 128.066676] [ 2368] 996 2368 926 50 5 3 0 0 distccd [ 128.075443] [ 2370] 0 2370 1163 659 5 3 0 0 sh [ 128.083776] [ 2372] 0 2372 511735 409 42 5 0 0 console-kit-dae [ 128.093242] [ 2440] 0 2440 47906 1906 53 3 0 0 chromium-bin [ 128.102439] [ 2543] 0 2543 274244 5637 126 10 0 300 chromium-bin [ 128.111639] [ 2733] 0 2733 285462 271363 537 4 0 0 python [ 128.120318] Out of memory: Kill process 2733 (python) score 699 or sacrifice child [ 128.127884] Killed process 2733 (python) total-vm:1141848kB, anon-rss:1084380kB, file-rss:1072kB, shmem-rss:0kB [ 128.269538] oom_reaper: reaped process 2733 (python), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB Killed What do i need to change in my configurations to make this work? I send in attachment my config files. -- 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/885a6592-84d9-43f4-a037-10ce73f968ab%40googlegroups.com.
/* * Jailhouse, a Linux-based partitioning hypervisor * * Configuration for linux-demo inmate on Avnet Ultra96 board: * 2 CPUs, 128M RAM, serial port 2 * * Copyright (c) Siemens AG, 2014-2019 * * 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. */ #include <jailhouse/types.h> #include <jailhouse/cell-config.h> struct { struct jailhouse_cell_desc cell; __u64 cpus[1]; struct jailhouse_memory mem_regions[7]; struct jailhouse_irqchip irqchips[1]; struct jailhouse_pci_device pci_devices[1]; } __attribute__((packed)) config = { .cell = { .signature = JAILHOUSE_CELL_DESC_SIGNATURE, .revision = JAILHOUSE_CONFIG_REVISION, .name = "non-root", .flags = JAILHOUSE_CELL_PASSIVE_COMMREG,/* | JAILHOUSE_CELL_VIRTUAL_CONSOLE_ACTIVE,*/ .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 = 140-32, .console = { .address = 0xff010000, /*UART1*/ //.address = 0xff000000, /*UART0*/ //se eu meter uart0 da erro unhandled trap .type= JAILHOUSE_CON_TYPE_XUARTPS, .flags = JAILHOUSE_CON_ACCESS_MMIO | JAILHOUSE_CON_REGDIST_4, }, }, .cpus = { 0xe, //1110 //0x8, //1000 - fica com cpu3 //0xc, //1100 }, .mem_regions = { /* UART */ { .phys_start = 0xff010000, .virt_start = 0xff010000, /*.phys_start = 0xff000000, .virt_start = 0xff000000,*/ .size = 0x1000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_IO | JAILHOUSE_MEM_ROOTSHARED, }, /* RAM */ { .phys_start = 0x7bef0000, .virt_start = 0, .size = 0x10000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_LOADABLE, }, /* RAM */ { .phys_start = 0x74000000, .virt_start = 0x74000000, .size = 0x7ef0000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA | JAILHOUSE_MEM_LOADABLE, }, /* IVSHMEM shared memory region */ { .phys_start = 0x7bf00000, .virt_start = 0x7bf00000, .size = 0x100000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_ROOTSHARED, }, /* communication region */ { .virt_start = 0x80000000, .size = 0x00001000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_COMM_REGION, }, /* RAM */{ .phys_start = 0x3fd00000, .virt_start = 0x3fd00000, .size = 0x202f0000, //must be page size aligned .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_LOADABLE | JAILHOUSE_MEM_ROOTSHARED, //se tirar JAILHOUSE_MEM_ROOTSHARED da exception fault 0x20 }, { .phys_start = 0, .virt_start = 0x10000, .size = 0x3ed00000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_ROOTSHARED, }, }, .irqchips = { /* GIC */ { .address = 0xf9010000, /* GICD base address - Display controller */ .pin_base = 32, /* The first irqchip starts at .pin_base=32 as the first 32 interrupts are reserved for SGIs and PPIs. */ .pin_bitmap = { //1 << (54 - 32), 1 << (53 - 32), // cat /proc/interrupts interrupt da UART0 AQUI ESTA A DIFERENÇA 0, 0, (1 << (140 - 128)) | (1 << (142 - 128)) //PL to PS interrupt signals 8 to 15. }, }, }, .pci_devices = { /* 00:00.0 */ { .type = JAILHOUSE_PCI_TYPE_IVSHMEM, .bdf = 0 << 3, // 00:00.0 .iommu = 1,// .bar_mask = { 0xffffff00, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }, .shmem_region = 3, //.shmem_protocol = JAILHOUSE_SHMEM_PROTO_VETH, //.shmem_protocol = JAILHOUSE_SHMEM_PROTO_CUSTOM, .shmem_protocol = JAILHOUSE_SHMEM_PROTO_UNDEFINED, //.num_msix_vectors = 1, }, }, };
/* * Jailhouse, a Linux-based partitioning hypervisor * * Configuration for Avnet Ultra96 board * * Copyright (c) Siemens AG, 2016-2019 * * 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. */ #include <jailhouse/types.h> #include <jailhouse/cell-config.h> struct { struct jailhouse_system header; __u64 cpus[1]; struct jailhouse_memory mem_regions[3]; 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 = { .phys_start = 0x7c000000, .size = 0x00400000, }, .debug_console = { .address = 0xff010000, .size = 0x1000, .type = JAILHOUSE_CON_TYPE_XUARTPS, .flags = JAILHOUSE_CON_ACCESS_MMIO | JAILHOUSE_CON_REGDIST_4, }, .platform_info = { .pci_mmconfig_base = 0xfc000000, .pci_mmconfig_end_bus = 0, .pci_is_virtual = 1, .arm = { .gic_version = 2, .gicd_base = 0xf9010000, .gicc_base = 0xf902f000, .gich_base = 0xf9040000, .gicv_base = 0xf906f000, .maintenance_irq = 25, }, }, .root_cell = { .name = "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 = 136-32, }, }, .cpus = { 0xf, }, .mem_regions = { /* MMIO (permissive) */ { .phys_start = 0xfd000000, .virt_start = 0xfd000000, .size = 0x03000000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_IO, }, /* RAM */ { .phys_start = 0x0, .virt_start = 0x0, .size = 0x7c000000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_EXECUTE, }, /* IVSHMEM shared memory region for 00:00.0 */ { .phys_start = 0x7bf00000, .virt_start = 0x7bf00000, .size = 0x100000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE, }, }, .irqchips = { /* GIC */ { .address = 0xf9010000, .pin_base = 32, .pin_bitmap = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, }, }, }, .pci_devices = { /* 0001:00:00.0 */ { .type = JAILHOUSE_PCI_TYPE_IVSHMEM, .iommu = 1,// //.domain = 1, .bdf = 0 << 3, .bar_mask = { 0xffffff00, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }, .shmem_region = 2, //.shmem_protocol = JAILHOUSE_SHMEM_PROTO_VETH, //.shmem_protocol = JAILHOUSE_SHMEM_PROTO_CUSTOM, .shmem_protocol = JAILHOUSE_SHMEM_PROTO_UNDEFINED, //.num_msix_vectors = 1,//se colocar isto, qd faço insmod uio_ivshmem.ko ele n diz "using jailhouse mode" e dps n existe /dev/uio1 }, }, };
