From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by dpdk.org (Postfix) with ESMTP id 2C707310 for ; Wed, 6 Aug 2014 11:43:36 +0200 (CEST) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 06 Aug 2014 02:45:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,811,1400050800"; d="scan'208";a="465536875" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by azsmga001.ch.intel.com with ESMTP; 06 Aug 2014 02:44:45 -0700 Received: from irsmsx152.ger.corp.intel.com (163.33.192.66) by IRSMSX104.ger.corp.intel.com (163.33.3.159) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 6 Aug 2014 10:44:44 +0100 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.12]) by IRSMSX152.ger.corp.intel.com ([169.254.6.214]) with mapi id 14.03.0195.001; Wed, 6 Aug 2014 10:44:43 +0100 From: "Gray, Mark D" To: "Murphy, Claire K" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 2/2] Patch to allow live migration of a VM with US-VHost. Thread-Index: AQHPiwtSWWGJB1cxxkmHiJP47M0z85vDn5JQ Date: Wed, 6 Aug 2014 09:44:42 +0000 Message-ID: <738D45BC1F695740A983F43CFE1B7EA92D70B6F2@IRSMSX102.ger.corp.intel.com> References: <1403105694-23736-1-git-send-email-claire.k.murphy@intel.com> <1403105694-23736-3-git-send-email-claire.k.murphy@intel.com> In-Reply-To: <1403105694-23736-3-git-send-email-claire.k.murphy@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "Czesnowicz, Przemyslaw" Subject: Re: [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, 06 Aug 2014 09:43:37 -0000 > Subject: [dpdk-dev] [PATCH 2/2] Patch to allow live migration of a VM wit= h > US-VHost. >=20 >=20 > 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(-) >=20 > 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; >=20 > + case VHOST_SET_VRING_ERR: > + RTE_LOG(ERR, CONFIG, "(%"PRIu64") IOCTL: > VHOST_SET_VRING_ERR cmd=3D%d Un-Supported\n", ctx.fh,cmd); > + result =3D -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=3D%d Un-Supported\n", ctx.fh,cmd); > + result =3D 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=3D%d Un-Supported \n", ctx.fh,cmd); > + result =3D -1; > + fuse_reply_ioctl(req, result, NULL, 0); > + break; > + > default: > RTE_LOG(ERR, VHOST_CONFIG, "(%"PRIu64") IOCTL: > DOESN NOT EXIST\n", ctx.fh); > result =3D -1; > diff --git a/examples/vhost/virtio-net.c b/examples/vhost/virtio-net.c in= dex > 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 =3D get_device(ctx); > if (dev =3D=3D 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; >=20 > /* Store the negotiated feature list for the device. */ > -- > 1.7.0.7 +1. This patch enables live migration for us on Intel DPDK vSwitch.