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

Re: [Xen-devel] [V7 PATCH 5/7] pvh: change xsm_add_to_physmap

On 02/20/2014 02:22 AM, Mukesh Rathor wrote:
> On Wed, 12 Feb 2014 16:47:54 +0000
> Julien Grall <julien.grall@xxxxxxxxxx> wrote:
>> Hi Mukesh,
>> On 12/17/2013 02:38 AM, Mukesh Rathor wrote:
>>> In preparation for the next patch, we update xsm_add_to_physmap to
>>> allow for checking of foreign domain. Thus, the current domain must
>>> have the right to update the mappings of target domain with pages
>>> from foreign domain.
>>> Signed-off-by: Mukesh Rathor <mukesh.rathor@xxxxxxxxxx>
>> While I was playing with XSM on ARM, I have noticed that Daniel De
>> Graff has added xsm_map_gfmn_foreign few months ago (see commit
>> 0b201e6).
>> Would it be suitable to use this XSM instead of extending
>> xsm_add_to_physmap?
>> Regards,
> Not the same thing. add to physmap could be adding to a domain's
> physmap pages from a foreign domain.

Let assume you don't modify xsm_add_to_physmap, in this case:
   - xsm_add_to_physmap checks if the current domain is allowed to
modify the p2m of a given domain
   - xsm_map_gfmn_foreign checks if the given domain is allowed to have
foreign mapping from the foreign domain

Both XSM are distinct and should be used together. You don't care that
the current domain can modify a given P2M domain to add foreign mapping.
You only want to know if a given domain is able to have foreign mapping
from a specific foreign domain.

IHMO, your solution to modify xsm_add_to_physmap will complexify the
policy because you need to explicitly say:
   - my domain A is able to modify P2M of domain B which is able to have
foreign map from domain C
   - my domain D is able to modify P2M of domain B which is able to have
foreign map from domain C

The last part is redundant.


Julien Grall

Xen-devel mailing list



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