From patchwork Mon Nov 6 11:03:07 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: 741333 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp1026001wrr; Mon, 6 Nov 2023 03:15:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IFXph+w86gWF5k/Ihd4REf275aCNwWWADUZld/8aZSeV/xuzdHPx/0Z6KppAaqUdLF50u7q X-Received: by 2002:a05:622a:1789:b0:41c:cc6d:bba with SMTP id s9-20020a05622a178900b0041ccc6d0bbamr33079737qtk.44.1699269300183; Mon, 06 Nov 2023 03:15:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699269300; cv=none; d=google.com; s=arc-20160816; b=oBULry+UiW5iGVM+aTZyGNKUny0v2meXkckeM1PT87rpCcdrpNWQRADW9jReNdJj5V zEvANe/XYv4nYb+CAToKMNXd5ECP3dUH7Dy+lU+2oS1ikLfAjkUx+PjBWSEfKz02wAmP jOir910214F76ta/VBxn97yq/Nu9FMkQU2lVZiGs4TmloWJL6lVpTdjAUIyKaa8D0R56 SwkbocKATbwSdV/OBR/s1bKBrfbtGm8B9kwSmBo/O2+fqw1Qizm9u66Za/tPy9iUAAdu Y/N+n4UmSormmX51VU1DgnZZ/mZEH4A0/79JY9pITusYO/2de08Wa3pf/C4QYisZNWsm T82w== 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=/8FQLEYTqFB9Ro3y1RtUGoGmFmjKyGG2i99735loRZ8=; fh=l0VZqEXHjAOAoKxAjE4HjirxxtGQta0klXTKiczTXSE=; b=ahcal09hyKfVdd3t7P0JFjCddSvsK5XQ7SsDAhIBipQbO3ojVS1HvUyb913rQaw5mM +q68XOamAPdhRBZrF2/yMjwVsP9kz4g61W3Kgj1jI1a2r6cbotB8zNibPObFktoDha90 +UCSZdBhF8G4NBH1paRAyrbrzzhR9RrqppcQYZyzmGVBoQcZVx+N9W/dPxVwPvgQT4Sj l4y4y7wOZU9rzP7TTiIPDFK/GawTE6xTL0DPQ+jZSflol1fJZ50UHMoWmGOESgkWCIVC rkVU0GSTqJlwr07AZTDCMJcyRtkRwUxi2oKgmAFIv78cKusu3nHdiM+lTWRlMsN6DQPm oqsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WF6E+sNX; 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 k7-20020a05622a03c700b004178c9cf90csi5444186qtx.21.2023.11.06.03.15.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Nov 2023 03:15:00 -0800 (PST) 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=WF6E+sNX; 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 1qzxSJ-0004Vz-PC; Mon, 06 Nov 2023 06:07:43 -0500 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 1qzxSH-0004SR-NJ for qemu-devel@nongnu.org; Mon, 06 Nov 2023 06:07:42 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qzxSG-0004m5-5P for qemu-devel@nongnu.org; Mon, 06 Nov 2023 06:07:41 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-408382da7f0so32552115e9.0 for ; Mon, 06 Nov 2023 03:07:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699268858; x=1699873658; 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=/8FQLEYTqFB9Ro3y1RtUGoGmFmjKyGG2i99735loRZ8=; b=WF6E+sNXVZX/Z+5pGUBibdCMZcz4zUcXLMjWEZE8U35cfkkuvb1O99TDaEPBQh8Rm8 zYfiXeRlni+swHKXl2RYdTVAJShEUu5Ssm+p1LnmAGRywT9b5hP4oi8moHQ0A6lBOCFb VHpypHN/gZbNOUGMxcm7sfQa2GmmGR1SaPBY5wMpGpKSJ+OSmZGh+RFT/HGCEHivRmBX GqXPvktynv1dKAt5Xs4kXbXq8DoT/v1VkuodmY7RE/NWmBg8pHRNKdbeziQ+8ZoFn/FF xqsDgUzojnCJIHirq23Nc55SA9QwqCc8/ClXOvUQNyKT0w7lXtBnnL5ZdC8hm7CfBS1l NXNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699268858; x=1699873658; 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=/8FQLEYTqFB9Ro3y1RtUGoGmFmjKyGG2i99735loRZ8=; b=VyXSo792PtSpZ4IEfNpi2lsSYjUBruJx7hyY4EdTOuaFrvz1ax1QVVsJ+rNTgbw4GH u/gJidMxRcbtYWnXYW/cqH+z9GJMGgZPaJHXvHyOKkqEE2gOVgICoLbcsxfsKtznxTWr GJ2bl1q6JVNWczIY7LCKaTAx62nuglNVer1Oh/xnNSo+g2Ho75Ya+cgj5mJS8AmSibBK dVib2qEX68ZIgzndHaLDs/dIj1mO/NUKrHXcRYIYycGjscQQ3UcUeAaGuxDEfcyPgaKw iydrfhOguUvgGbqecXIs/ZLzCK7GUbQ6fW3kS57vyjvGcYf0oJvOgrcnDKxeYTDzhYeF +WMw== X-Gm-Message-State: AOJu0YwO9KJD0UKKUB3G0NGIoyTfzXFUwmF17Jvtl8RKOLoPz4KKlW4k mTClKx2AbBhVTbBF6B2jRk6lPAFchoXgG1FFS/s= X-Received: by 2002:a5d:6dae:0:b0:32f:7c01:5376 with SMTP id u14-20020a5d6dae000000b0032f7c015376mr22752718wrs.31.1699268858733; Mon, 06 Nov 2023 03:07:38 -0800 (PST) Received: from m1x-phil.lan (176-131-220-199.abo.bbox.fr. [176.131.220.199]) by smtp.gmail.com with ESMTPSA id z13-20020a5d4d0d000000b0031ad5fb5a0fsm9131295wrt.58.2023.11.06.03.07.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 06 Nov 2023 03:07:38 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: kvm@vger.kernel.org, qemu-s390x@nongnu.org, qemu-block@nongnu.org, qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Kevin Wolf , Daniel Henrique Barboza , Nicholas Piggin , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Paolo Bonzini Subject: [PULL 35/60] target/ppc: Prohibit target specific KVM prototypes on user emulation Date: Mon, 6 Nov 2023 12:03:07 +0100 Message-ID: <20231106110336.358-36-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231106110336.358-1-philmd@linaro.org> References: <20231106110336.358-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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 Message-Id: <20231003070427.69621-5-philmd@linaro.org> --- 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 6a4dd9c560..1975fb5ee6 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);