qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Nicholas Piggin" <npiggin@gmail.com>,
	"Daniel Henrique Barboza" <dbarboza@ventanamicro.com>,
	"Daniel Henrique Barboza" <danielhb413@gmail.com>,
	qemu-ppc@nongnu.org,
	"Richard Henderson" <richard.henderson@linaro.org>,
	kvm@vger.kernel.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Kevin Wolf" <kwolf@redhat.com>,
	"David Gibson" <david@gibson.dropbear.id.au>,
	"Cédric Le Goater" <clg@kaod.org>,
	"Michael Tokarev" <mjt@tls.msk.ru>, "Greg Kurz" <groug@kaod.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH 1/4] sysemu/kvm: Restrict kvmppc_get_radix_page_info() to ppc targets
Date: Tue, 12 Sep 2023 13:30:23 +0200	[thread overview]
Message-ID: <20230912113027.63941-2-philmd@linaro.org> (raw)
In-Reply-To: <20230912113027.63941-1-philmd@linaro.org>

kvm_get_radix_page_info() is only defined for ppc targets (in
target/ppc/kvm.c). The declaration is not useful in other targets.
Rename using the 'kvmppc_' prefix following other declarations
from target/ppc/kvm_ppc.h.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 include/sysemu/kvm.h | 1 -
 target/ppc/kvm_ppc.h | 2 ++
 target/ppc/kvm.c     | 4 ++--
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
index ee9025f8e9..3bcd8f45be 100644
--- a/include/sysemu/kvm.h
+++ b/include/sysemu/kvm.h
@@ -551,7 +551,6 @@ int kvm_set_one_reg(CPUState *cs, uint64_t id, void *source);
  * Returns: 0 on success, or a negative errno on failure.
  */
 int kvm_get_one_reg(CPUState *cs, uint64_t id, void *target);
-struct ppc_radix_page_info *kvm_get_radix_page_info(void);
 int kvm_get_max_memslots(void);
 
 /* Notify resamplefd for EOI of specific interrupts. */
diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h
index 6a4dd9c560..440e93f923 100644
--- a/target/ppc/kvm_ppc.h
+++ b/target/ppc/kvm_ppc.h
@@ -89,6 +89,8 @@ void kvmppc_set_reg_tb_offset(PowerPCCPU *cpu, int64_t tb_offset);
 
 int kvm_handle_nmi(PowerPCCPU *cpu, struct kvm_run *run);
 
+struct ppc_radix_page_info *kvmppc_get_radix_page_info(void);
+
 #define kvmppc_eieio() \
     do {                                          \
         if (kvm_enabled()) {                          \
diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
index 51112bd367..a58708cdfc 100644
--- a/target/ppc/kvm.c
+++ b/target/ppc/kvm.c
@@ -268,7 +268,7 @@ static void kvm_get_smmu_info(struct kvm_ppc_smmu_info *info, Error **errp)
                      "KVM failed to provide the MMU features it supports");
 }
 
-struct ppc_radix_page_info *kvm_get_radix_page_info(void)
+struct ppc_radix_page_info *kvmppc_get_radix_page_info(void)
 {
     KVMState *s = KVM_STATE(current_accel());
     struct ppc_radix_page_info *radix_page_info;
@@ -2372,7 +2372,7 @@ static void kvmppc_host_cpu_class_init(ObjectClass *oc, void *data)
     }
 
 #if defined(TARGET_PPC64)
-    pcc->radix_page_info = kvm_get_radix_page_info();
+    pcc->radix_page_info = kvmppc_get_radix_page_info();
 
     if ((pcc->pvr & 0xffffff00) == CPU_POWERPC_POWER9_DD1) {
         /*
-- 
2.41.0



  reply	other threads:[~2023-09-12 11:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-12 11:30 [PATCH 0/4] target/ppc: Prohibit target specific KVM prototypes on user emulation Philippe Mathieu-Daudé
2023-09-12 11:30 ` Philippe Mathieu-Daudé [this message]
2023-09-12 12:32   ` [PATCH 1/4] sysemu/kvm: Restrict kvmppc_get_radix_page_info() to ppc targets Michael Tokarev
2023-09-12 12:44     ` Philippe Mathieu-Daudé
2023-09-12 11:30 ` [PATCH 2/4] target/ppc: Restrict KVM objects to system emulation Philippe Mathieu-Daudé
2023-09-12 13:03   ` Michael Tokarev
2023-09-12 11:30 ` [PATCH 3/4] hw/ppc/e500: Restrict ppce500_init_mpic_kvm() to KVM Philippe Mathieu-Daudé
2023-09-12 12:43   ` Michael Tokarev
2023-09-12 11:30 ` [PATCH 4/4] target/ppc: Prohibit target specific KVM prototypes on user emulation Philippe Mathieu-Daudé
2023-09-13  9:14   ` Daniel Henrique Barboza

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=20230912113027.63941-2-philmd@linaro.org \
    --to=philmd@linaro.org \
    --cc=clg@kaod.org \
    --cc=danielhb413@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=dbarboza@ventanamicro.com \
    --cc=groug@kaod.org \
    --cc=kvm@vger.kernel.org \
    --cc=kwolf@redhat.com \
    --cc=mjt@tls.msk.ru \
    --cc=npiggin@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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).