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

[Xen-devel] qemu pc_memory_init question

Hello, Alex,

This is Chunyan. Currently I'm working on xen HVM direct kernel boot and 
encounters some qemu questions. I found you have some patches regarding to 
that, so send this mail to ask for some help.

I know KVM support direct kernel boot, but not quite clear how it's 
implemented. In pc_memory_init, I can see bochs_bios_init() and load_linux(). I 
think I can understand load_linux, it read kernel and initrd and fill in 
specific addresses, and put linuxboot.bin to option rom override int19 vector 
to intercept boot process, linuxboot.bin will goto 'kernel' address to execute. 
But I don't understand bochs_bios_init, seems it only registers some things to 
FW_CFG. When is the BIOS loaded to RAM? 

For Xen, hvmloader provided BIOS, which is loaded into memory in xen code. That 
BIOS will probe disk MBR to load kernel and initrd. So, in SlE11 SP2, to 
support xen hvm direct kernel boot, it makes a different load_linux function, 
which read kernel and initrd, and make a fake boot sector and put it in the 
head of first disk. This is certainly not acceptable for upstream. 

Now I wonder if we can reuse upstream code and make a upstream acceptable 
patch. If BIOS can be loaded to ram in qemu, maybe I can remove hvmloader from 
xen phase (don't load hvmloader to RAM), and in qemu code, let it do 
pc_memory_init also in xen case.


Xen-devel mailing list



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