All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/5] vhost-scsi: support to assign boot order
@ 2015-01-29  7:08 arei.gonglei
  2015-01-29  7:08 ` [Qemu-devel] [PATCH v2 1/5] qdev: support to get a device firmware path directly arei.gonglei
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: arei.gonglei @ 2015-01-29  7:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: weidong.huang, subo7, mst, peter.huangpeng, Gonglei, pbonzini

From: Gonglei <arei.gonglei@huawei.com>

Qemu haven't provide a bootindex property for vhost-scsi device.
So, we can not assign the boot order for it at present. But
Some clients/users have requirements for that in some scenarios.
This patch achieve the aim in Qemu side.

Because Qemu only accept an wwpn argument for vhost-scsi, we
cannot assign a tpgt. That's say tpg is transparent for Qemu, Qemu
doesn't know which tpg can boot, but vhost-scsi driver module
doesn't know too for one assigned wwpn.
    
At present, we assume that the first tpg can boot only, and add
a boot_tpgt property that defaults to 0. Of course, people can
pass a valid value by qemu command line.

v2 -> v1: (Thanks to Paolo's suggestion)
 - change calling  qdev_get_own_fw_dev_path_from_handler in
   get_boot_devices_list, and convert non-NULL suffixes to
   implementations of FWPathProvider in Patch 1. (Paolo)
 - add a boot_tpgt property for vhost-scsi in Patch 4. (Paolo)
 - remove the ioctl calling in Patch 4, because the kernel
   patch hasn't been accepted.

kernel patch:
[PATCH] vhost-scsi: introduce an ioctl to get the minimum tpgt
http://news.gmane.org/gmane.comp.emulators.kvm.devel

Gonglei (5):
  qdev: support to get a device firmware path directly
  vhost-scsi: add bootindex property
  vhost-scsi: realize the TYPE_FW_PATH_PROVIDER interface
  vhost-scsi: add a property for booting
  vhost-scsi: set the bootable value of channel/target/lun

 bootdevice.c                    | 31 +++++++++++++++++--------------
 hw/core/qdev.c                  |  7 +++++++
 hw/scsi/vhost-scsi.c            | 35 +++++++++++++++++++++++++++++++++++
 hw/virtio/virtio-pci.c          |  2 ++
 include/hw/qdev-core.h          |  1 +
 include/hw/virtio/vhost-scsi.h  |  5 +++++
 include/hw/virtio/virtio-scsi.h |  1 +
 7 files changed, 68 insertions(+), 14 deletions(-)

-- 
1.7.12.4

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PATCH v2 1/5] qdev: support to get a device firmware path directly
  2015-01-29  7:08 [Qemu-devel] [PATCH v2 0/5] vhost-scsi: support to assign boot order arei.gonglei
@ 2015-01-29  7:08 ` arei.gonglei
  2015-01-29  7:08 ` [Qemu-devel] [PATCH v2 2/5] vhost-scsi: add bootindex property arei.gonglei
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: arei.gonglei @ 2015-01-29  7:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: weidong.huang, subo7, mst, peter.huangpeng, Gonglei, pbonzini

From: Gonglei <arei.gonglei@huawei.com>

commit 6b1566c (qdev: Introduce FWPathProvider interface) did a
good job for supproting to get firmware path on some different
architectures.

Moreover further more, we can use the interface to get firmware
path name for a device which isn't attached a specific bus,
such as virtio-bus, scsi-bus etc.

When the device (such as vhost-scsi) realize the TYPE_FW_PATH_PROVIDER
interface, we should introduce a new function to get the correct firmware
path name for it.

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 bootdevice.c           | 31 +++++++++++++++++--------------
 hw/core/qdev.c         |  7 +++++++
 include/hw/qdev-core.h |  1 +
 3 files changed, 25 insertions(+), 14 deletions(-)

diff --git a/bootdevice.c b/bootdevice.c
index 5914417..c3a010c 100644
--- a/bootdevice.c
+++ b/bootdevice.c
@@ -210,7 +210,9 @@ char *get_boot_devices_list(size_t *size, bool ignore_suffixes)
     char *list = NULL;
 
     QTAILQ_FOREACH(i, &fw_boot_order, link) {
-        char *devpath = NULL, *bootpath;
+        char *devpath = NULL,  *suffix = NULL;
+        char *bootpath;
+        char *d;
         size_t len;
 
         if (i->dev) {
@@ -218,21 +220,22 @@ char *get_boot_devices_list(size_t *size, bool ignore_suffixes)
             assert(devpath);
         }
 
-        if (i->suffix && !ignore_suffixes && devpath) {
-            size_t bootpathlen = strlen(devpath) + strlen(i->suffix) + 1;
-
-            bootpath = g_malloc(bootpathlen);
-            snprintf(bootpath, bootpathlen, "%s%s", devpath, i->suffix);
-            g_free(devpath);
-        } else if (devpath) {
-            bootpath = devpath;
-        } else if (!ignore_suffixes) {
-            assert(i->suffix);
-            bootpath = g_strdup(i->suffix);
-        } else {
-            bootpath = g_strdup("");
+        if (!ignore_suffixes) {
+            d = qdev_get_own_fw_dev_path_from_handler(i->dev->parent_bus, i->dev);
+            if (d) {
+                assert(!i->suffix);
+                suffix = d;
+            } else {
+                suffix = g_strdup(i->suffix);
+            }
         }
 
+        bootpath = g_strdup_printf("%s%s",
+                                   devpath ? devpath : "",
+                                   suffix ? suffix : "");
+        g_free(devpath);
+        g_free(suffix);
+
         if (total) {
             list[total-1] = '\n';
         }
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 2eacac0..44c6b93 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -818,6 +818,13 @@ static char *qdev_get_fw_dev_path_from_handler(BusState *bus, DeviceState *dev)
     return d;
 }
 
+char *qdev_get_own_fw_dev_path_from_handler(BusState *bus, DeviceState *dev)
+{
+    Object *obj = OBJECT(dev);
+
+    return fw_path_provider_try_get_dev_path(obj, bus, dev);
+}
+
 static int qdev_get_fw_dev_path_helper(DeviceState *dev, char *p, int size)
 {
     int l = 0;
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index 15a226f..4e673f9 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -342,6 +342,7 @@ void qbus_reset_all_fn(void *opaque);
 BusState *sysbus_get_default(void);
 
 char *qdev_get_fw_dev_path(DeviceState *dev);
+char *qdev_get_own_fw_dev_path_from_handler(BusState *bus, DeviceState *dev);
 
 /**
  * @qdev_machine_init
-- 
1.7.12.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PATCH v2 2/5] vhost-scsi: add bootindex property
  2015-01-29  7:08 [Qemu-devel] [PATCH v2 0/5] vhost-scsi: support to assign boot order arei.gonglei
  2015-01-29  7:08 ` [Qemu-devel] [PATCH v2 1/5] qdev: support to get a device firmware path directly arei.gonglei
@ 2015-01-29  7:08 ` arei.gonglei
  2015-01-29  7:08 ` [Qemu-devel] [PATCH v2 3/5] vhost-scsi: realize the TYPE_FW_PATH_PROVIDER interface arei.gonglei
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: arei.gonglei @ 2015-01-29  7:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: weidong.huang, subo7, mst, peter.huangpeng, Gonglei, pbonzini

From: Gonglei <arei.gonglei@huawei.com>

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
---
 hw/scsi/vhost-scsi.c           | 9 +++++++++
 hw/virtio/virtio-pci.c         | 2 ++
 include/hw/virtio/vhost-scsi.h | 1 +
 3 files changed, 12 insertions(+)

diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index dcb2bc5..9c4f613 100644
--- a/hw/scsi/vhost-scsi.c
+++ b/hw/scsi/vhost-scsi.c
@@ -290,11 +290,20 @@ static void vhost_scsi_class_init(ObjectClass *klass, void *data)
     vdc->set_status = vhost_scsi_set_status;
 }
 
+static void vhost_scsi_instance_init(Object *obj)
+{
+    VHostSCSI *dev = VHOST_SCSI(obj);
+
+    device_add_bootindex_property(obj, &dev->bootindex, "bootindex", NULL,
+                                  DEVICE(dev), NULL);
+}
+
 static const TypeInfo vhost_scsi_info = {
     .name = TYPE_VHOST_SCSI,
     .parent = TYPE_VIRTIO_SCSI_COMMON,
     .instance_size = sizeof(VHostSCSI),
     .class_init = vhost_scsi_class_init,
+    .instance_init = vhost_scsi_instance_init,
 };
 
 static void virtio_register_types(void)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index dde1d73..604cb5b 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1238,6 +1238,8 @@ static void vhost_scsi_pci_instance_init(Object *obj)
 
     virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
                                 TYPE_VHOST_SCSI);
+    object_property_add_alias(obj, "bootindex", OBJECT(&dev->vdev),
+                              "bootindex", &error_abort);
 }
 
 static const TypeInfo vhost_scsi_pci_info = {
diff --git a/include/hw/virtio/vhost-scsi.h b/include/hw/virtio/vhost-scsi.h
index 85cc031..ed50289 100644
--- a/include/hw/virtio/vhost-scsi.h
+++ b/include/hw/virtio/vhost-scsi.h
@@ -60,6 +60,7 @@ typedef struct VHostSCSI {
     Error *migration_blocker;
 
     struct vhost_dev dev;
+    int32_t bootindex;
 } VHostSCSI;
 
 #define DEFINE_VHOST_SCSI_PROPERTIES(_state, _conf_field) \
-- 
1.7.12.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PATCH v2 3/5] vhost-scsi: realize the TYPE_FW_PATH_PROVIDER interface
  2015-01-29  7:08 [Qemu-devel] [PATCH v2 0/5] vhost-scsi: support to assign boot order arei.gonglei
  2015-01-29  7:08 ` [Qemu-devel] [PATCH v2 1/5] qdev: support to get a device firmware path directly arei.gonglei
  2015-01-29  7:08 ` [Qemu-devel] [PATCH v2 2/5] vhost-scsi: add bootindex property arei.gonglei
@ 2015-01-29  7:08 ` arei.gonglei
  2015-01-29  7:08 ` [Qemu-devel] [PATCH v2 4/5] vhost-scsi: add a property for booting arei.gonglei
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: arei.gonglei @ 2015-01-29  7:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: weidong.huang, subo7, mst, peter.huangpeng, Gonglei, pbonzini

From: Gonglei <arei.gonglei@huawei.com>

In the way, we can make the bootindex property take effect.
At the meanwhile, the firmware path name of vhost-scsi is
"channel@channel/vhost-scsi@target,lun".

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
---
 hw/scsi/vhost-scsi.c           | 20 ++++++++++++++++++++
 include/hw/virtio/vhost-scsi.h |  3 +++
 2 files changed, 23 insertions(+)

diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index 9c4f613..dc9076e 100644
--- a/hw/scsi/vhost-scsi.c
+++ b/hw/scsi/vhost-scsi.c
@@ -24,6 +24,7 @@
 #include "hw/virtio/virtio-scsi.h"
 #include "hw/virtio/virtio-bus.h"
 #include "hw/virtio/virtio-access.h"
+#include "hw/fw-path-provider.h"
 
 /* Features supported by host kernel. */
 static const int kernel_feature_bits[] = {
@@ -271,6 +272,19 @@ static void vhost_scsi_unrealize(DeviceState *dev, Error **errp)
     virtio_scsi_common_unrealize(dev, errp);
 }
 
+/*
+ * Implementation of an interface to adjust firmware path
+ * for the bootindex property handling.
+ */
+static char *vhost_scsi_get_fw_dev_path(FWPathProvider *p, BusState *bus,
+                                        DeviceState *dev)
+{
+    VHostSCSI *s = VHOST_SCSI(dev);
+    /* format: channel@channel/vhost-scsi@target,lun */
+    return g_strdup_printf("channel@%x/%s@%x,%x", s->channel,
+                           qdev_fw_name(dev), s->target, s->lun);
+}
+
 static Property vhost_scsi_properties[] = {
     DEFINE_VHOST_SCSI_PROPERTIES(VHostSCSI, parent_obj.conf),
     DEFINE_PROP_END_OF_LIST(),
@@ -280,6 +294,7 @@ static void vhost_scsi_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
     VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
+    FWPathProviderClass *fwc = FW_PATH_PROVIDER_CLASS(klass);
 
     dc->props = vhost_scsi_properties;
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
@@ -288,6 +303,7 @@ static void vhost_scsi_class_init(ObjectClass *klass, void *data)
     vdc->get_features = vhost_scsi_get_features;
     vdc->set_config = vhost_scsi_set_config;
     vdc->set_status = vhost_scsi_set_status;
+    fwc->get_dev_path = vhost_scsi_get_fw_dev_path;
 }
 
 static void vhost_scsi_instance_init(Object *obj)
@@ -304,6 +320,10 @@ static const TypeInfo vhost_scsi_info = {
     .instance_size = sizeof(VHostSCSI),
     .class_init = vhost_scsi_class_init,
     .instance_init = vhost_scsi_instance_init,
+    .interfaces = (InterfaceInfo[]) {
+        { TYPE_FW_PATH_PROVIDER },
+        { }
+    },
 };
 
 static void virtio_register_types(void)
diff --git a/include/hw/virtio/vhost-scsi.h b/include/hw/virtio/vhost-scsi.h
index ed50289..c0056c2 100644
--- a/include/hw/virtio/vhost-scsi.h
+++ b/include/hw/virtio/vhost-scsi.h
@@ -61,6 +61,9 @@ typedef struct VHostSCSI {
 
     struct vhost_dev dev;
     int32_t bootindex;
+    int channel;
+    int target;
+    int lun;
 } VHostSCSI;
 
 #define DEFINE_VHOST_SCSI_PROPERTIES(_state, _conf_field) \
-- 
1.7.12.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PATCH v2 4/5] vhost-scsi: add a property for booting
  2015-01-29  7:08 [Qemu-devel] [PATCH v2 0/5] vhost-scsi: support to assign boot order arei.gonglei
                   ` (2 preceding siblings ...)
  2015-01-29  7:08 ` [Qemu-devel] [PATCH v2 3/5] vhost-scsi: realize the TYPE_FW_PATH_PROVIDER interface arei.gonglei
@ 2015-01-29  7:08 ` arei.gonglei
  2015-01-29  7:08 ` [Qemu-devel] [PATCH v2 5/5] vhost-scsi: set the bootable value of channel/target/lun arei.gonglei
  2015-02-03  8:55 ` [Qemu-devel] [PATCH v2 0/5] vhost-scsi: support to assign boot order Gonglei
  5 siblings, 0 replies; 13+ messages in thread
From: arei.gonglei @ 2015-01-29  7:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: weidong.huang, subo7, mst, peter.huangpeng, Gonglei, pbonzini

From: Gonglei <arei.gonglei@huawei.com>

Because Qemu only accept an wwpn argument for vhost-scsi, we
cannot assign a tpgt. That's say tpg is transparent for Qemu, Qemu
doesn't know which tpg can boot, but vhost-scsi driver module
doesn't know too for one assigned wwpn.

At present, we assume that the first tpg can boot only, and add
a boot_tpgt property that defaults to 0. Of course, people can
pass a valid value by qemu command line.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
---
 include/hw/virtio/vhost-scsi.h  | 1 +
 include/hw/virtio/virtio-scsi.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/include/hw/virtio/vhost-scsi.h b/include/hw/virtio/vhost-scsi.h
index c0056c2..dea0075 100644
--- a/include/hw/virtio/vhost-scsi.h
+++ b/include/hw/virtio/vhost-scsi.h
@@ -69,6 +69,7 @@ typedef struct VHostSCSI {
 #define DEFINE_VHOST_SCSI_PROPERTIES(_state, _conf_field) \
     DEFINE_PROP_STRING("vhostfd", _state, _conf_field.vhostfd), \
     DEFINE_PROP_STRING("wwpn", _state, _conf_field.wwpn), \
+    DEFINE_PROP_UINT32("boot_tpgt", _state, _conf_field.boot_tpgt, 0), \
     DEFINE_PROP_UINT32("num_queues", _state, _conf_field.num_queues, 1), \
     DEFINE_PROP_UINT32("max_sectors", _state, _conf_field.max_sectors, 0xFFFF), \
     DEFINE_PROP_UINT32("cmd_per_lun", _state, _conf_field.cmd_per_lun, 128)
diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scsi.h
index bf17cc9..c122e7a 100644
--- a/include/hw/virtio/virtio-scsi.h
+++ b/include/hw/virtio/virtio-scsi.h
@@ -153,6 +153,7 @@ struct VirtIOSCSIConf {
     uint32_t cmd_per_lun;
     char *vhostfd;
     char *wwpn;
+    uint32_t boot_tpgt;
     IOThread *iothread;
 };
 
-- 
1.7.12.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PATCH v2 5/5] vhost-scsi: set the bootable value of channel/target/lun
  2015-01-29  7:08 [Qemu-devel] [PATCH v2 0/5] vhost-scsi: support to assign boot order arei.gonglei
                   ` (3 preceding siblings ...)
  2015-01-29  7:08 ` [Qemu-devel] [PATCH v2 4/5] vhost-scsi: add a property for booting arei.gonglei
@ 2015-01-29  7:08 ` arei.gonglei
  2015-02-03  8:55 ` [Qemu-devel] [PATCH v2 0/5] vhost-scsi: support to assign boot order Gonglei
  5 siblings, 0 replies; 13+ messages in thread
From: arei.gonglei @ 2015-01-29  7:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: weidong.huang, subo7, mst, peter.huangpeng, Gonglei, pbonzini

From: Gonglei <arei.gonglei@huawei.com>

At present, the target is valued boot_tpgt, In addition,
channel and lun both are 0 for bootable vhost-scsi device.

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Bo Su <subo7@huawei.com>
---
 hw/scsi/vhost-scsi.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index dc9076e..e30ff84 100644
--- a/hw/scsi/vhost-scsi.c
+++ b/hw/scsi/vhost-scsi.c
@@ -251,6 +251,12 @@ static void vhost_scsi_realize(DeviceState *dev, Error **errp)
         return;
     }
 
+    /* At present, channel and lun both are 0 for bootable vhost-scsi disk */
+    s->channel = 0;
+    s->lun = 0;
+    /* Note: we can also get the minimum tpgt from kernel */
+    s->target = vs->conf.boot_tpgt;
+
     error_setg(&s->migration_blocker,
             "vhost-scsi does not support migration");
     migrate_add_blocker(s->migration_blocker);
-- 
1.7.12.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/5] vhost-scsi: support to assign boot order
  2015-01-29  7:08 [Qemu-devel] [PATCH v2 0/5] vhost-scsi: support to assign boot order arei.gonglei
                   ` (4 preceding siblings ...)
  2015-01-29  7:08 ` [Qemu-devel] [PATCH v2 5/5] vhost-scsi: set the bootable value of channel/target/lun arei.gonglei
@ 2015-02-03  8:55 ` Gonglei
  2015-02-03 11:11   ` Paolo Bonzini
  5 siblings, 1 reply; 13+ messages in thread
From: Gonglei @ 2015-02-03  8:55 UTC (permalink / raw)
  To: Gonglei (Arei)
  Cc: Huangweidong (C), Subo (A), mst, qemu-devel, Huangpeng (Peter), pbonzini

On 2015/1/29 15:08, Gonglei (Arei) wrote:

> From: Gonglei <arei.gonglei@huawei.com>
> 
> Qemu haven't provide a bootindex property for vhost-scsi device.
> So, we can not assign the boot order for it at present. But
> Some clients/users have requirements for that in some scenarios.
> This patch achieve the aim in Qemu side.
> 
> Because Qemu only accept an wwpn argument for vhost-scsi, we
> cannot assign a tpgt. That's say tpg is transparent for Qemu, Qemu
> doesn't know which tpg can boot, but vhost-scsi driver module
> doesn't know too for one assigned wwpn.
>     
> At present, we assume that the first tpg can boot only, and add
> a boot_tpgt property that defaults to 0. Of course, people can
> pass a valid value by qemu command line.
> 

Ping...

> v2 -> v1: (Thanks to Paolo's suggestion)
>  - change calling  qdev_get_own_fw_dev_path_from_handler in
>    get_boot_devices_list, and convert non-NULL suffixes to
>    implementations of FWPathProvider in Patch 1. (Paolo)
>  - add a boot_tpgt property for vhost-scsi in Patch 4. (Paolo)
>  - remove the ioctl calling in Patch 4, because the kernel
>    patch hasn't been accepted.
> 
> kernel patch:
> [PATCH] vhost-scsi: introduce an ioctl to get the minimum tpgt
> http://news.gmane.org/gmane.comp.emulators.kvm.devel
> 

> Gonglei (5):
>   qdev: support to get a device firmware path directly
>   vhost-scsi: add bootindex property
>   vhost-scsi: realize the TYPE_FW_PATH_PROVIDER interface
>   vhost-scsi: add a property for booting
>   vhost-scsi: set the bootable value of channel/target/lun
> 
>  bootdevice.c                    | 31 +++++++++++++++++--------------
>  hw/core/qdev.c                  |  7 +++++++
>  hw/scsi/vhost-scsi.c            | 35 +++++++++++++++++++++++++++++++++++
>  hw/virtio/virtio-pci.c          |  2 ++
>  include/hw/qdev-core.h          |  1 +
>  include/hw/virtio/vhost-scsi.h  |  5 +++++
>  include/hw/virtio/virtio-scsi.h |  1 +
>  7 files changed, 68 insertions(+), 14 deletions(-)
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/5] vhost-scsi: support to assign boot order
  2015-02-03  8:55 ` [Qemu-devel] [PATCH v2 0/5] vhost-scsi: support to assign boot order Gonglei
@ 2015-02-03 11:11   ` Paolo Bonzini
  2015-02-03 11:27     ` Gonglei
  0 siblings, 1 reply; 13+ messages in thread
From: Paolo Bonzini @ 2015-02-03 11:11 UTC (permalink / raw)
  To: Gonglei; +Cc: mst, Huangweidong (C), qemu-devel, Subo (A), Huangpeng (Peter)



On 03/02/2015 09:55, Gonglei wrote:
> On 2015/1/29 15:08, Gonglei (Arei) wrote:
> 
>> From: Gonglei <arei.gonglei@huawei.com>
>>
>> Qemu haven't provide a bootindex property for vhost-scsi device.
>> So, we can not assign the boot order for it at present. But
>> Some clients/users have requirements for that in some scenarios.
>> This patch achieve the aim in Qemu side.
>>
>> Because Qemu only accept an wwpn argument for vhost-scsi, we
>> cannot assign a tpgt. That's say tpg is transparent for Qemu, Qemu
>> doesn't know which tpg can boot, but vhost-scsi driver module
>> doesn't know too for one assigned wwpn.
>>     
>> At present, we assume that the first tpg can boot only, and add
>> a boot_tpgt property that defaults to 0. Of course, people can
>> pass a valid value by qemu command line.
>>
> 
> Ping...

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/5] vhost-scsi: support to assign boot order
  2015-02-03 11:11   ` Paolo Bonzini
@ 2015-02-03 11:27     ` Gonglei
  2015-02-05  8:51       ` Gonglei
  0 siblings, 1 reply; 13+ messages in thread
From: Gonglei @ 2015-02-03 11:27 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: mst, Huangweidong (C), qemu-devel, Subo (A), Huangpeng (Peter)

On 2015/2/3 19:11, Paolo Bonzini wrote:

> 
> 
> On 03/02/2015 09:55, Gonglei wrote:
>> On 2015/1/29 15:08, Gonglei (Arei) wrote:
>>
>>> From: Gonglei <arei.gonglei@huawei.com>
>>>
>>> Qemu haven't provide a bootindex property for vhost-scsi device.
>>> So, we can not assign the boot order for it at present. But
>>> Some clients/users have requirements for that in some scenarios.
>>> This patch achieve the aim in Qemu side.
>>>
>>> Because Qemu only accept an wwpn argument for vhost-scsi, we
>>> cannot assign a tpgt. That's say tpg is transparent for Qemu, Qemu
>>> doesn't know which tpg can boot, but vhost-scsi driver module
>>> doesn't know too for one assigned wwpn.
>>>     
>>> At present, we assume that the first tpg can boot only, and add
>>> a boot_tpgt property that defaults to 0. Of course, people can
>>> pass a valid value by qemu command line.
>>>
>>
>> Ping...
> 
> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

Thanks :)

Regards,
-Gonglei

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/5] vhost-scsi: support to assign boot order
  2015-02-03 11:27     ` Gonglei
@ 2015-02-05  8:51       ` Gonglei
  2015-02-05 11:10         ` Paolo Bonzini
  0 siblings, 1 reply; 13+ messages in thread
From: Gonglei @ 2015-02-05  8:51 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: mst, Huangweidong (C), qemu-devel, Subo (A), Huangpeng (Peter)

On 2015/2/3 19:27, Gonglei wrote:

> On 2015/2/3 19:11, Paolo Bonzini wrote:
> 
>>
>>
>> On 03/02/2015 09:55, Gonglei wrote:
>>> On 2015/1/29 15:08, Gonglei (Arei) wrote:
>>>
>>>> From: Gonglei <arei.gonglei@huawei.com>
>>>>
>>>> Qemu haven't provide a bootindex property for vhost-scsi device.
>>>> So, we can not assign the boot order for it at present. But
>>>> Some clients/users have requirements for that in some scenarios.
>>>> This patch achieve the aim in Qemu side.
>>>>
>>>> Because Qemu only accept an wwpn argument for vhost-scsi, we
>>>> cannot assign a tpgt. That's say tpg is transparent for Qemu, Qemu
>>>> doesn't know which tpg can boot, but vhost-scsi driver module
>>>> doesn't know too for one assigned wwpn.
>>>>     
>>>> At present, we assume that the first tpg can boot only, and add
>>>> a boot_tpgt property that defaults to 0. Of course, people can
>>>> pass a valid value by qemu command line.
>>>>
>>>
>>> Ping...
>>
>> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
> 
> Thanks :)
> 

Hi, Paolo and Michael

Which tree does this series can be applied, vhost tree or scsi tree? Thanks.

Regards,
-Gonglei

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/5] vhost-scsi: support to assign boot order
  2015-02-05  8:51       ` Gonglei
@ 2015-02-05 11:10         ` Paolo Bonzini
  2015-02-05 12:04           ` Michael S. Tsirkin
  0 siblings, 1 reply; 13+ messages in thread
From: Paolo Bonzini @ 2015-02-05 11:10 UTC (permalink / raw)
  To: Gonglei; +Cc: mst, Huangweidong (C), qemu-devel, Subo (A), Huangpeng (Peter)



On 05/02/2015 09:51, Gonglei wrote:
> Hi, Paolo and Michael
> 
> Which tree does this series can be applied, vhost tree or scsi tree? Thanks.

I can apply it to the scsi tree.

Paolo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/5] vhost-scsi: support to assign boot order
  2015-02-05 11:10         ` Paolo Bonzini
@ 2015-02-05 12:04           ` Michael S. Tsirkin
  2015-02-05 12:31             ` Gonglei
  0 siblings, 1 reply; 13+ messages in thread
From: Michael S. Tsirkin @ 2015-02-05 12:04 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Gonglei, Huangweidong (C), qemu-devel, Subo (A), Huangpeng (Peter)

On Thu, Feb 05, 2015 at 12:10:04PM +0100, Paolo Bonzini wrote:
> 
> 
> On 05/02/2015 09:51, Gonglei wrote:
> > Hi, Paolo and Michael
> > 
> > Which tree does this series can be applied, vhost tree or scsi tree? Thanks.
> 
> I can apply it to the scsi tree.
> 
> Paolo

Works for me
Acked-by: Michael S. Tsirkin <mst@redhat.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/5] vhost-scsi: support to assign boot order
  2015-02-05 12:04           ` Michael S. Tsirkin
@ 2015-02-05 12:31             ` Gonglei
  0 siblings, 0 replies; 13+ messages in thread
From: Gonglei @ 2015-02-05 12:31 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Paolo Bonzini, Huangweidong (C), qemu-devel, Subo (A), Huangpeng (Peter)

On 2015/2/5 20:04, Michael S. Tsirkin wrote:

> On Thu, Feb 05, 2015 at 12:10:04PM +0100, Paolo Bonzini wrote:
>>
>>
>> On 05/02/2015 09:51, Gonglei wrote:
>>> Hi, Paolo and Michael
>>>
>>> Which tree does this series can be applied, vhost tree or scsi tree? Thanks.
>>
>> I can apply it to the scsi tree.
>>
>> Paolo
> 
> Works for me
> Acked-by: Michael S. Tsirkin <mst@redhat.com>
> 

Thank you. :)

Regards,
-Gonglei

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-02-05 12:31 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-29  7:08 [Qemu-devel] [PATCH v2 0/5] vhost-scsi: support to assign boot order arei.gonglei
2015-01-29  7:08 ` [Qemu-devel] [PATCH v2 1/5] qdev: support to get a device firmware path directly arei.gonglei
2015-01-29  7:08 ` [Qemu-devel] [PATCH v2 2/5] vhost-scsi: add bootindex property arei.gonglei
2015-01-29  7:08 ` [Qemu-devel] [PATCH v2 3/5] vhost-scsi: realize the TYPE_FW_PATH_PROVIDER interface arei.gonglei
2015-01-29  7:08 ` [Qemu-devel] [PATCH v2 4/5] vhost-scsi: add a property for booting arei.gonglei
2015-01-29  7:08 ` [Qemu-devel] [PATCH v2 5/5] vhost-scsi: set the bootable value of channel/target/lun arei.gonglei
2015-02-03  8:55 ` [Qemu-devel] [PATCH v2 0/5] vhost-scsi: support to assign boot order Gonglei
2015-02-03 11:11   ` Paolo Bonzini
2015-02-03 11:27     ` Gonglei
2015-02-05  8:51       ` Gonglei
2015-02-05 11:10         ` Paolo Bonzini
2015-02-05 12:04           ` Michael S. Tsirkin
2015-02-05 12:31             ` Gonglei

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.