[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] PVH port of Mini-OS



Hi Hwanju,
it may be worth cross-posting this thread on xen-devel also
Regards
Lars

On 23/04/2014 14:02, David Scott wrote:
Hi Hwanju,


On Tue, Apr 22, 2014 at 7:12 PM, Hwanju Kim <Hwanju.Kim@xxxxxxxxxxxx> wrote:
Hi all,

I recently started to try to enable mini-os to run with PVH mode, which Xen 4.4 supports. This attempt is for Mirage and other mini-os-based appliances to take advantage of hardware features notably related to hardware-assisted memory virtualization (sharing, tagged tlb, etc), while retaining PV drivers as is. This is at a very early stage in progress and has not been heavily tested. But, I think it would be better to share the tree in the meantime.

Great-- thank you for sharing!
 
To summarize, it contains some features for PVH in ELF and conditional operations between PV and PVH for some low-level operations mostly for CPU and memory; the decent pvops's runtime code patch is not used for now. Since PVH has auto-translated P2M, relevant translation parts and grant table setup for that mode are patched. Finally, timer interface is also changed when PVH is enabled. To test it, you can simply add "pvh=1" in the Xen config file. 

I hope to hear about any comments, bug reports, or suggestions of testing it. Since it's been a little time since I had looked at mini-os and PVH, any fundamental suggestion would be helpful.

I did a quick boot test and it worked for me. Here's the difference in the mini-os console log between 'pvh=0' and 'pvh=1':

--- no-pvh      2014-04-23 12:40:50.000000000 +0000

+++ pvh 2014-04-23 12:40:28.000000000 +0000

@@ -1,8 +1,9 @@

+Xen HVM callback vector for event delivery is enabled

 Xen Minimal OS!

   start_info: 00000000000f1000(VA)

     nr_pages: 0x10000

-  shared_inf: 0xbf2cb000(MA)

-     pt_base: 00000000000f4000(VA)

+  shared_inf: 0x000f4000(MA)

+     pt_base: 00000000000f5000(VA)

 nr_pt_frames: 0x5

     mfn_list: 0000000000071000(VA)

    mod_start: 0x0(VA)

@@ -17,22 +18,22 @@


It's really nice that the same kernel works in both PV and PVH modes.

Note for anyone else trying this: in xen 4.4 PVH mode seems to require Intel hardware i.e. it doesn't work on AMD. On AMD you get an ugly failure from "xl create" (with pvh=1, note that pvh=0 boots as normal)

# xl create minios.cfg

Parsing config from minios.cfg

libxl: error: libxl_create.c:478:libxl__domain_make: domain creation fail

libxl: error: libxl_create.c:743:initiate_domain_create: cannot make domain: -3

libxl: error: libxl.c:1384:libxl__destroy_domid: non-existant domain -1

libxl: error: libxl.c:1348:domain_destroy_callback: unable to destroy guest with domid 4294967295

libxl: error: libxl_create.c:1320:domcreate_destruction_cb: unable to destroy domain 4294967295 following failed creation


The error is explained in 'xl dmesg':

# xl dmesg | grep PVH

(XEN) [2014-04-23 11:41:39] HVM: PVH mode not supported on this platform

(XEN) [2014-04-23 11:06:19] Attempt to create a PVH guest on a system without necessary hardware support

 
I'm sure this will be fixed in later versions of xen.

Anyway, great work so far!

Cheers,
Dave
_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel




--
Dave Scott


_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.