[PATCH 1/3] drm/i915/gvt: Rename "mfn" to "pfn" in intel_vgpu_shadow_page
Chuanxiao Dong
chuanxiao.dong at intel.com
Wed Feb 8 10:28:47 UTC 2017
This patch changes the name of the data member "mfn" inside
intel_vgpu_shadow_page to "pfn".
No other logic is changed.
Signed-off-by: Zhi Wang <zhi.a.wang at intel.com>
Signed-off-by: Chuanxiao Dong <chuanxiao.dong at intel.com>
---
drivers/gpu/drm/i915/gvt/gtt.c | 22 +++++++++++-----------
drivers/gpu/drm/i915/gvt/gtt.h | 2 +-
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c
index 47dec4a..5baae6f 100644
--- a/drivers/gpu/drm/i915/gvt/gtt.c
+++ b/drivers/gpu/drm/i915/gvt/gtt.c
@@ -611,11 +611,11 @@ static inline int init_shadow_page(struct intel_vgpu *vgpu,
INIT_HLIST_NODE(&p->node);
- p->mfn = intel_gvt_hypervisor_virt_to_mfn(p->vaddr);
- if (p->mfn == INTEL_GVT_INVALID_ADDR)
+ p->pfn = intel_gvt_hypervisor_virt_to_mfn(p->vaddr);
+ if (p->pfn == INTEL_GVT_INVALID_ADDR)
return -EFAULT;
- hash_add(vgpu->gtt.shadow_page_hash_table, &p->node, p->mfn);
+ hash_add(vgpu->gtt.shadow_page_hash_table, &p->node, p->pfn);
return 0;
}
@@ -626,13 +626,13 @@ static inline void clean_shadow_page(struct intel_vgpu_shadow_page *p)
}
static inline struct intel_vgpu_shadow_page *find_shadow_page(
- struct intel_vgpu *vgpu, unsigned long mfn)
+ struct intel_vgpu *vgpu, unsigned long pfn)
{
struct intel_vgpu_shadow_page *p;
hash_for_each_possible(vgpu->gtt.shadow_page_hash_table,
- p, node, mfn) {
- if (p->mfn == mfn)
+ p, node, pfn) {
+ if (p->pfn == pfn)
return p;
}
return NULL;
@@ -749,7 +749,7 @@ static struct intel_vgpu_ppgtt_spt *ppgtt_alloc_shadow_page(
goto err;
}
- trace_spt_alloc(vgpu->id, spt, type, spt->shadow_page.mfn, gfn);
+ trace_spt_alloc(vgpu->id, spt, type, spt->shadow_page.pfn, gfn);
return spt;
err:
ppgtt_free_shadow_page(spt);
@@ -757,15 +757,15 @@ static struct intel_vgpu_ppgtt_spt *ppgtt_alloc_shadow_page(
}
static struct intel_vgpu_ppgtt_spt *ppgtt_find_shadow_page(
- struct intel_vgpu *vgpu, unsigned long mfn)
+ struct intel_vgpu *vgpu, unsigned long pfn)
{
- struct intel_vgpu_shadow_page *p = find_shadow_page(vgpu, mfn);
+ struct intel_vgpu_shadow_page *p = find_shadow_page(vgpu, pfn);
if (p)
return shadow_page_to_ppgtt_spt(p);
gvt_err("vgpu%d: fail to find ppgtt shadow page: 0x%lx\n",
- vgpu->id, mfn);
+ vgpu->id, pfn);
return NULL;
}
@@ -915,7 +915,7 @@ static inline void ppgtt_generate_shadow_entry(struct intel_gvt_gtt_entry *se,
se->type = ge->type;
se->val64 = ge->val64;
- ops->set_pfn(se, s->shadow_page.mfn);
+ ops->set_pfn(se, s->shadow_page.pfn);
}
static int ppgtt_populate_shadow_page(struct intel_vgpu_ppgtt_spt *spt)
diff --git a/drivers/gpu/drm/i915/gvt/gtt.h b/drivers/gpu/drm/i915/gvt/gtt.h
index f88eb5e..4b67812 100644
--- a/drivers/gpu/drm/i915/gvt/gtt.h
+++ b/drivers/gpu/drm/i915/gvt/gtt.h
@@ -221,7 +221,7 @@ struct intel_vgpu_shadow_page {
struct page *page;
int type;
struct hlist_node node;
- unsigned long mfn;
+ unsigned long pfn;
};
struct intel_vgpu_guest_page {
--
2.7.4
More information about the intel-gvt-dev
mailing list