* [PATCH v2] kvm/kvm-all: make kvm_park/unpark_vcpu local to kvm-all.c
@ 2025-08-15 6:54 Ani Sinha
2025-08-26 11:23 ` Igor Mammedov
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Ani Sinha @ 2025-08-15 6:54 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: richard.henderson, Ani Sinha, kvm, qemu-devel
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 <anisinha@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.
--
2.50.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2] kvm/kvm-all: make kvm_park/unpark_vcpu local to kvm-all.c
2025-08-15 6:54 [PATCH v2] kvm/kvm-all: make kvm_park/unpark_vcpu local to kvm-all.c Ani Sinha
@ 2025-08-26 11:23 ` Igor Mammedov
2025-08-26 12:02 ` Alex Bennée
2025-08-26 15:09 ` Philippe Mathieu-Daudé
2025-08-26 14:35 ` Zhao Liu
2025-08-26 14:45 ` Paolo Bonzini
2 siblings, 2 replies; 7+ messages in thread
From: Igor Mammedov @ 2025-08-26 11:23 UTC (permalink / raw)
To: Ani Sinha; +Cc: Paolo Bonzini, richard.henderson, kvm, qemu-devel
On Fri, 15 Aug 2025 12:24:45 +0530
Ani Sinha <anisinha@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 <anisinha@redhat.com>
Reviewed-by: Ani Sinha <anisinha@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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] kvm/kvm-all: make kvm_park/unpark_vcpu local to kvm-all.c
2025-08-26 11:23 ` Igor Mammedov
@ 2025-08-26 12:02 ` Alex Bennée
2025-08-26 15:09 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 7+ messages in thread
From: Alex Bennée @ 2025-08-26 12:02 UTC (permalink / raw)
To: Igor Mammedov
Cc: Ani Sinha, Paolo Bonzini, richard.henderson, kvm, qemu-devel
Igor Mammedov <imammedo@redhat.com> writes:
> On Fri, 15 Aug 2025 12:24:45 +0530
> Ani Sinha <anisinha@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 <anisinha@redhat.com>
>
> Reviewed-by: Ani Sinha <anisinha@redhat.com>
?
I assume you meant reviewed by Igor but I'm not sure what b4 will do
now.
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] kvm/kvm-all: make kvm_park/unpark_vcpu local to kvm-all.c
2025-08-15 6:54 [PATCH v2] kvm/kvm-all: make kvm_park/unpark_vcpu local to kvm-all.c Ani Sinha
2025-08-26 11:23 ` Igor Mammedov
@ 2025-08-26 14:35 ` Zhao Liu
2025-08-26 14:45 ` Paolo Bonzini
2 siblings, 0 replies; 7+ messages in thread
From: Zhao Liu @ 2025-08-26 14:35 UTC (permalink / raw)
To: Ani Sinha; +Cc: Paolo Bonzini, richard.henderson, kvm, qemu-devel
On Fri, Aug 15, 2025 at 12:24:45PM +0530, Ani Sinha wrote:
> Date: Fri, 15 Aug 2025 12:24:45 +0530
> From: Ani Sinha <anisinha@redhat.com>
> 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() 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 <anisinha@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.
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] kvm/kvm-all: make kvm_park/unpark_vcpu local to kvm-all.c
2025-08-15 6:54 [PATCH v2] kvm/kvm-all: make kvm_park/unpark_vcpu local to kvm-all.c Ani Sinha
2025-08-26 11:23 ` Igor Mammedov
2025-08-26 14:35 ` Zhao Liu
@ 2025-08-26 14:45 ` Paolo Bonzini
2 siblings, 0 replies; 7+ messages in thread
From: Paolo Bonzini @ 2025-08-26 14:45 UTC (permalink / raw)
To: Ani Sinha; +Cc: richard.henderson, kvm, qemu-devel
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] kvm/kvm-all: make kvm_park/unpark_vcpu local to kvm-all.c
2025-08-26 11:23 ` Igor Mammedov
2025-08-26 12:02 ` Alex Bennée
@ 2025-08-26 15:09 ` Philippe Mathieu-Daudé
2025-08-27 8:02 ` Igor Mammedov
1 sibling, 1 reply; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-08-26 15:09 UTC (permalink / raw)
To: Igor Mammedov, Ani Sinha
Cc: Paolo Bonzini, richard.henderson, kvm, qemu-devel
On 26/8/25 13:23, Igor Mammedov wrote:
> On Fri, 15 Aug 2025 12:24:45 +0530
> Ani Sinha <anisinha@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 <anisinha@redhat.com>
>
> Reviewed-by: Ani Sinha <anisinha@redhat.com>
Do you mean Igor Mammedov <imammedo@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.
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] kvm/kvm-all: make kvm_park/unpark_vcpu local to kvm-all.c
2025-08-26 15:09 ` Philippe Mathieu-Daudé
@ 2025-08-27 8:02 ` Igor Mammedov
0 siblings, 0 replies; 7+ messages in thread
From: Igor Mammedov @ 2025-08-27 8:02 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Ani Sinha, Paolo Bonzini, richard.henderson, kvm, qemu-devel
On Tue, 26 Aug 2025 17:09:27 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> On 26/8/25 13:23, Igor Mammedov wrote:
> > On Fri, 15 Aug 2025 12:24:45 +0530
> > Ani Sinha <anisinha@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 <anisinha@redhat.com>
> >
> > Reviewed-by: Ani Sinha <anisinha@redhat.com>
>
> Do you mean Igor Mammedov <imammedo@redhat.com>?
sorry for mistake,
I've surely meant myself
>
> >
> >> ---
> >> 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.
> >
> >
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-08-27 8:03 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-15 6:54 [PATCH v2] kvm/kvm-all: make kvm_park/unpark_vcpu local to kvm-all.c Ani Sinha
2025-08-26 11:23 ` Igor Mammedov
2025-08-26 12:02 ` Alex Bennée
2025-08-26 15:09 ` Philippe Mathieu-Daudé
2025-08-27 8:02 ` Igor Mammedov
2025-08-26 14:35 ` Zhao Liu
2025-08-26 14:45 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).