----- Original Message ----- > From: "Janne Huttunen" <janne.huttu...@nokia.com> > To: "Paolo Bonzini" <pbonz...@redhat.com>, "Gerd Hoffmann" <kra...@redhat.com> > Cc: qemu-devel@nongnu.org > Sent: Wednesday, March 22, 2017 7:36:54 AM > Subject: Re: [Qemu-devel] [RFC][PATCH 0/6] "bootonceindex" property > > On Tue, 2017-03-21 at 18:55 +0100, Paolo Bonzini wrote: > > > > > Since real HW has this capability, there exist certain > > > auxiliary systems that are built on it. Having similar > > > semantics available in QEMU allows me to build a virtual > > > machine that works with these systems without modifying > > > them in any way. > > > > How does real hardware do it? I suppose you'd do it with a firmware > > setup menu or something like that; would it be enough to add a way to > > modify bootindex during runtime? > > On the real hardware the "boot once" really means *once* > i.e. it only affects the next reboot regardless of how > the next boot is triggered (reset button, power button, > software, etc.). After the next boot the normal boot > order is automatically restored.
Understood---my question is how you would set up the alternate boot order: is it something like "keep a button pressed while turning on", or something written in NVRAM, or something else that is completely different? Paolo > Theoretically it should be possible to get a close > approximation of this by changing the main boot order, > waiting for the boot to happen and then restoring the > original order back. This would require having some > process that constantly monitors what QEMU is doing so > that it can notice when the boot happens and then > restore the order. I'm trying to avoid having such > a process if possible, which in this case means that > QEMU would need to restore the order by itself. > > >