Failed to boot jailhouse

223 views
Skip to first unread message

raziebe

unread,
Jun 26, 2016, 1:52:35 PM6/26/16
to Jailhouse
Hello.
I am a newbie. I am failing to boot jailhouse. I am using
3.19.0-47-generic kernel in Ubuntu LTS 14.04.4 . I tried both qemu 2.0.0 ( or 2.1) but it hangs when I issue the command:

tools/jailhouse enable configs/qemu-vm.cell

The bellow is the output:

Code location: 0xfffffffff0000030
Using x2APIC
Page pool usage after early setup: mem 40/1498, remap 64/131072
Initializing processors:
CPU 2... (APIC ID 2) OK
CPU 0... (APIC ID 0) OK
CPU 3... (APIC ID 3) OK
CPU 1... (APIC ID 1) OK
WARNING: No VT-d support found!
Adding PCI device 00:01.0 to cell "QEMU-VM"
Adding PCI device 00:02.0 to cell "QEMU-VM"
Adding PCI device 00:1b.0 to cell "QEMU-VM"
Adding PCI device 00:1f.0 to cell "QEMU-VM"
Adding PCI device 00:1f.2 to cell "QEMU-VM"
Adding PCI device 00:1f.3 to cell "QEMU-VM"
Adding PCI device 00:1f.7 to cell "QEMU-VM"
Adding virtual PCI device 00:0f.0 to cell "QEMU-VM"
Page pool usage after late setup: mem 179/1498, remap 65606/131072
Activating hypervisor
FATAL: Invalid MMIO/RAM write, addr: 0x00000000fc234000
RIP: 0xffffffff813b457d RSP: 0xffff8800386afab0 FLAGS: 10202
RAX: 0xffffc90010ab4000 RBX: 0xffff880034a2c640 RCX: 0xffff880035e3fb7c
RDX: 0x0000000000000018 RSI: 0xffffc90010598000 RDI: 0xffffc90010ab4000
CS: 10 BASE: 0x0000000000000000 AR-BYTES: a09b EFER.LMA 1
CR0: 0x0000000080050033 CR3: 0x0000000038cbe000 CR4: 0x00000000000026e0
EFER: 0x0000000000000d01
Parking CPU 2 (Cell: "QEMU-VM")

Jan Kiszka

unread,
Jun 27, 2016, 12:51:04 AM6/27/16
to raziebe, Jailhouse
On 2016-06-26 19:52, raziebe wrote:
> Hello.
> I am a newbie. I am failing to boot jailhouse. I am using
> 3.19.0-47-generic kernel in Ubuntu LTS 14.04.4 . I tried both qemu 2.0.0 ( or 2.1) but it hangs when I issue the command:

You should retry with a more recent QEMU version. 2.6 is known to work,
but 2.2 is probably the minimum.

Jan

Raz

unread,
Jun 27, 2016, 4:38:55 AM6/27/16
to Jan Kiszka, Jailhouse
Thanks Jan.
You were right.
As a user I have experience with RT-systems solution. So I am a bit puzzled because I would expect to see a cpu dropped from both the host and the guest. 
Also, How do we continue ? What do we need to make this boot an OS ?






Jan Kiszka

unread,
Jun 27, 2016, 7:43:23 AM6/27/16
to Raz, Jailhouse
On 2016-06-27 10:38, Raz wrote:
> Thanks Jan.
> You were right.
> As a user I have experience with RT-systems solution. So I am a bit
> puzzled because I would expect to see a cpu dropped from both the host
> and the guest.

First of all, the QEMU setup is for testing purposes - do not confuse
with a real system (with potentially real RT requirements).

Then, I do not yet understand which CPU should be dropped under with
conditions. Can you describe in more details what you mean?

> Also, How do we continue ? What do we need to make this boot an OS ?
>

Which OS?

Jan

Raz

unread,
Jun 27, 2016, 11:12:34 AM6/27/16
to Jan Kiszka, Jailhouse
On Mon, Jun 27, 2016 at 4:43 PM, Jan Kiszka <jan.k...@web.de> wrote:
On 2016-06-27 10:38, Raz wrote:
> Thanks Jan.
> You were right.
> As a user I have experience with RT-systems solution. So I am a bit
> puzzled because I would expect to see a cpu dropped from both the host
> and the guest.

First of all, the QEMU setup is for testing purposes - do not confuse
with a real system (with potentially real RT requirements).

Then, I do not yet understand which CPU should be dropped under with
conditions. Can you describe in more details what you mean?
I thought the qemu guest would allocate a cpu for the host.   

> Also, How do we continue ? What do we need to make this boot an OS ?
>

Which OS?
I want to boot linux or linux. If you can provide me with guidance how to boot a linux guest over some ramdisk
that will be nice. I understand that jailhouse is not ready, this is why I want to contribute - if possible. 

Jan




--

Jan Kiszka

unread,
Jun 27, 2016, 11:43:25 AM6/27/16
to Raz, Jailhouse
On 2016-06-27 17:12, Raz wrote:
>
>
> On Mon, Jun 27, 2016 at 4:43 PM, Jan Kiszka <jan.k...@web.de
> <mailto:jan.k...@web.de>> wrote:
>
> On 2016-06-27 10:38, Raz wrote:
> > Thanks Jan.
> > You were right.
> > As a user I have experience with RT-systems solution. So I am a bit
> > puzzled because I would expect to see a cpu dropped from both the host
> > and the guest.
>
> First of all, the QEMU setup is for testing purposes - do not confuse
> with a real system (with potentially real RT requirements).
>
> Then, I do not yet understand which CPU should be dropped under with
> conditions. Can you describe in more details what you mean?
>
> I thought the qemu guest would allocate a cpu for the host.

What is the host here?

If we remove QEMU from the picture, the host is controlled by Jailhouse.
And Jailhouse decides about which physical CPU can be used by which of
its guests (cells). When you create a cell, Jailhouse will deny the root
cell to use any of the CPUs that are now assigned to the new cell - try
onlining one of them again while the non-root exists.

>
>
> > Also, How do we continue ? What do we need to make this boot an OS ?
> >
>
> Which OS?
>
> I want to boot linux or linux. If you can provide me with guidance how
> to boot a linux guest over some ramdisk
> that will be nice. I understand that jailhouse is not ready, this is why
> I want to contribute - if possible.

Look at Documentation/non-root-linux.txt.

I currently use an initramfs for testing purposes created via buildroot,
.config attached. I also attached a reference config for the kernel.

HTH,
Jan
buildroot-config.xz
kernel-config.xz

Raz

unread,
Jul 1, 2016, 6:06:08 PM7/1/16
to Jan Kiszka, Jailhouse
I am probably missing something.
1. I compiled the kernel ( 4.7-rc1 from the git in the document).
2. built the cpio with buildroot with the build-root.config you sent me.
3. I compiled jailhouse on my ubuntu (64bit 14 LTS - which what I need ).
4. Then I "sudo make firmware_install"
5. insmod drivers/jailhouse.ko
6. Now according to non-root linux, I should :
    sudo ./tools/jailhouse cell linux configs/linux-x86-demo.cell queues/jailhouse/arch/x86_64/boot/bzImage -i x86/rootfs.cpio
 I am getting :
  Traceback (most recent call last):
  File "./tools/jailhouse-cell-linux", line 280, in <module>
    cell = JailhouseCell(config)
  File "./tools/jailhouse-cell-linux", line 186, in __init__
    raise e
IOError: [Errno 22] Invalid argument

   The linux-x86-demo.cell is only cell I found ?


Jan Kiszka

unread,
Jul 2, 2016, 6:39:39 AM7/2/16
to Raz, Jailhouse
On 2016-07-02 00:05, Raz wrote:
> I am probably missing something.
> 1. I compiled the kernel ( 4.7-rc1 from the git in the document).
> 2. built the cpio with buildroot with the build-root.config you sent me.
> 3. I compiled jailhouse on my ubuntu (64bit 14 LTS - which what I need ).
> 4. Then I "sudo make firmware_install"
> 5. insmod drivers/jailhouse.ko

You are missing jailhouse enable?

Jan

> 6. Now according to non-root linux, I should :
> sudo ./tools/jailhouse cell linux configs/linux-x86-demo.cell
> queues/jailhouse/arch/x86_64/boot/bzImage -i x86/rootfs.cpio
> I am getting :
> Traceback (most recent call last):
> File "./tools/jailhouse-cell-linux", line 280, in <module>
> cell = JailhouseCell(config)
> File "./tools/jailhouse-cell-linux", line 186, in __init__
> raise e
> IOError: [Errno 22] Invalid argument
>
> The linux-x86-demo.cell is only cell I found ?
>
>
>
> On Mon, Jun 27, 2016 at 8:43 PM, Jan Kiszka <jan.k...@web.de

Jan Kiszka

unread,
Jul 2, 2016, 6:57:44 AM7/2/16
to Raz, Jailhouse
On 2016-07-02 12:47, Raz wrote:
> No. I did the the enable and I got the same error.
>

OK...

> בתאריך 2 ביול 2016 13:39, "Jan Kiszka" <jan.k...@web.de
> <mailto:jan.k...@web.de>> כתב:
>
> On 2016-07-02 00:05, Raz wrote:
> > I am probably missing something.
> > 1. I compiled the kernel ( 4.7-rc1 from the git in the document).
> > 2. built the cpio with buildroot with the build-root.config you
> sent me.
> > 3. I compiled jailhouse on my ubuntu (64bit 14 LTS - which what I
> need ).
> > 4. Then I "sudo make firmware_install"
> > 5. insmod drivers/jailhouse.ko
>
> You are missing jailhouse enable?
>
> Jan
>
> > 6. Now according to non-root linux, I should :
> > sudo ./tools/jailhouse cell linux configs/linux-x86-demo.cell
> > queues/jailhouse/arch/x86_64/boot/bzImage -i x86/rootfs.cpio
> > I am getting :
> > Traceback (most recent call last):
> > File "./tools/jailhouse-cell-linux", line 280, in <module>
> > cell = JailhouseCell(config)
> > File "./tools/jailhouse-cell-linux", line 186, in __init__
> > raise e
> > IOError: [Errno 22] Invalid argument
> >
> > The linux-x86-demo.cell is only cell I found ?
> >

Then the configuration of linux-x86-demo is not matching the virtual
machine settings, or the config is corrupt. Did you modify it in any way?

Check if you reserved enough memory for hypervisor and cells
(memmap=66M$0x3b000000 in the kernel command line).

Jan

Raz

unread,
Jul 5, 2016, 3:27:50 PM7/5/16
to Jan Kiszka, Jailhouse
I am unable to boot memmap. What kernel do you use in your host ? 

Jan Kiszka

unread,
Jul 6, 2016, 2:05:29 AM7/6/16
to Raz, Jailhouse
On 2016-07-05 21:27, Raz wrote:
> I am unable to boot memmap. What kernel do you use in your host ?

The physical host kernel plays no role here. That memmap parameter has
to be applied on the L1 guest kernel, i.e. the host kernel _inside_
KVM/QEMU. Here I'm running 4.7-rc6 at the moment (due to ongoing
development).

Jan

>
> On Sat, Jul 2, 2016 at 3:57 PM, Jan Kiszka <jan.k...@web.de
> <mailto:jan.k...@web.de>> wrote:
>
> On 2016-07-02 12:47, Raz wrote:
> > No. I did the the enable and I got the same error.
> >
>
> OK...
>
> > בתאריך 2 ביול 2016 13:39, "Jan Kiszka" <jan.k...@web.de <mailto:jan.k...@web.de>
> > <mailto:jan.k...@web.de <mailto:jan.k...@web.de>>> כתב:
Reply all
Reply to author
Forward
0 new messages