From: Philippe Mathieu-Daudé Date: Mon, 11 Sep 2023 21:16:40 +0000 (+0300) Subject: target/ppc: Prohibit target specific KVM prototypes on user emulation X-Git-Tag: v8.2.0-rc0~19^2~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c6b8252c6d55a4db19a67c295f88b66158c6d94e;p=thirdparty%2Fqemu.git target/ppc: Prohibit target specific KVM prototypes on user emulation 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> --- diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h index 6a4dd9c5608..1975fb5ee6c 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);