Ward Vandewege
2008-Aug-07 13:12 UTC
[Xen-devel] kexec regression between 3.1.0 and 3.1.3 ?
(I sent this yesterday to xen-users but received no response at all. Perhaps the dev list is the proper list for this kind of thing.) Hi there, There seems to be a regression with regard to kexec''ing into a Xen kernel between Xen 3.1.0 (confirmed working) and 3.1.3 (confirmed not working). I would try 3.1.1 and 3.1.2 but source for 3.1 versions older than 3.1.3 no longer seems to be available for download. I still had source for 3.1.0 lying around, luckily. I''m building and running Xen on AMD64 systems, 64 bit. Basically, up to 3.1.0 I can kexec into a Xen kernel like this: # kexec --console-vga --console-serial -l /boot/xen-3.1.0.gz --module="//boot/vmlinuz-2.6.18-xen root=/dev/sda ro console=tty0 console=ttyS0,115200" --module="/boot/initrd.img-2.6.18-xen" --command-line="com1=115200,8n1 cdb=com1" # kexec -e>From 3.1.3, this no longer works:# kexec --console-vga --console-serial -l /boot/xen-3.1.3.gz --module="//boot/vmlinuz-2.6.18.8-xen root=/dev/sda ro console=tty0 console=ttyS0,115200" --module="/boot/initrd.img-2.6.18.8-xen" --command-line="com1=115200,8n1 cdb=com1" # kexec -e Kexec loads the Xen kernel fine, but hangs when trying to execute it. I''ve done some digging in the kexec source, and from what I can tell it hangs sometime after running the __NR_reboot syscall, so presumably somewhere early in the Xen kernel code. If I add ''earlyprintk=ttyS0,115200,keep'' to the kernel command line, I see [ 0.000000] Starting new kernel and then nothing. I''m using the latest version of kexec (2.0.0 from http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/), but I''ve also tested older kexec versions which behave in the same way. I first observed this on real iron, but I''ve now set up a test environment with qemu which behaves identically. Any suggestions? Thanks, Ward. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2008-Aug-07 13:49 UTC
Re: [Xen-devel] kexec regression between 3.1.0 and 3.1.3 ?
On 7/8/08 14:12, "Ward Vandewege" <ward@gnu.org> wrote:> I''m using the latest version of kexec (2.0.0 from > http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/), but I''ve > also tested older kexec versions which behave in the same way. > > I first observed this on real iron, but I''ve now set up a test environment > with qemu which behaves identically. > > Any suggestions?Try adding no-real-mode to Xen''s command line. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ward Vandewege
2008-Aug-08 00:29 UTC
Re: [Xen-devel] kexec regression between 3.1.0 and 3.1.3 ?
On Thu, Aug 07, 2008 at 02:49:13PM +0100, Keir Fraser wrote:> On 7/8/08 14:12, "Ward Vandewege" <ward@gnu.org> wrote: > > > I''m using the latest version of kexec (2.0.0 from > > http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/), but I''ve > > also tested older kexec versions which behave in the same way. > > > > I first observed this on real iron, but I''ve now set up a test environment > > with qemu which behaves identically. > > > > Any suggestions? > > Try adding no-real-mode to Xen''s command line.Thank you! That fixes it for 3.1.3 and up (tested 3.1.3, 3.1.4 and 3.2.1). Thanks, Ward. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2008-Aug-08 08:06 UTC
Re: [Xen-devel] kexec regression between 3.1.0 and 3.1.3 ?
On 8/8/08 01:29, "Ward Vandewege" <ward@gnu.org> wrote:>>> Any suggestions? >> >> Try adding no-real-mode to Xen''s command line. > > Thank you! That fixes it for 3.1.3 and up (tested 3.1.3, 3.1.4 and 3.2.1).It''d be nice to have kexec add that flag by default for Xen, or steal a new multiboot flag to mean the same thing, as this trips people up frequently I expect. Oh well, hopefully knowledge of this trick will spread. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ward Vandewege
2008-Aug-08 15:09 UTC
Re: [Xen-devel] kexec regression between 3.1.0 and 3.1.3 ?
On Fri, Aug 08, 2008 at 09:06:50AM +0100, Keir Fraser wrote:> On 8/8/08 01:29, "Ward Vandewege" <ward@gnu.org> wrote: > >>> Any suggestions? > >> > >> Try adding no-real-mode to Xen''s command line. > > > > Thank you! That fixes it for 3.1.3 and up (tested 3.1.3, 3.1.4 and 3.2.1). > > It''d be nice to have kexec add that flag by default for Xen, or steal a new > multiboot flag to mean the same thing, as this trips people up frequently I > expect. Oh well, hopefully knowledge of this trick will spread.Yeah. Is there a significant difference between booting 3.1.4 and 3.2.1 with kexec in terms of BIOS requirements? I mentioned that with no-real-mode, I can kexec into a 3.1.3+ Xen kernel under qemu + bochs bios. I use coreboot (http://coreboot.org) on my servers though, and it seems that while kexec''ing into 3.1.3 and 3.1.4 works fine with qemu + coreboot, kexec''ing into 3.2.1 causes qemu to triple-fault and die. I tried on real iron this morning (with coreboot), and got similar results: kexec''ing into 3.1.3 and 3.1.4 works fine now, kexec''ing into 3.2.1 just hangs the machine. This is likely a coreboot bug, so I''ll have to track that down. Any information about differences between what 3.2.1 and 3.1.4 require to be kexec''ed into would be most helpful though. Thanks, Ward. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2008-Aug-08 15:14 UTC
Re: [Xen-devel] kexec regression between 3.1.0 and 3.1.3 ?
On 8/8/08 16:09, "Ward Vandewege" <ward@gnu.org> wrote:> This is likely a coreboot bug, so I''ll have to track that down. Any > information about differences between what 3.2.1 and 3.1.4 require to be > kexec''ed into would be most helpful though.If you specify no-real-mode in both cases then there should be no difference. If Xen does not drop back into real mode then it cannot make use of any legacy BIOS services. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Simon Horman
2008-Aug-11 01:56 UTC
Re: [Xen-devel] kexec regression between 3.1.0 and 3.1.3 ?
On Fri, Aug 08, 2008 at 09:06:50AM +0100, Keir Fraser wrote:> On 8/8/08 01:29, "Ward Vandewege" <ward@gnu.org> wrote: > > >>> Any suggestions? > >> > >> Try adding no-real-mode to Xen''s command line. > > > > Thank you! That fixes it for 3.1.3 and up (tested 3.1.3, 3.1.4 and 3.2.1). > > It''d be nice to have kexec add that flag by default for Xen, or steal a new > multiboot flag to mean the same thing, as this trips people up frequently I > expect. Oh well, hopefully knowledge of this trick will spread.How robust is adding no-real-mode to the command line of the second kernel? It probably makes sense just to have kexec add it by default. But I am a bit reluctant to do so if it isn''t always wanted. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2008-Aug-11 07:45 UTC
Re: [Xen-devel] kexec regression between 3.1.0 and 3.1.3 ?
On 11/8/08 02:56, "Simon Horman" <horms@verge.net.au> wrote:>> It''d be nice to have kexec add that flag by default for Xen, or steal a new >> multiboot flag to mean the same thing, as this trips people up frequently I >> expect. Oh well, hopefully knowledge of this trick will spread. > > How robust is adding no-real-mode to the command line of the second > kernel? It probably makes sense just to have kexec add it by default. > But I am a bit reluctant to do so if it isn''t always wanted.Any Xen version which recognises the option ought to have it specified when kexec''ed. It''s not usually valid to drop back into real mode and execute legacy BIOS services at that time. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Simon Horman
2008-Aug-11 09:04 UTC
Re: [Xen-devel] kexec regression between 3.1.0 and 3.1.3 ?
On Mon, Aug 11, 2008 at 08:45:24AM +0100, Keir Fraser wrote:> > > > On 11/8/08 02:56, "Simon Horman" <horms@verge.net.au> wrote: > > >> It''d be nice to have kexec add that flag by default for Xen, or steal a new > >> multiboot flag to mean the same thing, as this trips people up frequently I > >> expect. Oh well, hopefully knowledge of this trick will spread. > > > > How robust is adding no-real-mode to the command line of the second > > kernel? It probably makes sense just to have kexec add it by default. > > But I am a bit reluctant to do so if it isn''t always wanted. > > Any Xen version which recognises the option ought to have it specified when > kexec''ed. It''s not usually valid to drop back into real mode and execute > legacy BIOS services at that time.Hi Keir, thanks for the clarification. I''ll see about adding this to kexec-tools. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel