It's really tempting to remove the dmask pointer entirely. My one suggestion here removes the remaining in-kernel use. For userspace you might just need to pass the 'struct vm_run` to the exit handlers instead of vm_exit and then you could kill this entirely.
Maybe 's/old/13'? E.g. vm_exit_ipi_13 and VM_RUN_13?
I would do this fixup in libvmmapi perhaps rather than in the kernel.
I don't think you need the zero? We don't memset vme to 0 here either.
Thanks for doing the other changes.
So I think I was wrong, you do need the CPU_ZERO, but maybe with a comment to explain why. Doing the zero here ensures that if the kernel is using a smaller cpuset_t size than userspace, that the kernel doesn't have to explicitly zero out the extra bits each time. Otherwise you will need to patch the VM_RUN ioctl in the kernel to copy out zeroes to the "extra" cpuset_t bits.
Yeah, that's a better idea. I didn't do that initially just out of laziness.
"old" is what we say elsewhere, but yeah it's better to be specific.
Since userspace is doing the work to provide us with its view of the cpusetsize anyway, I think it's a bit tidier if the kernel takes take of zeroing the rest. That's what cpuset syscalls do too.