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

Re: [Xen-devel] [PATCH 20/22] arch/x86: use XSM hooks for get_pg_owner access checks



>>> On 12.09.12 at 17:59, Daniel De Graaf <dgdegra@xxxxxxxxxxxxx> wrote:
> @@ -3353,9 +3357,14 @@ long do_mmu_update(
>              mfn = req.ptr >> PAGE_SHIFT;
>              gpfn = req.val;
>  
> -            rc = xsm_mmu_machphys_update(d, pg_owner, mfn);
> -            if ( rc )
> -                break;
> +            xsm_needed |= XSM_MMU_MACHPHYS_UPDATE;
> +            if ( xsm_needed != xsm_checked )
> +            {
> +                rc = xsm_mmu_update(d, pt_owner, pg_owner, xsm_needed);

If you're already updating it this way, it would seem appropriate
to remove the over-checking here: pt_owner is meaningless for
this operation (there are no page tables involved), and hence
you could/should pass d instead.

Jan

> +                if ( rc )
> +                    break;
> +                xsm_checked = xsm_needed;
> +            }
>  
>              if ( unlikely(!get_page_from_pagenr(mfn, pg_owner)) )
>              {



_______________________________________________
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®.