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.
12 void kvmppc_init(void);
16 uint32_t kvmppc_get_tbfreq(void);
17 uint64_t kvmppc_get_clockfreq(void);
18 int kvmppc_get_hypercall(CPUState
*env
, uint8_t *buf
, int buf_len
);
19 int kvmppc_set_interrupt(CPUState
*env
, int irq
, int level
);
20 void kvmppc_set_papr(CPUState
*env
);
24 static inline uint32_t kvmppc_get_tbfreq(void)
29 static inline uint64_t kvmppc_get_clockfreq(void)
34 static inline int kvmppc_get_hypercall(CPUState
*env
, uint8_t *buf
, int buf_len
)
39 static inline int kvmppc_set_interrupt(CPUState
*env
, int irq
, int level
)
44 static inline void kvmppc_set_papr(CPUState
*env
)
51 #define kvmppc_eieio() do { } while (0)
53 #define kvmppc_eieio() \
55 if (kvm_enabled()) { \
56 asm volatile("eieio" : : : "memory"); \
61 #ifndef KVM_INTERRUPT_SET
62 #define KVM_INTERRUPT_SET -1
65 #ifndef KVM_INTERRUPT_UNSET
66 #define KVM_INTERRUPT_UNSET -2
69 #ifndef KVM_INTERRUPT_SET_LEVEL
70 #define KVM_INTERRUPT_SET_LEVEL -3
73 #endif /* __KVM_PPC_H__ */