]> git.proxmox.com Git - mirror_qemu.git/blob - target-ppc/kvm_ppc.h
PPC: bamboo: Move host fdt copy to target
[mirror_qemu.git] / target-ppc / kvm_ppc.h
1 /*
2 * Copyright 2008 IBM Corporation.
3 * Authors: Hollis Blanchard <hollisb@us.ibm.com>
4 *
5 * This work is licensed under the GNU GPL license version 2 or later.
6 *
7 */
8
9 #ifndef __KVM_PPC_H__
10 #define __KVM_PPC_H__
11
12 void kvmppc_init(void);
13 #ifndef CONFIG_KVM
14 static inline int kvmppc_read_host_property(const char *node_path, const char *prop,
15 void *val, size_t len)
16 {
17 assert(0);
18 return -ENOSYS;
19 }
20 #else
21 int kvmppc_read_host_property(const char *node_path, const char *prop,
22 void *val, size_t len);
23 #endif
24
25 uint32_t kvmppc_get_tbfreq(void);
26 int kvmppc_get_hypercall(CPUState *env, uint8_t *buf, int buf_len);
27 int kvmppc_set_interrupt(CPUState *env, int irq, int level);
28
29 #ifndef CONFIG_KVM
30 #define kvmppc_eieio() do { } while (0)
31 #else
32 #define kvmppc_eieio() \
33 do { \
34 if (kvm_enabled()) { \
35 asm volatile("eieio" : : : "memory"); \
36 } \
37 } while (0)
38 #endif
39
40 #ifndef KVM_INTERRUPT_SET
41 #define KVM_INTERRUPT_SET -1
42 #endif
43
44 #ifndef KVM_INTERRUPT_UNSET
45 #define KVM_INTERRUPT_UNSET -2
46 #endif
47
48 #ifndef KVM_INTERRUPT_SET_LEVEL
49 #define KVM_INTERRUPT_SET_LEVEL -3
50 #endif
51
52 #endif /* __KVM_PPC_H__ */