qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Ani Sinha <anisinha@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	richard.henderson@linaro.org, kvm@vger.kernel.org,
	qemu-devel@nongnu.org
Subject: Re: [PATCH v2] kvm/kvm-all: make kvm_park/unpark_vcpu local to kvm-all.c
Date: Tue, 26 Aug 2025 13:23:22 +0200	[thread overview]
Message-ID: <20250826132322.7571b918@fedora> (raw)
In-Reply-To: <20250815065445.8978-1-anisinha@redhat.com>

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.



  reply	other threads:[~2025-08-26 11:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250826132322.7571b918@fedora \
    --to=imammedo@redhat.com \
    --cc=anisinha@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).