xref: /openbsd/share/man/man4/man4.amd64/vmm.4 (revision a794025e)
1.\"	$OpenBSD: vmm.4,v 1.10 2024/11/05 15:08:46 mlarkin Exp $
2.\"
3.\"Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org>
4.\"
5.\"Permission to use, copy, modify, and distribute this software for any
6.\"purpose with or without fee is hereby granted, provided that the above
7.\"copyright notice and this permission notice appear in all copies.
8.\"
9.\"THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\"WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\"MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\"ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\"WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\"ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\"OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: November 5 2024 $
18.Dt VMM 4 amd64
19.Os
20.Sh NAME
21.Nm vmm
22.Nd virtual machine monitor
23.Sh SYNOPSIS
24.Cd "vmm0    at mainbus0"
25.Pp
26.In machine/vmmvar.h
27.Sh DESCRIPTION
28The
29.Nm
30driver implements a virtual machine monitor (VMM) suitable for executing
31.Em virtual machines
32(VMs).
33A VMM runs on the
34.Em host
35operating system and provides facilities to execute one or more
36VMs, each of which is provided with a suitable complement of
37virtual hardware.
38.Pp
39These VMs run independently of the host, but may interact with
40it as any other machine would (e.g. via network communications or
41other means).
42.Pp
43VMs are allocated hardware resources by the VMM during creation,
44including:
45.Pp
46.Bl -bullet -offset indent -compact
47.It
48Virtual CPUs
49.It
50Virtual network interfaces
51.It
52Virtual disk images
53.It
54Virtual serial ports
55.El
56.Pp
57Although VMs execute independently of each other and the host, they
58do consume host resources and, as such, the number of VMs (and their
59configurations) should be taken into consideration when planning
60host capacity.
61.Pp
62The
63.Nm
64driver requires suitable host CPU capabilities in order to provide
65VM services.
66The
67.Nm
68driver requires at least one CPU with hardware-assisted virtualization
69capabilities and nested or extended paging capabilities to be
70present on the host.
71For more information, consult the CPU vendor's documentation.
72.Pp
73The following
74.Xr ioctl 2
75commands are provided for managing
76.Nm
77guests:
78.Bl -tag -width Ds -offset indent
79.It Dv VMM_IOC_CREATE Fa "struct vm_create_params *"
80Create a VM, initializing
81.Nm
82if not yet started.
83(Does not start the VCPU.)
84.It Dv VMM_IOC_RUN Fa "struct vm_run_params *"
85Run a VCPU for a defined VM.
86Return on VM-exit, when the VCPU stopped, or an error occurred.
87.It Dv VMM_IOC_INFO Fa "struct vm_info_params *"
88Get information about the VMs currently hosted by
89.Nm .
90.It Dv VMM_IOC_TERM Fa "struct vm_terminate_params *"
91Terminate a given VM.
92.It Dv VMM_IOC_RESETCPU Fa "struct vm_resetcpu_params *"
93Reset a VCPU to power-on-init state using the provided register state.
94.It Dv VMM_IOC_INTR Fa "struct vm_intr_params *"
95Signal a pending interrupt for a VCPU.
96.It Dv VMM_IOC_READREGS Fa "struct vm_rwregs_params *"
97Read registers of a VCPU.
98.It Dv VMM_IOC_WRITEREGS Fa "struct vm_rwregs_params *"
99Write register values of a VCPU.
100.It Dv VMM_IOC_READVMPARAMS Fa "struct vm_rwvmparams_params *"
101Read paravirtualized hardware parameters (such as
102.Xr pvclock 4
103version) for a VM.
104.It Dv VMM_IOC_WRITEVMPARAMS Fa "struct vm_rwvmparams_params *"
105Write paravirtualized hardware parameters (such as
106.Xr pvclock 4
107guest physical address) for a VM.
108.El
109.Sh SEE ALSO
110.Xr cpu 4 ,
111.Xr intro 4 ,
112.Xr virtio 4 ,
113.Xr vmctl 8 ,
114.Xr vmd 8
115.Sh HISTORY
116The
117.Nm
118driver
119appeared in
120.Ox 5.9 .
121.Sh AUTHORS
122.An Mike Larkin Aq Mt mlarkin@openbsd.org
123