From: Philippe Mathieu-Daudé Date: Tue, 17 Jun 2025 05:02:17 +0000 (+0200) Subject: accel/kvm: Reduce kvm_create_vcpu() declaration scope X-Git-Tag: v10.1.0-rc0~32^2~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=06810394fdc013037811e317501902ed6ab9c276;p=thirdparty%2Fqemu.git 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é Reviewed-by: Richard Henderson Reviewed-by: Xiaoyao Li Reviewed-by: Zhao Liu Message-Id: <20250703173248.44995-7-philmd@linaro.org> --- diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index d095d1b98f8..17235f26464 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 7cc60d26f24..e943df2c09d 100644 --- a/include/system/kvm.h +++ b/include/system/kvm.h @@ -316,14 +316,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.