[SeaBIOS] [PATCH] boot: fix path pattern of scsi device

Paolo Bonzini pbonzini at redhat.com
Tue May 28 10:06:51 CEST 2013


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 at i0cf8/scsi at 4/virtio-scsi-device/channel at 0/disk at 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 at nongnu.org when sending the QEMU patch.

Thanks,

Paolo

> Signed-off-by: Amos Kong <akong at redhat.com>
> ---
>  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 at i0cf8/scsi at 5/channel at 0/disk at 1,0
> +    /* Find scsi drive - for example:
> +       /pci at i0cf8/scsi at 5/virtio-scsi-device/channel at 0/disk at 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);
>  }
>  
> 




More information about the SeaBIOS mailing list