]> git.proxmox.com Git - mirror_qemu.git/blame - target-ppc/kvm_ppc.h
Implement PAPR CRQ hypercalls
[mirror_qemu.git] / target-ppc / kvm_ppc.h
CommitLineData
d76d1650
AJ
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
12void kvmppc_init(void);
13void kvmppc_fdt_update(void *fdt);
ea23bc20
AJ
14int kvmppc_read_host_property(const char *node_path, const char *prop,
15 void *val, size_t len);
d76d1650 16
dc333cd6 17uint32_t kvmppc_get_tbfreq(void);
45024f09 18int kvmppc_get_hypercall(CPUState *env, uint8_t *buf, int buf_len);
fc87e185
AG
19int kvmppc_set_interrupt(CPUState *env, int irq, int level);
20
b45d63b6
BH
21#ifndef CONFIG_KVM
22#define kvmppc_eieio() do { } while (0)
23#else
24#define kvmppc_eieio() \
25 do { \
26 if (kvm_enabled()) { \
27 asm volatile("eieio" : : : "memory"); \
28 } \
29 } while (0)
30#endif
31
fc87e185
AG
32#ifndef KVM_INTERRUPT_SET
33#define KVM_INTERRUPT_SET -1
34#endif
35
36#ifndef KVM_INTERRUPT_UNSET
37#define KVM_INTERRUPT_UNSET -2
38#endif
39
40#ifndef KVM_INTERRUPT_SET_LEVEL
41#define KVM_INTERRUPT_SET_LEVEL -3
42#endif
dc333cd6 43
d76d1650 44#endif /* __KVM_PPC_H__ */