From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claire Murphy Subject: [PATCH 2/2] Patch to allow live migration of a VM with US-VHost. Date: Wed, 18 Jun 2014 16:34:54 +0100 Message-ID: <1403105694-23736-3-git-send-email-claire.k.murphy@intel.com> References: <1403105694-23736-1-git-send-email-claire.k.murphy@intel.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1403105694-23736-1-git-send-email-claire.k.murphy-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Signed-off-by: Claire Murphy --- 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