[dpdk-dev] [PATCH 2/2] Patch to allow live migration of a VM with US-VHost.
Gray, Mark D
mark.d.gray at intel.com
Wed Aug 6 12:01:25 CEST 2014
> Subject: RE: [dpdk-dev] [PATCH 2/2] Patch to allow live migration of a VM
> with US-VHost.
>
> > Subject: [dpdk-dev] [PATCH 2/2] Patch to allow live migration of a VM
> > with US-VHost.
> >
> >
> > 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
>
> +1. This patch enables live migration for us on Intel DPDK vSwitch.
Acked-by: Mark D. Gray <mark.d.gray at intel.com>
More information about the dev
mailing list