[dpdk-dev] [PATCH 2/2] Patch to allow live migration of a VM with US-VHost.
Claire Murphy
claire.k.murphy at intel.com
Wed Jun 18 17:34:54 CEST 2014
Signed-off-by: Claire Murphy <claire.k.murphy at intel.com>
---
examples/vhost/vhost-net-cdev.c | 18 ++++++++++++++++++
examples/vhost/virtio-net.c | 8 +++++++-
2 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/examples/vhost/vhost-net-cdev.c b/examples/vhost/vhost-net-cdev.c
index ef42e88..e942df0 100644
--- a/examples/vhost/vhost-net-cdev.c
+++ b/examples/vhost/vhost-net-cdev.c
@@ -275,6 +275,24 @@ vhost_net_ioctl(fuse_req_t req, int cmd, void *arg,
VHOST_IOCTL_R(struct vhost_vring_file, file, ops->set_vring_call);
break;
+ case VHOST_SET_VRING_ERR:
+ RTE_LOG(ERR, CONFIG, "(%"PRIu64") IOCTL: VHOST_SET_VRING_ERR cmd=%d Un-Supported\n", ctx.fh,cmd);
+ result = -1;
+ fuse_reply_ioctl(req, result, NULL, 0);
+ break;
+
+ case VHOST_SET_LOG_BASE:
+ RTE_LOG(ERR, CONFIG, "(%"PRIu64") IOCTL: VHOST_SET_LOG_BASE cmd=%d Un-Supported\n", ctx.fh,cmd);
+ result = 0;
+ fuse_reply_ioctl(req, result, NULL, 0);
+ break;
+
+ case VHOST_SET_LOG_FD:
+ RTE_LOG(ERR, CONFIG, "(%"PRIu64") IOCTL: VHOST_SET_LOG_FD cmd=%d Un-Supported \n", ctx.fh,cmd);
+ result = -1;
+ fuse_reply_ioctl(req, result, NULL, 0);
+ break;
+
default:
RTE_LOG(ERR, VHOST_CONFIG, "(%"PRIu64") IOCTL: DOESN NOT EXIST\n", ctx.fh);
result = -1;
diff --git a/examples/vhost/virtio-net.c b/examples/vhost/virtio-net.c
index 9be959f..3cf650d 100644
--- a/examples/vhost/virtio-net.c
+++ b/examples/vhost/virtio-net.c
@@ -573,7 +573,13 @@ set_features(struct vhost_device_ctx ctx, uint64_t *pu)
dev = get_device(ctx);
if (dev == NULL)
return -1;
- if (*pu & ~VHOST_FEATURES)
+
+ /*
+ * We mask the VHOST_F_LOG_ALL feature bit here as it is enabled by default
+ * during migration in QEMU even if we have it disabled as a feature in
+ * userspace vhost.
+ */
+ if (*pu & ~(VHOST_FEATURES | (1ULL << VHOST_F_LOG_ALL)))
return -1;
/* Store the negotiated feature list for the device. */
--
1.7.0.7
More information about the dev
mailing list