From: Amos Kong <akong@redhat.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: dallan@redhat.com, alex.williamson@redhat.com,
kevin@koconnor.net, seabios@seabios.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Resend][Seabios PATCH] don't boot from un-selected devices
Date: Tue, 25 Dec 2012 11:58:08 +0800 [thread overview]
Message-ID: <20121225035808.GA1553@t430s.redhat.com> (raw)
In-Reply-To: <20121219093208.GL11016@redhat.com>
On Wed, Dec 19, 2012 at 11:32:08AM +0200, Gleb Natapov wrote:
> On Wed, Dec 19, 2012 at 03:24:45PM +0800, Amos Kong wrote:
> > Current seabios will try to boot from selected devices first,
> > if they are all failed, seabios will also try to boot from
> > un-selected devices.
> >
> > For example:
> > @ qemu-kvm -boot order=n,menu=on ...
> >
> > Guest will boot from network first, if it's failed, guest will try to
> > boot from other un-selected devices (floppy, cdrom, disk) one by one.
> >
> > Sometimes, user don't want to boot from some devices. This patch changes
Hi Gleb,
> And sometimes he want. The patch changes behaviour unconditionally. New
> behaviour should be user selectable. Something line -boot order=strict
> on qemu command line.
Sometimes, user don't know which devices are in boot list of seabios,
so they could not disable them through qemu cmdline.
I didn't describe the purpose clearly. Currently we can assign boot
order by "-boot order=...", if fails to boot from all devices in order
parameters, other devices in seabios's boot table will also be tried.
The exact request should be "only boot from selected devices".
I agree to make it configurable.
eg: qemu -boot order=nd,strict=on,menu=on
strick: on (only boot from selected devices)
strick: off (will try to boot from all devices in seabios' boot table)
default strick should be 'off' as current behavior.
Thanks, Amos
> > seabios to boot only from selected devices.
> >
> > If user choose first boot device from menu, then seabios will try all
> > the devices, even some of them are not selected.
> >
> > Signed-off-by: Amos Kong <akong@redhat.com>
> > ---
> > Resend for CCing seabios maillist.
> > ---
> > src/boot.c | 13 ++++++++-----
> > 1 files changed, 8 insertions(+), 5 deletions(-)
> >
> > diff --git a/src/boot.c b/src/boot.c
> > index 3ca7960..ee810ac 100644
> > --- a/src/boot.c
> > +++ b/src/boot.c
> > @@ -424,6 +424,10 @@ interactive_bootmenu(void)
> > maxmenu++;
> > printf("%d. %s\n", maxmenu
> > , strtcpy(desc, pos->description, ARRAY_SIZE(desc)));
> > + /* If user chooses first boot device from menu, we will treat
> > + all the devices as selected. */
> > + if (pos->priority == DEFAULT_PRIO)
> > + pos->priority = DEFAULT_PRIO - 1;
> > pos = pos->next;
> > }
> >
> > @@ -490,7 +494,10 @@ boot_prep(void)
> >
> > // Map drives and populate BEV list
> > struct bootentry_s *pos = BootList;
> > - while (pos) {
> > +
> > + /* The priority of un-selected device is not changed,
> > + we only boot from user selected devices. */
> > + while (pos && pos->priority != DEFAULT_PRIO) {
> > switch (pos->type) {
> > case IPL_TYPE_BCV:
> > call_bcv(pos->vector.seg, pos->vector.offset);
> > @@ -513,10 +520,6 @@ boot_prep(void)
> > }
> > pos = pos->next;
> > }
> > -
> > - // If nothing added a floppy/hd boot - add it manually.
> > - add_bev(IPL_TYPE_FLOPPY, 0);
> > - add_bev(IPL_TYPE_HARDDISK, 0);
next prev parent reply other threads:[~2012-12-25 4:48 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-19 7:22 [Qemu-devel] [PATCH] don't boot from un-selected devices Amos Kong
2012-12-19 7:24 ` [Qemu-devel] [Resend][Seabios PATCH] " Amos Kong
2012-12-19 7:38 ` Gerd Hoffmann
2012-12-19 8:12 ` Amos Kong
2012-12-19 9:32 ` Gleb Natapov
2012-12-25 3:58 ` Amos Kong [this message]
2012-12-25 6:37 ` Gleb Natapov
2012-12-25 10:37 ` Amos Kong
2012-12-26 0:55 ` [Qemu-devel] [SeaBIOS PATCH v2] boot: support strict boot and make it configurable Amos Kong
2013-01-09 4:00 ` Kevin O'Connor
2013-01-09 5:03 ` Amos Kong
2013-01-12 22:01 ` Kevin O'Connor
2013-01-09 5:17 ` [Qemu-devel] [SeaBIOS PATCH v3] boot: add a new type to halt booting Amos Kong
2012-12-25 15:59 ` [Qemu-devel] [Resend][Seabios PATCH] don't boot from un-selected devices Ronen Hod
2012-12-25 17:15 ` Gleb Natapov
2012-12-19 16:39 ` Kevin O'Connor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121225035808.GA1553@t430s.redhat.com \
--to=akong@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=dallan@redhat.com \
--cc=gleb@redhat.com \
--cc=kevin@koconnor.net \
--cc=qemu-devel@nongnu.org \
--cc=seabios@seabios.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).