DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] dpdk/vpp and cross-version migration for vhost
@ 2016-10-13 17:50 Michael S. Tsirkin
  2016-11-16 20:43 ` Maxime Coquelin
  2016-11-17  8:29 ` Yuanhan Liu
  0 siblings, 2 replies; 22+ messages in thread
From: Michael S. Tsirkin @ 2016-10-13 17:50 UTC (permalink / raw)
  To: Yuanhan Liu
  Cc: dev, Stephen Hemminger, Maxime Coquelin, qemu-devel, libvir-list,
	vpp-dev

Hi!
So it looks like we face a problem with cross-version
migration when using vhost. It's not new but became more
acute with the advent of vhost user.

For users to be able to migrate between different versions
of the hypervisor the interface exposed to guests
by hypervisor must stay unchanged.

The problem is that a qemu device is connected
to a backend in another process, so the interface
exposed to guests depends on the capabilities of that
process.

Specifically, for vhost user interface based on virtio, this includes
the "host features" bitmap that defines the interface, as well as more
host values such as the max ring size.  Adding new features/changing
values to this interface is required to make progress, but on the other
hand we need ability to get the old host features to be compatible.

To solve this problem within qemu, qemu has a versioning system based on
a machine type concept which fundamentally is a version string, by
specifying that string one can get hardware compatible with a previous
qemu version. QEMU also reports the latest version and list of versions
supported so libvirt records the version at VM creation and then is
careful to use this machine version whenever it migrates a VM.

One might wonder how is this solved with a kernel vhost backend. The
answer is that it mostly isn't - instead an assumption is made, that
qemu versions are deployed together with the kernel - this is generally
true for downstreams.  Thus whenever qemu gains a new feature, it is
already supported by the kernel as well.  However, if one attempts
migration with a new qemu from a system with a new to old kernel, one
would get a failure.

In the world where we have multiple userspace backends, with some of
these supplied by ISVs, this seems non-realistic.

IMO we need to support vhost backend versioning, ideally
in a way that will also work for vhost kernel backends.

So I'd like to get some input from both backend and management
developers on what a good solution would look like.

If we want to emulate the qemu solution, this involves adding the
concept of interface versions to dpdk.  For example, dpdk could supply a
file (or utility printing?) with list of versions: latest and versions
supported. libvirt could read that and
- store latest version at vm creation
- pass it around with the vm
- pass it to qemu

>From here, qemu could pass this over the vhost-user channel,
thus making sure it's initialized with the correct
compatible interface.

As version here is an opaque string for libvirt and qemu,
anything can be used - but I suggest either a list
of values defining the interface, e.g.
any_layout=on,max_ring=256
or a version including the name and vendor of the backend,
e.g. "org.dpdk.v4.5.6".

Note that typically the list of supported versions can only be
extended, not shrunk. Also, if the host/guest interface
does not change, don't change the current version as
this just creates work for everyone.

Thoughts? Would this work well for management? dpdk? vpp?

Thanks!

-- 
MST

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2016-12-09 16:48 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-13 17:50 [dpdk-dev] dpdk/vpp and cross-version migration for vhost Michael S. Tsirkin
2016-11-16 20:43 ` Maxime Coquelin
2016-11-17  8:29 ` Yuanhan Liu
2016-11-17  8:47   ` Maxime Coquelin
2016-11-17  9:49     ` Yuanhan Liu
2016-11-17 15:25       ` [dpdk-dev] [vpp-dev] " Thomas F Herbert
2016-11-17 17:37       ` [dpdk-dev] " Michael S. Tsirkin
2016-11-22 13:02         ` Yuanhan Liu
2016-11-22 14:53           ` Michael S. Tsirkin
2016-11-24  6:31             ` Yuanhan Liu
2016-11-24  9:30               ` Kevin Traynor
2016-11-24 12:33                 ` Yuanhan Liu
2016-11-24 12:47                   ` Maxime Coquelin
2016-11-24 15:01                     ` Kevin Traynor
2016-11-24 15:24                       ` Kavanagh, Mark B
2016-11-28 15:28                         ` Maxime Coquelin
2016-11-28 22:18                           ` Thomas Monjalon
2016-11-29  8:09                             ` Maxime Coquelin
2016-12-09 13:35               ` Maxime Coquelin
2016-12-09 14:42                 ` Daniel P. Berrange
2016-12-09 16:45                   ` Maxime Coquelin
2016-12-09 16:48                     ` Daniel P. Berrange

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).