Signed-off-by: Avi Kivity <a...@redhat.com>
---
 api/kvmxx.cc |    5 +++--
 api/kvmxx.hh |    3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/api/kvmxx.cc b/api/kvmxx.cc
index ad27907..42e8781 100644
--- a/api/kvmxx.cc
+++ b/api/kvmxx.cc
@@ -150,12 +150,13 @@ vm::vm(system& system)
 {
 }
 
-void vm::set_memory_region(int slot, void *addr, uint64_t gpa, size_t len)
+void vm::set_memory_region(int slot, void *addr, uint64_t gpa, size_t len,
+                           uint32_t flags)
 {
     struct kvm_userspace_memory_region umr;
 
     umr.slot = slot;
-    umr.flags = 0;
+    umr.flags = flags;
     umr.guest_phys_addr = gpa;
     umr.memory_size = len;
     umr.userspace_addr = reinterpret_cast<uint64_t>(addr);
diff --git a/api/kvmxx.hh b/api/kvmxx.hh
index 51dbe7a..958d36f 100644
--- a/api/kvmxx.hh
+++ b/api/kvmxx.hh
@@ -57,7 +57,8 @@ private:
 class vm {
 public:
     explicit vm(system& system);
-    void set_memory_region(int slot, void *addr, uint64_t gpa, size_t len);
+    void set_memory_region(int slot, void *addr, uint64_t gpa, size_t len,
+                           uint32_t flags = 0);
     void set_tss_addr(uint32_t addr);
     system& sys() { return _system; }
 private:
-- 
1.7.1

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

Reply via email to