How to test preserve_context mode?

David Woodhouse dwmw2 at infradead.org
Fri Nov 15 03:14:00 PST 2024


I'm messing around with the x86 relocate_kernel code, and I'd like to
test the 'preserve_context' mode. I can't find any documentation or
examples; am I just being dim?

All I want to do is kexec into an environment which just does a 'ret',
and comes back to the original kernel.

I've only been able to do that by hacking out the 'call %rdx' in
relocate_kernel_64.S so it never even calls into the environment in the
first place. 

(Which doesn't work, as the kernel forgets to reload its own GDT, but
with *that* fixed it seems fine.)



Also, I've configured the mailing list to no longer append a footer,
because it makes the lore.kernel.org archive unhappy.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5965 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/kexec/attachments/20241115/c7b695d9/attachment.p7s>


More information about the kexec mailing list