On Fri, 15 Aug 2025 12:24:45 +0530 Ani Sinha <anisi...@redhat.com> wrote:
> kvm_park_vcpu() and kvm_unpark_vcpu() is only used in kvm-all.c. Declare it > static, remove it from common header file and make it local to kvm-all.c > > Signed-off-by: Ani Sinha <anisi...@redhat.com> Reviewed-by: Ani Sinha <anisi...@redhat.com> > --- > accel/kvm/kvm-all.c | 4 ++-- > include/system/kvm.h | 17 ----------------- > 2 files changed, 2 insertions(+), 19 deletions(-) > > changelog: > unexport kvm_unpark_vcpu() as well and remove unnecessary forward > declarations. > > diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c > index 890d5ea9f8..f36dfe3349 100644 > --- a/accel/kvm/kvm-all.c > +++ b/accel/kvm/kvm-all.c > @@ -414,7 +414,7 @@ err: > return ret; > } > > -void kvm_park_vcpu(CPUState *cpu) > +static void kvm_park_vcpu(CPUState *cpu) > { > struct KVMParkedVcpu *vcpu; > > @@ -426,7 +426,7 @@ void kvm_park_vcpu(CPUState *cpu) > QLIST_INSERT_HEAD(&kvm_state->kvm_parked_vcpus, vcpu, node); > } > > -int kvm_unpark_vcpu(KVMState *s, unsigned long vcpu_id) > +static int kvm_unpark_vcpu(KVMState *s, unsigned long vcpu_id) > { > struct KVMParkedVcpu *cpu; > int kvm_fd = -ENOENT; > diff --git a/include/system/kvm.h b/include/system/kvm.h > index 3c7d314736..4fc09e3891 100644 > --- a/include/system/kvm.h > +++ b/include/system/kvm.h > @@ -317,23 +317,6 @@ int kvm_create_device(KVMState *s, uint64_t type, bool > test); > */ > bool kvm_device_supported(int vmfd, uint64_t type); > > -/** > - * kvm_park_vcpu - Park QEMU KVM vCPU context > - * @cpu: QOM CPUState object for which QEMU KVM vCPU context has to be > parked. > - * > - * @returns: none > - */ > -void kvm_park_vcpu(CPUState *cpu); > - > -/** > - * kvm_unpark_vcpu - unpark QEMU KVM vCPU context > - * @s: KVM State > - * @vcpu_id: Architecture vCPU ID of the parked vCPU > - * > - * @returns: KVM fd > - */ > -int kvm_unpark_vcpu(KVMState *s, unsigned long vcpu_id); > - > /** > * kvm_create_and_park_vcpu - Create and park a KVM vCPU > * @cpu: QOM CPUState object for which KVM vCPU has to be created and parked.