]>
git.proxmox.com Git - mirror_qemu.git/blob - target-ppc/kvm_ppc.h
2 * Copyright 2008 IBM Corporation.
3 * Authors: Hollis Blanchard <hollisb@us.ibm.com>
5 * This work is licensed under the GNU GPL license version 2 or later.
14 void kvmppc_init(void);
18 uint32_t kvmppc_get_tbfreq(void);
19 uint64_t kvmppc_get_clockfreq(void);
20 uint32_t kvmppc_get_vmx(void);
21 uint32_t kvmppc_get_dfp(void);
22 int kvmppc_get_hypercall(CPUState
*env
, uint8_t *buf
, int buf_len
);
23 int kvmppc_set_interrupt(CPUState
*env
, int irq
, int level
);
24 void kvmppc_set_papr(CPUState
*env
);
25 int kvmppc_smt_threads(void);
26 off_t
kvmppc_alloc_rma(const char *name
, MemoryRegion
*sysmem
);
27 void *kvmppc_create_spapr_tce(uint32_t liobn
, uint32_t window_size
, int *pfd
);
28 int kvmppc_remove_spapr_tce(void *table
, int pfd
, uint32_t window_size
);
29 const ppc_def_t
*kvmppc_host_cpu_def(void);
33 static inline uint32_t kvmppc_get_tbfreq(void)
38 static inline uint64_t kvmppc_get_clockfreq(void)
43 static inline uint32_t kvmppc_get_vmx(void)
48 static inline uint32_t kvmppc_get_dfp(void)
53 static inline int kvmppc_get_hypercall(CPUState
*env
, uint8_t *buf
, int buf_len
)
58 static inline int kvmppc_set_interrupt(CPUState
*env
, int irq
, int level
)
63 static inline void kvmppc_set_papr(CPUState
*env
)
67 static inline int kvmppc_smt_threads(void)
72 static inline off_t
kvmppc_alloc_rma(const char *name
, MemoryRegion
*sysmem
)
77 static inline void *kvmppc_create_spapr_tce(uint32_t liobn
,
78 uint32_t window_size
, int *fd
)
83 static inline int kvmppc_remove_spapr_tce(void *table
, int pfd
,
89 static inline const ppc_def_t
*kvmppc_host_cpu_def(void)
97 #define kvmppc_eieio() do { } while (0)
99 #define kvmppc_eieio() \
101 if (kvm_enabled()) { \
102 asm volatile("eieio" : : : "memory"); \
107 #ifndef KVM_INTERRUPT_SET
108 #define KVM_INTERRUPT_SET -1
111 #ifndef KVM_INTERRUPT_UNSET
112 #define KVM_INTERRUPT_UNSET -2
115 #ifndef KVM_INTERRUPT_SET_LEVEL
116 #define KVM_INTERRUPT_SET_LEVEL -3
119 #endif /* __KVM_PPC_H__ */