From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47702) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlEla-0001qs-HZ for qemu-devel@nongnu.org; Wed, 19 Dec 2012 03:12:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TlElZ-0006F4-Jq for qemu-devel@nongnu.org; Wed, 19 Dec 2012 03:12:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:65230) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlElZ-0006Ez-B8 for qemu-devel@nongnu.org; Wed, 19 Dec 2012 03:12:37 -0500 Date: Wed, 19 Dec 2012 16:12:22 +0800 From: Amos Kong Message-ID: <20121219081222.GA3078@t430s.nay.redhat.com> References: <1355901730-24350-1-git-send-email-akong@redhat.com> <1355901885-24398-1-git-send-email-akong@redhat.com> <50D16EE5.1050105@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50D16EE5.1050105@redhat.com> Subject: Re: [Qemu-devel] [Resend][Seabios PATCH] don't boot from un-selected devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: dallan@redhat.com, gleb@redhat.com, seabios@seabios.org, qemu-devel@nongnu.org, alex.williamson@redhat.com, kevin@koconnor.net On Wed, Dec 19, 2012 at 08:38:13AM +0100, Gerd Hoffmann wrote: > On 12/19/12 08:24, 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 > > seabios to boot only from selected devices. > > I think (i.e. I didn't test) the patch breaks booting if the user didn't > explicitly specify a boot device. Hi Gerd, | #define DEFAULT_PRIO 9999 If we don't select some devices, their priority will always be 9999 | static int DefaultFloppyPrio = 101; | static int DefaultCDPrio = 102; | static int DefaultHDPrio = 103; | static int DefaultBEVPrio = 104; The priority of selected devices will be changed to above values first, the priority might be re-changed. However, we can judge if device is selected or not by checking if the priority is 9999. . Boot guest without qemu boot option, guest will try to boot from network/hd/floppy/cdrom. . If seabios ignores the order parameter of qemu, guest will also try to boot from network/hd/floppy/cdrom. -- Amos.