freebsd-dev/lib/libvmmapi
Mark Johnston e17eca3276 vmm: Avoid embedding cpuset_t ioctl ABIs
Commit 0bda8d3e9f ("vmm: permit some IPIs to be handled by userspace")
embedded cpuset_t into the vmm(4) ioctl ABI.  This was a mistake since
we otherwise have some leeway to change the cpuset_t for the whole
system, but we want to keep the vmm ioctl ABI stable.

Rework IPI reporting to avoid this problem.  Along the way, make VM_RUN
a bit more efficient:
- Split vmexit metadata out of the main VM_RUN structure.  This data is
  only written by the kernel.
- Have userspace pass a cpuset_t pointer and cpusetsize in the VM_RUN
  structure, as is done for cpuset syscalls.
- Have the destination CPU mask for VM_EXITCODE_IPIs live outside the
  vmexit info structure, and make VM_RUN copy it out separately.  Zero
  out any extra bytes in the CPU mask, like cpuset syscalls do.
- Modify the vmexit handler prototype to take a full VM_RUN structure.

PR:		271330
Reviewed by:	corvink, jhb (previous versions)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40113
2023-05-23 21:15:59 -04:00
..
internal.h libvmmapi: Add a struct vcpu and use it in most APIs. 2023-03-24 11:49:06 -07:00
Makefile libvmmapi: Add a struct vcpu and use it in most APIs. 2023-03-24 11:49:06 -07:00
Makefile.depend Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
vmmapi_freebsd.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
vmmapi.c vmm: Avoid embedding cpuset_t ioctl ABIs 2023-05-23 21:15:59 -04:00
vmmapi.h vmm: Avoid embedding cpuset_t ioctl ABIs 2023-05-23 21:15:59 -04:00