Xen kexec status

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

 



I've been looking at kexec into Xen, and from Xen.

Kexec-tools doesn't support Multiboot v2, and doesn't treat the Xen
image as relocatable. So it loads it at address zero, which causes lots
of amusement:

Firstly, head.S trusts the low memory limit found in the BDA, which has
been scribbled on. Hacking around that and setting no-real-mode does
make kexec into Xen from Linux work.

Secondly, kexec (in xen_kexec_load()) adds a mapping of the 0-1MiB
region, which "overlaps" with where Xen is actually loaded, so *Xen*
refuses the kexec_load hypercall.

For kexec from Xen I also reverted to kexec-tools 2.0.16 as commit
894bea9335f57b62c ("kexec-tools: Perform run-time linking of
libxenctrl.so") seems to have broken things by not always defining
HAVE_LIBXENCTRL when it should. I'll fix that shortly.

Most of the above is relatively simply worked around by hacking the Xen
image to be ET_DYN (so that kexec will relocate it) and then using
kexec --mem-min=0x100000. I'll probably implement Multiboot v2 support
in kexec-tools to allow for saner relocation.

We should fix head.S. One option is to recognise when the load address
is zero, and automatically eschew the BDA and trigger the no-real-mode
behaviour when that is the case. Better suggestions welcome.

Should we also avoid having a load segment at offset zero in the image,
so that it doesn't scribble on the BDA by default?

Should we also fix Xen's kexec_load not to refuse overlapping segments
if they are not loaded (bufsz==0)? I'm not quite sure what's going on
there; doesn't this happen with paging disabled anyway, so why would we
need an explicit mapping of RAM?

After that, I'm looking at using Xen as a crash kernel, which means I
really don't want it scribbling on low memory that it hasn't been
explicitly told it can use. First attempt at this is at 
http://david.woodhou.se/0001-x86-boot-Use-trampoline_protmode_entry-in-place.patch
but as noted there, it only works for a single processor for now; I'll
fix it as described therein.



<<attachment: smime.p7s>>

_______________________________________________
kexec mailing list
kexec@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/kexec

[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux