From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 8EB5DB149 for ; Wed, 18 Jun 2014 17:36:40 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 18 Jun 2014 08:30:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,501,1400050800"; d="scan'208";a="559621588" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga002.jf.intel.com with ESMTP; 18 Jun 2014 08:35:00 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id s5IFZ0Bl013170; Wed, 18 Jun 2014 16:35:00 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id s5IFZ0Sq023962; Wed, 18 Jun 2014 16:35:00 +0100 Received: (from cmurph2@localhost) by sivswdev02.ir.intel.com with id s5IFZ0lP023958; Wed, 18 Jun 2014 16:35:00 +0100 From: Claire Murphy To: dev@dpdk.org Date: Wed, 18 Jun 2014 16:34:54 +0100 Message-Id: <1403105694-23736-3-git-send-email-claire.k.murphy@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1403105694-23736-1-git-send-email-claire.k.murphy@intel.com> References: <1403105694-23736-1-git-send-email-claire.k.murphy@intel.com> Subject: [dpdk-dev] [PATCH 2/2] Patch to allow live migration of a VM with US-VHost. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jun 2014 15:36:41 -0000 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