From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34258) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uj9jz-0003kj-Vk for qemu-devel@nongnu.org; Sun, 02 Jun 2013 10:58:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uj9jx-0002q7-EM for qemu-devel@nongnu.org; Sun, 02 Jun 2013 10:58:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63277) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uj9jx-0002q2-4v for qemu-devel@nongnu.org; Sun, 02 Jun 2013 10:58:37 -0400 Date: Sun, 2 Jun 2013 17:59:04 +0300 From: "Michael S. Tsirkin" Message-ID: <20130602145904.GA13977@redhat.com> References: <1369744094-21727-1-git-send-email-akong@redhat.com> <20130528225902.GA27056@morn.localdomain> <20130529023354.GA2432@t430s.nay.redhat.com> <20130602142945.GG24773@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130602142945.GG24773@redhat.com> Subject: Re: [Qemu-devel] [SeaBIOS] [SeaBIOS PATCH] boot: fix fw_dev_path pattern for q35-pcihost List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gleb Natapov Cc: pbonzini@redhat.com, Kevin O'Connor , Amos Kong , seabios@seabios.org, qemu-devel@nongnu.org On Sun, Jun 02, 2013 at 05:29:45PM +0300, Gleb Natapov wrote: > On Wed, May 29, 2013 at 10:33:54AM +0800, Amos Kong wrote: > > On Tue, May 28, 2013 at 06:59:02PM -0400, Kevin O'Connor wrote: > > > On Tue, May 28, 2013 at 08:28:14PM +0800, Amos Kong wrote: > > > > Bootindex string passed from qemu: > > > > /q35-pcihost@i0cf8/ethernet@2/ethernet-phy@0 > > > > > > > > We match pci domain by "/pci@i0cf8" in SeaBIOS, but fw_dev_path prefix > > > > of q35 is "/q35-pcihost@i0cf8". So bootindex in qemu commandline > > > > doesn't work if it uses q35 machine type. > > > > > > > > This patch fixes the pattern to match both original pc-i440fx & q35 > > > > > > > > Signed-off-by: Amos Kong > > > > --- > > > > src/boot.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/src/boot.c b/src/boot.c > > > > index cd9d784..f30d47e 100644 > > > > --- a/src/boot.c > > > > +++ b/src/boot.c > > > > @@ -97,7 +97,7 @@ find_prio(const char *glob) > > > > return -1; > > > > } > > > > > > > > -#define FW_PCI_DOMAIN "/pci@i0cf8" > > > > +#define FW_PCI_DOMAIN "/*pci*@i0cf8" > > > > > > The seabios pattern matching code isn't that sophisticated - I think > > > this could end up doing something unexpected. Why does it need to > > > change? > > > > If we start a guest with default machine type (pc-i440fx), the prefix > > of bootindex string is "/pci@i0cf8", if we start guest with -M q35, > > the prefix will become "/q35-pcihost@i0cf8". > > > > We only match "/pci@i0cf8" in seabios, it causes boot priority of q35 > > devices could not be changed. > > > > We could not change TYPE_Q35_HOST_DEVICE to 'pci' in qemu to adapt > > seabios, so fix the pattern. > > > Why couldn't we? QEMU not been able to generate proper device string is > QEMU bug. > > -- > Gleb. I applied a patch that does just that.