From patchwork Tue Sep 12 11:30:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 721759 Delivered-To: patch@linaro.org Received: by 2002:adf:f64d:0:b0:31d:da82:a3b4 with SMTP id x13csp1584523wrp; Tue, 12 Sep 2023 04:31:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHikcWfCq2wPhpkQuCXTbEGXuLA/xq0fxhZmCdp6WSAcrr1hApk7FKxA5vdLmCSJ+sIOLtQ X-Received: by 2002:a05:6808:d4:b0:3a7:b47a:9fb with SMTP id t20-20020a05680800d400b003a7b47a09fbmr11679777oic.46.1694518270376; Tue, 12 Sep 2023 04:31:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694518270; cv=none; d=google.com; s=arc-20160816; b=FoXwQ04CMk2suHjZ6/kKCp3t/roa4cqF3HVYaaAe/694UlnqcypC4XPmR+tLd8lS3Z th61zvE8vqwsNDFfVitQgQberM+2kJWhjXTr5t+rXGH0xLMKx/3+BRfP1beZ9/FPLIm4 fenYQVANvqGy9V4FPFb/fmQKXiKx4lxGFDpzS2Aaza9Wr0VGX/enAuY8O6030AhMYcvW hS7OMCfMLYVqrTjNVw8vAIRZb8WfXF8SUFZ71Ds/e+2Jn9aSKiGDPFYa3/RfCSTm/cFL upr4tM2SFY69bgopaJJjZqg7noajYXFerU6UnzSIQuaPHAvw31x1gLu8ECvmd7TUmE60 tFJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=21QMJ7GGkeglUQqOfSInY5x1p67Ji2fztTn3JUMzTjQ=; fh=B+ZNRnZ/8434is8zCHEu5frYXYw5NWqaVMtn8Sm3cTI=; b=Txb/rCEPS8C9JgyQJBcTev83d7Map2Ru3XqZgWRx0pDrAvxp5kCF3wPRg0VTiSb345 zIMdxsxGaRj6Zenjft1gqK7etRGOCGPq9BbmTL1F4W7SOvldjw4+D89niQ9Rri5NktVY 6+2Vmbi/LmypulqAAk+t3/4bS27K1NOKcTeywwk5I+wIt/+un42WEpNGf0XWkCelY5vZ yeOYY+U5z05Cm/uPxOv/maQNCAc3aTa36xIDAwh6UziZxX781qtHFAKZRw1sxc8wIqax ICOWJ77vOArclLIrAfQkYSmTJjBBk3o2+4gw/JqgxsAFqpZUMGlvE5XMmQhTxXXb5HTD JnYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FGy2CaNE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v21-20020a05622a131500b00410a0737535si6170172qtk.207.2023.09.12.04.31.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Sep 2023 04:31:10 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FGy2CaNE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qg1bb-0004FN-9a; Tue, 12 Sep 2023 07:30:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qg1bR-00042W-1x for qemu-devel@nongnu.org; Tue, 12 Sep 2023 07:30:45 -0400 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qg1bM-0000qd-8q for qemu-devel@nongnu.org; Tue, 12 Sep 2023 07:30:44 -0400 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2bcb89b4767so90374531fa.3 for ; Tue, 12 Sep 2023 04:30:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694518237; x=1695123037; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=21QMJ7GGkeglUQqOfSInY5x1p67Ji2fztTn3JUMzTjQ=; b=FGy2CaNExXOnWrwlzVyh2dju8m1DjwILrSqhsp4HLo2EC0rUvrislOEsf0EyyqTqOa 1Zdruf5inIiiXzOSP0kzwLBr5ZWfKbGQfo0AozpoQIpdyqxxuSmUKO7TKT+Lcou9LDSK wyV/u4XEPQ7bYPJiUU81N0ecyD/dbiBOJFVtXE+5A3iOzVrXpeZXqFHBZ/tmNVTzrE+g hdQePJwg86TJhBlvLqD1s1vxI4h79rsei8PHqlyzDhVKOEUZO5WnScQbSa4vb6MZ7+MR ayM+1HO67qQ4eIszJNDLwUTHmRLgmL8XHosxm5OkKHUk//10y7A/g6s3t1pdB1fVTPT6 oS2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694518237; x=1695123037; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=21QMJ7GGkeglUQqOfSInY5x1p67Ji2fztTn3JUMzTjQ=; b=VZn2qJSEPsr7bd/qfpYpAsYCoKziynG5KSk0FWmb2JJVisZaqLv4AYQpyqdjw+Bg3Y HCuEFkfjRmiBOyS1lA+CTgyAwUQDkMES9jx58H+RDUvmbESV+lmKVT1xoet2zS4bK66y Xq0yOd8RzU0QM/iekjB+J3IJeNKFBB3QdcaJvhS1DcRT4SyXrkXadk/GW/63JsT4sIsA tQhWILRliwRIn/LmpQh9H/edHxdaQLICG0U72Gk4+hf9X4wO0x2cgrqRsprHxZOQwrOl SoDgbD0sdZaTxDzB0YYCJXEnNDEC/sPM+EwXUiOBbFablj5CBUI9iBKjre1wkfWyxenP SMeQ== X-Gm-Message-State: AOJu0YyZwd+SVhceYmT5FWiLfh+H09fKgPNqouiOwcc+nHarsa1QcNDJ wQaXxNMbhFbV8is8UgT5bevhysnfTBpStUQ3blU= X-Received: by 2002:a2e:7c1a:0:b0:2bc:c846:aa17 with SMTP id x26-20020a2e7c1a000000b002bcc846aa17mr10295292ljc.41.1694518236658; Tue, 12 Sep 2023 04:30:36 -0700 (PDT) Received: from m1x-phil.lan (cou50-h01-176-172-50-150.dsl.sta.abo.bbox.fr. [176.172.50.150]) by smtp.gmail.com with ESMTPSA id l26-20020a1709061c5a00b009894b476310sm6628964ejg.163.2023.09.12.04.30.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 12 Sep 2023 04:30:36 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Nicholas Piggin , Daniel Henrique Barboza , Daniel Henrique Barboza , qemu-ppc@nongnu.org, Richard Henderson , kvm@vger.kernel.org, Paolo Bonzini , Kevin Wolf , David Gibson , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Michael Tokarev , Greg Kurz , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 1/4] sysemu/kvm: Restrict kvmppc_get_radix_page_info() to ppc targets Date: Tue, 12 Sep 2023 13:30:23 +0200 Message-ID: <20230912113027.63941-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230912113027.63941-1-philmd@linaro.org> References: <20230912113027.63941-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::230; envelope-from=philmd@linaro.org; helo=mail-lj1-x230.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.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é --- 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) { /*