summaryrefslogtreecommitdiff
path: root/usr/src/uts/intel/io/vmm/vmm_vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/intel/io/vmm/vmm_vm.c')
-rw-r--r--usr/src/uts/intel/io/vmm/vmm_vm.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr/src/uts/intel/io/vmm/vmm_vm.c b/usr/src/uts/intel/io/vmm/vmm_vm.c
index 42d963a53c..609f034d10 100644
--- a/usr/src/uts/intel/io/vmm/vmm_vm.c
+++ b/usr/src/uts/intel/io/vmm/vmm_vm.c
@@ -292,9 +292,12 @@ vmspace_resident_count(vmspace_t *vms)
return (vms->vms_pages_mapped);
}
-void
+int
vmspace_track_dirty(vmspace_t *vms, uint64_t gpa, size_t len, uint8_t *bitmap)
{
+ if (!vms->vms_track_dirty)
+ return (EPERM);
+
/*
* Accumulate dirty bits into the given bit vector. Note that this
* races both against hardware writes from running vCPUs and
@@ -327,6 +330,8 @@ vmspace_track_dirty(vmspace_t *vms, uint64_t gpa, size_t len, uint8_t *bitmap)
vmc_space_invalidate(vmc, gpa, len, vms->vms_pt_gen);
}
vmspace_hold_exit(vms, true);
+
+ return (0);
}
static pfn_t
@@ -839,7 +844,7 @@ vmspace_client_alloc(vmspace_t *vms)
uint64_t
vmspace_table_root(vmspace_t *vms)
{
- return (vmm_gpt_get_pmtp(vms->vms_gpt));
+ return (vmm_gpt_get_pmtp(vms->vms_gpt, vms->vms_track_dirty));
}
/*