Hi,

the -s/-a argument pair are primarily used for our internal inmate demos
with "jailhouse cell load", and not for "jailhouse cell linux".

You could, e.g., use:
jailhouse cell load your-cell apic-demo.bin -s "con-base=0x3f8
con-type=PIO" -a 0x100

Look at the position of the quotes. This will redirect output of
apic-demo to the HV console, if it's permitted to.

The -c parameter for "jailhouse cell linux" appends cmdline arguments to
the linux kernel, not configuration parameters for the loader.

To enable the console on x86, you probably have to do sth. like
jailhouse cell linux cell image -i initrd -c "console=jailhouse"
(or console=jailhouse0, not sure, only used it on ARM via device trees).

  Ralf


On 02/24/2018 06:52 AM, Muneeswaran Rajendran wrote:
> Hi,
> I understand that the jailhouse console mean hyperviosr console not
> physical UART.
> 
> I used the below command to create inmate cell with '-s' option
> mentioned in the README.md (qemu). After walk-through the jailhouse code
> the we need to pass -c for command line argument in the inmate cell
> 
> jailhouse cell linux configs/nonroot-2.cell
> /home/xeon/linux-4.14.18/linux-4.14.18/arch/x86/boot/bzImage -i
> rootfs.cpio -c "con-type=JAILHOUSE" -s "con-base=0x3f8 -a 0x100"
> 
> [root@localhost jailhouse-ubuntu]# jailhouse cell linux
> configs/nonroot-2.cell bzImage -i rootfs.cpio -c "con-type=JAILHOUSE" -s
> "con-base=0x3f8 -a 0x100"
> usage: jailhouse cell linux [-h] [--dtb DTB] [--initrd FILE]
>                             [--cmdline "STRING"] [--write-params FILE]
>                             [--arch ARCH] [--kernel-decomp-factor N]
>                             CELLCONFIG KERNEL
> jailhouse cell linux: error: unrecognized arguments: -s con-base=0x3f8
> 
> After changing the passing argument as '-c' option the inmate cell
> created but no early boot messages in either jailhouse console and
> physical UART console.
> 
> jailhouse cell linux configs/nonroot-2.cell arch/x86/boot/bzImage -i
> rootfs.cpio -c "con-base=0x3f8 con-type=JAILHOUSE -a 0x100"
> 
> The 0x3f8 enabled in rootcell configuration of pio_bitmap.
> 
> [ 0x3f8/8 ...  0x3ff/8] = 0x7D
> 
> 
> The below log was same as physical UART and jailhouse console.
> -------------------------------------------------------------------------------------------------
> Adding PCI device ff:1f.2 to cell "RootCell"
> Page pool usage after late setup: mem 462/16328, remap 66078/131072
> Activating hypervisor
> CAT: Shrunk root cell bitmask to 000ffffc
> CAT: Using COS 1 with bitmask 00000003 for cell linux-4.15
> Adding virtual PCI device 00:0e.0 to cell "linux-4.15"
> Created cell "linux-4.15"
> Page pool usage after cell creation: mem 485/16328, remap 66078/131072
> Cell "linux-4.15" can be loaded
> CPU 4 received SIPI, vector 100
> CPU 5 received SIPI, vector 100
> Started cell "linux-4.15"
> CPU 5 received SIPI, vector 9a
> FATAL: Invalid PIO read, port: 3fe size: 1
> RIP: 0xffffffffbac85ea3 RSP: 0xffffb5d1c8247d20 FLAGS: 2
> RAX: 0x0000000000000000 RBX: 0xffffffffbc243e80 RCX: 0x0000000000000000
> RDX: 0x00000000000003fe RSI: 0x0000000000000006 RDI: 0xffffffffbc243e80
> CS: 10 BASE: 0x0000000000000000 AR-BYTES: a09b EFER.LMA 1
> CR0: 0x0000000080050033 CR3: 0x0000001059bc4003 CR4: 0x00000000003626e0
> EFER: 0x0000000000000d01
> Parking CPU 9 (Cell: "RootCell")
> FATAL: Invalid PIO write, port: b2 size: 1
> RIP: 0xffffffffbabf7589 RSP: 0xffffb5d1c8247938 FLAGS: 46
> RAX: 0x000000000000009c RBX: 0xffffb5d1c0012e4c RCX: 0x0000000000000001
> RDX: 0x00000000000000b2 RSI: 0x000000000000009c RDI: 0x00000000000000b2
> CS: 10 BASE: 0x0000000000000000 AR-BYTES: a09b EFER.LMA 1
> CR0: 0x0000000080050033 CR3: 0x0000001059bc4003 CR4: 0x00000000003626e0
> EFER: 0x0000000000000d01
> Parking CPU 9 (Cell: "RootCell")
> 
> please let me know if anything missing.
> 
> Thanks,
> Munees
> 
> On 23-Feb-2018 7:19 PM, "Ralf Ramsauer" <ralf.ramsa...@oth-regensburg.de
> <mailto:ralf.ramsa...@oth-regensburg.de>> wrote:
> 
>     Hi,
> 
>     On 02/23/2018 02:41 PM, Muneeswaran Rajendran wrote:
>     > Hi All,
>     >
>     > I am looking for to log early boot message of inmate cell in the
>     > jailhouse console. I have one physical uart and want to redirect both
>     > the boot messages into  jailhouse console. I followed one of the
>     What do you mean by 'redirect to jailhouse console'? Do you mean the
>     hypervisor console? Or to a physical UART?
>     > jailhouse mail thread added pio_bitmap entry for ox3f8 into
>     rootcell and
>     > while passing -s 'con-base=0x3f8' in the command line argument to
>     create
>     > inmate cell. look like the option not supported in the linux
>     inmate cell.
>     This doesn't redirect output to the 'jailhouse console', it tells the
>     inmate to output to a physical UART.
> 
>     The con-base is supported, see inmates/lib/x86/printk.c. Are you loading
>     the arguments to the correct address? (-a 0x100 for x86) Did you also
>     set the correct con-type?
> 
>       Ralf
>     >
>     > can you please share some details if anyone might experimented to log
>     > early boot message of inmate cell to jailhouse console.
>     >
>     > Regards,
>     > Munees
>     >
>     > On Tue, Feb 20, 2018 at 9:53 PM, Ralf Ramsauer
>     > <ralf.ramsa...@oth-regensburg.de
>     <mailto:ralf.ramsa...@oth-regensburg.de>
>     > <mailto:ralf.ramsa...@oth-regensburg.de
>     <mailto:ralf.ramsa...@oth-regensburg.de>>> wrote:
>     >
>     >     Hi,
>     >
>     >     you need to enable CONFIG_IVSHMEM_NET in your kernel and
>     configure the
>     >     system and inmate config appropriately. See
>     configs/x86/qemu-x86.c and
>     >     configs/x86/linux-x86-demo.c .
>     >
>     >     Just play with the qemu demos, everything is known to work there.
>     >
>     >       Ralf
>     >
>     >     On 02/20/2018 05:09 PM, Muneeswaran Rajendran wrote:
>     >     > Thanks Hennig and Ralf. I need some additional details
>     whether it's
>     >     > required to add additional configurations in the non root
>     cell to bring
>     >     > up this interface or enable virtio-net in the jans kernel
>     sufficient to
>     >     > make the interface up.
>     >     >
>     >     > can you please share some reference or input to get
>     interactive consoles.
>     >     >
>     >     > Munees 
>     >     >
>     >     > On Tue, Feb 20, 2018 at 6:34 PM, Ralf Ramsauer
>     >     > <ralf.ramsa...@oth-regensburg.de
>     <mailto:ralf.ramsa...@oth-regensburg.de>
>     <mailto:ralf.ramsa...@oth-regensburg.de
>     <mailto:ralf.ramsa...@oth-regensburg.de>>
>     >     > <mailto:ralf.ramsa...@oth-regensburg.de
>     <mailto:ralf.ramsa...@oth-regensburg.de>
>     >     <mailto:ralf.ramsa...@oth-regensburg.de
>     <mailto:ralf.ramsa...@oth-regensburg.de>>>> wrote:
>     >     >
>     >     >     Hi Munees,
>     >     >
>     >     >     On 02/20/2018 01:08 PM, Muneeswaran Rajendran wrote:
>     >     >     > Hi Ralf,
>     >     >     >
>     >     >     > Thanks for reply. I able to see the both console
>     messages using
>     >     >     What do you mean by that, 'access both console messages'?
>     >     >     > jailhouse console. But not able to access both non
>     root cell
>     >     >     > simultaneously by login to the shell and start the
>     test application. Now
>     >     >     > I can access recently created non root cell and lost
>     the control of
>     >     >     > previously created one. How do I access both non root
>     cell or switch
>     >     >     > between the cells?
>     >     >     Sorry, I think I didn't get that. The debug console only
>     supports output
>     >     >     and no input, if you refer to that.
>     >     >
>     >     >     So if it's just about receiving life signs of a cell,
>     the debug console
>     >     >     is sufficient, if you need interaction with cells, your
>     choice is the
>     >     >     virtio-net driver, as Henning just wrote.
>     >     >
>     >     >       Ralf
>     >     >     >
>     >     >     > -Munees
>     >     >     >
>     >     >     > On Mon, Feb 19, 2018 at 5:55 PM, Ralf Ramsauer
>     >     >     > <ralf.ramsa...@oth-regensburg.de
>     <mailto:ralf.ramsa...@oth-regensburg.de>
>     >     <mailto:ralf.ramsa...@oth-regensburg.de
>     <mailto:ralf.ramsa...@oth-regensburg.de>>
>     >     <mailto:ralf.ramsa...@oth-regensburg.de
>     <mailto:ralf.ramsa...@oth-regensburg.de>
>     >     <mailto:ralf.ramsa...@oth-regensburg.de
>     <mailto:ralf.ramsa...@oth-regensburg.de>>>
>     >     >     > <mailto:ralf.ramsa...@oth-regensburg.de
>     <mailto:ralf.ramsa...@oth-regensburg.de>
>     >     <mailto:ralf.ramsa...@oth-regensburg.de
>     <mailto:ralf.ramsa...@oth-regensburg.de>>
>     >     >     <mailto:ralf.ramsa...@oth-regensburg.de
>     <mailto:ralf.ramsa...@oth-regensburg.de>
>     >     <mailto:ralf.ramsa...@oth-regensburg.de
>     <mailto:ralf.ramsa...@oth-regensburg.de>>>>> wrote:
>     >     >     >
>     >     >     >     Hi Munees,
>     >     >     >
>     >     >     >     yes, that's possible. You can allow your inmates
>     to use the hypervisor
>     >     >     >     console by setting the .flag
>     JAILHOUSE_CELL_DEBUG_CONSOLE in your inmate
>     >     >     >     config.
>     >     >     >
>     >     >     >     Your inmates may then use this console, but you
>     have to tell them to use
>     >     >     >     the hypervisor console by either passing the
>     cmdline argument
>     >     >     >     "con-type=JAILHOUSE" or change the CON_TYPE define to
>     >     >     >       #define CON_TYPE "JAILHOUSE"
>     >     >     >
>     >     >     >     Linux inmates also supports this console; see
>     jailhouse_dbcon.c: [1]
>     >     >     >
>     >     >     >       Ralf
>     >     >     >
>     >     >     >     [1]
>     >     >     >   
>      
> http://git.kiszka.org/?p=linux.git;a=commit;h=7b18955c0008aba6d20abc203ddf12ffed4592e7
>     
> <http://git.kiszka.org/?p=linux.git;a=commit;h=7b18955c0008aba6d20abc203ddf12ffed4592e7>
>     >   
>      
> <http://git.kiszka.org/?p=linux.git;a=commit;h=7b18955c0008aba6d20abc203ddf12ffed4592e7
>     
> <http://git.kiszka.org/?p=linux.git;a=commit;h=7b18955c0008aba6d20abc203ddf12ffed4592e7>>
>     >     >   
>      
> <http://git.kiszka.org/?p=linux.git;a=commit;h=7b18955c0008aba6d20abc203ddf12ffed4592e7
>     
> <http://git.kiszka.org/?p=linux.git;a=commit;h=7b18955c0008aba6d20abc203ddf12ffed4592e7>
>     >   
>      
> <http://git.kiszka.org/?p=linux.git;a=commit;h=7b18955c0008aba6d20abc203ddf12ffed4592e7
>     
> <http://git.kiszka.org/?p=linux.git;a=commit;h=7b18955c0008aba6d20abc203ddf12ffed4592e7>>>
>     >     >     >   
>      
> <http://git.kiszka.org/?p=linux.git;a=commit;h=7b18955c0008aba6d20abc203ddf12ffed4592e7
>     
> <http://git.kiszka.org/?p=linux.git;a=commit;h=7b18955c0008aba6d20abc203ddf12ffed4592e7>
>     >   
>      
> <http://git.kiszka.org/?p=linux.git;a=commit;h=7b18955c0008aba6d20abc203ddf12ffed4592e7
>     
> <http://git.kiszka.org/?p=linux.git;a=commit;h=7b18955c0008aba6d20abc203ddf12ffed4592e7>>
>     >     >   
>      
> <http://git.kiszka.org/?p=linux.git;a=commit;h=7b18955c0008aba6d20abc203ddf12ffed4592e7
>     
> <http://git.kiszka.org/?p=linux.git;a=commit;h=7b18955c0008aba6d20abc203ddf12ffed4592e7>
>     >   
>      
> <http://git.kiszka.org/?p=linux.git;a=commit;h=7b18955c0008aba6d20abc203ddf12ffed4592e7
>     
> <http://git.kiszka.org/?p=linux.git;a=commit;h=7b18955c0008aba6d20abc203ddf12ffed4592e7>>>>
>     >     >     >
>     >     >     >     On 02/19/2018 12:45 PM, m.rajend...@matellio.com
>     <mailto:m.rajend...@matellio.com> <mailto:m.rajend...@matellio.com
>     <mailto:m.rajend...@matellio.com>>
>     >     <mailto:m.rajend...@matellio.com
>     <mailto:m.rajend...@matellio.com> <mailto:m.rajend...@matellio.com
>     <mailto:m.rajend...@matellio.com>>>
>     >     >     >     <mailto:m.rajend...@matellio.com
>     <mailto:m.rajend...@matellio.com>
>     >     <mailto:m.rajend...@matellio.com
>     <mailto:m.rajend...@matellio.com>>
>     >     >     <mailto:m.rajend...@matellio.com
>     <mailto:m.rajend...@matellio.com> <mailto:m.rajend...@matellio.com
>     <mailto:m.rajend...@matellio.com>>>> wrote:
>     >     >     >     > Hi Jailhouse Team,
>     >     >     >     > can I create virtual serial console interface
>     for all
>     >     >     created non
>     >     >     >     root cell?. Right now I have one serial interface
>     with that the
>     >     >     >     recent non root cell boot message logged in the
>     console. Not
>     >     >     able to
>     >     >     >     see the other console message.If the user want to
>     log both non
>     >     >     root
>     >     >     >     cell messages then how to achieve with jailhouse.
>     >     >     >     >
>     >     >     >     > How to configure and log the messages using
>     virtual serial
>     >     >     >     interface for the non root cell?
>     >     >     >     >
>     >     >     >     > Thanks in advance
>     >     >     >     >
>     >     >     >     > -Munees
>     >     >     >     >
>     >     >     >
>     >     >     >
>     >     >     > --
>     >     >     > 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 jailhouse-dev+unsubscr...@googlegroups.com
>     <mailto:jailhouse-dev%2bunsubscr...@googlegroups.com>
>     >     <mailto:jailhouse-dev%2bunsubscr...@googlegroups.com
>     <mailto:jailhouse-dev%252bunsubscr...@googlegroups.com>>
>     >     >     <mailto:jailhouse-dev%2bunsubscr...@googlegroups.com
>     <mailto:jailhouse-dev%252bunsubscr...@googlegroups.com>
>     >     <mailto:jailhouse-dev%252bunsubscr...@googlegroups.com
>     <mailto:jailhouse-dev%25252bunsubscr...@googlegroups.com>>>
>     >     >     > <mailto:jailhouse-dev+unsubscr...@googlegroups.com
>     <mailto:jailhouse-dev%2bunsubscr...@googlegroups.com>
>     >     <mailto:jailhouse-dev%2bunsubscr...@googlegroups.com
>     <mailto:jailhouse-dev%252bunsubscr...@googlegroups.com>>
>     >     >     <mailto:jailhouse-dev%2bunsubscr...@googlegroups.com
>     <mailto:jailhouse-dev%252bunsubscr...@googlegroups.com>
>     >     <mailto:jailhouse-dev%252bunsubscr...@googlegroups.com
>     <mailto:jailhouse-dev%25252bunsubscr...@googlegroups.com>>>>.
>     >     >     > For more options, visit
>     https://groups.google.com/d/optout <https://groups.google.com/d/optout>
>     >     <https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>>
>     >     <https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>
>     >     <https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>>>.
>     >     >
>     >     >
>     >     > --
>     >     > 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 jailhouse-dev+unsubscr...@googlegroups.com
>     <mailto:jailhouse-dev%2bunsubscr...@googlegroups.com>
>     >     <mailto:jailhouse-dev%2bunsubscr...@googlegroups.com
>     <mailto:jailhouse-dev%252bunsubscr...@googlegroups.com>>
>     >     > <mailto:jailhouse-dev+unsubscr...@googlegroups.com
>     <mailto:jailhouse-dev%2bunsubscr...@googlegroups.com>
>     >     <mailto:jailhouse-dev%2bunsubscr...@googlegroups.com
>     <mailto:jailhouse-dev%252bunsubscr...@googlegroups.com>>>.
>     >     > For more options, visit https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>
>     >     <https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>>.
>     >
>     >
>     > --
>     > 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 jailhouse-dev+unsubscr...@googlegroups.com
>     <mailto:jailhouse-dev%2bunsubscr...@googlegroups.com>
>     > <mailto:jailhouse-dev+unsubscr...@googlegroups.com
>     <mailto:jailhouse-dev%2bunsubscr...@googlegroups.com>>.
>     > For more options, visit https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>.
> 
> -- 
> 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 jailhouse-dev+unsubscr...@googlegroups.com
> <mailto:jailhouse-dev+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 jailhouse-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to