summary refs log tree commit diff stats
path: root/include
diff options
context:
space:
mode:
authorHarsh Prateek Bora <harshpb@linux.ibm.com>2024-06-18 13:53:53 +0530
committerNicholas Piggin <npiggin@gmail.com>2024-07-26 09:21:06 +1000
commit18530e7c57dec3d82d02ed17038661e2005162c1 (patch)
tree761edbc17ad48e9d1814d72ab580bc768f385ce9 /include
parentc6a3d7bc9e3acf2431ac23ae6dbeb28aa92f873c (diff)
downloadfocaccia-qemu-18530e7c57dec3d82d02ed17038661e2005162c1.tar.gz
focaccia-qemu-18530e7c57dec3d82d02ed17038661e2005162c1.zip
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 <npiggin@gmail.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/exec/cpu-common.h2
1 files changed, 2 insertions, 0 deletions
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);