From patchwork Tue Oct 3 07:04: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: 728716 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp2008256wrt; Tue, 3 Oct 2023 00:06:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGCm/Wys3hjdHfV6CSqBt/Kp9Ys3f/jFT7s0Lf5K/q5D0f6/J2LSfOjdXMWd/m+fuz/k38k X-Received: by 2002:a0c:f1cc:0:b0:647:2653:bcc with SMTP id u12-20020a0cf1cc000000b0064726530bccmr2115989qvl.13.1696316781356; Tue, 03 Oct 2023 00:06:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696316781; cv=none; d=google.com; s=arc-20160816; b=T5BAfbi584nYYum2EEnsOpCPqMBZ6Grl+2ZgAD0IzpMkss4ZqKd3gKn/QHvlXIWjKr WPAPnI4EIYSWBeybSTV2OsmRaU1z1aBum797ixymdTnAyZRpnkUy+rScIeC2cd5g5IQ8 m0Ij5ie/wTRteEdY1n7uenIH3N6xHqyQkZZb15Ot7mB/dCinQ9ZAX7M2pU9rin4vMW1F miFXBwxZqoucj/XLEyCH1xh8nZEBcLhY6Pk/7463meZcvZ4/+jcMsKHs4jOoI/JST1ph 6Tjkuhap/OELms2VvR0AeJYCdmUGuTnJ8HbSTb8zL5IIUFPLLiK1yJSkJsswTW6xhkui xHeQ== 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=4dGNWXL4bt/YZVly7d1oK3PqrthsZjp41Sj7J9uNPxE=; fh=stgTJ6meyq09O+0pY4Hopx/UalDJyGpmOS4HF8vYwWA=; b=p7mqx1KgBMgmYvS+ZqlsyOqBQejW7UUWC1Djgr6+G/knEb7F7bkC1KLqAySIiYMUfr TiHTPBv72yKIObRuH3ByxHi0quXU3iEpn53Eq6cI9gt75mGU4r/cvQhTtOodH0B14u54 IkAFxxj2pLdRcPcH139eVjJjH5kyV6V02DRHSZGKB2Brhdp1wGO+TUTDW3TWDV9a6QOM 3HlCyWcJwE3NQM8bW8S7BoapzXRE0joUOIWFqqceXHBUbQK9Hrs8JeK1V2w0z2juGEjM 0ONx8vN69bBtQGwKcFSYp2nsc6F7jWCIpDgcDPcSoDqfmPwmN9+XDpH0pxgyd6+cXtCn 18gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fdnvxRmh; 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 w1-20020a0cb541000000b0065b23aea95asi255726qvd.11.2023.10.03.00.06.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Oct 2023 00:06:21 -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=fdnvxRmh; 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 1qnZT3-0001ZX-IT; Tue, 03 Oct 2023 03:05:17 -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 1qnZT2-0001Yh-7W for qemu-devel@nongnu.org; Tue, 03 Oct 2023 03:05:16 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qnZSm-0008Sm-Oz for qemu-devel@nongnu.org; Tue, 03 Oct 2023 03:05:15 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-32799639a2aso616234f8f.3 for ; Tue, 03 Oct 2023 00:05:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696316699; x=1696921499; 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=4dGNWXL4bt/YZVly7d1oK3PqrthsZjp41Sj7J9uNPxE=; b=fdnvxRmhb4A2CQCjmKssDKnkUYSnnGsMegiRMQbnuXhjQaUXo5kb4GESYSc/PR/+oS bwr9uag2cuEHBf0/bQWIaaC+SHt0fzlpN15z7L17kE+PVdU3oT3BBdWFwen/Sixg5Brl GX5cgJq6ALjrQBKQnuQmUtnshukN4t18hHShThu+j5m4G1YMDEq57ZwGy3yalLxTPCVQ P8EwR1BtL8DRPFKRsB4pR6u/PTxpoxxLmMI2o+YMpMFB3fT6gUYQkC0zTz6j+JDFJzpQ C8n8U/szhxQQCqyBWlu1/ro7jbG5+7m+mLYGPVskHmnCpf6Y8VJGji51/3YsoF8bmh2h kqdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696316699; x=1696921499; 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=4dGNWXL4bt/YZVly7d1oK3PqrthsZjp41Sj7J9uNPxE=; b=sdrzbR19x9pnBqOZF24Rk8cZnq7nK2EJ5vJ2D3Oy4lGqb/GMGO2bXSONd4wQaDg3qx iAMr6alrRXZrvWiJV1MWeHEgu3F4DQpDKhBCZXHqjhIA+/50I5OiPctYbzwtp1X91DNQ Wvh3hh3nSR94Gdox9N8th7f+51kN2m5jdDCgs38qKTD3c1izwRhestOp0y8bb/gSV98S bP4QOCC9tAZlrfhxiSnUVLVwDRIuYrYnop+c5bPpunUQSlRZK1/3qtvSbYITsFidvdJZ nFKwWb05EYJtmlOLYubobfYslNrVk63CqvThokVqGQRJqokrnG7B4WHia6roRtPas/ld 9Ktg== X-Gm-Message-State: AOJu0Yycvu9oZewsnBQIjDaQzxh/34uPraVpJzM2jIxVXonfKEq8IArO FFqQDLcwbyBwYmDATfl+eLAAFoWX9BLUnt0blEYiuQ== X-Received: by 2002:a5d:58c2:0:b0:321:f74d:ade6 with SMTP id o2-20020a5d58c2000000b00321f74dade6mr11933643wrf.40.1696316699144; Tue, 03 Oct 2023 00:04:59 -0700 (PDT) Received: from m1x-phil.lan (176-131-222-246.abo.bbox.fr. [176.131.222.246]) by smtp.gmail.com with ESMTPSA id d18-20020a056000115200b00326c952716esm818614wrx.61.2023.10.03.00.04.57 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 03 Oct 2023 00:04:58 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Daniel Henrique Barboza , David Gibson , Paolo Bonzini , kvm@vger.kernel.org, Richard Henderson , =?utf-8?q?C=C3=A9dric_Le_?= =?utf-8?q?Goater?= , qemu-ppc@nongnu.org, Kevin Wolf , Daniel Henrique Barboza , Michael Tokarev , Greg Kurz , Nicholas Piggin , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 4/4] target/ppc: Prohibit target specific KVM prototypes on user emulation Date: Tue, 3 Oct 2023 09:04:26 +0200 Message-ID: <20231003070427.69621-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231003070427.69621-1-philmd@linaro.org> References: <20231003070427.69621-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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, 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 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);