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) { /* From patchwork Tue Sep 12 11:30:24 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: 721760 Delivered-To: patch@linaro.org Received: by 2002:adf:f64d:0:b0:31d:da82:a3b4 with SMTP id x13csp1585463wrp; Tue, 12 Sep 2023 04:33:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHvBSf7MdmVXRUyXqG+TKfEmeovCSpaUESam1UcBxeCs2vig/dGYtgXN1lYitxHdV5QiYQ5 X-Received: by 2002:aca:670b:0:b0:3a3:b39d:a8bf with SMTP id z11-20020aca670b000000b003a3b39da8bfmr11908352oix.45.1694518405031; Tue, 12 Sep 2023 04:33:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694518404; cv=none; d=google.com; s=arc-20160816; b=hQGku4Sd7w1LlgRF3wcTpUW0LZCMFQDtjhWrNOF4hhfAG0F40VhPEAbnGqt7ZRxVKe ylQGzNId840BOLERP6ckglpzwFQ2QTSiKr/u+lWLjK05ET4DOceqZvBoi79FPa9YcAo/ m7chVtBybQu4eYu45pZ3unPd3MfZHnaWBvexix11boEFXmaktk4ZJAwXJ7z841f/9dbk E9D6x0uePc/YfhKiVkrFfgCClxif+vTOm4gPKF3JaRe3qwuRb96BC25jiO1xV6sWUMns +tDZZeTH5u6Fj7/Frh7Z+1kRY85AbmhMrM+0ajBdC4TH9F85hivzMfAM2zoRbSIoJNO5 +Zsw== 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=EJDcYGi9xkj6QKbqo3iNcw77O78wB7Hq6Jj/+q8EmC0=; fh=B+ZNRnZ/8434is8zCHEu5frYXYw5NWqaVMtn8Sm3cTI=; b=lnBWd8Lff+QK5gH9yxDHS7j5WL+r65zUQMOVZD0RmDUmv8l7j21mvq9dUET7XhiWEV oFuOTxeWL5pidX5giGOVV84SWYmiRMxY9Lh4RlqV59Ivxa2dKQnMETh0aACjcE049ON9 HL1QiVQ1XNR3RrP+CQI6b7f+AAotlUK9QHdWM0LUxDGjGibQMjCCk0hwYdbGYZv5L999 NYmpHHJ58z67esXCmD7lRWiF6qAFmsmaiJVTbCdo3QilTlwU3MvVkDokpISC1OcAMeOd c7kOCm43Var2kROHtJHZzEsZtpwusVB2Ns6H4tfZqw/UzMN2sZOcPm2/DN+W/mcTkkoL dRYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yW5lewSt; 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 t7-20020ac85887000000b004069479a788si6061036qta.484.2023.09.12.04.33.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Sep 2023 04:33:24 -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=yW5lewSt; 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-0004G5-AQ; 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 1qg1bU-00042i-HP for qemu-devel@nongnu.org; Tue, 12 Sep 2023 07:30:49 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qg1bQ-0000rN-Tx for qemu-devel@nongnu.org; Tue, 12 Sep 2023 07:30:47 -0400 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-99bcc0adab4so696978666b.2 for ; Tue, 12 Sep 2023 04:30:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694518243; x=1695123043; 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=EJDcYGi9xkj6QKbqo3iNcw77O78wB7Hq6Jj/+q8EmC0=; b=yW5lewStDd//iABYoGkiNWmTAUWKTsI5QBpRc9tDw3blWT8hGKn3vDR7sWCGDeExJl 0tNv2sHtdHYnwsL1lt6LAmbw2MUNut2pdNLodtBCwc/W3zRPn5aXKQpPkviM4vCuNq/8 CAt1nZk/eLTxl7H6NsAjL5M/7zeRnVWD04VIILlnBHxAimDNwBXeS3PlxvhLNluiX8Sf bzDd0EfQ/qPGUyvtWtI59Kl+ZwUCvp+5u3vn+2Voii4nrHHKTHgfTCBYFjkGsTJpRSu8 2NfUp9CL3Wbpno6t/Vf76bueX2z1j0mzapE44T7DPrgNK7lfJdn/1rZKq5E+7/y9vomL 2Bxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694518243; x=1695123043; 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=EJDcYGi9xkj6QKbqo3iNcw77O78wB7Hq6Jj/+q8EmC0=; b=r/Zpif/37qcpf5l+V2BBr/S/gXes9CjyrajagRa7CXJ45LvZaQ/f8aHML5ZWO9jW76 Hd33uSNGiS1iOln2INxEeM/y3dQC1zrGS9lB78LVNLh0b2FM8n220chhHhhzi655odYN o7ti4x3gIoKrHNYOgaAB3PPAnGg+OjdueKfehe2ZfwZ3frx6uruoltpV/Y0PLAW/d6ub IAQ80PoYFmUGZlBiv/mLI57vKklsrvvJQ/QJM7JW3VIpx4rCfjAgzGW6+bWwp9TkyPHM tb8x9F2W8Oi3rJY2bTecNXJw1YxuUaDb3XJbwCD+IRpvtygG5X3pJc9Kb3Q0Oy1KrPOx sOPw== X-Gm-Message-State: AOJu0YyTX+TKLmEgZMXX5DmuNTPdCv+JZb+RcwBNdApOzMRbvZGpwuGg KC0ub6LPxzmsicjvZ2lmO/8HVIkjFCYNGfmJwpk= X-Received: by 2002:a17:906:1da9:b0:9a1:d79a:418e with SMTP id u9-20020a1709061da900b009a1d79a418emr10080318ejh.40.1694518243093; Tue, 12 Sep 2023 04:30:43 -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 ld10-20020a1709079c0a00b009ad829ed144sm953504ejc.130.2023.09.12.04.30.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 12 Sep 2023 04:30:42 -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 2/4] target/ppc: Restrict KVM objects to system emulation Date: Tue, 12 Sep 2023 13:30:24 +0200 Message-ID: <20230912113027.63941-3-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::635; envelope-from=philmd@linaro.org; helo=mail-ej1-x635.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-stub.c only defines kvm_openpic_connect_vcpu(), which is clearly not used by user emulation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev --- target/ppc/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/meson.build b/target/ppc/meson.build index 4c2635039e..bf1c9319fa 100644 --- a/target/ppc/meson.build +++ b/target/ppc/meson.build @@ -30,7 +30,6 @@ gen = [ ] ppc_ss.add(when: 'CONFIG_TCG', if_true: gen) -ppc_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c')) ppc_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user_only_helper.c')) ppc_system_ss = ss.source_set() @@ -46,6 +45,7 @@ ppc_system_ss.add(when: 'CONFIG_TCG', if_true: files( ), if_false: files( 'tcg-stub.c', )) +ppc_system_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c')) ppc_system_ss.add(when: 'TARGET_PPC64', if_true: files( 'compat.c', From patchwork Tue Sep 12 11:30:25 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: 721762 Delivered-To: patch@linaro.org Received: by 2002:adf:f64d:0:b0:31d:da82:a3b4 with SMTP id x13csp1587174wrp; Tue, 12 Sep 2023 04:37:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHEcXC5XML3baiHgDWCy8rF4HhctrR5ZWQQ0CT+KbXX9QISwqQDTUdDE50gEM6GS2pSPtTB X-Received: by 2002:a05:620a:1927:b0:769:89c8:4fae with SMTP id bj39-20020a05620a192700b0076989c84faemr14401346qkb.52.1694518668223; Tue, 12 Sep 2023 04:37:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694518668; cv=none; d=google.com; s=arc-20160816; b=Kxy5PeG3DZiadVyRP77gzFkXuERcAcYq5h0rLBXBB9PMXEk8/x0QI7l0xOGDQqWrlv OYLt2OtKu5Tj3sifGb8WhxETHurlkQ6yiqV45YUda3Oe7ZVU0mDUgmVApP2SHZ8OSsN5 hOQyn2eSq5/2yggQJN0rTiF6ZHVLdk73pCxQa1HccwDiIdgf5b4apbZdxxtbErXOS4w/ LiauS6uxuAu3LEGhtVo1ZhEP4WYTu3OIGeNrReAKqFBTTKRru1YCzuPo1pFNS3jhQVPy 2kkXgc+vzzDyF1GkCsD9ILUkLuRSN3OK9Z7+6Mcxj+XgV+KgEKFdnHnWHhD1jHc9RytR d7xg== 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=/aSlGFqA9ubhB7ZC5gHBqxQU1rcWLkqloVAzPG4iLCg=; fh=B+ZNRnZ/8434is8zCHEu5frYXYw5NWqaVMtn8Sm3cTI=; b=yyskL2DxftP3Q6utWzA4fWadvzitdRHMteSFQFYrIlJnLvgilnaYMi9ejTZoRRiUuN GdSl93LtFO9Ao6kLTGZhfkZShli7T/Az2LtD4uBjuCFjEuvRu7m1sxZjKIMAgKWNoVBM 8VTy13Kurvwe8K/tcehQBQ2Jd7znSTHlJ3VAwq8CEOhxKivXNk5Ogv+CN02KHkDv9tpu AhUSQGa902c/05qNlKHleYuIn709G9YeLItJp9N6hoFcl3W4vlI8X1xppA6ZjwMCzQbF 40SWw1gu9CTt+rBGv2i3XtqQKKLNMrvKA4/ntu1Blye9RXLPw3mRKLRQRPcckb8rxpxh JgYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="f/UwKA3k"; 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 ef14-20020a05620a808e00b0077076a46511si5833925qkb.255.2023.09.12.04.37.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Sep 2023 04:37:48 -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="f/UwKA3k"; 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 1qg1bf-0004N2-N8; Tue, 12 Sep 2023 07:30:59 -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 1qg1bc-0004M2-5J for qemu-devel@nongnu.org; Tue, 12 Sep 2023 07:30:57 -0400 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qg1bY-0000tS-2k for qemu-devel@nongnu.org; Tue, 12 Sep 2023 07:30:55 -0400 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-501cba1ec0aso9065609e87.2 for ; Tue, 12 Sep 2023 04:30:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694518250; x=1695123050; 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=/aSlGFqA9ubhB7ZC5gHBqxQU1rcWLkqloVAzPG4iLCg=; b=f/UwKA3kemM72cVDiT+KeUcY2sJtPXAtf4cxQvs+bb+0OesP4L9bz5LLF3uBYJRHbR ZsN46VjhkeOLep94WXvL9I2L7Fw895r/ZW7PyQFd3waeJuSqU8G6XzZcqEKDLyb/Z/vH CkWp2UH9JYWVMOXaqi+QRuBYI8jOkmMdHOVpimvR+u6k3xOVATVUrg1mlE/OrNgdeX0z MMxK+N7O6tffYhi4WBtHERZUdjLn/qrYifJIgxzhJ0uJJ/PIalBC0is556aY6PO5An9G cuUsSO3WFCbTpuVEWMm+W2+PCFZMhFGJu5l1XhUoTcyKmQ9twVNBsEJkhUi2hutNujNm UTuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694518250; x=1695123050; 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=/aSlGFqA9ubhB7ZC5gHBqxQU1rcWLkqloVAzPG4iLCg=; b=EhIbU7AcMrlVWPQe/D9/592UFHj9oBmVYlqldYoogNWHW2X04H3tT/lEsvfrlSRxHC D/zSnCeM+FLfkBi/VmILSxIpRFzn+eXJwewDY7DbWUgb65reDGeBFmcV8BddJ3sw9evJ xDj4L+Mj5Rv/GZmAlx4NhqXVI+IaBgKUA0Q0AU9t3tzJ8WItY36xlwe1IjTEFFExBF0c QGumTSwCTkeyX75tAoM+Q1+sYqfB1wUcuPLumKt3idAZwY6dc+ntEYz1Vi7AQ5ZGyM3G RnSAuiHDGmDn98bAN0aYjFqxs04DzejIlfCDwDyRKW4OM6HjpZdaYaCOMsBMRJe2F92A ZdQg== X-Gm-Message-State: AOJu0YyO6teqNO6r9KfYZVukDTSEK3cpNbPzlGCsC0BrNPAqTXMGMhRe 3ZWBVSw3WGWw8YkTvcrsKI/h+Cjd/3vSnB+7vq0= X-Received: by 2002:a05:6512:32d0:b0:4fb:7675:1ff9 with SMTP id f16-20020a05651232d000b004fb76751ff9mr11429892lfg.9.1694518250011; Tue, 12 Sep 2023 04:30:50 -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 m16-20020aa7c490000000b005236410a16bsm5839285edq.35.2023.09.12.04.30.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 12 Sep 2023 04:30:49 -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 3/4] hw/ppc/e500: Restrict ppce500_init_mpic_kvm() to KVM Date: Tue, 12 Sep 2023 13:30:25 +0200 Message-ID: <20230912113027.63941-4-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::12f; envelope-from=philmd@linaro.org; helo=mail-lf1-x12f.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 Inline and guard the single call to kvm_openpic_connect_vcpu() allows to remove kvm-stub.c. While it seems some code churn, it allows forbidding user emulation to include "kvm_ppc.h" in the next commit. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev --- hw/ppc/e500.c | 4 ++++ target/ppc/kvm-stub.c | 19 ------------------- target/ppc/meson.build | 2 +- 3 files changed, 5 insertions(+), 20 deletions(-) delete mode 100644 target/ppc/kvm-stub.c diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index d5b6820d1d..d0e199fb2c 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -834,6 +834,7 @@ static DeviceState *ppce500_init_mpic_qemu(PPCE500MachineState *pms, static DeviceState *ppce500_init_mpic_kvm(const PPCE500MachineClass *pmc, IrqLines *irqs, Error **errp) { +#ifdef CONFIG_KVM DeviceState *dev; CPUState *cs; @@ -854,6 +855,9 @@ static DeviceState *ppce500_init_mpic_kvm(const PPCE500MachineClass *pmc, } return dev; +#else + g_assert_not_reached(); +#endif } static DeviceState *ppce500_init_mpic(PPCE500MachineState *pms, diff --git a/target/ppc/kvm-stub.c b/target/ppc/kvm-stub.c deleted file mode 100644 index b98e1d404f..0000000000 --- a/target/ppc/kvm-stub.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * QEMU KVM PPC specific function stubs - * - * Copyright Freescale Inc. 2013 - * - * Author: Alexander Graf - * - * This work is licensed under the terms of the GNU GPL, version 2 or later. - * See the COPYING file in the top-level directory. - * - */ -#include "qemu/osdep.h" -#include "cpu.h" -#include "hw/ppc/openpic_kvm.h" - -int kvm_openpic_connect_vcpu(DeviceState *d, CPUState *cs) -{ - return -EINVAL; -} diff --git a/target/ppc/meson.build b/target/ppc/meson.build index bf1c9319fa..44462f95cd 100644 --- a/target/ppc/meson.build +++ b/target/ppc/meson.build @@ -45,7 +45,7 @@ ppc_system_ss.add(when: 'CONFIG_TCG', if_true: files( ), if_false: files( 'tcg-stub.c', )) -ppc_system_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c')) +ppc_system_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c')) ppc_system_ss.add(when: 'TARGET_PPC64', if_true: files( 'compat.c', From patchwork Tue Sep 12 11:30:26 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: 721761 Delivered-To: patch@linaro.org Received: by 2002:adf:f64d:0:b0:31d:da82:a3b4 with SMTP id x13csp1587091wrp; Tue, 12 Sep 2023 04:37:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEkgw+WIU5kTQqWdcgX5dBxYu93xNIM/MGdJ0RmORAe+vaHNnccF2JaoCak/+UI4vI5px9X X-Received: by 2002:a05:622a:248:b0:410:961:668a with SMTP id c8-20020a05622a024800b004100961668amr12064981qtx.26.1694518655696; Tue, 12 Sep 2023 04:37:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694518655; cv=none; d=google.com; s=arc-20160816; b=S14urlg5Z5PnMrennKb+/jzFjmEo82ivIE+n7ahtmRToPQ3CHs0zMrRhNQ5OgLy6e4 IbVHAN1HQegNbyJ/psHGpRfRy5pGP35hfOPlcE1Ag37L/2uJDqOpkXbQJ16g3N+41Yjx Xobv5QdwjBIr6yuDuiM6kp0R+KnH0dvJ039m1rx2erFxsy4cZTSm0yWlNlF/kagvAb8W P/QE7suiS8MGfx+GFoOmk2lGawTyvcEyO22cWPnT0hWx7OuowC4IDQnP6EQTrPuZMorm wjOJR9tVq6MWQFRWrnYCxOrWZ2x3fUAsilALSCbFEfsWxHu+BpUT7x/mK5M5p0xwMl44 6olw== 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=Qjw2XAQ6HKVx9Z3EPaWrG+b3gjC37zBrk2Sv1nlYmYs=; fh=B+ZNRnZ/8434is8zCHEu5frYXYw5NWqaVMtn8Sm3cTI=; b=cdlKI6m8WtYVt6knPKcYRZsJqWkl6XTtPXs1oV3tkVlPgyluqGjOk3tfZj6k+ToWSO 7rhiuImzmtknltoWHHg+oWG7jdppb1GvBXWrgAvK5iZ5WjGiSPbaczBmhhsIxuANrieI 1ESY0+r3FhELMRdexUZvIP8Oa4/bd4Nn2lIiX6tz4mss79LnNVOSxSgu7wXB2lneLbR5 6FCFgJul353ELBdRpgT+xDpV29rRY9wvzmLUSdch+Y9plK3lHxYJ8DZGv1qGBlXXDkqp a18pSClaWBLfoF80Z4cWP5LRhwW6Km7bkzBpMFRChs2IDNqx7Dc/H6m458Z01OoxG97y Gdnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Egw/iGjY"; 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 bp39-20020a05622a1ba700b00410a9f8c7e5si6231372qtb.110.2023.09.12.04.37.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Sep 2023 04:37:35 -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="Egw/iGjY"; 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 1qg1bi-0004Ou-Ev; Tue, 12 Sep 2023 07:31:02 -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 1qg1bg-0004NK-BR for qemu-devel@nongnu.org; Tue, 12 Sep 2023 07:31:00 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qg1be-0000uY-6O for qemu-devel@nongnu.org; Tue, 12 Sep 2023 07:31:00 -0400 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-52a4737a08fso6930210a12.3 for ; Tue, 12 Sep 2023 04:30:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694518256; x=1695123056; 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=Qjw2XAQ6HKVx9Z3EPaWrG+b3gjC37zBrk2Sv1nlYmYs=; b=Egw/iGjY/DgpRE5PDdVkqV1q9BZPIO1okohP3wN3KUyyrTrM9DGsjMnvNhxiUrNmVw xM+aAxjsNuDjOJXrjzlnae3UorV87mhWK6HajIRJjDN7WM6zY/WaNMtrIaC7piOcGM10 jmZctYL19qtG8tXSuH43Bj1AB07a3vYDT2NAEXALJlSCvwTU13kmnnCBK+bFoKme7FG/ Fs0WVPjBTBz9eqz2x2OR+8kWZ+RLDUWH+6RMFW7wPwHwx6jdxVpZkKYdFBkKPp2qvaxw xgBp5+Mq+kO6RXpRjK52hb7LQ/B+kPp9LI3zyiPf/9yb14DS1lTmzyBTrNofkt8IEWFq jRvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694518256; x=1695123056; 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=Qjw2XAQ6HKVx9Z3EPaWrG+b3gjC37zBrk2Sv1nlYmYs=; b=tfeibj6EFI83PX0zkJ9tJxx8a+OKA+v4T0Lty9smN0KNApTr+RVWwO2AfcH9wq0fe0 JN5f/qyCWuqjCTYNi8vv7EASx6uyGrFmWSbWSkTNL5fUlZVk/TLTwNWUg90B0N87IzNJ AdppzSjSRQilCm5WgW1FpyRC3PBMOrrFwSqrYmslL1wpyiJPsSal+sMCd2pvBsgOrJQ8 GY8qB7eBtakDlQ4210KH03Rvc93KkujPKhkWJTa/mnWlsa6VtxwAdVxTijl9sJYjcbBG Av8CaJQH4EqZrlI9CCXN9UBEB7Zt3AjgkeVIShFB+M+qpLr0IFQ4YYYoMvTLzg4EvgPy SelQ== X-Gm-Message-State: AOJu0Yx43p9bIJ+x3P1MrKdf9WKvOYmVCgm9jYCc4nNeOExn0M7fjjht PDGUzUbf9gNqFDkG/pgusdane2Kkn66uTyHGgi0= X-Received: by 2002:a17:906:10c:b0:9ad:805d:70da with SMTP id 12-20020a170906010c00b009ad805d70damr1647683eje.12.1694518256600; Tue, 12 Sep 2023 04:30:56 -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 o6-20020a17090637c600b00991e2b5a27dsm6698164ejc.37.2023.09.12.04.30.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 12 Sep 2023 04:30:56 -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 4/4] target/ppc: Prohibit target specific KVM prototypes on user emulation Date: Tue, 12 Sep 2023 13:30:26 +0200 Message-ID: <20230912113027.63941-5-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::52f; envelope-from=philmd@linaro.org; helo=mail-ed1-x52f.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 None of these target-specific prototypes should be used by user emulation. Remove their declaration there, so we get a compile failure if ever used (instead of having to deal with linker and its possible optimizations, such dead code removal). Suggested-by: Kevin Wolf Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza --- target/ppc/kvm_ppc.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h index 440e93f923..ffda8054b2 100644 --- a/target/ppc/kvm_ppc.h +++ b/target/ppc/kvm_ppc.h @@ -13,6 +13,10 @@ #include "exec/hwaddr.h" #include "cpu.h" +#ifdef CONFIG_USER_ONLY +#error Cannot include kvm_ppc.h from user emulation +#endif + #ifdef CONFIG_KVM uint32_t kvmppc_get_tbfreq(void);