Skip to content

Commit

Permalink
target/ppc: Prohibit target specific KVM prototypes on user emulation
Browse files Browse the repository at this point in the history
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 <kwolf@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20231003070427.69621-5-philmd@linaro.org>
  • Loading branch information
philmd committed Nov 7, 2023
1 parent a523b67 commit c6b8252
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions target/ppc/kvm_ppc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c6b8252

Please sign in to comment.