Rusty Russell wrote:> Hi all,
>
> The next obvious step for paravirt_ops seems to me to be higher-level
> mmu operations: from reading the VMI patches it seems to do flushing,
> whereas Xen opts for batching.
>
> In the spirit of ops structures, this would be done by putting
> higher-level operations into the ops structure, and batching done by the
> op itself (perhaps with a default implementation for those too lazy to
> implement it). At this point we run into the brick wall of my
> ignorance: Chris, Zach, anyone, are there any obvious interfaces from a
> Linux POV?
>
I would say that attempting to move MMU operations into an ops structure
is still premature. There are substantial differences in the set of
operations that would be useful to a shadow mode Xen guest, a shadow
mode VMI guest, and a direct mode Xen guest. Writable pagetables is I
believe still an optional interface for UP guests in Xen. So there are
a lot of combinations, and picking the set of ops we need to hook needs
a lot of discussion.
I think for writable page tables, Xen needs only a set_pte function, but
it does need two higher level abstractions - to iterate, change
protection and register pages prior to switching to an address space,
and to move off the current address space onto swapper_pgdir before
destroying an address space. A VMI guest needs only low level page
table operations. A shadow mode Xen guest may benefit from some mixed
set of operations - of which I confess not to know the best approach. I
don't know how important shadow mode is to Xen.
So now we are mixing low-level and high-level operations, and we need a
good plan laid out. Lets hope we can promote some more discussions
along these lines - finding the balance between flexibility,
performance, and intrusiveness in the MMU interface is a big problem.
I'm working on a proposal along these lines for a well defined set of
hooks, but meanwhile I will take a look at these patches and would
encourage other proposals as well.
Zach