On 20.02.20 10:41, [email protected] wrote:
Am Freitag, 14. Februar 2020 16:15:53 UTC+1 schrieb Jan Kiszka:

    Check if your non-root Linux comes with CONFIG_X86_X2APIC=y - I suspect
    it doesn't.


It didn't. Fixed that and now I can start the non-root cell. Thank you!

    You can find a working x86 inmate kernel config in
    
https://github.com/siemens/jailhouse-images/blob/master/recipes-kernel/linux/files/amd64_defconfig_5.4
    
<https://github.com/siemens/jailhouse-images/blob/master/recipes-kernel/linux/files/amd64_defconfig_5.4>

    (multi-purpose config, thus a bit larger than technically needed).

     >
     > Is there a guide somewhere that documents the steps necessary for
     > adjusting the linux-x86-demo cell config?

    Nope, unfortunately not. The mid-term plan is still to enhance the
    config generator to build also non-root configs. Any contribution,
    including "just" documentation, would be very welcome!

I'll prepare a pull request to update the documentation.

Although I cannot see any errors in the Jailhouse console anymore, my Linux guest still appears to be stuck somewhere.
The console output I get is:
|
AddingvirtualPCI device 00:0c.0to cell "linux-x86-demo"
AddingvirtualPCI device 00:0d.0to cell "linux-x86-demo"
AddingvirtualPCI device 00:0e.0to cell "linux-x86-demo"
AddingvirtualPCI device 00:0f.0to cell "linux-x86-demo"
Createdcell "linux-x86-demo"
Pagepool usage after cell creation:mem 375/975,remap 16395/131072
Cell"linux-x86-demo"can be loaded
CPU 2received SIPI,vector 100
CPU 3received SIPI,vector 100
Startedcell "linux-x86-demo"
CPU 3received SIPI,vector 9a
|

I added the JAILHOUSE_CELL_VIRTUAL_CONSOLE_ACTIVE bit to the linux-x86-demo cell flags to get kernel message output in /dev/jailhouse in the root cell. Is that supposed to be working or do I need to use UART?

You are free to choose the output according to your setup. The virtual console is a bit limited (write-only), inefficient (one hypervisor call per character) and not available when the root cell dies, but it can be fine if there is not much to print and no UART free.


At first there was a PIO read access violation at port 87, I went to check my root cell config and found the following:
|
/* Port I/O: 0080-008f : dma page reg */
/* PIO_RANGE(0x80, 0x10), */
|

So I added that exact range (0x80, 0x10) to the linux-x86-demo PIO configs and the error disappeared.
Could that be related to the cell being stuck issue?

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


To ensure it's not related to other missing guest kernel options, I will build a kernel with your amd64_defconfig_5.4 <https://github.com/siemens/jailhouse-images/blob/master/recipes-kernel/linux/files/amd64_defconfig_5.4> and see if I get the same results.

--
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] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/dfe23f77-f16a-41c9-9f6e-8e67b853b66e%40googlegroups.com <https://groups.google.com/d/msgid/jailhouse-dev/dfe23f77-f16a-41c9-9f6e-8e67b853b66e%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
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/ba1334c7-a13c-fdea-7177-53ad21c23244%40siemens.com.

Reply via email to