mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 21:05:08 +00:00
7d9ef309bd
This replaces the 'struct vm, int vcpuid' tuple passed to most API calls and is similar to the changes recently made in vmm(4) in the kernel. struct vcpu is an opaque type managed by libvmmapi. For now it stores a pointer to the VM context and an integer id. As an immediate effect this removes the divergence between the kernel and userland for the instruction emulation code introduced by the recent vmm(4) changes. Since this is a major change to the vmmapi API, bump VMMAPI_VERSION to 0x200 (2.0) and the shared library major version. While here (and since the major version is bumped), remove unused vcpu argument from vm_setup_pptdev_msi*(). Add new functions vm_suspend_all_cpus() and vm_resume_all_cpus() for use by the debug server. The underyling ioctl (which uses a vcpuid of -1) remains unchanged, but the userlevel API now uses separate functions for global CPU suspend/resume. Reviewed by: corvink, markj Differential Revision: https://reviews.freebsd.org/D38124
18 lines
269 B
C
18 lines
269 B
C
/*-
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*
|
|
* Copyright (c) 2022 John Baldwin <jhb@FreeBSD.org>
|
|
*/
|
|
|
|
#ifndef __VMMAPI_INTERNAL_H__
|
|
#define __VMMAPI_INTERNAL_H__
|
|
|
|
struct vmctx;
|
|
|
|
struct vcpu {
|
|
struct vmctx *ctx;
|
|
int vcpuid;
|
|
};
|
|
|
|
#endif /* !__VMMAPI_INTERNAL_H__ */
|