From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhEw5-0005UN-Rs for qemu-devel@nongnu.org; Tue, 28 May 2013 04:07:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhEvu-0004a7-4K for qemu-devel@nongnu.org; Tue, 28 May 2013 04:07:13 -0400 Received: from mail-ee0-f46.google.com ([74.125.83.46]:63619) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhEvt-0004Zv-Ua for qemu-devel@nongnu.org; Tue, 28 May 2013 04:07:02 -0400 Received: by mail-ee0-f46.google.com with SMTP id e49so4326288eek.5 for ; Tue, 28 May 2013 01:07:01 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <51A4659B.8060601@redhat.com> Date: Tue, 28 May 2013 10:06:51 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1369726806-9715-1-git-send-email-akong@redhat.com> In-Reply-To: <1369726806-9715-1-git-send-email-akong@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] boot: fix path pattern of scsi device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong Cc: kevin@koconnor.net, seabios@seabios.org, qemu-devel@nongnu.org, =?ISO-8859-1?Q?KONRAD_Fr=E9d=E9ric?= Il 28/05/2013 09:40, Amos Kong ha scritto: > bootindex parameter of scsi device doesn't work, it causes > by wrong pattern in seabios. > > qemu passes the following firmware dev_path to seabios: > /pci@i0cf8/scsi@4/virtio-scsi-device/channel@0/disk@0,0 No, this is another unexpected change due to the virtio refactoring in QEMU. The right fix is in QEMU, by adding a get_fw_dev_path implementation in hw/virtio/virtio-bus.c. We fixed it already for migration paths, it should be easy to do the same for this. Please Cc qemu-stable@nongnu.org when sending the QEMU patch. Thanks, Paolo > Signed-off-by: Amos Kong > --- > src/boot.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/src/boot.c b/src/boot.c > index c308602..cd9d784 100644 > --- a/src/boot.c > +++ b/src/boot.c > @@ -138,10 +138,11 @@ int bootprio_find_scsi_device(struct pci_device *pci, int target, int lun) > if (!pci) > // support only pci machine for now > return -1; > - // Find scsi drive - for example: /pci@i0cf8/scsi@5/channel@0/disk@1,0 > + /* Find scsi drive - for example: > + /pci@i0cf8/scsi@5/virtio-scsi-device/channel@0/disk@1,0 */ > char desc[256], *p; > p = build_pci_path(desc, sizeof(desc), "*", pci); > - snprintf(p, desc+sizeof(desc)-p, "/*@0/*@%d,%d", target, lun); > + snprintf(p, desc+sizeof(desc)-p, "/*/*@0/*@%d,%d", target, lun); > return find_prio(desc); > } > >