* [Qemu-devel] [PATCH] block: Always compile virtio-blk dataplane
@ 2014-08-26 6:57 Fam Zheng
2014-08-26 11:02 ` Paolo Bonzini
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Fam Zheng @ 2014-08-26 6:57 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf, pbonzini, stefanha
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>
---
configure | 21 ++-------------------
hw/block/Makefile.objs | 2 +-
hw/block/virtio-blk.c | 22 ++--------------------
hw/virtio/Makefile.objs | 2 +-
include/hw/virtio/virtio-blk.h | 2 --
5 files changed, 6 insertions(+), 43 deletions(-)
diff --git a/configure b/configure
index 2063cf6..68cb4d2 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"
;;
@@ -2936,16 +2934,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
@@ -4319,7 +4307,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"
@@ -4778,10 +4765,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 d9167ce..643eb2f 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>
@@ -432,7 +430,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().
*/
@@ -440,7 +437,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);
@@ -497,11 +493,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
@@ -591,12 +585,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;
@@ -691,7 +683,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.
*/
@@ -722,16 +713,13 @@ 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)
{
VirtIODevice *vdev = VIRTIO_DEVICE(dev);
VirtIOBlock *s = VIRTIO_BLK(dev);
VirtIOBlkConf *blk = &(s->blk);
-#ifdef CONFIG_VIRTIO_BLK_DATA_PLANE
Error *err = NULL;
-#endif
static int virtio_blk_id;
if (!blk->conf.bs) {
@@ -760,7 +748,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);
@@ -769,7 +756,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,
@@ -787,11 +773,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);
@@ -816,9 +800,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 afb7b8d..f4c5239 100644
--- a/include/hw/virtio/virtio-blk.h
+++ b/include/hw/virtio/virtio-blk.h
@@ -131,10 +131,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 {
--
2.1.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] block: Always compile virtio-blk dataplane
2014-08-26 6:57 [Qemu-devel] [PATCH] block: Always compile virtio-blk dataplane Fam Zheng
@ 2014-08-26 11:02 ` Paolo Bonzini
2014-08-26 15:07 ` Benoît Canet
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2014-08-26 11:02 UTC (permalink / raw)
To: Fam Zheng, qemu-devel; +Cc: kwolf, stefanha
Il 26/08/2014 08:57, Fam Zheng ha scritto:
> 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>
> ---
> configure | 21 ++-------------------
> hw/block/Makefile.objs | 2 +-
> hw/block/virtio-blk.c | 22 ++--------------------
> hw/virtio/Makefile.objs | 2 +-
> include/hw/virtio/virtio-blk.h | 2 --
> 5 files changed, 6 insertions(+), 43 deletions(-)
>
> diff --git a/configure b/configure
> index 2063cf6..68cb4d2 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"
> ;;
> @@ -2936,16 +2934,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
> @@ -4319,7 +4307,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"
> @@ -4778,10 +4765,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 d9167ce..643eb2f 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>
> @@ -432,7 +430,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().
> */
> @@ -440,7 +437,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);
> @@ -497,11 +493,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
> @@ -591,12 +585,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;
> @@ -691,7 +683,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.
> */
> @@ -722,16 +713,13 @@ 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)
> {
> VirtIODevice *vdev = VIRTIO_DEVICE(dev);
> VirtIOBlock *s = VIRTIO_BLK(dev);
> VirtIOBlkConf *blk = &(s->blk);
> -#ifdef CONFIG_VIRTIO_BLK_DATA_PLANE
> Error *err = NULL;
> -#endif
> static int virtio_blk_id;
>
> if (!blk->conf.bs) {
> @@ -760,7 +748,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);
> @@ -769,7 +756,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,
> @@ -787,11 +773,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);
> @@ -816,9 +800,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 afb7b8d..f4c5239 100644
> --- a/include/hw/virtio/virtio-blk.h
> +++ b/include/hw/virtio/virtio-blk.h
> @@ -131,10 +131,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 {
>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] block: Always compile virtio-blk dataplane
2014-08-26 6:57 [Qemu-devel] [PATCH] block: Always compile virtio-blk dataplane Fam Zheng
2014-08-26 11:02 ` Paolo Bonzini
@ 2014-08-26 15:07 ` Benoît Canet
2014-08-27 11:44 ` Stefan Hajnoczi
2014-08-28 13:56 ` Stefan Hajnoczi
3 siblings, 0 replies; 6+ messages in thread
From: Benoît Canet @ 2014-08-26 15:07 UTC (permalink / raw)
To: Fam Zheng; +Cc: kwolf, pbonzini, qemu-devel, stefanha
The Tuesday 26 Aug 2014 à 14:57:19 (+0800), Fam Zheng wrote :
> 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>
> ---
> configure | 21 ++-------------------
> hw/block/Makefile.objs | 2 +-
> hw/block/virtio-blk.c | 22 ++--------------------
> hw/virtio/Makefile.objs | 2 +-
> include/hw/virtio/virtio-blk.h | 2 --
> 5 files changed, 6 insertions(+), 43 deletions(-)
>
> diff --git a/configure b/configure
> index 2063cf6..68cb4d2 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"
> ;;
> @@ -2936,16 +2934,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
> @@ -4319,7 +4307,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"
> @@ -4778,10 +4765,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 d9167ce..643eb2f 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>
> @@ -432,7 +430,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().
> */
> @@ -440,7 +437,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);
> @@ -497,11 +493,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
> @@ -591,12 +585,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;
> @@ -691,7 +683,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.
> */
> @@ -722,16 +713,13 @@ 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)
> {
> VirtIODevice *vdev = VIRTIO_DEVICE(dev);
> VirtIOBlock *s = VIRTIO_BLK(dev);
> VirtIOBlkConf *blk = &(s->blk);
> -#ifdef CONFIG_VIRTIO_BLK_DATA_PLANE
> Error *err = NULL;
> -#endif
> static int virtio_blk_id;
>
> if (!blk->conf.bs) {
> @@ -760,7 +748,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);
> @@ -769,7 +756,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,
> @@ -787,11 +773,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);
> @@ -816,9 +800,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 afb7b8d..f4c5239 100644
> --- a/include/hw/virtio/virtio-blk.h
> +++ b/include/hw/virtio/virtio-blk.h
> @@ -131,10 +131,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 {
> --
> 2.1.0
>
>
Reviewed-by: Benoît Canet <benoit.canet@nodalink.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] block: Always compile virtio-blk dataplane
2014-08-26 6:57 [Qemu-devel] [PATCH] block: Always compile virtio-blk dataplane Fam Zheng
2014-08-26 11:02 ` Paolo Bonzini
2014-08-26 15:07 ` Benoît Canet
@ 2014-08-27 11:44 ` Stefan Hajnoczi
2014-08-28 13:56 ` Stefan Hajnoczi
3 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2014-08-27 11:44 UTC (permalink / raw)
To: Fam Zheng; +Cc: kwolf, pbonzini, qemu-devel, stefanha
[-- Attachment #1: Type: text/plain, Size: 680 bytes --]
On Tue, Aug 26, 2014 at 02:57:19PM +0800, Fam Zheng wrote:
> 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>
> ---
> configure | 21 ++-------------------
> hw/block/Makefile.objs | 2 +-
> hw/block/virtio-blk.c | 22 ++--------------------
> hw/virtio/Makefile.objs | 2 +-
> include/hw/virtio/virtio-blk.h | 2 --
> 5 files changed, 6 insertions(+), 43 deletions(-)
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] block: Always compile virtio-blk dataplane
2014-08-26 6:57 [Qemu-devel] [PATCH] block: Always compile virtio-blk dataplane Fam Zheng
` (2 preceding siblings ...)
2014-08-27 11:44 ` Stefan Hajnoczi
@ 2014-08-28 13:56 ` Stefan Hajnoczi
2014-08-29 1:11 ` Fam Zheng
3 siblings, 1 reply; 6+ messages in thread
From: Stefan Hajnoczi @ 2014-08-28 13:56 UTC (permalink / raw)
To: Fam Zheng; +Cc: kwolf, pbonzini, qemu-devel, stefanha
[-- Attachment #1: Type: text/plain, Size: 985 bytes --]
On Tue, Aug 26, 2014 at 02:57:19PM +0800, Fam Zheng wrote:
> 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>
> ---
> configure | 21 ++-------------------
> hw/block/Makefile.objs | 2 +-
> hw/block/virtio-blk.c | 22 ++--------------------
> hw/virtio/Makefile.objs | 2 +-
> include/hw/virtio/virtio-blk.h | 2 --
> 5 files changed, 6 insertions(+), 43 deletions(-)
Oops, mingw cross-compiling no longer works:
In file included from hw/virtio/dataplane/vring.c:21:0:
/home/stefanha/qemu/include/hw/virtio/dataplane/vring.h:20:31: fatal error: linux/virtio_ring.h: No such file or directory
#include <linux/virtio_ring.h>
^
compilation terminated.
make: *** [hw/virtio/dataplane/vring.o] Error 1
I have dropped this patch for now.
Stefan
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] block: Always compile virtio-blk dataplane
2014-08-28 13:56 ` Stefan Hajnoczi
@ 2014-08-29 1:11 ` Fam Zheng
0 siblings, 0 replies; 6+ messages in thread
From: Fam Zheng @ 2014-08-29 1:11 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: kwolf, pbonzini, qemu-devel, stefanha
On Thu, 08/28 14:56, Stefan Hajnoczi wrote:
> On Tue, Aug 26, 2014 at 02:57:19PM +0800, Fam Zheng wrote:
> > 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>
> > ---
> > configure | 21 ++-------------------
> > hw/block/Makefile.objs | 2 +-
> > hw/block/virtio-blk.c | 22 ++--------------------
> > hw/virtio/Makefile.objs | 2 +-
> > include/hw/virtio/virtio-blk.h | 2 --
> > 5 files changed, 6 insertions(+), 43 deletions(-)
>
> Oops, mingw cross-compiling no longer works:
>
> In file included from hw/virtio/dataplane/vring.c:21:0:
> /home/stefanha/qemu/include/hw/virtio/dataplane/vring.h:20:31: fatal error: linux/virtio_ring.h: No such file or directory
> #include <linux/virtio_ring.h>
> ^
> compilation terminated.
> make: *** [hw/virtio/dataplane/vring.o] Error 1
>
> I have dropped this patch for now.
>
Ah. So dataplane is still conditional. I'll try again.
Fam
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-08-29 1:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-26 6:57 [Qemu-devel] [PATCH] block: Always compile virtio-blk dataplane Fam Zheng
2014-08-26 11:02 ` Paolo Bonzini
2014-08-26 15:07 ` Benoît Canet
2014-08-27 11:44 ` Stefan Hajnoczi
2014-08-28 13:56 ` Stefan Hajnoczi
2014-08-29 1:11 ` Fam Zheng
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).