hypervisor: Fix clippy: for_kv_map

Fix use of a paired map iterator when only the values are cared about.

Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
Rob Bradford
2026-05-27 12:18:00 +01:00
committed by Bo Chen
parent d0634d18d9
commit 673d4a441c
2 changed files with 3 additions and 3 deletions

View File

@@ -1275,7 +1275,7 @@ impl vm::Vm for KvmVm {
///
fn start_dirty_log(&self) -> vm::Result<()> {
let dirty_log_slots = self.dirty_log_slots.read().unwrap();
for (_, s) in dirty_log_slots.iter() {
for s in dirty_log_slots.values() {
let region = kvm_userspace_memory_region2 {
slot: s.slot,
guest_phys_addr: s.guest_phys_addr,
@@ -1301,7 +1301,7 @@ impl vm::Vm for KvmVm {
///
fn stop_dirty_log(&self) -> vm::Result<()> {
let dirty_log_slots = self.dirty_log_slots.read().unwrap();
for (_, s) in dirty_log_slots.iter() {
for s in dirty_log_slots.values() {
let region = kvm_userspace_memory_region2 {
slot: s.slot,
guest_phys_addr: s.guest_phys_addr,

View File

@@ -2210,7 +2210,7 @@ impl vm::Vm for MshvVm {
// Before disabling the dirty page tracking we need
// to set the dirty bits in the Hypervisor
// This is a requirement from Microsoft Hypervisor
for (_, s) in dirty_log_slots.iter() {
for s in dirty_log_slots.values() {
self.fd
.get_dirty_log(
s.guest_pfn,