aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-06-17 07:02:17 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-07-04 14:43:45 +0200
commitaf065855ced71fdad6fc0fecec7dd65593b73413 (patch)
tree0454d2e3bd1b804ac2f8257f6dff9fdf23db435c
parent597ae563ba2a46174a414a3d223db4aac9a76cd3 (diff)
downloadqemu-af065855ced71fdad6fc0fecec7dd65593b73413.zip
qemu-af065855ced71fdad6fc0fecec7dd65593b73413.tar.gz
qemu-af065855ced71fdad6fc0fecec7dd65593b73413.tar.bz2
accel/kvm: Reduce kvm_create_vcpu() declaration scope
kvm_create_vcpu() is only used within the same file unit. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Message-Id: <20250703173248.44995-7-philmd@linaro.org>
-rw-r--r--accel/kvm/kvm-all.c8
-rw-r--r--include/system/kvm.h8
2 files changed, 7 insertions, 9 deletions
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index d095d1b..17235f2 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -453,7 +453,13 @@ static void kvm_reset_parked_vcpus(KVMState *s)
}
}
-int kvm_create_vcpu(CPUState *cpu)
+/**
+ * kvm_create_vcpu - Gets a parked KVM vCPU or creates a KVM vCPU
+ * @cpu: QOM CPUState object for which KVM vCPU has to be fetched/created.
+ *
+ * @returns: 0 when success, errno (<0) when failed.
+ */
+static int kvm_create_vcpu(CPUState *cpu)
{
unsigned long vcpu_id = kvm_arch_vcpu_id(cpu);
KVMState *s = kvm_state;
diff --git a/include/system/kvm.h b/include/system/kvm.h
index 7cc60d2..e943df2 100644
--- a/include/system/kvm.h
+++ b/include/system/kvm.h
@@ -317,14 +317,6 @@ int kvm_create_device(KVMState *s, uint64_t type, bool test);
bool kvm_device_supported(int vmfd, uint64_t type);
/**
- * kvm_create_vcpu - Gets a parked KVM vCPU or creates a KVM vCPU
- * @cpu: QOM CPUState object for which KVM vCPU has to be fetched/created.
- *
- * @returns: 0 when success, errno (<0) when failed.
- */
-int kvm_create_vcpu(CPUState *cpu);
-
-/**
* kvm_park_vcpu - Park QEMU KVM vCPU context
* @cpu: QOM CPUState object for which QEMU KVM vCPU context has to be parked.
*