[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 3/4] KVM: Rename KVMMemoryListener.nr_used_slots to nr_slots_u
From: |
Peter Xu |
Subject: |
[PATCH v2 3/4] KVM: Rename KVMMemoryListener.nr_used_slots to nr_slots_used |
Date: |
Wed, 4 Sep 2024 18:35:09 -0400 |
This will make all nr_slots counters to be named in the same manner.
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
---
include/sysemu/kvm_int.h | 2 +-
accel/kvm/kvm-all.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/sysemu/kvm_int.h b/include/sysemu/kvm_int.h
index 48e496b3d4..b705dfc9b4 100644
--- a/include/sysemu/kvm_int.h
+++ b/include/sysemu/kvm_int.h
@@ -45,7 +45,7 @@ typedef struct KVMMemoryUpdate {
typedef struct KVMMemoryListener {
MemoryListener listener;
KVMSlot *slots;
- unsigned int nr_used_slots;
+ unsigned int nr_slots_used;
unsigned int nr_slots_allocated;
int as_id;
QSIMPLEQ_HEAD(, KVMMemoryUpdate) transaction_add;
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index bc1b039190..b7fb73ae18 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -239,7 +239,7 @@ unsigned int kvm_get_free_memslots(void)
if (!s->as[i].ml) {
continue;
}
- used_slots = MAX(used_slots, s->as[i].ml->nr_used_slots);
+ used_slots = MAX(used_slots, s->as[i].ml->nr_slots_used);
}
kvm_slots_unlock();
@@ -1510,7 +1510,7 @@ static void kvm_set_phys_mem(KVMMemoryListener *kml,
}
start_addr += slot_size;
size -= slot_size;
- kml->nr_used_slots--;
+ kml->nr_slots_used--;
} while (size);
return;
}
@@ -1549,7 +1549,7 @@ static void kvm_set_phys_mem(KVMMemoryListener *kml,
ram_start_offset += slot_size;
ram += slot_size;
size -= slot_size;
- kml->nr_used_slots++;
+ kml->nr_slots_used++;
} while (size);
}
--
2.45.0
[PATCH v2 2/4] KVM: Define KVM_MEMSLOTS_NUM_MAX_DEFAULT, Peter Xu, 2024/09/04
[PATCH v2 3/4] KVM: Rename KVMMemoryListener.nr_used_slots to nr_slots_used,
Peter Xu <=
[PATCH v2 4/4] KVM: Rename KVMState->nr_slots to nr_slots_max, Peter Xu, 2024/09/04