Home
last modified time | relevance | path

Searched full:memory (Results 1 – 25 of 155) sorted by relevance

1234567

/cloud-hypervisor/docs/
H A Dmemory.md1 # Memory chapter
3 Cloud Hypervisor has many ways to expose memory to the guest VM. This document
9 `MemoryConfig` or what is known as `--memory` from the CLI perspective is the
29 --memory <memory> Memory parameters "size=<guest_memory_size>,mergeable=on|off,shared=on|off,hugepa…
36 This option is mandatory when using the `--memory` parameter.
43 --memory size=1G
54 on a single host, as it will reduce the amount of memory consumed by each VM.
61 --memory size=1G,mergeable=on
66 Selects the way of adding and/or removing memory to/from a booted VM.
73 --memory size=1G,hotplug_method=acpi
[all …]
H A Dhotplug.md3 Currently Cloud Hypervisor supports hot plugging of CPUs devices (x86 only), PCI devices and memory
27 --memory size=1024M \
64 ## Memory Hot Plug
68 Extra memory can be added from a running `cloud-hypervisor` instance. This is controlled by two mec…
70 1. Allocating some of the guest physical address space for hotplug memory.
71 … case of expanding the memory for the VM the new memory will be hotplugged into the running VM, if…
73 To use memory hotplug start the VM specifying some size RAM in the `hotplug_size` parameter to the
85 --memory size=1024M,hotplug_size=8192M \
92 …essary to run the following command inside the VM to make it automatically online the added memory:
95 root@ch-guest ~ # echo online | sudo tee /sys/devices/system/memory/auto_online_blocks
[all …]
H A Diommu.md14 to increase the security regarding the memory accesses performed by the virtual
19 the guest memory. This is standard interposition that is performed here by the
25 devices from accessing the entire guest memory is pointless.
32 device implementation from the host VMM to access the entire guest L1 memory.
55 handled from the guest itself, it removes the complexity of trapping memory
87 --memory size=512M \
146 By default, the guest memory is mapped with 4k pages and no huge pages, which
154 memory, this means the entire mapping of the L2 guest need to be stored into
187 --memory size=8G,hugepages=on \
204 --memory size=8G,hugepages=on \
[all …]
H A Dballoon.md4 Its main purpose is to provide the host a way to reclaim memory by controlling
5 the amount of memory visible to the guest. But it also provides some interesting
6 features related to guest memory management.
29 guest will be able to use 3GiB of accessible memory. The guest sees all the RAM
45 Allow the guest to deflate the balloon if running Out Of Memory (OOM). Assuming
H A Dfs.md41 overall footprint on host memory. This increases the maximum density of virtual
46 the footprint on host memory.
67 Correct functioning of `--fs` requires `--memory shared=on` to facilitate
68 interprocess memory sharing.
75 --memory size=1G,shared=on \
H A Dvfio.md18 In this example we're going to assign a PCI memory card (SD, MMC, etc) reader
89 --memory size=512M \
132 peer-to-peer transactions instead of a shared memory buffer. This drastically
169 Memory at f9000000 (32-bit, non-prefetchable) [size=16M]
170 Memory at 46000000000 (64-bit, prefetchable) [size=64G]
171 Memory at 48040000000 (64-bit, prefetchable) [size=32M]
/cloud-hypervisor/vmm/src/igvm/
H A Dloader.rs15 /// Structure to hold the guest memory info/layout to check
16 /// the if the memory is accepted within the layout.
17 /// Adds up the total bytes written to the guest memory
19 memory: GuestMemoryAtomic<GuestMemoryMmap<AtomicBitmap>>, field
35 #[error("memory unavailable")]
39 #[error("invalid vp context memory")]
46 pub fn new(memory: GuestMemoryAtomic<GuestMemoryMmap<AtomicBitmap>>) -> Loader { in new()
48 memory, in new()
104 .memory in import_pages()
105 .memory() in import_pages()
[all …]
H A Dmod.rs24 * guest memory. Currently igvm only supported on Microsoft Hypervisor, as
74 /// The startup memory type used to notify a well behaved host that memory should be present before…
79 /// The range is normal memory.
/cloud-hypervisor/arch/src/
H A Dlib.rs39 #[error("The memory map table extends past the end of guest memory")]
41 #[error("Error writing memory map table to guest memory")]
43 #[error("The hvm_start_info structure extends past the end of guest memory")]
45 #[error("Error writing hvm_start_info to guest memory")]
49 #[error("Error writing module entry to guest memory")]
51 #[error("RSDP extends past the end of guest memory")]
62 /// Type for memory region types.
68 /// SubRegion memory region.
69 /// A SubRegion is a memory region sub-region, allowing for a region
71 /// For example, the x86 32-bit memory hole is a SubRegion.
[all …]
/cloud-hypervisor/vmm/src/
H A Dmemory_manager.rs66 const SNAPSHOT_FILENAME: &str = "memory-ranges";
76 // Memory policy constants
216 /// Mmap backed guest memory error
217 #[error("Mmap backed guest memory error")]
220 /// Failed to allocate a memory range.
221 #[error("Failed to allocate a memory range")]
236 /// The requested hotplug memory addition is not a valid size
237 #[error("The requested hotplug memory addition is not a valid size")]
240 /// Failed to create the user memory region.
241 #[error("Failed to create the user memory region")]
[all …]
/cloud-hypervisor/hypervisor/src/arch/x86/emulator/instructions/
H A Dmov.rs318 let memory: [u8; 8] = target_rax.to_le_bytes(); in test_mov_r64_m64() localVariable
320 let mut vmm = MockVmm::new(ip, vec![(Register::RAX, rax)], Some((rax + rax, &memory))); in test_mov_r64_m64()
400 let mut memory: [u8; 1] = [0; 1]; in test_mov_m8_r8() localVariable
401 vmm.read_memory(rax, &mut memory).unwrap(); in test_mov_m8_r8()
403 assert_eq!(u8::from_le_bytes(memory), dh); in test_mov_m8_r8()
421 let mut memory: [u8; 4] = [0; 4]; in test_mov_m32_r32() localVariable
422 vmm.read_memory(rax, &mut memory).unwrap(); in test_mov_m32_r32()
424 assert_eq!(u32::from_le_bytes(memory), esi); in test_mov_m32_r32()
443 let mut memory: [u8; 4] = [0; 4]; in test_mov_m32imm32_r32() localVariable
444 vmm.read_memory(rax + displacement, &mut memory).unwrap(); in test_mov_m32imm32_r32()
[all …]
H A Dmovs.rs43 let mut memory: [u8; 8] = [0; 8]; localVariable
53 .read_memory(src, &mut memory[0..len])
56 .write_memory(dst, &memory[0..len])
114 let memory: [u8; 32] = [ in test_rep_movsq_m64_m64() localVariable
132 let mut vmm = MockVmm::new(ip, regs, Some((0, &memory))); in test_rep_movsq_m64_m64()
148 let memory: [u8; 24] = [ in test_rep_movsd_m32_m32() localVariable
160 let mut vmm = MockVmm::new(ip, regs, Some((0, &memory))); in test_rep_movsd_m32_m32()
178 let memory: [u8; 4] = [ in test_movsd_m32_m32() localVariable
185 let mut vmm = MockVmm::new(ip, regs, Some((0, &memory))); in test_movsd_m32_m32()
201 let memory: [u8; 24] = [ in test_rep_movsw_m16_m16() localVariable
[all …]
H A Dstos.rs100 let memory: [u8; 12] = [ in test_rep_stosb() localVariable
113 let mut vmm = MockVmm::new(ip, regs, Some((0, &memory))); in test_rep_stosb()
128 let memory: [u8; 4] = [ in test_stosw() localVariable
135 let mut vmm = MockVmm::new(ip, regs, Some((0, &memory))); in test_stosw()
151 let memory: [u8; 8] = [ in test_rep_stosw() localVariable
163 let mut vmm = MockVmm::new(ip, regs, Some((0, &memory))); in test_rep_stosw()
178 let memory: [u8; 12] = [ in test_rep_stosd() localVariable
191 let mut vmm = MockVmm::new(ip, regs, Some((0, &memory))); in test_rep_stosd()
213 let memory: [u8; 8] = [ in test_rep_stosq() localVariable
225 let mut vmm = MockVmm::new(ip, regs, Some((0, &memory))); in test_rep_stosq()
H A Dmod.rs48 OpKind::Memory => { in get_op()
50 let mut memory: [u8; 8] = [0; 8]; in get_op() localVariable
51 platform.read_memory(addr, &mut memory[0..op_size])?; in get_op()
52 <u64>::from_le_bytes(memory) in get_op()
99 OpKind::Memory => { in set_op()
109 // Returns the linear a.k.a. virtual address for a memory operand.
/cloud-hypervisor/vm-migration/src/
H A Dprotocol.rs20 // 5: Dest -> Source : sends "ok response" when ready to accept memory data
21 // 6: Source -> Dest : send "memory command" followed by table of u64 pairs (GPA, size)
22 // followed by the memory described in those pairs.
24 // 7: Dest -> Source : sends "ok response" when ready to accept more memory data
25 // 8..(n-4): Repeat steps 6 and 7 until source has no more memory to send
32 // "Local version": (Handing FDs across socket for memory)
39 // 5: Dest -> Source : sends "ok response" when ready to accept memory data
40 // 6: Source -> Dest : send "memory fd command" followed by u16 slot ID and FD for memory
42 // 8..(n-4): Repeat steps 6 and 7 until source has no more memory to send
59 Memory, enumerator
[all …]
/cloud-hypervisor/virtio-devices/src/
H A Dballoon.rs67 #[error("Guest gave us bad memory addresses.")]
172 memory: &GuestMemoryMmap, in advise_memory_range()
177 let hva = memory in advise_memory_range()
190 memory: &GuestMemoryMmap, in release_memory_range()
194 let region = memory.find_region(range_base).ok_or(Error::GuestMemory( in release_memory_range()
214 Self::advise_memory_range(memory, range_base, range_len, libc::MADV_DONTNEED) in release_memory_range()
219 memory: &GuestMemoryMmap, in release_memory_range_4k()
227 return Self::release_memory_range(memory, range_base, range_len); in release_memory_range_4k()
235 // We are trying to free memory region in a different pfn with current pbp. Flush pbp. in release_memory_range_4k()
243 memory, in release_memory_range_4k()
[all …]
H A Dmem.rs50 // 128MiB is the standard memory block size in Linux. A virtio-mem region must
80 // State of memory blocks is "plugged"
82 // State of memory blocks is "unplugged"
84 // State of memory blocks is "mixed"
87 // request to plug memory blocks
89 // request to unplug memory blocks
93 // request information about the plugged state of memory blocks
104 #[error("Guest gave us bad memory addresses")]
128 #[error("Failed discarding memory range")]
176 // Start address of the memory region. Cannot change.
[all …]
/cloud-hypervisor/hypervisor/src/arch/emulator/
H A Dmod.rs48 #[error("Memory read failure")]
51 #[error("Memory write failure")]
75 #[error("Unsupported memory size")]
98 /// It's mostly a guest resources (memory and CPU state) getter and setter.
106 /// Read guest memory into a u8 slice.
115 /// Write a u8 slice into guest memory.
141 /// Fetch instruction bytes from memory.
/cloud-hypervisor/hypervisor/src/
H A Dvm.rs104 /// Create user memory error
106 #[error("Failed to create user memory")]
109 /// Remove user memory region error
111 #[error("Failed to remove user memory")]
148 /// Write to Guest memory
150 #[error("Failed to write to guest memory")]
153 /// Read Guest memory
155 #[error("Failed to read guest memory")]
219 /// Error initializing the TDX memory region
221 #[error("Failed to initialize memory region TDX")]
[all …]
/cloud-hypervisor/arch/src/x86_64/
H A Dmod.rs67 /// Address in guest memory where the guest must start execution
134 /// Error writing MP table to memory.
135 #[error("Error writing MP table to memory")]
899 regs::setup_sregs(&guest_memory.memory(), vcpu).map_err(Error::SregsConfiguration)?; in configure_vcpu()
905 /// Returns a Vec of the valid memory addresses.
912 // 0 GiB ~ 3GiB: memory before the gap in arch_memory_regions()
918 // 4 GiB ~ inf: memory after the gap in arch_memory_regions()
920 // 3 GiB ~ 3712 MiB: 32-bit device memory hole in arch_memory_regions()
926 // 3712 MiB ~ 3968 MiB: 32-bit reserved memory hole in arch_memory_regions()
939 /// * `guest_mem` - The memory to be used by the guest.
[all …]
/cloud-hypervisor/
H A Drelease-notes.md51 …- [Optimized Boot Time with Parallel Memory Prefault](#optimized-boot-time-with-parallel-memory-pr…
175 - [`AArch64` Memory Map Improvements](#aarch64-memory-map-improvements)
289 - [Memory Zones](#memory-zones)
302 - [Virtio Memory Ballooning Support](#virtio-memory-ballooning-support)
318 …- [Block, Network, Persistent Memory (PMEM), VirtioFS and Vsock hotplug](#block-network-persistent…
322 - [Alternative Memory Hotplug: `virtio-mem`](#alternative-memory-hotplug-virtio-mem)
356 - [Memory mapped virtio transport](#memory-mapped-virtio-transport)
359 - [Large memory guests](#large-memory-guests)
371 - [Virtual persistent memory](#virtual-persistent-memory)
503 expected to improve performance, such as reducing memory usage and reduce CPU
[all …]
/cloud-hypervisor/devices/src/
H A Dpvmemcontrol.rs39 #[error("Guest gave us bad memory addresses")]
291 if !guest_memory.memory().check_range(
433 let memory = self.mem.memory(); in operate_on_memory_range() localVariable
437 // assume guest memory is not interleaved with vmm memory on the host. in operate_on_memory_range()
438 if !memory.check_range(range_base, range_len) { in operate_on_memory_range()
443 let hva = memory in operate_on_memory_range()
454 // SAFETY: [`base`, `base` + `len`) is guest memory in madvise()
461 // SAFETY: [`base`, `base` + `len`) is guest memory in mlock()
468 // SAFETY: [`base`, `base` + `len`) is guest memory in munlock()
480 // SAFETY: [`base`, `base` + `len`) is guest memory in mprotect()
[all …]
/cloud-hypervisor/net_util/src/
H A Dctrl_queue.rs76 .memory() in process()
94 .memory() in process()
112 .memory() in process()
139 .memory() in process()
150 .add_used(desc_chain.memory(), desc_chain.head_index(), len) in process()
/cloud-hypervisor/vm-allocator/src/
H A Dmemory_slot.rs9 /// Allocator for KVM memory slots
16 /// Next free memory slot
24 /// Release memory slot for reuse
/cloud-hypervisor/hypervisor/src/arch/x86/emulator/
H A Dmod.rs669 memory: Vec<u8>, field
676 pub fn new(ip: u64, regs: Vec<(Register, u64)>, memory: Option<(u64, &[u8])>) -> MockVmm { in new()
703 memory: vec![0; 8192], in new()
707 if let Some(mem) = memory { in new()
743 "Memory read {} bytes from [{:#x} -> {:#x}]", in read_memory()
748 data.copy_from_slice(&self.memory[gva as usize..gva as usize + data.len()]); in read_memory()
754 "Memory write {} bytes at [{:#x} -> {:#x}]", in write_memory()
759 self.memory[gva as usize..gva as usize + data.len()].copy_from_slice(data); in write_memory()
795 // memory.
804 let memory = [ in test_empty_instruction_stream() localVariable
[all …]

1234567