]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vmm: Expose struct vcpu as an opaque type.
authorJohn Baldwin <jhb@FreeBSD.org>
Fri, 18 Nov 2022 18:01:05 +0000 (10:01 -0800)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 26 Jan 2023 21:45:43 +0000 (13:45 -0800)
commitfa1eabaa8d9a357817eca29c7ad42ac2c8c8872f
tree492e887d78edfe97b4e290d4fb9c68546a1afc5c
parenteb15017f7d2eaf24d5af48e8305649e9b79585ed
vmm: Expose struct vcpu as an opaque type.

Pass a pointer to the current struct vcpu to the vcpu_init callback
and save this pointer in the CPU-specific vcpu structures.

Add routines to fetch a struct vcpu by index from a VM and to query
the VM and vcpuid from a struct vcpu.

Reviewed by: corvink, markj
Differential Revision: https://reviews.freebsd.org/D37156

(cherry picked from commit 950af9ffc616ee573a1ce6ef0c841e897b13dfc4)
sys/amd64/include/vmm.h
sys/amd64/vmm/amd/svm.c
sys/amd64/vmm/amd/svm_softc.h
sys/amd64/vmm/intel/vmx.c
sys/amd64/vmm/intel/vmx.h
sys/amd64/vmm/io/vlapic_priv.h
sys/amd64/vmm/vmm.c