From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60292) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zi2C9-0004Nw-IY for qemu-devel@nongnu.org; Fri, 02 Oct 2015 11:24:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zi2C5-0001Cg-Uo for qemu-devel@nongnu.org; Fri, 02 Oct 2015 11:24:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35329) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zi2C5-0001Ca-Qm for qemu-devel@nongnu.org; Fri, 02 Oct 2015 11:24:21 -0400 Date: Fri, 2 Oct 2015 16:24:17 +0100 From: "Daniel P. Berrange" Message-ID: <20151002152417.GH28469@redhat.com> References: <1443701677-13629-1-git-send-email-markmb@redhat.com> <1443701819-13855-1-git-send-email-markmb@redhat.com> <1443701819-13855-7-git-send-email-markmb@redhat.com> <560D5057.6010308@redhat.com> <1443773357.14636.6.camel@redhat.com> <20151002134041.GB16190@morn.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20151002134041.GB16190@morn.lan> Subject: Re: [Qemu-devel] [PATCH v4 6/7] Make the kernel image in the fw_cfg DMA interface bootable Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin O'Connor Cc: Drew , Stefan Hajnoczi , "Gabriel L. Somlo" , qemu-devel@nongnu.org, Gerd Hoffmann , Marc =?utf-8?B?TWFyw60=?= , Laszlo Ersek On Fri, Oct 02, 2015 at 09:40:41AM -0400, Kevin O'Connor wrote: > On Fri, Oct 02, 2015 at 10:09:17AM +0200, Gerd Hoffmann wrote: > > > - read four bytes from under the fw_cfg selector QEMU_CFG_KERNEL_SIZE > > > (0x0008), > > > - if it is zero, return -1 --> no kernel boot requested, > > > - if it is nonzero, return 0 --> which means "top priority". > > > > > > In other words, I agree with: > > > > > > > - option_rom[nb_option_roms].bootindex = 0; > > > > + option_rom[nb_option_roms].bootindex = 1; > > The bootindex in QEMU is not visible in the firmware, so if the rest > of patch 6 is dropped then the above should be dropped as well. > > > Hmm. That makes the boot order undefined for "qemu -kernel foo -device > > virtio-blk,drive=bar,bootindex=1" when using an old seabios. I don't > > think this is a good idea. > > Wouldn't that make the bootorder undefined everywhere? What does it > mean to use -kernel and specify a bootorder? I think it is pretty meaningless - I've always considered the use of -kernel vs -boot / bootindex= to be mutually exclusive. I think that libvirt leaves out -boot entirely if it adds -kernel. If the kernel specified via -kernel doesn't boot for some reason (corrupt image or wrong arch image or something) then I think users would reasonably expect QEMU to not boot, rather than fallback to non-kernel boot approach. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|