MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / ValidationError

Enum ValidationError

vmm/src/config.rs:221–419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219
220#[derive(Debug, PartialEq, Eq, Error)]
221pub enum ValidationError {
222 /// Missing file value for console
223 #[error("Path missing when using file console mode")]
224 ConsoleFileMissing,
225 /// Missing socket path for console
226 #[error("Path missing when using socket console mode")]
227 ConsoleSocketPathMissing,
228 /// Max is less than boot
229 #[error("Max CPUs ({0}) lower than boot CPUs ({1})")]
230 CpusMaxLowerThanBoot(u32 /* max vCPUs */, u32 /* boot vCPUs */),
231 /// Too many CPUs.
232 #[error("Too many CPUs: specified {0} but {MAX_SUPPORTED_CPUS} is the limit")]
233 TooManyCpus(u32 /* specified CPUs */),
234 /// Missing file value for debug-console
235 #[cfg(target_arch = "x86_64")]
236 #[error("Path missing when using file mode for debug console")]
237 DebugconFileMissing,
238 /// Both socket and path specified
239 #[error("Disk path and vhost socket both provided")]
240 DiskSocketAndPath,
241 /// Using vhost user requires shared memory
242 #[error("Using vhost-user requires using shared memory or huge pages")]
243 VhostUserRequiresSharedMemory,
244 /// No socket provided for vhost_use
245 #[error("No socket provided when using vhost-user")]
246 VhostUserMissingSocket,
247 /// Trying to use IOMMU without PCI
248 #[error("Using an IOMMU without PCI support is unsupported")]
249 IommuUnsupported,
250 /// Trying to use VFIO without PCI
251 #[error("Using VFIO without PCI support is unsupported")]
252 VfioUnsupported,
253 /// CPU topology count doesn't match max
254 #[error("Product of CPU topology parts does not match maximum vCPU")]
255 CpuTopologyCount,
256 /// CPU topology uses too many threads per core
257 #[error("CPU topology supports at most 2 threads per core")]
258 CpuTopologyThreadsPerCore,
259 /// One part of the CPU topology was zero
260 #[error("No part of the CPU topology can be zero")]
261 CpuTopologyZeroPart,
262 #[cfg(target_arch = "aarch64")]
263 /// Dies per package must be 1
264 #[error("Dies per package must be 1")]
265 CpuTopologyDiesPerPackage,
266 /// Virtio needs a min of 2 queues
267 #[error("Number of queues ({0}) to virtio_net should be higher than 2")]
268 VnetQueueLowerThan2(usize),
269 /// The input queue number for virtio_net must match the number of input fds
270 #[error("Number of queues ({0}) to virtio_net does not match the number of FDs ({1})")]
271 VnetQueueFdMismatch(usize /* num of queues */, usize /* FD num */),
272 /// Using reserved fd
273 #[error("Reserved fd number (<= 2): {0}")]
274 VnetReservedFd(i32),
275 /// Hardware checksum offload is disabled.
276 #[error("\"offload_tso\" and \"offload_ufo\" depend on \"offload_csum\"")]
277 NoHardwareChecksumOffload,
278 /// Hugepages not turned on

Callers 1

validateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected