Home
last modified time | relevance | path

Searched +full:add +full:- +full:user +full:- +full:device (Results 1 – 25 of 28) sorted by relevance

12

/cloud-hypervisor/docs/
H A Dvhost-user-net-testing.md1 # How to test Vhost-user net with OpenVSwitch/DPDK
3 The purpose of this document is to illustrate how to test vhost-user-net
4 in cloud-hypervisor with OVS/DPDK as the backend. This document was
10 …te the communication between two virtual machine, connecting them to vhost-user ports respectively…
12 … +----+----------+ +-------------+-----------+-------------+ +----------+----+
14 … | |vhost-user|----------| vhost-user | ovs | vhost-user |----------|vhost-user| |
15 … | |net device| | port 1 | | port 2 | |net device| |
17 … | +----------+ +-------------+-----------+-------------+ +----------+ |
21 …+--+---------------------------------------------------------------------------------------------+
23 …| +---------------------------------------------------------------------------------------------+…
[all …]
H A Dhotplug.md8 or by using this kernel patch (available in 5.5-rc1 and later): https://git.kernel.org/pub/scm/linu…
12 Extra vCPUs can be added and removed from a running `cloud-hypervisor` instance. This is controlled…
21 $ sudo setcap cap_net_admin+ep ./cloud-hypervisor/target/release/cloud-hypervisor
22 $ ./cloud-hypervisor/target/release/cloud-hypervisor \
23 --kernel custom-vmlinux.bin \
24 --cmdline "console=ttyS0 console=hvc0 root=/dev/vda1 rw" \
25 --disk path=focal-server-cloudimg-amd64.raw \
26 --cpus boot=4,max=8 \
27 --memory size=1024M \
28 --net "tap=,mac=,ip=,mask=" \
[all …]
H A Dapi.md1 - [Cloud Hypervisor API](#cloud-hypervisor-api)
2 - [External API](#external-api)
3 - [REST API](#rest-api)
4 - [REST API Location and availability](#rest-api-location-and-availability)
5 - [REST API Endpoints](#rest-api-endpoints)
6 - [Virtual Machine Manager (VMM) Actions](#virtual-machine-manager-vmm-actions)
7 - [Virtual Machine (VM) Actions](#virtual-machine-vm-actions)
8 - [REST API Examples](#rest-api-examples)
9 - [Create a Virtual Machine](#create-a-virtual-machine)
10 - [Boot a Virtual Machine](#boot-a-virtual-machine)
[all …]
H A Dvfio-user.md1 # Cloud Hypervisor VFIO-user HOWTO
3-user is an *experimental* protocol for allowing devices to be implemented in another process and …
5 The protocol is documented here: https://github.com/nutanix/libvfio-user/blob/master/docs/vfio-user
7 …*. Not all Cloud Hypervisor functionality is supported in particular: virtio-mem and iommu are not…
11--user-device socket=<path>` parameter is used to create a vfio-user device when creating the VM s…
13 ## Example (GPIO device)
15 There is a simple GPIO device included in the libvfio-user repository: https://github.com/nutanix/l…
17 Run the example from the libvfio-user repository:
20 rm /tmp/vfio-user.sock
21 ./build/dbg/samples/gpio-pci-idio-16 -v /tmp/vfio-user.sock &
[all …]
H A Dwindows.md3 Starting with the release version [0.10.0](https://github.com/cloud-hypervisor/cloud-hypervisor/rel…
7 - Host with KVM enabled
8 - [UEFI](uefi.md) capable Windows guest image with Virtio drivers integrated
22 - QEMU, version >=5.0.0 is recommended.
23 - Windows installation ISO. Obtained through MSDN, Visual Studio subscription, evaluation center, e…
24 - [VirtIO driver ISO](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virti…
25 - Suitable firmware for Cloud Hypervisor (`CLOUDHV.fd`) and for QEMU (`OVMF.fd`)
26 - With the suggested image size of 30G, there should be enough free disk space to hold the installa…
33 IMG_FILE=windows-disk.raw
35 VIRTIO_ISO_FILE=virtio-win-0.1.185.iso
[all …]
H A Dvdpa.md3 vDPA aims at achieving bare-metal performance for devices passed into a virtual
8 the VIRTIO specification on their data-path, while the control path is vendor
11 vDPA framework, being exposed through the vhost interface as a vhost-vdpa
12 device.
14 Because DMA accesses between device and guest are going through virtqueues,
15 migration can be achieved without requiring device's driver to implement any
18 must be done for each and every device's driver.
20 The official [website](https://vdpa-dev.gitlab.io/) contains some extensive
25 `VdpaConfig` (known as `--vdpa` from the CLI perspective) contains the list of
26 parameters available for the vDPA device.
[all …]
H A Dvirtiofs-root.md3 A quick guide for using virtiofs as a cloud-hypervisor guest's rootfs (i.e.
4 with no root block device). This document is a quick getting started guide.
13 * Part of the qemu-system-common package on Ubuntu
14 * Part of the qemu-common package on Fedora
15 2. cloud-hypervisor - the newer the better, but I tested with 0.12
16 3. a rootfs - This howto uses an alpine rootfs available here:
17 …* https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/x86_64/alpine-minirootfs-3.13.2-x86_64.tar.…
26 sudo tar -xf /path/to/alpine-minirootfs-3.13.1-x86_64.tar.gz
32 sudo chroot $PWD apk add openrc busybox-initscripts
33 # we are using the paravirt console in cloud-hypervisor, so enable it in init
[all …]
H A Diommu.md17 With a virtual IOMMU, the VMM stands between the guest driver and its device
29 user intends to run multiple VMs from this L1. We can end up with multiple L2
32 device implementation from the host VMM to access the entire guest L1 memory.
34 addresses the device is authorized to access.
50 ## Why virtio-iommu?
52 The Cloud Hypervisor project decided to implement the brand new virtio-iommu
53 device in order to provide a virtual IOMMU to its users. The reason being the
59 ## Pre-requisites
63 As of Kernel 5.14, virtio-iommu is available for both X86-64 and Aarch64.
68 virtio-iommu device and expose it through the ACPI IORT table. This can be
[all …]
/cloud-hypervisor/src/bin/
H A Dch-remote.rs3 // SPDX-License-Identifier: Apache-2.0
45 #[error("Error parsing device syntax")]
55 #[error("Error parsing user device syntax")]
57 #[error("Error parsing vDPA device syntax")]
78 fn vmm_ping(&self) -> zbus::Result<String>; in vmm_ping()
79 fn vmm_shutdown(&self) -> zbus::Result<()>; in vmm_shutdown()
80 fn vm_add_device(&self, device_config: &str) -> zbus::Result<Optional<String>>; in vm_add_device()
81 fn vm_add_disk(&self, disk_config: &str) -> zbus::Result<Optional<String>>; in vm_add_disk()
82 fn vm_add_fs(&self, fs_config: &str) -> zbus::Result<Optional<String>>; in vm_add_fs()
83 fn vm_add_net(&self, net_config: &str) -> zbus::Result<Optional<String>>; in vm_add_net()
[all …]
/cloud-hypervisor/vhost_user_net/src/
H A Dlib.rs7 // SPDX-License-Identifier: (Apache-2.0 AND BSD-3-Clause)
54 /// Failed to open tap device.
55 #[error("Failed to open tap device")]
68 pub const SYNTAX: &str = "vhost-user-net backend parameters \
73 fn from(e: Error) -> Self { in from()
84 /// Create a new virtio network device with the given TAP interface.
85 fn new(tap: Tap) -> Result<Self> { in new()
131 ) -> Result<Self> { in new()
165 fn num_queues(&self) -> usize { in num_queues()
169 fn max_queue_size(&self) -> usize { in max_queue_size()
[all …]
/cloud-hypervisor/
H A Drelease-notes.md1 - [v46.0](#v460)
2 - [File-level Locking Support with `--disk`](#file-level-locking-support-with---disk)
3 - [Improved Error Reporting with VM Resizing](#improved-error-reporting-with-vm-resizing)
4 - [IPv6 Address Support with `--net`](#ipv6-address-support-with---net)
5- [Experimental AArch64 Support with the MSHV Hypervisor](#experimental-aarch64-support-with-the-m…
6 - [Deprecated SGX Support](#deprecated-sgx-support)
7 - [Notable Bug Fixes](#notable-bug-fixes)
8 - [Contributors](#contributors)
9 - [v45.0](#v450)
10 - [Experimental `riscv64` Architecture Support](#experimental-riscv64-architecture-support)
[all …]
H A DREADME.md1 - [1. What is Cloud Hypervisor?](#1-what-is-cloud-hypervisor)
2 - [Objectives](#objectives)
3 - [High Level](#high-level)
4 - [Architectures](#architectures)
5 - [Guest OS](#guest-os)
6 - [2. Getting Started](#2-getting-started)
7 - [Host OS](#host-os)
8 - [Use Pre-built Binaries](#use-pre-built-binaries)
9 - [Packages](#packages)
10 - [Building from Source](#building-from-source)
[all …]
/cloud-hypervisor/vmm/src/
H A Ddevice_manager.rs4 // Use of this source code is governed by a BSD-style license that can be
5 // found in the LICENSE-BSD-3-Clause file.
9 // SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause
121 // Singleton devices / devices the user cannot name
137 // Devices that the user may name and for which we generate
138 // identifiers if the user doesn't give one
148 const VIRTIO_PCI_DEVICE_NAME_PREFIX: &str = "_virtio-pci";
150 /// Errors associated with device manager
161 /// Cannot create vhost-user-net device
162 #[error("Cannot create vhost-user-net device")]
[all …]
H A Dconfig.rs3 // SPDX-License-Identifier: Apache-2.0
32 #[error("Error parsing --fs: tag missing")]
35 #[error("Error parsing --fs: max tag length is {VIRTIO_FS_TAG_LEN}")]
38 #[error("Error parsing --fs: socket missing")]
41 #[error("Error parsing --pmem: file missing")]
44 #[error("Error parsing --vsock: socket missing")]
47 #[error("Error parsing --vsock: cid missing")]
50 #[error("Error parsing --restore: source_url missing")]
53 #[error("Error parsing --cpus")]
56 #[error("Invalid feature in --cpus features list: {0}")]
[all …]
H A Dmemory_manager.rs3 // SPDX-License-Identifier: Apache-2.0
66 const SNAPSHOT_FILENAME: &str = "memory-ranges";
104 pub fn region(&self) -> &Arc<GuestRegionMmap> { in region()
110 pub fn hotplugged_size(&self) -> u64 { in hotplugged_size()
113 pub fn hugepages(&self) -> bool { in hugepages()
116 pub fn blocks_state(&self) -> &Arc<Mutex<BlocksState>> { in blocks_state()
119 pub fn plugged_ranges(&self) -> MemoryRangeTable { in plugged_ranges()
134 pub fn regions(&self) -> &Vec<Arc<GuestRegionMmap>> { in regions()
137 pub fn virtio_mem_zone(&self) -> &Option<VirtioMemZone> { in virtio_mem_zone()
140 pub fn virtio_mem_zone_mut(&mut self) -> Option<&mut VirtioMemZone> { in virtio_mem_zone_mut()
[all …]
/cloud-hypervisor/virtio-devices/src/
H A Dlib.rs4 // Use of this source code is governed by a BSD-style license that can be
5 // found in the LICENSE-BSD-3-Clause file.
9 // SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause
24 mod device; module
49 pub use self::device::{
88 #[error("Failed to activate virtio device")]
94 #[error("Failed to setup vhost-user-fs daemon")]
96 #[error("Failed to setup vhost-user daemon")]
102 #[error("Failed to activate the vDPA device")]
116 #[error("Failed to update memory vhost-user")]
[all …]
H A Diommu.rs3 // SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause
44 /// "eventq" lets the device report any fault or other asynchronous event to
50 /// Because virtio-iommu expects one MSI reserved region, we must provide it,
337 // mappings required from various devices such as VFIO or vhost-user ones,
343 // virtio-iommu (giving the link device_id <=> domain).
349 ) -> result::Result<usize, Error> { in parse()
371 let desc_size_left = (desc.len() as usize) - req_offset; in parse()
414 // Add endpoint associated with specific domain in parse()
434 // Add new domain with no mapping if the entry didn't exist yet in parse()
498 // mapping is done on a per-container level, not a per-domain level in parse()
[all …]
/cloud-hypervisor/vmm/src/api/http/
H A Dmod.rs3 // SPDX-License-Identifier: Apache-2.0
75 /// The error message contained in the response is supposed to be user-facing,
78 pub fn error_response(error: HttpError, status: StatusCode) -> Response { in error_response()
85 // See <https://github.com/rust-lang/rust/issues/141673> in error_response()
112 ) -> Response { in handle_request()
149 ) -> std::result::Result<Option<Body>, HttpError> { in put_handler()
158 ) -> std::result::Result<Option<Body>, HttpError> { in get_handler()
175 /// HTTP_ROUTES contain all the cloud-hypervisor HTTP routes.
182 endpoint!("/vm.add-device"),
186 endpoint!("/vm.add-user-device"),
[all …]
/cloud-hypervisor/vmm/src/api/openapi/
H A Dcloud-hypervisor.yaml4 description: Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
7 url: http://www.apache.org/licenses/LICENSE-2.0.html
11 - url: http://localhost/api/v1
27 summary: Shuts the cloud-hypervisor VMM.
35 summary: Returns general information about the cloud-hypervisor Virtual Machine (VM) instance.
57 …summary: Create the cloud-hypervisor Virtual Machine (VM) instance. The instance is not booted, on…
72 summary: Delete the cloud-hypervisor Virtual Machine (VM) instance.
136 /vm.power-button:
139 operationId: power-buttonVM
166 /vm.resize-zone:
[all …]
/cloud-hypervisor/vhost_user_block/src/
H A Dlib.rs9 // SPDX-License-Identifier: (Apache-2.0 AND BSD-3-Clause)
45 // Polling for 50us should be enough to cover for the device latency
78 pub const SYNTAX: &str = "vhost-user-block backend parameters \
84 fn from(e: Error) -> Self { in from()
106 ) -> Result<Self> { in new()
121 ) -> bool { in process_queue()
213 ) -> Result<Self> { in new()
237 seg_max: 128 - 2, in new()
300 fn num_queues(&self) -> usize { in num_queues()
304 fn max_queue_size(&self) -> usize { in max_queue_size()
[all …]
/cloud-hypervisor/virtio-devices/src/vhost_user/
H A Dmod.rs2 // SPDX-License-Identifier: Apache-2.0
51 #[error("Failed binding vhost-user socket")]
67 #[error("Failed to open vhost device")]
79 #[error("Vhost-user Backend not support vhost-user protocol")]
113 #[error("Add memory region failed")]
127 #[error("Invalid features provided from vhost-user backend")]
135 #[error("Migration is not supported by this vhost-user device")]
187 ) -> std::result::Result<(), EpollHelperError> { in run()
204 fn reconnect(&mut self, helper: &mut EpollHelper) -> std::result::Result<(), EpollHelperError> { in reconnect()
219 "failed connecting vhost-user backend {e:?}" in reconnect()
[all …]
/cloud-hypervisor/scripts/
H A Ddev_cli.sh5 # SPDX-License-Identifier: Apache-2.0
9 CTR_IMAGE_TAG="ghcr.io/cloud-hypervisor/cloud-hypervisor"
11 # Needs to match explicit version in docker-image.yaml workflow
12 CTR_IMAGE_VERSION="20250412-0"
23 CLH_CTR_BUILD_DIR="/tmp/cloud-hypervisor/ctr-build"
27 CTR_CLH_ROOT_DIR="/cloud-hypervisor"
53 [ -t 1 ] && [ -n "$TERM" ] &&
61 [ -t 1 ] && [ -n "$TERM" ] &&
62 echo -n "$(tput setaf 2)[$CLI_NAME]$(tput sgr0) $*" ||
69 [ -t 2 ] && [ -n "$TERM" ] &&
[all …]
/cloud-hypervisor/pci/src/
H A Dvfio.rs3 // SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause
50 #[error("Failed to create user memory region")]
52 #[error("Failed to DMA map: {0} for device {1} (guest BDF: {2})")]
54 #[error("Failed to DMA unmap: {0} for device {1} (guest BDF: {2})")]
60 #[error("Failed to enable MSI-x")]
86 fn get_register_value(&self) -> u8 { in get_register_value()
121 fn update(&mut self, offset: u64, data: &[u8]) -> Option<InterruptUpdateAction> { in update()
155 fn update(&mut self, offset: u64, data: &[u8]) -> Option<InterruptUpdateAction> { in update()
176 fn table_accessed(&self, bar_index: u32, offset: u64) -> bool { in table_accessed()
192 fn update_msi(&mut self, offset: u64, data: &[u8]) -> Option<InterruptUpdateAction> { in update_msi()
[all …]
/cloud-hypervisor/src/
H A Dmain.rs3 // SPDX-License-Identifier: Apache-2.0
40 #[cfg(feature = "dhat-heap")]
71 #[error("Error parsing --api-socket")]
73 #[error("Error parsing --event-monitor")]
76 #[error("`--dbus-object-path` option isn't provided")]
79 #[error("`--dbus-service-name` option isn't provided")]
81 #[error("Error parsing --event-monitor: path or fd required")]
88 #[error("Error parsing --gdb")]
91 #[error("Error parsing --gdb: path required")]
123 fn enabled(&self, _metadata: &log::Metadata) -> bool { in enabled()
[all …]
/cloud-hypervisor/tests/
H A Dintegration.rs3 // SPDX-License-Identifier: Apache-2.0
7 // hence have known dead-code. This annotation silences dead-code
36 pub const FOCAL_IMAGE_NAME: &str = "focal-server-cloudimg-amd64-custom-20210609-0.raw";
38 "jammy-server-cloudimg-amd64-custom-vfio-20241012-0.raw";
39 pub const FOCAL_IMAGE_NAME_QCOW2: &str = "focal-server-cloudimg-amd64-custom-20210609-0.qcow2";
41 "focal-server-cloudimg-amd64-custom-20210609-0-backing.qcow2";
42 pub const FOCAL_IMAGE_NAME_VHD: &str = "focal-server-cloudimg-amd64-custom-20210609-0.vhd";
43 pub const FOCAL_IMAGE_NAME_VHDX: &str = "focal-server-cloudimg-amd64-custom-20210609-0.vhdx";
44 pub const JAMMY_IMAGE_NAME: &str = "jammy-server-cloudimg-amd64-custom-20241017-0.raw";
45 pub const WINDOWS_IMAGE_NAME: &str = "windows-server-2022-amd64-2.raw";
[all …]

12