qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gonglei <arei.gonglei@huawei.com>
Subject: [Qemu-devel] [PULL 03/21] vhost-scsi: add bootindex property
Date: Mon, 16 Feb 2015 19:17:44 +0100	[thread overview]
Message-ID: <1424110682-14334-4-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1424110682-14334-1-git-send-email-pbonzini@redhat.com>

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

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.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) \
-- 
2.3.0

  parent reply	other threads:[~2015-02-16 18:18 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-16 18:17 [Qemu-devel] [PULL 00/21] SCSI, RCU, KVM changes for 2015-02-16 Paolo Bonzini
2015-02-16 18:17 ` [Qemu-devel] [PULL 01/21] kvm_stat: Add kvm_exit reasons for aarch64 Paolo Bonzini
2015-02-16 18:17 ` [Qemu-devel] [PULL 02/21] qdev: support to get a device firmware path directly Paolo Bonzini
2015-02-16 18:17 ` Paolo Bonzini [this message]
2015-02-16 18:17 ` [Qemu-devel] [PULL 04/21] vhost-scsi: expose the TYPE_FW_PATH_PROVIDER interface Paolo Bonzini
2015-02-16 18:17 ` [Qemu-devel] [PULL 05/21] vhost-scsi: add a property for booting Paolo Bonzini
2015-02-16 18:17 ` [Qemu-devel] [PULL 06/21] vhost-scsi: set the bootable value of channel/target/lun Paolo Bonzini
2015-02-16 18:17 ` [Qemu-devel] [PULL 07/21] rcu: do not let RCU callbacks pile up indefinitely Paolo Bonzini
2015-02-16 18:17 ` [Qemu-devel] [PULL 08/21] rcu: run RCU callbacks under the BQL Paolo Bonzini
2015-02-25 17:16   ` Leon Alrae
2015-02-26 11:35     ` Paolo Bonzini
2015-02-26 13:40       ` Leon Alrae
2015-02-26 14:39         ` Paolo Bonzini
     [not found]           ` <54EF30AD.9040302@redhat.com>
     [not found]             ` <54EF425A.8010204@imgtec.com>
     [not found]               ` <1644893486.26759341.1424978182441.JavaMail.zimbra@zmail13.collab.prod.int.phx2.redhat.com>
     [not found]                 ` <54F03A7D.90401@imgtec.com>
     [not found]                   ` <54F06E59.2080609@redhat.com>
     [not found]                     ` <54F07E28.6090004@imgtec.com>
2015-02-27 18:27                       ` Paolo Bonzini
2015-02-16 18:17 ` [Qemu-devel] [PULL 09/21] memory: keep the owner of the AddressSpace alive until do_address_space_destroy Paolo Bonzini
2015-02-16 18:17 ` [Qemu-devel] [PULL 10/21] pcie: remove mmconfig memory leak and wrap mmconfig update with transaction Paolo Bonzini
2015-02-16 18:17 ` [Qemu-devel] [PULL 11/21] pci: split shpc_cleanup and shpc_free Paolo Bonzini
2015-02-16 18:17 ` [Qemu-devel] [PULL 12/21] docs: clarify memory region lifecycle Paolo Bonzini
2015-02-16 18:17 ` [Qemu-devel] [PULL 13/21] exec: introduce cpu_reload_memory_map Paolo Bonzini
2015-02-16 18:17 ` [Qemu-devel] [PULL 14/21] exec: make iotlb RCU-friendly Paolo Bonzini
2015-02-16 18:17 ` [Qemu-devel] [PULL 15/21] exec: RCUify AddressSpaceDispatch Paolo Bonzini
2015-02-16 18:17 ` [Qemu-devel] [PULL 16/21] rcu: introduce RCU-enabled QLIST Paolo Bonzini
2015-02-16 18:17 ` [Qemu-devel] [PULL 17/21] rcu: add g_free_rcu Paolo Bonzini
2015-02-16 18:17 ` [Qemu-devel] [PULL 18/21] exec: protect mru_block with RCU Paolo Bonzini
2015-02-16 18:18 ` [Qemu-devel] [PULL 19/21] cosmetic changes preparing for the following patches Paolo Bonzini
2015-02-16 18:18 ` [Qemu-devel] [PULL 20/21] exec: convert ram_list to QLIST Paolo Bonzini
2015-02-16 18:18 ` [Qemu-devel] [PULL 21/21] Convert ram_list to RCU Paolo Bonzini
2015-02-25 11:01 ` [Qemu-devel] [PULL 00/21] SCSI, RCU, KVM changes for 2015-02-16 Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1424110682-14334-4-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=arei.gonglei@huawei.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).