| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
migration: add external guest memory snapshot mode Add memory=external for file snapshots. In this mode the snapshot memory file keeps address-space metadata and the ram-list section, while guest RAM bytes are provided by an external flat RAM image. Device state and GPU state continue to use the existing full save/restore paths. On the save side, QMP migrate accepts memory=full|external. It also accepts mapped=false for URI compatibility, but mapped is restore-side behavior and is ignored by snapshot save. Restore-only UFFD socket options remain rejected on the save path. On the restore side, memory=external is valid only for file snapshots restored through UFFD. The external mode registers UFFD mappings with offsets starting at 0 so they match the external guest RAM image; full-memory snapshots keep using offsets inside the snapshot memory file. (cherry picked from commit 66ef1a3d765eb98a35c7b7b2ca8b792ce04c4d60) | 4 天前 | |
feat(mmds): wire QMP commands and implement MMDS handlers for all machine types QMP layer (machine_manager/src/qmp/): - qmp_schema.rs: register put-mmds, patch-mmds, get-mmds, put-mmds-config with typed arg structs (MmdsPutArgs, MmdsPatchArgs, MmdsConfigArgs). - qmp_socket.rs: dispatch the four new commands to DeviceInterface. - machine.rs: add default "not supported" stubs to DeviceInterface trait. LightMachine (micro_common/mod.rs): - Hold mmds_store: Arc<Mutex<MmdsStore>> on the struct. - Implement mmds_put/patch/get/config; propagate the store to virtio-net slots in fill_replaceable_device / add_net_replaceable_device. - Clear the store reference on device detach. StdMachine (standard_common/mod.rs, aarch64 + x86_64): - Add mmds_store: Option<Arc<Mutex<MmdsStore>>> to MachineBase (None for microvm which owns its own); initialize in StdMachine::new(). - Wire the store into virtio-net-pci devices at add_net_device time when the iface ID is already present in the MMDS config. - mmds_config rejects vhost interfaces (they bypass the virtio TX path), writes the new MmdsConfig, then atomically enables or clears MmdsTcpStack on each virtio-net device. - Make net_devs pub(crate) so standard_common can access it directly. mmds/mod.rs: add parse_ipv4() helper and unit tests covering MmdsStore put/patch/get, IMDSv2 token lifecycle, interface filtering, parse_ipv4 edge cases, and StdMachine MMDS handler logic. (cherry picked from commit 1278034bb65453927a84409f570dfcf67c67439e) | 4 天前 | |
tests: add snapshot memory query workflow Add tests for the snapshot memory query workflow and file snapshot detection path. The QMP socket regression checks that save-side migrate URI parsing recognizes file snapshots with memory=external and mapped=false, so the existing snapshot stop/resume wrapper is used. The ignored mod-test documents the manual QMP flow for pausing a VM and querying page state and memory mappings from a test VM. (cherry picked from commit 988fc21e0c475d0976f29eb70d759e379f5a8059) | 4 天前 | |
trace: gate runtime control support 1. Add an internal trace feature that gates trace state registry, regex matching, command-line trace parsing, and QMP trace control commands. 2. Keep trace_to_logger, trace_to_ftrace, and trace_to_hitrace as the public feature entry points that enable the internal trace control path. 3. Remove default runtime regex users by replacing device id deletion matching and making test-only or VNC-only regex users conditional. 4. Verify all trace_to_logger, trace_to_ftrace, and trace_to_hitrace debug feature combinations build without warnings. (cherry picked from commit 6a5978d9c31b85b91d8b373e205ed1cbe04204f8) | 4 天前 | |
replace error-chain with thiserror+anyhow | 3 年前 | |
event_loop: use OnceLock to replace static mut Signed-off-by: Fan Xuan Zhe <fanxuanzhe@huawei.com> Signed-off-by: Tao Chen <boby.chen@huawei.com> | 7 个月前 | |
feat(mmds): add MMDS core module with data store and in-process TCP/IP stack Add machine_manager/src/mmds/ with two files: - mod.rs: MmdsStore backed by MmdsData (instanceID, envID, address, accessTokenHash). Supports IMDSv1 (unauthenticated GET) and IMDSv2 (PUT /latest/api/token → TTL-bounded token, validated per-request via X-metadata-token header). MmdsConfig holds version (V2 by default), bound interface IDs, and endpoint IP (default 169.254.169.254). - tcp_stack.rs: MmdsTcpStack — minimal in-process TCP state machine keyed by (src_ip, src_port). Parses VirtioNetHdr + Ethernet + IPv4 + TCP, drives Listen→SynReceived→Established→CloseWait→LastAck lifecycle, demultiplexes HTTP/1.1 GET/PUT under /latest/ to MmdsStore, and returns raw response frames ready for guest RX virtqueue injection. (cherry picked from commit 203c3415c5a9ec6fafe45a7e122247d90f9c20c1) | 4 天前 | |
machine: expose guest RAM snapshot query data Implement the snapshot memory QMP queries for standard and micro machines. The mapping query returns RAM host addresses, sizes, page sizes, and flat image offsets. The page-state query returns resident and zero-page bitmaps using the same flat RAM order. Residency is derived from /proc/self/pagemap rather than mincore, so pages that are present in RAM or swapped out are both reported as resident. Swapped pages are read back in before zero-page classification so the empty bitmap remains exact. All snapshot memory query paths require the VM to be paused so external tools observe a stable memory layout and page-state view. The dirty bitmap command uses the UFFD query-and-reset helper introduced earlier. (cherry picked from commit 8eb89af3594843237af9edcc64d6cc34b0ab4f4f) | 4 天前 | |
virtio-snd: manage vm pause notifier via Stream RAII lifecycle Signed-off-by: chaisong <chai_song@126.com> (cherry picked from commit e69daa2b4307be6929570a2003b25c1590585225) | 4 天前 | |
hisysevent: adapt the type of argument According to the review conclusion, adapt the type of argument. Signed-off-by: Yan Wang <wangyan122@huawei.com> Signed-off-by: Fei Xu <xufei30@huawei.com> | 4 个月前 | |
fix(socket): combine CRLF into one string in send_str to avoid split writes send_str previously appended "\r" to the message string and wrote "\n" in a separate write() call, splitting the line terminator across two syscalls and risking partial delivery or interleaving on the socket. Merge "\r\n" into the message string so the entire line is sent in a single write_all call. (cherry picked from commit 864608eecf5994d8953f7e1aeed91de079f5f104) | 4 天前 | |
virtio-snd: support state query Support state query for playback and capture. This patch also unifies the keywords used by scream and virtio-snd. Signed-off-by: chaisong <chai_song@126.com> (cherry picked from commit 449768c55c36cf6229f8316f353ef55e5f9874c1) | 4 天前 | |
Cleaner: Break into small lock to avoid deadlock The block exit_notifier may wait for iothread, which in turn wait on cleaner, causing deadlock. Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com> | 4 个月前 | |
machine_manager: Fix typos, modernize global init, and add build script Replaced all instances of "Unknow" with the correct spelling "Unknown". Improved indentation in comments to enhance clarity and consistency. Replaced unsafe static global QMP_CHANNEL with OnceLock for thread-safe lazy initialization. Added a build.rs script to register custom cfg flags for conditional compilation checks. Added missing Sync and Send implementations to Socket with safety annotations. Fixed minor logic issues in socket message writing using write_all for better robustness. Signed-off-by: Fei Xu <xufei30@huawei.com> | 1 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 4 天前 | ||
| 4 天前 | ||
| 4 天前 | ||
| 4 天前 | ||
| 3 年前 | ||
| 7 个月前 | ||
| 4 天前 | ||
| 4 天前 | ||
| 4 天前 | ||
| 4 个月前 | ||
| 4 天前 | ||
| 4 天前 | ||
| 4 个月前 | ||
| 1 年前 |