xref: /dflybsd-src/share/man/man4/virtio_balloon.4 (revision 4a5f69f602439e4ddaa5c06d3f350823dac88dd0)
195fbc42eSDiederik de Groot.\" Copyright (c) 2011 Bryan Venteicher
295fbc42eSDiederik de Groot.\" All rights reserved.
395fbc42eSDiederik de Groot.\"
495fbc42eSDiederik de Groot.\" Redistribution and use in source and binary forms, with or without
595fbc42eSDiederik de Groot.\" modification, are permitted provided that the following conditions
695fbc42eSDiederik de Groot.\" are met:
795fbc42eSDiederik de Groot.\" 1. Redistributions of source code must retain the above copyright
895fbc42eSDiederik de Groot.\"    notice, this list of conditions and the following disclaimer.
995fbc42eSDiederik de Groot.\" 2. Redistributions in binary form must reproduce the above copyright
1095fbc42eSDiederik de Groot.\"    notice, this list of conditions and the following disclaimer in the
1195fbc42eSDiederik de Groot.\"    documentation and/or other materials provided with the distribution.
1295fbc42eSDiederik de Groot.\"
1395fbc42eSDiederik de Groot.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1495fbc42eSDiederik de Groot.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1595fbc42eSDiederik de Groot.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1695fbc42eSDiederik de Groot.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1795fbc42eSDiederik de Groot.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1895fbc42eSDiederik de Groot.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1995fbc42eSDiederik de Groot.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2095fbc42eSDiederik de Groot.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2195fbc42eSDiederik de Groot.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2295fbc42eSDiederik de Groot.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2395fbc42eSDiederik de Groot.\" SUCH DAMAGE.
2495fbc42eSDiederik de Groot.\"
2595fbc42eSDiederik de Groot.Dd October 26, 2018
2695fbc42eSDiederik de Groot.Dt VIRTIO_BALLOON 4
2795fbc42eSDiederik de Groot.Os
2895fbc42eSDiederik de Groot.Sh NAME
2995fbc42eSDiederik de Groot.Nm virtio_balloon
3095fbc42eSDiederik de Groot.Nd VirtIO Memory Balloon driver
3195fbc42eSDiederik de Groot.Sh SYNOPSIS
3295fbc42eSDiederik de GrootTo compile this driver into the kernel,
3395fbc42eSDiederik de Grootplace the following lines in your
3495fbc42eSDiederik de Grootkernel configuration file:
3595fbc42eSDiederik de Groot.Bd -ragged -offset indent
3695fbc42eSDiederik de Groot.Cd "device virtio_balloon"
3795fbc42eSDiederik de Groot.Ed
3895fbc42eSDiederik de Groot.Pp
3995fbc42eSDiederik de GrootAlternatively, to load the driver as a
4095fbc42eSDiederik de Grootmodule at boot time, place the following line in
4195fbc42eSDiederik de Groot.Xr loader.conf 5 :
4295fbc42eSDiederik de Groot.Bd -literal -offset indent
4395fbc42eSDiederik de Grootvirtio_balloon_load="YES"
4495fbc42eSDiederik de Groot.Ed
4595fbc42eSDiederik de Groot.Sh DESCRIPTION
4695fbc42eSDiederik de GrootThe
4795fbc42eSDiederik de Groot.Nm
4895fbc42eSDiederik de Grootdevice driver provides support for VirtIO memory balloon devices.
4995fbc42eSDiederik de Groot.Pp
5095fbc42eSDiederik de GrootThe memory balloon allows the guest to, at the request of the
5195fbc42eSDiederik de Groothypervisor, return memory allocated to the hypervisor so it can
5295fbc42eSDiederik de Grootbe made available to other guests.
5395fbc42eSDiederik de GrootThe hypervisor can later signal the balloon to return the memory.
54*4a5f69f6SSascha Wildner.Sh EXAMPLES
5595fbc42eSDiederik de Groot.Bd -literal
5695fbc42eSDiederik de Groot(vmguest) # kldload virtio_balloon
5795fbc42eSDiederik de Groot(vmguest) # sysctl dev.vtballoon.desired
5895fbc42eSDiederik de Grootdev.vtballoon.0.desired: 0
5995fbc42eSDiederik de Groot(vmguest) # sysctl dev.vtballoon.current
6095fbc42eSDiederik de Grootdev.vtballoon.0.current: 0
6195fbc42eSDiederik de Groot
6295fbc42eSDiederik de Groot(vmhost) # virsh qemu-monitor-command --domain <vmguest> --hmp 'balloon 2000'
6395fbc42eSDiederik de Groot
6495fbc42eSDiederik de Groot(vmguest) # sysctl dev.vtballoon.desired
6595fbc42eSDiederik de Grootdev.vtballoon.0.desired: 536576
6695fbc42eSDiederik de Groot(vmguest) # sysctl dev.vtballoon.current
6795fbc42eSDiederik de Grootdev.vtballoon.0.current: 536576
6895fbc42eSDiederik de Groot.Ed
6995fbc42eSDiederik de Groot.Sh SEE ALSO
7095fbc42eSDiederik de Groot.Xr virtio 4
7195fbc42eSDiederik de Groot.Sh HISTORY
7295fbc42eSDiederik de GrootThe
7395fbc42eSDiederik de Groot.Nm
7495fbc42eSDiederik de Grootdriver was written by
7595fbc42eSDiederik de Groot.An Bryan Venteicher Aq Mt bryanv@FreeBSD.org .
7695fbc42eSDiederik de GrootIt first appeared in
7795fbc42eSDiederik de Groot.Fx 9.0 .
78