vhost-scsi: fix wrong vhost-scsi firmware path
authorGonglei <arei.gonglei@huawei.com>
Wed, 26 Aug 2015 01:52:51 +0000 (09:52 +0800)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Sun, 18 Oct 2015 04:15:39 +0000 (23:15 -0500)
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>
Message-Id: <1440553971-11108-1-git-send-email-arei.gonglei@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit f42bf6a262ab5923a1a3bc8f731b830396937c47)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/scsi/vhost-scsi.c

index a69918b..62d9100 100644 (file)
@@ -291,7 +291,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);
 }