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

Re: [Xen-devel] [PATCH for-4.5 v6 12/17] xen/arm: Implement domain_get_maximum_gpfn




On Tue, Sep 16, 2014 at 12:39 AM, Ian Campbell <ian.campbell@xxxxxxxxxx> wrote:
On Mon, 2014-09-15 at 16:02 +0200, Tamas K Lengyel wrote:
> The function domain_get_maximum_gpfn is returning the maximum gpfn ever
> mapped in the guest. We can use d->arch.p2m.max_mapped_gfn for this purpose.

We had a grief discussion about why/how this was useful for xenaccess
and whether it was needed or just an optimisation etc. Could you recap
that here please?

Ian.

Certainly. The reason we use this in xenaccess is to avoid the user attempting to set page permissions on pages which don't exist for the domain. For example, if the user attempts to set page permissions from gpfn 0 -> (~0-1), it will waste a lot of the hypervisors time. It won't break anything as non-existent pages are skipped automatically, and now with the preemption in place it can't DoS the system, but it's still a reasonable sanity check to perform. It's not a comprehensive enforcement of 'don't try to set permission on non-existent pages' as ARM has holes in the memory layout and doesn't start from 0, but this check at least works for both x86 and ARM.

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