qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 4/4] target/ppc: Prohibit target specific KVM prototypes on u


From: Daniel Henrique Barboza
Subject: Re: [PATCH 4/4] target/ppc: Prohibit target specific KVM prototypes on user emulation
Date: Wed, 13 Sep 2023 06:14:48 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0



On 9/12/23 08:30, Philippe Mathieu-Daudé wrote:
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>

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]