|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC PATCH 1/2] xen: introduce arch_iommu_grant_(un)map_page
>>> On 08.07.14 at 17:53, <stefano.stabellini@xxxxxxxxxxxxx> wrote:
> --- a/xen/common/grant_table.c
> +++ b/xen/common/grant_table.c
> @@ -738,13 +738,13 @@ __gnttab_map_grant_ref(
> !(old_pin & (GNTPIN_hstw_mask|GNTPIN_devw_mask)) )
> {
> if ( wrc == 0 )
> - err = iommu_map_page(ld, frame, frame,
> - IOMMUF_readable|IOMMUF_writable);
> + err = arch_iommu_grant_map_page(ld, frame,
> +
> IOMMUF_readable|IOMMUF_writable);
This (and further similar code) sitting in (from an x86 perspective)
PV code path makes the naming together with the hiding of the
1:1-ness quite undesirable. I.e. without enough care one may be
tempted to call this seemingly generic function from a non-PV
context.
> --- a/xen/drivers/passthrough/x86/iommu.c
> +++ b/xen/drivers/passthrough/x86/iommu.c
> @@ -135,6 +135,17 @@ void arch_iommu_domain_destroy(struct domain *d)
> }
> }
>
> +int arch_iommu_grant_map_page(struct domain *d, unsigned long frame,
> + unsigned flags)
> +{
> + return iommu_map_page(d, frame, frame, flags);
> +}
> +
> +int arch_iommu_grant_unmap_page(struct domain *d, unsigned long frame)
> +{
> + return iommu_unmap_page(d, frame);
> +}
Is there no way to make these simple wrappers inline functions?
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |