This patch enables coalesced MMIO for ia64 architecture.

WARNING: this has not been tested.

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

diff --git a/libkvm/kvm-ia64.h b/libkvm/kvm-ia64.h
index 304496d..ad87ae7 100644
--- a/libkvm/kvm-ia64.h
+++ b/libkvm/kvm-ia64.h
@@ -25,4 +25,7 @@ extern int kvm_page_size;
 #define PAGE_SIZE kvm_page_size
 #define PAGE_MASK (~(kvm_page_size - 1))
 
+#define ia64_mf()      asm volatile ("mf" ::: "memory")
+#define smp_wmb()      ia64_mf()
+
 #endif
diff --git a/libkvm/libkvm-ia64.c b/libkvm/libkvm-ia64.c
index d7477d0..f35a16c 100644
--- a/libkvm/libkvm-ia64.c
+++ b/libkvm/libkvm-ia64.c
@@ -67,6 +67,12 @@ void *kvm_create_kernel_phys_mem(kvm_context_t kvm, unsigned 
long phys_start,
 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