This patch enables coalesced MMIO for powerpc architecture.

WARNING: this has not been tested.

Signed-off-by: Laurent Vivier <[EMAIL PROTECTED]>
---
 libkvm/kvm-powerpc.h    |    7 +++++++
 libkvm/libkvm-powerpc.c |    6 ++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/libkvm/kvm-powerpc.h b/libkvm/kvm-powerpc.h
index 77aee54..b09511c 100644
--- a/libkvm/kvm-powerpc.h
+++ b/libkvm/kvm-powerpc.h
@@ -26,4 +26,11 @@ extern int kvm_page_size;
 #define PAGE_SIZE kvm_page_size
 #define PAGE_MASK (~(PAGE_SIZE - 1))
 
+static inline void eieio(void)
+{
+       asm volatile("eieio" : : : "memory");
+}
+
+#define smp_wmb()      eieio()
+
 #endif
diff --git a/libkvm/libkvm-powerpc.c b/libkvm/libkvm-powerpc.c
index 53a2478..376aca4 100644
--- a/libkvm/libkvm-powerpc.c
+++ b/libkvm/libkvm-powerpc.c
@@ -93,6 +93,12 @@ void kvm_show_regs(kvm_context_t kvm, int vcpu)
 int kvm_arch_create(kvm_context_t kvm, unsigned long phys_mem_bytes,
                         void **vm_mem)
 {
+       int r;
+
+       r = kvm_init_coalesced_mmio(kvm);
+       if (r < 0)
+               return r;
+
        return 0;
 }
 
-- 
1.5.2.4

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to