kvm/kvm-all: make kvm_park/unpark_vcpu local to kvm-all.c
PATCH v2 1/1 kvm/kvm-all: make kvm_park/unpark_vcpu local to kvm-all.c
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
--- 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.
accel/kvm/kvm-all.c +2 -2
@@ -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 ;
include/system/kvm.h +0 -17
@@ -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.
Signature · 1 line
2.50.1
Quoted 4 lines · On Fri, 15 Aug 2025 12:24:45 +0530 Ani Sinha <[email protected]> wrote:
kvm_park_vcpu()andkvm_unpark_vcpu()is only used inkvm-all.c. Declare it static, remove it from common header file and make it local tokvm-all.cSigned-off-by Ani Sinha <[email protected]>
Quoted 59 lines
--- accel/kvm/kvm-all.c | 4 ++-- include/system/kvm.h | 17 ----------------- 2 files changed, 2 insertions(+), 19 deletions(-)changelog:
unexportkvm_unpark_vcpu()as well and remove unnecessary forward declarations.accel/kvm/kvm-all.c +2
-2@@ -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 ;include/system/kvm.h +0
-17@@ -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.
Quoted 9 lines · Igor Mammedov
Quoted 4 lines · On Fri, 15 Aug 2025 12:24:45 +0530 Ani Sinha <[email protected]> wrote:
kvm_park_vcpu()andkvm_unpark_vcpu()is only used inkvm-all.c. Declare it static, remove it from common header file and make it local tokvm-all.cSigned-off-by Ani Sinha <[email protected]>Reviewed-by Ani Sinha <[email protected]>
?
I assume you meant reviewed by Igor but I'm not sure what b4 will do now.
Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro
Quoted 9 lines · Igor Mammedov
Quoted 4 lines · On Fri, 15 Aug 2025 12:24:45 +0530 Ani Sinha <[email protected]> wrote:
kvm_park_vcpu()andkvm_unpark_vcpu()is only used inkvm-all.c. Declare it static, remove it from common header file and make it local tokvm-all.cSigned-off-by Ani Sinha <[email protected]>Reviewed-by Ani Sinha <[email protected]>
Do you mean Igor Mammedov <[email protected]>?
Quoted 62 lines
Quoted 60 lines
--- accel/kvm/kvm-all.c | 4 ++-- include/system/kvm.h | 17 ----------------- 2 files changed, 2 insertions(+), 19 deletions(-)changelog:
unexportkvm_unpark_vcpu()as well and remove unnecessary forward declarations.accel/kvm/kvm-all.c +2
-2@@ -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 ;include/system/kvm.h +0
-17@@ -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.
Quoted 4 lines · On Tue, 26 Aug 2025 17:09:27 +0200 Philippe Mathieu-Daudé <[email protected]>…
Quoted 3 lines · Igor Mammedov
On Fri, 15 Aug 2025 12:24:45 +0530
Ani Sinha <[email protected]> wrote:
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
kvm_park_vcpu()andkvm_unpark_vcpu()is only used inkvm-all.c. Declare it static, remove it from common header file and make it local tokvm-all.cSigned-off-by Ani Sinha <[email protected]>Reviewed-by Ani Sinha <[email protected]>Do you mean Igor Mammedov <[email protected]>?
sorry for mistake,
I've surely meant myself
Quoted 64 lines
Quoted 63 lines
Quoted 61 lines
--- accel/kvm/kvm-all.c | 4 ++-- include/system/kvm.h | 17 ----------------- 2 files changed, 2 insertions(+), 19 deletions(-)changelog:
unexportkvm_unpark_vcpu()as well and remove unnecessary forward declarations.accel/kvm/kvm-all.c +2
-2@@ -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 ;include/system/kvm.h +0
-17@@ -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.
Quoted 10 lines · Ani Sinha
Date: Fri, 15 Aug 2025 12:24:45 +0530
From: Ani Sinha <[email protected]>
Subject: [PATCH v2] kvm/kvm-all: make kvm_park/unpark_vcpu local to
kvm-all.c
X-Mailer: git-send-email 2.50.1
kvm_park_vcpu()andkvm_unpark_vcpu()is only used inkvm-all.c. Declare it static, remove it from common header file and make it local tokvm-all.cSigned-off-by Ani Sinha <[email protected]>
Quoted 8 lines
--- accel/kvm/kvm-all.c | 4 ++-- include/system/kvm.h | 17 ----------------- 2 files changed, 2 insertions(+), 19 deletions(-)changelog:
unexportkvm_unpark_vcpu()as well and remove unnecessary forward declarations.
Queued, thanks.
Paolo