Page MenuHomeFreeBSD

vmm: Move local variables into ioctl handlers
ClosedPublic

Authored by markj on Oct 16 2025, 10:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jan 13, 2:07 AM
Unknown Object (File)
Wed, Dec 31, 3:01 AM
Unknown Object (File)
Dec 19 2025, 7:57 PM
Unknown Object (File)
Dec 19 2025, 7:49 PM
Unknown Object (File)
Dec 10 2025, 2:54 AM
Unknown Object (File)
Dec 3 2025, 11:13 PM
Unknown Object (File)
Dec 1 2025, 4:06 AM
Unknown Object (File)
Nov 25 2025, 12:58 AM

Details

Summary

Make the ioctl handlers easy to read by moving local variables into
per-ioctl blocks. No functional change intended.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 67838
Build 64721: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Oct 17 2025, 6:15 AM
emaste added inline comments.
sys/amd64/vmm/vmm_dev_machdep.c
219

As an aside I wonder if it's reasonable to remove COMPAT_FREEBSD13 in the near future. I don't think we need to maintain backwards compat indefinitely for integrated system utilities.

263–265

I wonder if style(9) would permit

struct vm_pptdev_msi *pptmsi = (struct vm_pptdev_msi *)data;
error = ppt_setup_msi(vm, pptmsi->bus, pptmsi->slot,
    pptmsi->func, pptmsi->addr, pptmsi->msg, pptmsi->numvec);
sys/amd64/vmm/vmm_dev_machdep.c
219

Yes, probably not. Or at least we could have a sysctl which lets one opt in there, with the default being opt-out.

It's kind of hard to weigh the usefulness of backwards compat in one subsystem vs. another. Device ioctls are less important than syscalls for sure. So I'm thinking such a sysctl should be per-subsystem rather than having a blanket "enable all compat 13 code" sysctl.

263–265

I guess that'd be fine. I just kept the existing style, I'm old-fashioned and don't really like combined declaration and initialization.

This revision was automatically updated to reflect the committed changes.