This patch enables coalesced MMIO for x86 architecture.

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

diff --git a/libkvm/kvm-x86.h b/libkvm/kvm-x86.h
index 1dccf64..e988cb7 100644
--- a/libkvm/kvm-x86.h
+++ b/libkvm/kvm-x86.h
@@ -50,4 +50,6 @@ int kvm_disable_tpr_access_reporting(kvm_context_t kvm, int 
vcpu);
 
 #endif
 
+#define smp_wmb()   asm volatile("" ::: "memory")
+
 #endif
diff --git a/libkvm/libkvm-x86.c b/libkvm/libkvm-x86.c
index d46fdcc..ea97bdd 100644
--- a/libkvm/libkvm-x86.c
+++ b/libkvm/libkvm-x86.c
@@ -179,6 +179,10 @@ int kvm_arch_create(kvm_context_t kvm, unsigned long 
phys_mem_bytes,
        if (r < 0)
                return 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