Petersson, Mats <Mats.Petersson@amd.com> wrote:> On Sunday 01 April 2007, Johannes Formann wrote: > > to test a few setups I thought running Xen inside QEMU might be > > possible. > > But when I tried it, Xen fails to boot, when using "noreboot" > > I did not > > find any error-message: > > <http://picpaste.de/Q_Screenshot_1.png> > > > > Is it impossble, oder did I something wrong? (The "normal" Kernel boot > > fine) > > I don''t know if it''s "impossible", but I wonder WHY you would want to > run Xen inside QEMU? [Not saying you shouldn''t be able to, I just don''t > quite see the point].I have tried that, since I need for a university-Projekt a least 2 Xen-Server (and a few other) to test if it is possible to use reliable server pooling with Xen. Since I haven''t 3 or more X86 PCs at home I thought an emulation might be fine.> It''s also worth noting that Xen uses a few things that are slightly > different from the "regular" OS''s (Linux, Windows, etc), and using > instructions in ever so slightly different ways can cause you to hit > things in emulators that aren''t emulated correctly [in Xen''s HVM we hit > this from time to time when someone tries to run a different OS - until > very recently OS/2 didn''t work, for example]. > > This is corner cases of unusual instructions and modes that don''t get > run very often in "normal code", which means that it''s more likely that > you''d hit "bugs" in these areas.Ok, I''ll try different emulations later. Do you have an idea why xen simply reboots/stops without any Error-Message? regards Johannes _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Petersson, Mats
2007-Apr-02 12:21 UTC
RE: [Xen-users] Re: Possible to run Xen inside QEMU?
> Ok, I''ll try different emulations later. > > Do you have an idea why xen simply reboots/stops without any > Error-Message?As a general rule, that indicates a "triple-fault", which is when a fault in the processor causes a second fault which in turn causes a third fault - it would be possible to let the processor recursively fault forever, but it''s pretty pointless to do, so there is a layered approach of "first fault, double-fault, triple-fault". Double-fault is supposed to be handled "clean", but of course there are scenarios where the processor just hasn''t got a chance to "get out of trouble" (typically when some global resource like the IDT or GDT has been overwritten with garbage). Triple-fault as such will stop the processor with a special "pattern" on the pins to indicate that it is a "triple-fault stop". Since it''s pretty pointless to have a system just sit there after a triple-fault, the engineers at this time (at the time of the 80286) invented a mechanism in the chipset to do a soft-reset at this point, so as to restart the machine. A little while later, someone figured out that this was a good way to actually restart a PC, so ever since there''s been code to "zero GDT, cause a trap" (typically, just load GDT with a length of zero followed by an INT3 instruction) to restart the machine. This was particularly useful when using 286 processor to get out of protected mode (as there was no instruction to disable protected mode once in there) - something that had to be done quite frequently in early OS/2 to make use of "dos-mode" for example. [It''s faster to do a triple-fault than it is to talk to the keyboard controller to issue a reset-signal that way, which is the alternative method]. QEMU obviously should follow this pattern of "restart with triple-fault", otherwise it''s "broken" for certain old applications. -- Mats> > > regards > > Johannes > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Petersson, Mats
2007-Apr-02 12:24 UTC
RE: [Xen-users] Re: Possible to run Xen inside QEMU?
> -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of > Petersson, Mats > Sent: 02 April 2007 13:22 > To: mlmail@formann.de; xen-users@lists.xensource.com > Subject: RE: [Xen-users] Re: Possible to run Xen inside QEMU? > > > Ok, I''ll try different emulations later. > > > > Do you have an idea why xen simply reboots/stops without any > > Error-Message? > > As a general rule, that indicates a "triple-fault", which is when a > fault in the processor causes a second fault which in turn causes a > third fault - it would be possible to let the processor recursively > fault forever, but it''s pretty pointless to do, so there is a layered > approach of "first fault, double-fault, triple-fault". Double-fault is > supposed to be handled "clean", but of course there are > scenarios where > the processor just hasn''t got a chance to "get out of trouble" > (typically when some global resource like the IDT or GDT has been > overwritten with garbage). Triple-fault as such will stop the > processor > with a special "pattern" on the pins to indicate that it is a > "triple-fault stop". > > Since it''s pretty pointless to have a system just sit there after a > triple-fault, the engineers at this time (at the time of the 80286) > invented a mechanism in the chipset to do a soft-reset at > this point, so > as to restart the machine. A little while later, someone figured out > that this was a good way to actually restart a PC, so ever > since there''s > been code to "zero GDT, cause a trap" (typically, just load GDT with a > length of zero followed by an INT3 instruction) to restart > the machine. > This was particularly useful when using 286 processor to get out of > protected mode (as there was no instruction to disable protected mode > once in there) - something that had to be done quite > frequently in early > OS/2 to make use of "dos-mode" for example. [It''s faster to do a > triple-fault than it is to talk to the keyboard controller to issue a > reset-signal that way, which is the alternative method]. > > QEMU obviously should follow this pattern of "restart with > triple-fault", otherwise it''s "broken" for certain old applications.After all that, I just realized that this is bogus: it''s not a triple-fault if "noreboot" stops it from rebooting! I don''t know what would cause an immediate reboot on Xen like that. -- Mats> > -- > Mats > > > > > > regards > > > > Johannes > > > > > > _______________________________________________ > > Xen-users mailing list > > Xen-users@lists.xensource.com > > http://lists.xensource.com/xen-users > > > > > > > > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Petersson, Mats <Mats.Petersson@amd.com> wrote:> After all that, I just realized that this is bogus: it''s not a > triple-fault if "noreboot" stops it from rebooting!But it was quite intressting, although not solving my problem. regards Johannes _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users