[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 1/3] xen/domain_page: Convert map_domain_page_global() to using mfn_t



>>> On 02.07.15 at 14:04, <Ben.Catterall@xxxxxxxxxx> wrote:
> --- a/xen/include/xen/domain_page.h
> +++ b/xen/include/xen/domain_page.h
> @@ -41,11 +41,15 @@ unsigned long domain_page_map_to_mfn(const void *va);
>   * address spaces (not just within the VCPU that created the mapping). Global
>   * mappings can also be unmapped from any context.
>   */
> -void *map_domain_page_global(unsigned long mfn);
> +void *map_domain_page_global(mfn_t mfn);
>  void unmap_domain_page_global(const void *va);
>  
>  #define __map_domain_page(pg)        map_domain_page(__page_to_mfn(pg))
> -#define __map_domain_page_global(pg) 
> map_domain_page_global(__page_to_mfn(pg))
> +
> +static inline void *__map_domain_page_global(struct page_info *pg)

const

> @@ -117,9 +121,17 @@ domain_mmap_cache_destroy(struct domain_mmap_cache 
> *cache)
>                                                        mfn_to_virt(smfn))
>  #define domain_page_map_to_mfn(va)          virt_to_mfn((unsigned long)(va))
>  
> -#define map_domain_page_global(mfn)         mfn_to_virt(mfn)
> -#define __map_domain_page_global(pg)        page_to_virt(pg)
> -#define unmap_domain_page_global(va)        ((void)(va))
> +static inline void *map_domain_page_global(mfn_t mfn)
> +{
> +    return mfn_to_virt(mfn_x(mfn));
> +}
> +
> +static inline void *__map_domain_page_global(struct page_info *pg)

const

> +{
> +    return page_to_virt(pg);
> +}
> +
> +static inline void unmap_domain_page_global(void *va) {};

And again (the more that the real function already has it that way).

With these adjusted
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.