From 18530e7c57dec3d82d02ed17038661e2005162c1 Mon Sep 17 00:00:00 2001 From: Harsh Prateek Bora Date: Tue, 18 Jun 2024 13:53:53 +0530 Subject: cpu-common.c: export cpu_get_free_index to be reused later This helper provides an easy way to identify the next available free cpu index which can be used for vcpu creation. Until now, this is being called at a very later stage and there is a need to be able to call it earlier (for now, with ppc64) hence the need to export. Suggested-by: Nicholas Piggin Reviewed-by: Nicholas Piggin Signed-off-by: Harsh Prateek Bora Signed-off-by: Nicholas Piggin --- include/exec/cpu-common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/exec/cpu-common.h') diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 240ee04369..2e1b499cb7 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -35,6 +35,8 @@ void cpu_list_lock(void); void cpu_list_unlock(void); unsigned int cpu_list_generation_id_get(void); +int cpu_get_free_index(void); + void tcg_iommu_init_notifier_list(CPUState *cpu); void tcg_iommu_free_notifier_list(CPUState *cpu); -- cgit 1.4.1