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: 1842449 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=fdnvxRmh; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S084Z4bBQz1yph for ; Tue, 3 Oct 2023 18:06:22 +1100 (AEDT) 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-Google-Smtp-Source: AGHT+IEtMLpY0vDY8IiNQlnwRAuBYlQaQaB3YsnFQvO7ycOaQmgl/yRWmUy1V6VmkwiBs0q8c2c4lw== 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.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);