diff options
author | Changbin Du <changbin.du@intel.com> | 2018-01-30 19:19:51 +0800 |
---|---|---|
committer | Zhenyu Wang <zhenyuw@linux.intel.com> | 2018-03-06 13:19:19 +0800 |
commit | f66e5ff706038d03e8ef6d012e3aec7824442418 (patch) | |
tree | cd8050a57578e2d210b1ce4108c7fb4d662d4070 /drivers/gpu/drm/i915/gvt/mpt.h | |
parent | d87f5ff35f3fc10a4abe13db6b1af9613f20519d (diff) | |
download | linux-f66e5ff706038d03e8ef6d012e3aec7824442418.tar.bz2 |
drm/i915/gvt: Rename mpt api {set, unset}_wp_page to {enable, disable}_page_track
The kvmgt's implementation of mpt api {set,unset}_wp_page is not real
write-protection - the data get written before invoke this two api.
As discussed, change the mpt api to match the real behavior.
Signed-off-by: Changbin Du <changbin.du@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/mpt.h')
-rw-r--r-- | drivers/gpu/drm/i915/gvt/mpt.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/gvt/mpt.h b/drivers/gpu/drm/i915/gvt/mpt.h index 81aff4eacbfe..90fd83f98733 100644 --- a/drivers/gpu/drm/i915/gvt/mpt.h +++ b/drivers/gpu/drm/i915/gvt/mpt.h @@ -154,7 +154,7 @@ static inline unsigned long intel_gvt_hypervisor_virt_to_mfn(void *p) } /** - * intel_gvt_hypervisor_enable - set a guest page to write-protected + * intel_gvt_hypervisor_enable_page_track - track a guest page * @vgpu: a vGPU * @t: page track data structure * @@ -170,7 +170,7 @@ static inline int intel_gvt_hypervisor_enable_page_track( if (t->tracked) return 0; - ret = intel_gvt_host.mpt->set_wp_page(vgpu->handle, t->gfn); + ret = intel_gvt_host.mpt->enable_page_track(vgpu->handle, t->gfn); if (ret) return ret; t->tracked = true; @@ -179,8 +179,7 @@ static inline int intel_gvt_hypervisor_enable_page_track( } /** - * intel_gvt_hypervisor_disable_page_track - remove the write-protection of a - * guest page + * intel_gvt_hypervisor_disable_page_track - untrack a guest page * @vgpu: a vGPU * @t: page track data structure * @@ -196,7 +195,7 @@ static inline int intel_gvt_hypervisor_disable_page_track( if (!t->tracked) return 0; - ret = intel_gvt_host.mpt->unset_wp_page(vgpu->handle, t->gfn); + ret = intel_gvt_host.mpt->disable_page_track(vgpu->handle, t->gfn); if (ret) return ret; t->tracked = false; |