diff mbox

vhost-scsi: fix wrong vhost-scsi firmware path

Message ID 1440553971-11108-1-git-send-email-arei.gonglei@huawei.com
State New
Headers show

Commit Message

Gonglei (Arei) Aug. 26, 2015, 1:52 a.m. UTC
From: Gonglei <arei.gonglei@huawei.com>

vhost-scsi bootindex does't work because Qemu passes
wrong fireware path to seabios.

before:
  /pci@i0cf8/scsi@7channel@0/vhost-scsi@0,0
after applying the patch:
  /pci@i0cf8/scsi@7/channel@0/vhost-scsi@0,0

Reported-by: Subo <subo7@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
---
 hw/scsi/vhost-scsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Gonglei (Arei) Aug. 26, 2015, 1:56 a.m. UTC | #1
On 2015/8/26 9:52, arei.gonglei@huawei.com wrote:
> From: Gonglei <arei.gonglei@huawei.com>
> 
> vhost-scsi bootindex does't work because Qemu passes
> wrong fireware path to seabios.
> 
> before:
>   /pci@i0cf8/scsi@7channel@0/vhost-scsi@0,0
> after applying the patch:
>   /pci@i0cf8/scsi@7/channel@0/vhost-scsi@0,0
> 
> Reported-by: Subo <subo7@huawei.com>
> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
> ---
>  hw/scsi/vhost-scsi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Cc: qemu-stable@nongnu.org

> diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
> index 7eacca9..bac9ddb 100644
> --- a/hw/scsi/vhost-scsi.c
> +++ b/hw/scsi/vhost-scsi.c
> @@ -292,7 +292,7 @@ static char *vhost_scsi_get_fw_dev_path(FWPathProvider *p, BusState *bus,
>  {
>      VHostSCSI *s = VHOST_SCSI(dev);
>      /* format: channel@channel/vhost-scsi@target,lun */
> -    return g_strdup_printf("channel@%x/%s@%x,%x", s->channel,
> +    return g_strdup_printf("/channel@%x/%s@%x,%x", s->channel,
>                             qdev_fw_name(dev), s->target, s->lun);
>  }
>  
>
Gonglei (Arei) Sept. 6, 2015, 7:10 a.m. UTC | #2
On 2015/8/26 9:52, arei.gonglei@huawei.com wrote:
> From: Gonglei <arei.gonglei@huawei.com>
> 
> vhost-scsi bootindex does't work because Qemu passes
> wrong fireware path to seabios.
> 
> before:
>   /pci@i0cf8/scsi@7channel@0/vhost-scsi@0,0
> after applying the patch:
>   /pci@i0cf8/scsi@7/channel@0/vhost-scsi@0,0
> 
> Reported-by: Subo <subo7@huawei.com>
> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
> ---
>  hw/scsi/vhost-scsi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
> index 7eacca9..bac9ddb 100644
> --- a/hw/scsi/vhost-scsi.c
> +++ b/hw/scsi/vhost-scsi.c
> @@ -292,7 +292,7 @@ static char *vhost_scsi_get_fw_dev_path(FWPathProvider *p, BusState *bus,
>  {
>      VHostSCSI *s = VHOST_SCSI(dev);
>      /* format: channel@channel/vhost-scsi@target,lun */
> -    return g_strdup_printf("channel@%x/%s@%x,%x", s->channel,
> +    return g_strdup_printf("/channel@%x/%s@%x,%x", s->channel,
>                             qdev_fw_name(dev), s->target, s->lun);
>  }
>  
> 

Ping...
Paolo Bonzini Sept. 7, 2015, 4:18 p.m. UTC | #3
On 26/08/2015 03:52, arei.gonglei@huawei.com wrote:
> From: Gonglei <arei.gonglei@huawei.com>
> 
> vhost-scsi bootindex does't work because Qemu passes
> wrong fireware path to seabios.
> 
> before:
>   /pci@i0cf8/scsi@7channel@0/vhost-scsi@0,0
> after applying the patch:
>   /pci@i0cf8/scsi@7/channel@0/vhost-scsi@0,0
> 
> Reported-by: Subo <subo7@huawei.com>
> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
> ---
>  hw/scsi/vhost-scsi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
> index 7eacca9..bac9ddb 100644
> --- a/hw/scsi/vhost-scsi.c
> +++ b/hw/scsi/vhost-scsi.c
> @@ -292,7 +292,7 @@ static char *vhost_scsi_get_fw_dev_path(FWPathProvider *p, BusState *bus,
>  {
>      VHostSCSI *s = VHOST_SCSI(dev);
>      /* format: channel@channel/vhost-scsi@target,lun */
> -    return g_strdup_printf("channel@%x/%s@%x,%x", s->channel,
> +    return g_strdup_printf("/channel@%x/%s@%x,%x", s->channel,
>                             qdev_fw_name(dev), s->target, s->lun);
>  }
>  
> 

I was on vacation. :)  Thanks, I applied this now.

Paolo
diff mbox

Patch

diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index 7eacca9..bac9ddb 100644
--- a/hw/scsi/vhost-scsi.c
+++ b/hw/scsi/vhost-scsi.c
@@ -292,7 +292,7 @@  static char *vhost_scsi_get_fw_dev_path(FWPathProvider *p, BusState *bus,
 {
     VHostSCSI *s = VHOST_SCSI(dev);
     /* format: channel@channel/vhost-scsi@target,lun */
-    return g_strdup_printf("channel@%x/%s@%x,%x", s->channel,
+    return g_strdup_printf("/channel@%x/%s@%x,%x", s->channel,
                            qdev_fw_name(dev), s->target, s->lun);
 }