From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 6302D310 for ; Wed, 6 Aug 2014 11:59:24 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 06 Aug 2014 03:01:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,811,1400050800"; d="scan'208";a="572452198" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by fmsmga001.fm.intel.com with ESMTP; 06 Aug 2014 03:01:49 -0700 Received: from irsmsx154.ger.corp.intel.com (163.33.192.96) by IRSMSX101.ger.corp.intel.com (163.33.3.153) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 6 Aug 2014 11:01:25 +0100 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.12]) by IRSMSX154.ger.corp.intel.com ([169.254.12.156]) with mapi id 14.03.0195.001; Wed, 6 Aug 2014 11:01:25 +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: AQHPiwtSWWGJB1cxxkmHiJP47M0z85vDn5JQgAAEtrA= Date: Wed, 6 Aug 2014 10:01:25 +0000 Message-ID: <738D45BC1F695740A983F43CFE1B7EA92D70B75A@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> 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:59:24 -0000 > Subject: RE: [dpdk-dev] [PATCH 2/2] Patch to allow live migration of a VM > with US-VHost. >=20 > > Subject: [dpdk-dev] [PATCH 2/2] Patch to allow live migration of a VM > > with US-VHost. > > > > > > 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=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 > > 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 =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; > > > > /* Store the negotiated feature list for the device. */ > > -- > > 1.7.0.7 >=20 > +1. This patch enables live migration for us on Intel DPDK vSwitch. Acked-by: Mark D. Gray