|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen: grant-table: Simplify get_page_frame
>>> On 14.09.17 at 18:49, <julien.grall@xxxxxxx> wrote:
> get_page_from_gfn will be able to get reference on foreign page and as
> per my understanding will allow to grant page on foreign memory.
>
> This was not allowed with a simple get_page(...) on the ARM
> implementation (no sharing nor paging supprot) but is allowed on the x86
> implementation due to get_page_from_gfn.
>
> On x86, foreign pages are currently only allowed for PVH dom0, so I
> think it is not a big deal for now.
>
> On Arm, foreign pages can be present on any domain. So this patch would
> permit grant on foreing pages.
>
> So I would like to check whether it would be valid to grant a mapping on
> foreign pages?
No, I don't think grants should be permitted for other domains'
pages.
> If not, I could add a check if ( p2m_is_foreign(...) ) return
> GTNST_bad_page.
Please do.
> @@ -267,26 +266,20 @@ static int get_paged_frame(unsigned long gfn, unsigned
> long *frame,
> if ( !(*page) )
> {
> *frame = mfn_x(INVALID_MFN);
> +#if defined(P2M_SHARED_TYPES)
#ifdef please.
> if ( p2m_is_shared(p2mt) )
> return GNTST_eagain;
> +#endif
> +#if defined(P2M_PAGES_TYPES)
Same here.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |