On 20.02.20 14:05, [email protected] wrote:
Am Donnerstag, 20. Februar 2020 13:24:24 UTC+1 schrieb Jan Kiszka:


    PIO access has no "shared with root cell" mode, like memory regions
    (and
    there is can be dangerous): If you grant access to non-root cell, the
    root cell loses it - and may then run into own violations. I don't
    recall what triggers access to this port, might be the SERIO things,
    but
    it can be configured out.

    Jan


That makes sense. But that particular PIO range was not activated for my root cell sysconfig by default, so I figured enabling it in the non-root cell should not cause any issues.

Following up on my first email today, I built a guest kernel using the amd64_defconfig you linked a few days ago.
But no luck. I'm stuck at the exact same output I pasted earlier:
|
Startedcell "linux-x86-demo"
CPU 3received SIPI,vector 9a
|

The linux-x86-demo config I am using is the following (modified from the 0.12 release):
|
diff --git a/configs/x86/linux-x86-demo.c b/configs/x86/linux-x86-demo.c
index 47cb6517..0f1e6d9e100644
---a/configs/x86/linux-x86-demo.c
+++b/configs/x86/linux-x86-demo.c
@@-25,7+25,7@@struct{
#endif
structjailhouse_cache cache_regions[1];
structjailhouse_irqchip irqchips[1];
-structjailhouse_pio pio_regions[3];
+structjailhouse_pio pio_regions[4];
#ifdefCONFIG_QEMU_E1000E_ASSIGNMENT
structjailhouse_pci_device pci_devices[5];
#else
@@-38,7+38,7@@struct{
.revision =JAILHOUSE_CONFIG_REVISION,
.name ="linux-x86-demo",
.flags =JAILHOUSE_CELL_PASSIVE_COMMREG |
-                       JAILHOUSE_CELL_VIRTUAL_CONSOLE_PERMITTED,
+                       JAILHOUSE_CELL_VIRTUAL_CONSOLE_ACTIVE,

In fact, this flag is not evaluated by the Linux kernel, only by our bare-metal inmates so far. See below for how to tell the kernel to use that console.


.cpu_set_size =sizeof(config.cpus),
.num_memory_regions =ARRAY_SIZE(config.mem_regions),
@@-47,6+47,12@@struct{
.num_pio_regions =ARRAY_SIZE(config.pio_regions),
.num_pci_devices =ARRAY_SIZE(config.pci_devices),
.num_pci_caps =ARRAY_SIZE(config.pci_caps),
+
+.console ={
+.type =JAILHOUSE_CON_TYPE_8250,
+.flags =JAILHOUSE_CON_ACCESS_PIO,
+.address =0x3f8,
+},
},

.cpus ={
@@-186,7+192,7@@struct{
.irqchips ={
/* IOAPIC */{
.address =0xfec00000,
-.id =0xff00,
+.id =0x100f7,
.pin_bitmap ={
(1<<3)|(1<<4),
},
@@-197,6+203,7@@struct{
                 PIO_RANGE(0x2f8,8),/* serial 2 */
                 PIO_RANGE(0x3f8,8),/* serial 1 */
                 PIO_RANGE(0xe010,8),/* OXPCIe952 serial1 */
+              PIO_RANGE(0x80,0x10),
},

.pci_devices ={
|

From what I understood from your comment, this should print the Linux output to /dev/jailhouse, no? I'm sorry if I'm missing something obvious here. My plan was to prepare real UART for more serious debugging once Linux is starting and loading an initrd. My non-root cell invocation looks like this (modeled after the documentation examples):
|
jailhouse cell linux linux-x86-demo.cell bzImage -c "console=ttyS0,115200"
|

Yeah, to use the virtual console under Linux, you heed "console=jailhouse0 console=tty0" (that second console is to avoid a panic because the virtual console does not support input). Make sure that CONFIG_JAILHOUSE_DBGCON=y.

Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate 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/e088a0bc-e100-5acd-7268-a33c134ad821%40siemens.com.

Reply via email to