diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2011-05-05 16:39:47 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2011-05-05 16:39:47 +0300 |
commit | 5300f1a5487f67f0bde8ee1081b799108668cb1d (patch) | |
tree | 5274ff496f2665487736a4eec23bf76601e4da44 /target-ppc/kvm_ppc.h | |
parent | 8d4c78e7c8adf0a4440a8de92738b3820fc8215a (diff) | |
parent | d2d979c628e4b2c4a3cb71a31841875795c79043 (diff) |
Merge remote branch 'origin/master' into pci
Conflicts:
exec.c
Diffstat (limited to 'target-ppc/kvm_ppc.h')
-rw-r--r-- | target-ppc/kvm_ppc.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/target-ppc/kvm_ppc.h b/target-ppc/kvm_ppc.h index 911b19e378..45a1373b28 100644 --- a/target-ppc/kvm_ppc.h +++ b/target-ppc/kvm_ppc.h @@ -11,13 +11,33 @@ void kvmppc_init(void); void kvmppc_fdt_update(void *fdt); +#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 int kvmppc_read_host_property(const char *node_path, const char *prop, void *val, size_t len); +#endif uint32_t kvmppc_get_tbfreq(void); int kvmppc_get_hypercall(CPUState *env, uint8_t *buf, int buf_len); int kvmppc_set_interrupt(CPUState *env, int irq, int level); +#ifndef CONFIG_KVM +#define kvmppc_eieio() do { } while (0) +#else +#define kvmppc_eieio() \ + do { \ + if (kvm_enabled()) { \ + asm volatile("eieio" : : : "memory"); \ + } \ + } while (0) +#endif + #ifndef KVM_INTERRUPT_SET #define KVM_INTERRUPT_SET -1 #endif |