vmm: Lookup vcpu pointers in vmmdev_ioctl.
authorJohn Baldwin <jhb@FreeBSD.org>
Fri, 18 Nov 2022 18:03:52 +0000 (10:03 -0800)
committerJohn Baldwin <jhb@FreeBSD.org>
Fri, 18 Nov 2022 18:25:38 +0000 (10:25 -0800)
commit3f0f4b1598e0e7005bebed7ea3458e96d0fb8e2f
tree8ce2a2c316836a2f21f414cef45517d2dbaf148b
parent0cbc39d53d2270fa77255c663a0cfa5ed502ab0a
vmm: Lookup vcpu pointers in vmmdev_ioctl.

Centralize mapping vCPU IDs to struct vcpu objects in vmmdev_ioctl and
pass vcpu pointers to the routines in vmm.c.  For operations that want
to perform an action on all vCPUs or on a single vCPU, pass pointers
to both the VM and the vCPU using a NULL vCPU pointer to request
global actions.

Reviewed by: corvink, markj
Differential Revision: https://reviews.freebsd.org/D37168
12 files changed:
sys/amd64/include/vmm.h
sys/amd64/vmm/io/vatpic.c
sys/amd64/vmm/io/vlapic.c
sys/amd64/vmm/vmm.c
sys/amd64/vmm/vmm_dev.c
sys/amd64/vmm/vmm_ioport.c
sys/amd64/vmm/vmm_ioport.h
sys/amd64/vmm/vmm_lapic.c
sys/amd64/vmm/vmm_lapic.h
sys/amd64/vmm/vmm_stat.c
sys/amd64/vmm/vmm_stat.h
sys/amd64/vmm/x86.c