HomeFreeBSD

vmm: Avoid embedding cpuset_t ioctl ABIs

Description

vmm: Avoid embedding cpuset_t ioctl ABIs

Commit 0bda8d3e9f7a ("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

Details

Provenance
markjAuthored on May 24 2023, 1:13 AM
Reviewer
corvink
Differential Revision
D40113: vmm: Avoid embedding cpuset_t ioctl ABIs
Parents
rG0be82d56b44f: fwget: update pci_network_mediatek for mt7996
Branches
Unknown
Tags
Unknown