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);