On 15/02/19 21:48, Sean Christopherson wrote: > Per Paolo[1], instantiating multiple VMs in a single process is legal; > but this conflicts with KVM's API documentation, which states: > > The only supported use is one virtual machine per process, and one > vcpu per thread. Which really was intended to be "one process per virtual machine" and "one thread per vcpu" as you say below. (In fact, very early versions of KVM support for upstream QEMU, back when qemu-kvm was a thing, ran all vCPUs in the same thread with time sharing...). Paolo > However, an earlier section in the documentation states: > > Only run VM ioctls from the same process (address space) that was used > to create the VM. > > and: > > Only run vcpu ioctls from the same thread that was used to create the > vcpu. > > This suggests that the conflicting documentation is simply an incorrect > ordering of of words, i.e. what's really meant is that a virtual machine > can't be shared across multiple processes and a vCPU can't be shared > across multiple threads. > > Tweak the blurb on issuing ioctls to use a more assertive tone, and > rewrite the "supported use" sentence to reference said blurb instead of > poorly restating it in different terms.