Messages in this thread |  | | Subject | Re: [RFC][PATCH v2 14/21] kvm: register in mm_struct | | From | Paolo Bonzini <> | | Date | Mon, 4 Feb 2019 11:46:54 +0100 |
| |
On 02/02/19 07:57, Peter Xu wrote: > > I'm thinking whether it's legal for multiple VMs to run on a single mm > address space. I don't see a limitation so far but it's very possible > I am just missing something there (if there is, IMHO they might be > something nice to put into the commit message?). Thanks,
Yes, it certainly is legal, and even useful in fact.
For example there are people running WebAssembly in a KVM sandbox. In that case you can have multiple KVM instances in a single process.
It seems to me that there is already a perfect way to link an mm to its users, which is the MMU notifier. Why do you need a separate proc_ept_idle_operations? You could change ept_idle_read into an MMU notifier callback, and have core mm/ core combine the output of mm_idle_read and all the MMU notifiers? Basically, ept_idle_ctrl becomes an argument to the new MMU notifier callback, or something like that.
Paolo
|  |