xen/arm: Rename grant_table_gfpn into grant_table_gfn and use the typesafe gfn

The correct acronym for a guest physical frame is gfn. Also use
the typesafe gfn to ensure that a guest frame is effectively used.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
Julien Grall authored and Andrew Cooper committed 2016-06-28 19:19:36 +01:00
1 parent 29118c726d
commit 3cdad93704
4 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -464,13 +464,13 @@ struct domain *alloc_domain_struct(void)
return NULL;
clear_page(d);
d->arch.grant_table_gpfn = xzalloc_array(xen_pfn_t, max_grant_frames);
d->arch.grant_table_gfn = xzalloc_array(gfn_t, max_grant_frames);
return d;
}
void free_domain_struct(struct domain *d)
{
xfree(d->arch.grant_table_gpfn);
xfree(d->arch.grant_table_gfn);
free_xenheap_page(d);
}
+1 -1
View File
@@ -1082,7 +1082,7 @@ int xenmem_add_to_physmap_one(
return -EINVAL;
}
d->arch.grant_table_gpfn[idx] = gfn_x(gfn);
d->arch.grant_table_gfn[idx] = gfn;
t = p2m_ram_rw;
+1 -1
View File
@@ -51,7 +51,7 @@ struct arch_domain
uint64_t vttbr;
struct hvm_domain hvm_domain;
xen_pfn_t *grant_table_gpfn;
gfn_t *grant_table_gfn;
struct vmmio vmmio;
+1 -1
View File
@@ -30,7 +30,7 @@ static inline int replace_grant_supported(void)
#define gnttab_shared_gmfn(d, t, i) \
( ((i >= nr_grant_frames(d->grant_table)) && \
(i < max_grant_frames)) ? 0 : (d->arch.grant_table_gpfn[i]))
(i < max_grant_frames)) ? 0 : gfn_x(d->arch.grant_table_gfn[i]))
#define gnttab_need_iommu_mapping(d) \
(is_domain_direct_mapped(d) && need_iommu(d))
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.