ia64/xen-unstable

changeset 2829:e2bc06051a02

bitkeeper revision 1.1159.1.339 (4187d558wgmS7NtFrI42sB3JuRbwlg)

interface wip
author smh22@tempest.cl.cam.ac.uk
date Tue Nov 02 18:43:36 2004 +0000 (2004-11-02)
parents 62d5a53a46e2
children 565da10c07de 6ab98626161f
files docs/src/interface.tex
line diff
     1.1 --- a/docs/src/interface.tex	Tue Nov 02 17:57:41 2004 +0000
     1.2 +++ b/docs/src/interface.tex	Tue Nov 02 18:43:36 2004 +0000
     1.3 @@ -320,10 +320,10 @@ For example, the following hypercall is 
     1.4  \begin{quote}
     1.5  int {\bf set\_gdt}(unsigned long *{\em frame\_list}, int {\em entries})
     1.6  
     1.7 -{\em frame\_list}: An array of up to 16 page frames within which the
     1.8 -GDT resides.  Any frame registered as a GDT frame may only be mapped
     1.9 -read-only within the guest's address space (e.g., no writable
    1.10 -mappings, no use as a page-table page, and so on).
    1.11 +{\em frame\_list}: An array of up to 16 machine page frames within
    1.12 +which the GDT resides.  Any frame registered as a GDT frame may only
    1.13 +be mapped read-only within the guest's address space (e.g., no
    1.14 +writable mappings, no use as a page-table page, and so on).
    1.15  
    1.16  {\em entries}: The number of descriptor-entry slots in the GDT.  Note
    1.17  that the table must be large enough to contain Xen's reserved entries;
    1.18 @@ -722,36 +722,67 @@ of TLB flush, if any, should follow the 
    1.19  \end{quote} 
    1.20  
    1.21  Finally, sufficiently privileged domains may occasionally wish to manipulate 
    1.22 -the page tables of others: 
    1.23 +the pages of others: 
    1.24  \begin{quote}
    1.25  
    1.26  \hypercall{update\_va\_mapping\_otherdomain(unsigned long page\_nr,
    1.27  unsigned long val, unsigned long flags, uint16\_t domid)}
    1.28  
    1.29 -Identical to {\tt update\_va\_mapping()} save that it operates 
    1.30 -on the page tables of the domain with id {\tt domid}. 
    1.31 +Identical to {\tt update\_va\_mapping()} save that the pages being
    1.32 +mapped must belong to the domain {\tt domid}. 
    1.33  
    1.34  \end{quote}
    1.35  
    1.36  This privileged operation is currently used by backend virtual device
    1.37 -drivers to efficiently implement `page flipping'.
    1.38 +drivers to safely map pages containing I/O data. 
    1.39  
    1.40  
    1.41  
    1.42  \section{Segmentation Support}
    1.43  
    1.44 +Xen allows guest OSes to install a custom GDT if they require it; 
    1.45 +this is context switched transparently whenever a domain is 
    1.46 +[de]scheduled.  The following hypercall is effectively a 
    1.47 +`safe' version of {\tt lgdt}: 
    1.48  
    1.49 +\begin{quote}
    1.50  \hypercall{set\_gdt(unsigned long *frame\_list, int entries)} 
    1.51  
    1.52 -Set the global descriptor table - virtualization for lgdt.
    1.53 +Install a global descriptor table for a domain; {\tt frame\_list} is
    1.54 +an array of up to 16 machine page frames within which the GDT resides,
    1.55 +with {\tt entries} being the actual number of descriptor-entry
    1.56 +slots. All page frames must be mapped read-only within the guest's
    1.57 +address space, and the table must be large enough to contain Xen's
    1.58 +reserved entries (see {\tt xen/include/public/arch-x86\_32.h}).
    1.59 +
    1.60 +\end{quote}
    1.61 +
    1.62 +Many guest OSes will also wish to install LDTs; this is achieved by
    1.63 +using {\tt mmu\_update()} with an extended commmand, passing the
    1.64 +linear address of the LDT base along with the number of entries. No
    1.65 +special safety checks are required; Xen needs to perform this task
    1.66 +simply since {\tt lldt} requires CPL 0.
    1.67  
    1.68  
    1.69 +Xen also allows guest operating systems to update just an 
    1.70 +individual segment descriptor in the GDT or LDT:  
    1.71  
    1.72 -\hypercall{update\_descriptor(unsigned long ma, unsigned long word1, unsigned long word2)} 
    1.73 +\begin{quote}
    1.74 +\hypercall{update\_descriptor(unsigned long ma, unsigned long word1,
    1.75 +unsigned long word2)}
    1.76 +
    1.77 +Update the GDT/LDT entry at machine address {\tt ma}; the new
    1.78 +8-byte descriptor is stored in {\tt word1} and {\tt word2}.
    1.79 +Xen performs a number of checks to ensure the descriptor is 
    1.80 +valid. 
    1.81 +
    1.82 +\end{quote}
    1.83  
    1.84  
    1.85  \section{Context Switching} 
    1.86  
    1.87 +
    1.88 +
    1.89  \hypercall{stack\_switch(unsigned long ss, unsigned long esp)} 
    1.90  
    1.91  Request context switch from hypervisor.