From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>, Fam Zheng <famz@redhat.com>
Subject: [Qemu-devel] [PULL 59/59] block: Always compile virtio-blk dataplane
Date: Fri, 19 Sep 2014 15:42:18 +0100 [thread overview]
Message-ID: <1411137738-31280-60-git-send-email-stefanha@redhat.com> (raw)
In-Reply-To: <1411137738-31280-1-git-send-email-stefanha@redhat.com>
From: Fam Zheng <famz@redhat.com>
Dataplane doesn't depend on linux-aio any more, so we don't need the
compiling condition now.
Configure options are kept but just print a message.
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1410329871-28885-4-git-send-email-famz@redhat.com
---
configure | 21 ++-------------------
hw/block/Makefile.objs | 2 +-
hw/block/virtio-blk.c | 20 ++------------------
hw/virtio/Makefile.objs | 2 +-
include/hw/virtio/virtio-blk.h | 2 --
5 files changed, 6 insertions(+), 41 deletions(-)
diff --git a/configure b/configure
index fb194fd..20e37a7 100755
--- a/configure
+++ b/configure
@@ -327,7 +327,6 @@ glusterfs=""
glusterfs_discard="no"
glusterfs_zerofill="no"
archipelago=""
-virtio_blk_data_plane=""
gtk=""
gtkabi=""
vte=""
@@ -1092,9 +1091,8 @@ for opt do
;;
--enable-archipelago) archipelago="yes"
;;
- --disable-virtio-blk-data-plane) virtio_blk_data_plane="no"
- ;;
- --enable-virtio-blk-data-plane) virtio_blk_data_plane="yes"
+ --disable-virtio-blk-data-plane|--enable-virtio-blk-data-plane)
+ echo "$0: $opt is obsolete, virtio-blk data-plane is always on" >&2
;;
--disable-gtk) gtk="no"
;;
@@ -2943,16 +2941,6 @@ else
fi
##########################################
-# adjust virtio-blk-data-plane based on linux-aio
-
-if test "$virtio_blk_data_plane" = "yes" -a \
- "$linux_aio" != "yes" ; then
- error_exit "virtio-blk-data-plane requires Linux AIO, please try --enable-linux-aio"
-elif test -z "$virtio_blk_data_plane" ; then
- virtio_blk_data_plane=$linux_aio
-fi
-
-##########################################
# attr probe
if test "$attr" != "no" ; then
@@ -4326,7 +4314,6 @@ echo "coroutine backend $coroutine"
echo "coroutine pool $coroutine_pool"
echo "GlusterFS support $glusterfs"
echo "Archipelago support $archipelago"
-echo "virtio-blk-data-plane $virtio_blk_data_plane"
echo "gcov $gcov_tool"
echo "gcov enabled $gcov"
echo "TPM support $tpm"
@@ -4788,10 +4775,6 @@ if test "$quorum" = "yes" ; then
echo "CONFIG_QUORUM=y" >> $config_host_mak
fi
-if test "$virtio_blk_data_plane" = "yes" ; then
- echo 'CONFIG_VIRTIO_BLK_DATA_PLANE=$(CONFIG_VIRTIO)' >> $config_host_mak
-fi
-
if test "$vhdx" = "yes" ; then
echo "CONFIG_VHDX=y" >> $config_host_mak
fi
diff --git a/hw/block/Makefile.objs b/hw/block/Makefile.objs
index bf46f03..d4c3ab7 100644
--- a/hw/block/Makefile.objs
+++ b/hw/block/Makefile.objs
@@ -12,4 +12,4 @@ common-obj-$(CONFIG_NVME_PCI) += nvme.o
obj-$(CONFIG_SH4) += tc58128.o
obj-$(CONFIG_VIRTIO) += virtio-blk.o
-obj-$(CONFIG_VIRTIO_BLK_DATA_PLANE) += dataplane/
+obj-$(CONFIG_VIRTIO) += dataplane/
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 38ad38f..45e0c8f 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -18,10 +18,8 @@
#include "hw/block/block.h"
#include "sysemu/blockdev.h"
#include "hw/virtio/virtio-blk.h"
-#ifdef CONFIG_VIRTIO_BLK_DATA_PLANE
-# include "dataplane/virtio-blk.h"
-# include "migration/migration.h"
-#endif
+#include "dataplane/virtio-blk.h"
+#include "migration/migration.h"
#include "block/scsi.h"
#ifdef __linux__
# include <scsi/sg.h>
@@ -435,7 +433,6 @@ static void virtio_blk_handle_output(VirtIODevice *vdev, VirtQueue *vq)
.num_writes = 0,
};
-#ifdef CONFIG_VIRTIO_BLK_DATA_PLANE
/* Some guests kick before setting VIRTIO_CONFIG_S_DRIVER_OK so start
* dataplane here instead of waiting for .set_status().
*/
@@ -443,7 +440,6 @@ static void virtio_blk_handle_output(VirtIODevice *vdev, VirtQueue *vq)
virtio_blk_data_plane_start(s->dataplane);
return;
}
-#endif
while ((req = virtio_blk_get_request(s))) {
virtio_blk_handle_request(req, &mrb);
@@ -500,11 +496,9 @@ static void virtio_blk_reset(VirtIODevice *vdev)
{
VirtIOBlock *s = VIRTIO_BLK(vdev);
-#ifdef CONFIG_VIRTIO_BLK_DATA_PLANE
if (s->dataplane) {
virtio_blk_data_plane_stop(s->dataplane);
}
-#endif
/*
* This should cancel pending requests, but can't do nicely until there
@@ -594,12 +588,10 @@ static void virtio_blk_set_status(VirtIODevice *vdev, uint8_t status)
VirtIOBlock *s = VIRTIO_BLK(vdev);
uint32_t features;
-#ifdef CONFIG_VIRTIO_BLK_DATA_PLANE
if (s->dataplane && !(status & (VIRTIO_CONFIG_S_DRIVER |
VIRTIO_CONFIG_S_DRIVER_OK))) {
virtio_blk_data_plane_stop(s->dataplane);
}
-#endif
if (!(status & VIRTIO_CONFIG_S_DRIVER_OK)) {
return;
@@ -694,7 +686,6 @@ static const BlockDevOps virtio_block_ops = {
.resize_cb = virtio_blk_resize,
};
-#ifdef CONFIG_VIRTIO_BLK_DATA_PLANE
/* Disable dataplane thread during live migration since it does not
* update the dirty memory bitmap yet.
*/
@@ -725,7 +716,6 @@ static void virtio_blk_migration_state_changed(Notifier *notifier, void *data)
}
}
}
-#endif /* CONFIG_VIRTIO_BLK_DATA_PLANE */
static void virtio_blk_device_realize(DeviceState *dev, Error **errp)
{
@@ -762,7 +752,6 @@ static void virtio_blk_device_realize(DeviceState *dev, Error **errp)
s->vq = virtio_add_queue(vdev, 128, virtio_blk_handle_output);
s->complete_request = virtio_blk_complete_request;
-#ifdef CONFIG_VIRTIO_BLK_DATA_PLANE
virtio_blk_data_plane_create(vdev, blk, &s->dataplane, &err);
if (err != NULL) {
error_propagate(errp, err);
@@ -771,7 +760,6 @@ static void virtio_blk_device_realize(DeviceState *dev, Error **errp)
}
s->migration_state_notifier.notify = virtio_blk_migration_state_changed;
add_migration_state_change_notifier(&s->migration_state_notifier);
-#endif
s->change = qemu_add_vm_change_state_handler(virtio_blk_dma_restart_cb, s);
register_savevm(dev, "virtio-blk", virtio_blk_id++, 2,
@@ -789,11 +777,9 @@ static void virtio_blk_device_unrealize(DeviceState *dev, Error **errp)
VirtIODevice *vdev = VIRTIO_DEVICE(dev);
VirtIOBlock *s = VIRTIO_BLK(dev);
-#ifdef CONFIG_VIRTIO_BLK_DATA_PLANE
remove_migration_state_change_notifier(&s->migration_state_notifier);
virtio_blk_data_plane_destroy(s->dataplane);
s->dataplane = NULL;
-#endif
qemu_del_vm_change_state_handler(s->change);
unregister_savevm(dev, "virtio-blk", s);
blockdev_mark_auto_del(s->bs);
@@ -818,9 +804,7 @@ static Property virtio_blk_properties[] = {
#ifdef __linux__
DEFINE_PROP_BIT("scsi", VirtIOBlock, blk.scsi, 0, true),
#endif
-#ifdef CONFIG_VIRTIO_BLK_DATA_PLANE
DEFINE_PROP_BIT("x-data-plane", VirtIOBlock, blk.data_plane, 0, false),
-#endif
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
index ec9e855..d21c397 100644
--- a/hw/virtio/Makefile.objs
+++ b/hw/virtio/Makefile.objs
@@ -2,7 +2,7 @@ common-obj-y += virtio-rng.o
common-obj-$(CONFIG_VIRTIO_PCI) += virtio-pci.o
common-obj-y += virtio-bus.o
common-obj-y += virtio-mmio.o
-common-obj-$(CONFIG_VIRTIO_BLK_DATA_PLANE) += dataplane/
+common-obj-$(CONFIG_VIRTIO) += dataplane/
obj-y += virtio.o virtio-balloon.o
obj-$(CONFIG_LINUX) += vhost.o vhost-backend.o vhost-user.o
diff --git a/include/hw/virtio/virtio-blk.h b/include/hw/virtio/virtio-blk.h
index cf61154..f3853f2 100644
--- a/include/hw/virtio/virtio-blk.h
+++ b/include/hw/virtio/virtio-blk.h
@@ -132,10 +132,8 @@ typedef struct VirtIOBlock {
VMChangeStateEntry *change;
/* Function to push to vq and notify guest */
void (*complete_request)(struct VirtIOBlockReq *req, unsigned char status);
-#ifdef CONFIG_VIRTIO_BLK_DATA_PLANE
Notifier migration_state_notifier;
struct VirtIOBlockDataPlane *dataplane;
-#endif
} VirtIOBlock;
typedef struct MultiReqBuffer {
--
1.9.3
next prev parent reply other threads:[~2014-09-19 14:44 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-19 14:41 [Qemu-devel] [PULL 00/59] Block patches Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 01/59] block/vhdx.c: Mark parent_vhdx_guid variable as unused Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 02/59] ide/atapi: Mark non-data commands as complete Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 03/59] aio-win32: fix uninitialized use of have_select_revents Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 04/59] ide/ahci: Check for -ECANCELED in aio callbacks Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 05/59] block: Add refcnt in BlockDriverAIOCB Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 06/59] block: Add bdrv_aio_cancel_async Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 07/59] block: Drop bdrv_em_co_aiocb_info.cancel Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 08/59] block: Drop bdrv_em_aiocb_info.cancel Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 09/59] thread-pool: Convert thread_pool_aiocb_info.cancel to cancel_async Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 10/59] linux-aio: Convert laio_aiocb_info.cancel to .cancel_async Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 11/59] dma: Convert dma_aiocb_info.cancel " Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 12/59] iscsi: Convert iscsi_aiocb_info.cancel " Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 13/59] archipelago: Drop archipelago_aiocb_info.cancel Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 14/59] blkdebug: Drop blkdebug_aiocb_info.cancel Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 15/59] blkverify: Drop blkverify_aiocb_info.cancel Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 16/59] curl: Drop curl_aiocb_info.cancel Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 17/59] qed: Drop qed_aiocb_info.cancel Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 18/59] quorum: fix quorum_aio_cancel() Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 19/59] quorum: Convert quorum_aiocb_info.cancel to .cancel_async Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 20/59] rbd: Drop rbd_aiocb_info.cancel Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 21/59] sheepdog: Convert sd_aiocb_info.cancel to .cancel_async Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 22/59] win32-aio: Drop win32_aiocb_info.cancel Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 23/59] ide: Convert trim_aiocb_info.cancel to .cancel_async Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 24/59] block: Drop AIOCBInfo.cancel Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 25/59] block: Rename qemu_aio_release -> qemu_aio_unref Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 26/59] qdev-monitor: fix segmentation fault on qdev_device_help() Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 27/59] aio-win32: avoid out-of-bounds access to the events array Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 28/59] block: Introduce "null" drivers Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 29/59] qapi: Sort BlockdevDriver enum data list Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 30/59] qapi: Sort items in BlockdevOptions definition Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 31/59] qapi/block: Add "fatal" to BLOCK_IMAGE_CORRUPTED Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 32/59] qcow2: Add qcow2_signal_corruption() Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 33/59] qcow2: Use qcow2_signal_corruption() for overlaps Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 34/59] qcow2: Check L1/L2/reftable entries for alignment Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 35/59] iotests: Add more tests for qcow2 corruption Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 36/59] image-fuzzer: Trivial readability and formatting improvements Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 37/59] hmp: fix memory leak at hmp_info_block_jobs() Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 38/59] qcow2: Fix leak of QemuOpts in qcow2_open() Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 39/59] qapi: Allow enums in anonymous unions Stefan Hajnoczi
2014-09-19 14:41 ` [Qemu-devel] [PULL 40/59] qcow2: Add overlap-check.template option Stefan Hajnoczi
2014-09-19 14:42 ` [Qemu-devel] [PULL 41/59] qapi/block-core: Add "new" qcow2 options Stefan Hajnoczi
2014-09-19 14:42 ` [Qemu-devel] [PULL 42/59] docs: List all image elements currently supported by the fuzzer Stefan Hajnoczi
2014-09-19 14:42 ` [Qemu-devel] [PULL 43/59] fuzz: Add fuzzing functions for entries of refcount table and blocks Stefan Hajnoczi
2014-09-19 14:42 ` [Qemu-devel] [PULL 44/59] layout: Add generators for " Stefan Hajnoczi
2014-09-19 14:42 ` [Qemu-devel] [PULL 45/59] ahci: Adding basic functionality qtest Stefan Hajnoczi
2014-09-19 14:42 ` [Qemu-devel] [PULL 46/59] ahci: MSI capability should be at 0x80, not 0x50 Stefan Hajnoczi
2014-09-19 14:42 ` [Qemu-devel] [PULL 47/59] ahci: Add test_pci_spec to ahci-test Stefan Hajnoczi
2014-09-19 14:42 ` [Qemu-devel] [PULL 48/59] ahci: add test_pci_enable " Stefan Hajnoczi
2014-09-19 14:42 ` [Qemu-devel] [PULL 49/59] ahci: properly shadow the TFD register Stefan Hajnoczi
2014-09-19 14:42 ` [Qemu-devel] [PULL 50/59] ahci: Add test_hba_spec to ahci-test Stefan Hajnoczi
2014-09-19 14:42 ` [Qemu-devel] [PULL 51/59] ahci: Add test_hba_enable " Stefan Hajnoczi
2014-09-19 14:42 ` [Qemu-devel] [PULL 52/59] ahci: Add test_identify case " Stefan Hajnoczi
2014-09-19 14:42 ` [Qemu-devel] [PULL 53/59] block/archipelago: Fix typo in qemu_archipelago_truncate() Stefan Hajnoczi
2014-09-19 14:42 ` [Qemu-devel] [PULL 54/59] block: delete cow block driver Stefan Hajnoczi
2014-09-19 14:42 ` [Qemu-devel] [PULL 55/59] block: vhdx - fix reading beyond pointer during image creation Stefan Hajnoczi
2014-09-19 14:42 ` [Qemu-devel] [PULL 56/59] async: aio_context_new(): Handle event_notifier_init failure Stefan Hajnoczi
2014-09-19 14:42 ` [Qemu-devel] [PULL 57/59] virtio: Import virtio_vring.h Stefan Hajnoczi
2014-09-19 14:42 ` [Qemu-devel] [PULL 58/59] vring: Better error handling if num is too large Stefan Hajnoczi
2014-09-19 14:42 ` Stefan Hajnoczi [this message]
2014-09-19 18:10 ` [Qemu-devel] [PULL 00/59] Block patches 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=1411137738-31280-60-git-send-email-stefanha@redhat.com \
--to=stefanha@redhat.com \
--cc=famz@redhat.com \
--cc=peter.maydell@linaro.org \
--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).