Steps on how to lunch seconadary VM

70 views
Skip to first unread message

Johnson Lu

unread,
Jan 7, 2019, 3:16:08 AM1/7/19
to Hafnium
Hi guys,

I am able to boot up primary vm now, can you share steps on how to lunch secondary VM?

Thanks a lot.

Johnson Lu

unread,
Jan 7, 2019, 3:45:12 AM1/7/19
to Hafnium
I insmod .ko file, meet below error, not sure any steps missing.

/ # insmod hafnium.ko 
[    9.661612] hafnium: loading out-of-tree module taints kernel.
[    9.673579] NET: Registered protocol family 19
[    9.674329] Hafnium successfully loaded with 1 VMs:
[    9.674629] VM 1: 4 vCPUS
/ # Unknown lower sync exception pc=0xffff000011080324, esr=0x1fe00000, ec=0x7

在 2019年1月7日星期一 UTC+8下午4:16:08,Johnson Lu写道:

Andrew Walbran

unread,
Jan 7, 2019, 12:33:24 PM1/7/19
to Johnson Lu, Hafnium
Secondary VMs are configured in the vms.txt file of the RAM disk image that Hafnium boots: https://hafnium.googlesource.com/hafnium/+/HEAD/docs/HafniumRamDisk.md
Note that secondary VMs don't (yet) get access to interrupts or other hardware, so they can't do much other than respond to requests from the primary VM.

As usual, the best way to understand how to create secondary VMs is to look at how the tests do it. https://hafnium.googlesource.com/hafnium/+/HEAD/test/vmapi/primary_with_secondaries/ is an example of a test suite which uses several secondary VMs.

--
You received this message because you are subscribed to the Google Groups "Hafnium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hafnium-discu...@googlegroups.com.
To post to this group, send email to hafnium...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/hafnium-discuss/0b135c8a-facb-4beb-876f-cd91094a6367%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Johnson Lu

unread,
Jan 7, 2019, 10:46:46 PM1/7/19
to Hafnium
Thanks for the quick response. I already create RAM disk image as guide, see below log. Anyway, let me check the tests you share. Thanks.

/ # insmod hafnium.ko 
[    9.661612] hafnium: loading out-of-tree module taints kernel.
[    9.673579] NET: Registered protocol family 19
[    9.674329] Hafnium successfully loaded with 1 VMs:
[    9.674629]  VM 1: 4 vCPUS
/ # Unknown lower sync exception pc=0xffff000011080324, esr=0x1fe00000, ec=0x7

在 2019年1月8日星期二 UTC+8上午1:33:24,Andrew Walbran写道:

Johnson Lu

unread,
Jan 8, 2019, 4:43:05 AM1/8/19
to Hafnium
Issue is caused by the memory for VM is too small, only a litte bigger than kernel size. After increase machine memory size and VM memory size, can successfully insmod .ko file without any hang and error.

Can you share your current method to interactive between primary VM and secondary VM?

在 2019年1月8日星期二 UTC+8上午11:46:46,Johnson Lu写道:

Andrew Walbran

unread,
Jan 8, 2019, 1:51:07 PM1/8/19
to Johnson Lu, Hafnium
Currently VMs can interact by sending messages, and the primary VM may also inject interrupts into a secondary VM. You can see the available HVCs in https://hafnium.googlesource.com/hafnium/+/master/inc/vmapi/hf/call.h. This is a work in progress.

Reply all
Reply to author
Forward
0 new messages