Lines Matching +full:memory +full:- +full:region
1 /* SPDX-License-Identifier: BSD-3-Clause */
41 #include "standard-headers/linux/types.h"
42 #include "standard-headers/linux/virtio_types.h"
43 #include "standard-headers/linux/virtio_ids.h"
44 #include "standard-headers/linux/virtio_config.h"
47 * Each virtio-mem device manages a dedicated region in physical address
49 * for a single NUMA node are possible. A virtio-mem device is like a
50 * "resizable DIMM" consisting of small memory blocks that can be plugged
51 * or unplugged. The device driver is responsible for (un)plugging memory
54 * Virtio-mem devices can only operate on their assigned memory region in
55 * order to (un)plug memory. A device cannot (un)plug memory belonging to
58 * The "region_size" corresponds to the maximum amount of memory that can
59 * be provided by a device. The "size" corresponds to the amount of memory
63 * "requested_size". It is impossible to plug more memory than requested.
65 * The "usable_region_size" represents the memory region that can actually
66 * be used to (un)plug memory. It is always at least as big as the
70 * There are no guarantees what will happen if unplugged memory is
71 * read/written. In general, unplugged memory should not be touched, because
73 * VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE, unplugged memory inside the usable
74 * region can be read, to simplify creation of memory dumps.
79 * Usually, during system resets all memory will get unplugged, so the
82 * has memory plugged. The device driver can request to unplug all memory
83 * (VIRTIO_MEM_REQ_UNPLUG) - which might take a while to succeed if the
87 /* --- virtio-mem: feature bits --- */
91 /* unplugged memory must not be accessed */
93 /* plugged memory will remain plugged when suspending+resuming */
97 /* --- virtio-mem: guest -> host requests --- */
99 /* request to plug memory blocks */
101 /* request to unplug memory blocks */
105 /* request information about the plugged state of memory blocks */
138 /* --- virtio-mem: host -> guest response --- */
142 * - VIRTIO_MEM_REQ_PLUG
143 * - VIRTIO_MEM_REQ_UNPLUG
144 * - VIRTIO_MEM_REQ_UNPLUG_ALL
145 * - VIRTIO_MEM_REQ_STATE
149 * Request denied - e.g. trying to plug more than requested, applicable for
150 * - VIRTIO_MEM_REQ_PLUG
155 * - VIRTIO_MEM_REQ_PLUG
156 * - VIRTIO_MEM_REQ_UNPLUG
157 * - VIRTIO_MEM_REQ_UNPLUG_ALL
162 * - VIRTIO_MEM_REQ_PLUG
163 * - VIRTIO_MEM_REQ_UNPLUG
164 * - VIRTIO_MEM_REQ_STATE
169 /* State of memory blocks is "plugged" */
171 /* State of memory blocks is "unplugged" */
173 /* State of memory blocks is "mixed" */
189 /* --- virtio-mem: configuration --- */
197 /* Start address of the memory region. Cannot change. */
199 /* Region size (maximum). Cannot change. */
202 * Currently usable region size. Can grow up to region_size. Can