]> git.proxmox.com Git - qemu.git/blobdiff - target-ppc/kvm_ppc.h
Documentation: Remove outdated host_device note
[qemu.git] / target-ppc / kvm_ppc.h
index 911b19e378b499a1a4b5d8381c1aa5e8640e2cc6..45a1373b28130aa1f15ee256d862b82a0c2aa985 100644 (file)
 
 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