diff mbox series

[PATCH-for-8.0,1/4] target/ppc/kvm: Add missing "cpu.h" and "exec/hwaddr.h"

Message ID 20221213123550.39302-2-philmd@linaro.org
State New
Headers show
Series ppc: Clean up few headers to make them target agnostic | expand

Commit Message

Philippe Mathieu-Daudé Dec. 13, 2022, 12:35 p.m. UTC
kvm_ppc.h is missing various declarations from "cpu.h":

  target/ppc/kvm_ppc.h:128:40: error: unknown type name 'CPUPPCState'; did you mean 'CPUState'?
  static inline int kvmppc_get_hypercall(CPUPPCState *env,
                                         ^~~~~~~~~~~
                                         CPUState
  include/qemu/typedefs.h:45:25: note: 'CPUState' declared here
  typedef struct CPUState CPUState;
                          ^
  target/ppc/kvm_ppc.h:134:40: error: unknown type name 'PowerPCCPU'
  static inline int kvmppc_set_interrupt(PowerPCCPU *cpu, int irq, int level)
                                         ^
  target/ppc/kvm_ppc.h:285:38: error: unknown type name 'hwaddr'
                                       hwaddr ptex, int n)
                                       ^
  target/ppc/kvm_ppc.h:220:15: error: unknown type name 'target_ulong'
  static inline target_ulong kvmppc_configure_v3_mmu(PowerPCCPU *cpu,
                ^
  target/ppc/kvm_ppc.h:286:38: error: unknown type name 'ppc_hash_pte64_t'
  static inline void kvmppc_read_hptes(ppc_hash_pte64_t *hptes,
                                       ^

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/ppc/kvm_ppc.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Daniel Henrique Barboza Dec. 16, 2022, 4:33 p.m. UTC | #1
On 12/13/22 09:35, Philippe Mathieu-Daudé wrote:
> kvm_ppc.h is missing various declarations from "cpu.h":
> 
>    target/ppc/kvm_ppc.h:128:40: error: unknown type name 'CPUPPCState'; did you mean 'CPUState'?
>    static inline int kvmppc_get_hypercall(CPUPPCState *env,
>                                           ^~~~~~~~~~~
>                                           CPUState
>    include/qemu/typedefs.h:45:25: note: 'CPUState' declared here
>    typedef struct CPUState CPUState;
>                            ^
>    target/ppc/kvm_ppc.h:134:40: error: unknown type name 'PowerPCCPU'
>    static inline int kvmppc_set_interrupt(PowerPCCPU *cpu, int irq, int level)
>                                           ^
>    target/ppc/kvm_ppc.h:285:38: error: unknown type name 'hwaddr'
>                                         hwaddr ptex, int n)
>                                         ^
>    target/ppc/kvm_ppc.h:220:15: error: unknown type name 'target_ulong'
>    static inline target_ulong kvmppc_configure_v3_mmu(PowerPCCPU *cpu,
>                  ^
>    target/ppc/kvm_ppc.h:286:38: error: unknown type name 'ppc_hash_pte64_t'
>    static inline void kvmppc_read_hptes(ppc_hash_pte64_t *hptes,
>                                         ^
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>

>   target/ppc/kvm_ppc.h | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h
> index ee9325bf9a..5fd9753953 100644
> --- a/target/ppc/kvm_ppc.h
> +++ b/target/ppc/kvm_ppc.h
> @@ -9,6 +9,9 @@
>   #ifndef KVM_PPC_H
>   #define KVM_PPC_H
>   
> +#include "exec/hwaddr.h"
> +#include "cpu.h"
> +
>   #define TYPE_HOST_POWERPC_CPU POWERPC_CPU_TYPE_NAME("host")
>   
>   #ifdef CONFIG_KVM
diff mbox series

Patch

diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h
index ee9325bf9a..5fd9753953 100644
--- a/target/ppc/kvm_ppc.h
+++ b/target/ppc/kvm_ppc.h
@@ -9,6 +9,9 @@ 
 #ifndef KVM_PPC_H
 #define KVM_PPC_H
 
+#include "exec/hwaddr.h"
+#include "cpu.h"
+
 #define TYPE_HOST_POWERPC_CPU POWERPC_CPU_TYPE_NAME("host")
 
 #ifdef CONFIG_KVM