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

Re: [Xen-devel] [PATCH v2 2/2] Xen: Document the semantic of the pagetable_reserve PVOPS



On 14/08/12 14:57, David Vrabel wrote:
On 14/08/12 13:24, Attilio Rao wrote:
The informations added on the hook are:
- Native behaviour
- Xen specific behaviour
- Logic behind the Xen specific behaviour
These are implementation details and should be documented with the
implementations (if necessary).

In this specific case, implementation details are very valuable to understand the semantic of operations, this is why I added them there. I think, at least for this case, this is the best trade-off.

- PVOPS semantic
This is the interesting stuff.

This particular pvop seems a little odd really.  It might make more
sense if it took a third parameter for pgt_buf_top.

The thing is that this work (documenting PVOPS) should help in understanding the logic behind some PVOPS and possibly improve/rework them. For this stage, I agreed with Konrad to keep the changes as small as possible. Once the documentation about the semantic is in place we can think about ways to improve things more effectively (for example, in some cases we may want to rewrite the PVOP completely).

"@pagetable_reserve is used to reserve a range of PFNs used for the
kernel direct mapping page tables and cleans-up any PFNs that ended up
not being used for the tables.

It shall reserve the range (start, end] with memblock_reserve(). It
shall prepare PFNs in the range (end, pgt_buf_top] for general (non page
table) use.

It shall only be called in init_memory_mapping() after the direct
mapping tables have been constructed."

Having said that, I couldn't immediately see where pages in (end,
pgt_buf_top] was getting set RO.  Can you point me to where it's done?

As mentioned in the comment, please look at xen_set_pte_init().

Attilio

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