From: Avi Kivity <avi@xxxxxxxxxx> Signed-off-by: Avi Kivity <avi@xxxxxxxxxx> Signed-off-by: Marcelo Tosatti <mtosatti@xxxxxxxxxx> 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: -- To unsubscribe from this list: send the line "unsubscribe kvm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html