2008-12-16 13:43:58 +03:00
|
|
|
/*
|
|
|
|
* Copyright 2008 IBM Corporation.
|
|
|
|
* Authors: Hollis Blanchard <hollisb@us.ibm.com>
|
|
|
|
*
|
|
|
|
* This work is licensed under the GNU GPL license version 2 or later.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __KVM_PPC_H__
|
|
|
|
#define __KVM_PPC_H__
|
|
|
|
|
|
|
|
void kvmppc_init(void);
|
|
|
|
void kvmppc_fdt_update(void *fdt);
|
2011-04-08 14:08:25 +04:00
|
|
|
#ifndef CONFIG_KVM
|
|
|
|
static inline int kvmppc_read_host_property(const char *node_path, const char *prop,
|
|
|
|
void *val, size_t len)
|
|
|
|
{
|
|
|
|
assert(0);
|
|
|
|
return -ENOSYS;
|
|
|
|
}
|
|
|
|
#else
|
2009-01-24 19:35:56 +03:00
|
|
|
int kvmppc_read_host_property(const char *node_path, const char *prop,
|
|
|
|
void *val, size_t len);
|
2011-04-08 14:08:25 +04:00
|
|
|
#endif
|
2008-12-16 13:43:58 +03:00
|
|
|
|
2010-02-09 19:37:05 +03:00
|
|
|
uint32_t kvmppc_get_tbfreq(void);
|
2010-08-03 17:22:42 +04:00
|
|
|
int kvmppc_get_hypercall(CPUState *env, uint8_t *buf, int buf_len);
|
2010-08-30 15:49:15 +04:00
|
|
|
int kvmppc_set_interrupt(CPUState *env, int irq, int level);
|
|
|
|
|
2011-04-01 08:15:30 +04:00
|
|
|
#ifndef CONFIG_KVM
|
|
|
|
#define kvmppc_eieio() do { } while (0)
|
|
|
|
#else
|
|
|
|
#define kvmppc_eieio() \
|
|
|
|
do { \
|
|
|
|
if (kvm_enabled()) { \
|
|
|
|
asm volatile("eieio" : : : "memory"); \
|
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
#endif
|
|
|
|
|
2010-08-30 15:49:15 +04:00
|
|
|
#ifndef KVM_INTERRUPT_SET
|
|
|
|
#define KVM_INTERRUPT_SET -1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef KVM_INTERRUPT_UNSET
|
|
|
|
#define KVM_INTERRUPT_UNSET -2
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef KVM_INTERRUPT_SET_LEVEL
|
|
|
|
#define KVM_INTERRUPT_SET_LEVEL -3
|
|
|
|
#endif
|
2010-02-09 19:37:05 +03:00
|
|
|
|
2008-12-16 13:43:58 +03:00
|
|
|
#endif /* __KVM_PPC_H__ */
|