diff --git a/.rootkeys b/.rootkeys index c56e81efa9..93831dd4fe 100644 --- a/.rootkeys +++ b/.rootkeys @@ -5,7 +5,6 @@ 4177dbbfqsi01p2zgZa0geUOgScONw COPYING 3eb788d6Kleck_Cut0ouGneviGzliQ Makefile 3f5ef5a24IaQasQE2tyMxrfxskMmvw README -3f69d8abYB1vMyD_QVDvzxy5Zscf1A TODO 3f9e7d53iC47UnlfORp9iC1vai6kWw docs/Makefile 3f9e7d60PWZJeVh5xdnk0nLUdxlqEA docs/figs/xenlogo.eps 418273f3YZUyGIrNbERVAPFeOd9gww docs/figs/xenserver.obj @@ -732,19 +731,19 @@ 404f1bb86rAXB3aLS1vYdcqpJiEcyg xen/include/asm-x86/x86_64/ptrace.h 40e1966azOJZfNI6Ilthe6Q-T3Hewg xen/include/asm-x86/x86_64/string.h 404f1bc4tWkB9Qr8RkKtZGW5eMQzhw xen/include/asm-x86/x86_64/uaccess.h -400304fcmRQmDdFYEzDh0wcBba9alg xen/include/hypervisor-ifs/COPYING -404f1bc68SXxmv0zQpXBWGrCzSyp8w xen/include/hypervisor-ifs/arch-x86_32.h -404f1bc7IwU-qnH8mJeVu0YsNGMrcw xen/include/hypervisor-ifs/arch-x86_64.h -3ddb79c2PMeWTK86y4C3F4MzHw4A1g xen/include/hypervisor-ifs/dom0_ops.h -403cd194j2pyLqXD8FJ-ukvZzkPenw xen/include/hypervisor-ifs/event_channel.h -4121d149udGfSUGhn3k1ECz0bM31nQ xen/include/hypervisor-ifs/grant_table.h -3ddb79c25UE59iu4JJcbRalx95mvcg xen/include/hypervisor-ifs/hypervisor-if.h -40f5623bqoi4GEoBiiUc6TZk1HjsMg xen/include/hypervisor-ifs/io/blkif.h -40dc4076pVeE1kEEWzcUaNZin65kCA xen/include/hypervisor-ifs/io/domain_controller.h -40f5623cTZ80EwjWUBlh44A9F9i_Lg xen/include/hypervisor-ifs/io/netif.h -4051db79512nOCGweabrFWO2M2h5ng xen/include/hypervisor-ifs/physdev.h -40589968wmhPmV5-ENbBYmMjnedgKw xen/include/hypervisor-ifs/sched_ctl.h -404f3d2eR2Owk-ZcGOx9ULGHg3nrww xen/include/hypervisor-ifs/trace.h +400304fcmRQmDdFYEzDh0wcBba9alg xen/include/public/COPYING +404f1bc68SXxmv0zQpXBWGrCzSyp8w xen/include/public/arch-x86_32.h +404f1bc7IwU-qnH8mJeVu0YsNGMrcw xen/include/public/arch-x86_64.h +3ddb79c2PMeWTK86y4C3F4MzHw4A1g xen/include/public/dom0_ops.h +403cd194j2pyLqXD8FJ-ukvZzkPenw xen/include/public/event_channel.h +4121d149udGfSUGhn3k1ECz0bM31nQ xen/include/public/grant_table.h +40f5623bqoi4GEoBiiUc6TZk1HjsMg xen/include/public/io/blkif.h +40dc4076pVeE1kEEWzcUaNZin65kCA xen/include/public/io/domain_controller.h +40f5623cTZ80EwjWUBlh44A9F9i_Lg xen/include/public/io/netif.h +4051db79512nOCGweabrFWO2M2h5ng xen/include/public/physdev.h +40589968wmhPmV5-ENbBYmMjnedgKw xen/include/public/sched_ctl.h +404f3d2eR2Owk-ZcGOx9ULGHg3nrww xen/include/public/trace.h +3ddb79c25UE59iu4JJcbRalx95mvcg xen/include/public/xen.h 3e397e66m2tO3s-J8Jnr7Ws_tGoPTg xen/include/xen/ac_timer.h 40715b2epYl2jBbxzz9CI2rgIca7Zg xen/include/xen/acpi.h 3ddb79c0c0cX_DZE209-Bb-Rx1v-Aw xen/include/xen/cache.h diff --git a/BitKeeper/etc/ignore b/BitKeeper/etc/ignore index d039d56f50..d8bc1ae2f2 100644 --- a/BitKeeper/etc/ignore +++ b/BitKeeper/etc/ignore @@ -13,43 +13,13 @@ TAGS Twisted-1.3.0 Twisted-1.3.0.tar.gz docs/*.aux +docs/*.dvi docs/*.log docs/*.pdf docs/*.ps -docs/*.dvi docs/*.toc +docs/figs/xenserver.eps docs/html/* -extras/mini-os/h/hypervisor-ifs -install -install/* -linux-*-xen0/* -linux-*-xenU/* -linux-xen-sparse -netbsd-*-xen0 -netbsd-*-xenU -netbsd-*-tools -patches/* -tools/*/build/lib*/*.py -tools/balloon/balloon -tools/check/.* -tools/misc/miniterm/miniterm -tools/misc/xen_cpuperf -tools/web-shutdown.tap -tools/xentrace/xentrace -tools/xfrd/xfrd -xen/arch/x86/boot/mkelf32 -xen/drivers/pci/classlist.h -xen/drivers/pci/devlist.h -xen/drivers/pci/gen-devlist -xen/figlet/figlet -xen/include/asm -xen/include/hypervisor-ifs/arch -xen/include/xen/compile.h -xen/tools/elf-reloc -xen/tools/figlet/figlet -xen/xen -xen/xen-syms -xen/xen.* docs/interface/WARNINGS docs/interface/images.pl docs/interface/images.tex @@ -78,4 +48,36 @@ docs/xend/internals.pl docs/xend/labels.pl docs/xend/xend.css docs/xend/xend.html -docs/figs/xenserver.eps +extras/mini-os/h/hypervisor-ifs +install +install/* +linux-*-xen0/* +linux-*-xenU/* +linux-xen-sparse +netbsd-*-tools +netbsd-*-xen0 +netbsd-*-xenU +patches/* +pristine-* +tools/*/build/lib*/*.py +tools/balloon/balloon +tools/check/.* +tools/libxc/xen +tools/misc/miniterm/miniterm +tools/misc/xen_cpuperf +tools/web-shutdown.tap +tools/xentrace/xentrace +tools/xfrd/xfrd +xen/arch/x86/boot/mkelf32 +xen/drivers/pci/classlist.h +xen/drivers/pci/devlist.h +xen/drivers/pci/gen-devlist +xen/figlet/figlet +xen/include/asm +xen/include/hypervisor-ifs/arch +xen/include/xen/compile.h +xen/tools/elf-reloc +xen/tools/figlet/figlet +xen/xen +xen/xen-syms +xen/xen.* diff --git a/COPYING b/COPYING index 9e4ba6a151..32f39ab5f8 100644 --- a/COPYING +++ b/COPYING @@ -17,12 +17,11 @@ Xen guests, certain files in this repository are not subject to the GPL when distributed separately or included in software packages outside this repository. Instead we specify a much more relaxed BSD-style license. Affected files include the Xen interface headers -(xen/include/hypervisor-ifs/COPYING), and various drivers, support -functions and header files within the Linux sparse source trees. In -all such cases, license terms are stated at the top of the file or in -a COPYING file in the same directory. Note that _any_ file that is -modified and then distributed within a Linux kernel is still subject -to the GNU GPL! +(xen/include/public/COPYING), and various drivers, support functions +and header files within the Linux sparse source trees. In all such +cases, license terms are stated at the top of the file or in a COPYING +file in the same directory. Note that _any_ file that is modified and +then distributed within a Linux kernel is still subject to the GNU GPL. -- Keir Fraser (on behalf of the Xen team) diff --git a/README b/README index 4f771179f1..a45e7f3213 100644 --- a/README +++ b/README @@ -10,7 +10,6 @@ __ __ ____ ___ University of Cambridge Computer Laboratory 29 October 2004 -http://www.cl.cam.ac.uk/netos/xen/ http://www.cl.cam.ac.uk/netos/xen/ About the Xen Virtual Machine Monitor diff --git a/TODO b/TODO deleted file mode 100644 index 193c2e2c6a..0000000000 --- a/TODO +++ /dev/null @@ -1,60 +0,0 @@ -Future plans and enhancements -============================= - -For up-to-date details of features currently under implementation, -visit the Xen project roadmap at: -http://www.cl.cam.ac.uk/Research/SRG/netos/xen/roadmap.html - -IO enhancements ---------------- -There are also a number of memory management enhancements that didn't -make this release: We have plans for a "universal buffer cache" that -enables otherwise unused system memory to be used by domains in a -read-only fashion. - -Disk scheduling ---------------- -The current disk scheduler is rather simplistic (batch round robin), -and could be replaced by e.g. Cello if we have QoS isolation -problems. For most things it seems to work OK, but there's currently -no service differentiation or weighting. - -Improved load-balancing ------------------------ -Currently, although Xen runs on SMP and SMT (hyperthreaded) machines, -the scheduling is far from smart -- domains are currently statically -assigned to a CPU when they are created (in a round robin fashion). -We'd like to see a user-space load-balancing daemon that can shift -domains between CPUs as their activity changes. - -Multiprocessor guest VMs ------------------------- -Xen currently only supports uniprocessor guest OSes. We have designed -the Xen interface with MP guests in mind, and plan to build an MP -Linux guest in due course. Basically, an MP guest would consist of -multiple scheduling domains (one per CPU) sharing a single memory -protection domain. The only extra complexity for the Xen VM system is -ensuring that when a page transitions from holding a page table or -page directory to a write-able page, we must ensure that no other CPU -still has the page in its TLB to ensure memory system integrity. One -other issue for supporting MP guests is that we'll need some sort of -CPU gang scheduler, which will require some research. - -Cluster management ------------------- -There have been discussions regarding a unified cluster controller -for Xen deployments. This would leverage the existing features of -Xen to present a uniform control interface for managing a cluster -as a pool of resources, rather than a set of completely distinct -machines. - -64-bit x86 ----------- -Xen can currently use up to 4GB of memory. It's possible for 32-bit -x86 machines to address up to 64GB, but it requires using a different -page table format that would be rather tedious to support. Our -preferred approach is to virtualize 64-bit x86 (x86/64), as supported -by modern AMD and Intel processors. The large address space provided -by a 64-bit execution model greatly simplifies support for large-memory -configurations. Our implementation for x86/64 is in progress and should -feature in our next major release. diff --git a/docs/misc/blkif-drivers-explained.txt b/docs/misc/blkif-drivers-explained.txt index 8f6f7a498a..adf1d3738a 100644 --- a/docs/misc/blkif-drivers-explained.txt +++ b/docs/misc/blkif-drivers-explained.txt @@ -244,8 +244,8 @@ records. Pointers may only advance, and may not pass one another. By adopting the convention that every request will receive a response, not all four pointers need be shared and flow control on the ring becomes very easy to manage. Each domain manages its own -consumer pointer, and the two producer pointers are visible to both (Xen/include/hypervisor-ifs/io/blkif.h): - +consumer pointer, and the two producer pointers are visible to both +(xen/include/public/io/blkif.h): /* NB. Ring size must be small enough for sizeof(blkif_ring_t) <=PAGE_SIZE.*/ diff --git a/docs/src/interface.tex b/docs/src/interface.tex index d6ac3542b2..752ab1d157 100644 --- a/docs/src/interface.tex +++ b/docs/src/interface.tex @@ -111,12 +111,16 @@ direct access to CR3 and is not permitted to update privileged bits in EFLAGS. Guest OSes use \emph{hypercalls} to invoke operations in Xen; these are analagous to system calls but occur from ring 1 to ring 0. +A list of all hypercalls is given in Appendix~\ref{a:hypercalls}. + + \section{Exceptions} -The IDT is virtualised by submitting to Xen a table of trap handlers. -Most trap handlers are identical to native x86 handlers, although the -page-fault handler is somewhat different. +A virtual IDT is provided --- a domain can submit a table of trap +handlers to Xen via the {\tt set\_trap\_table()} hypercall. Most trap +handlers are identical to native x86 handlers, although the page-fault +handler is somewhat different. \section{Interrupts and events} @@ -186,7 +190,8 @@ currently executing domain every 10ms. The Xen scheduler also sends a timer event whenever a domain is scheduled; this allows the guest OS to adjust for the time that has passed while it has been inactive. In addition, Xen allows each domain to request that they receive a timer -event sent at a specified system time. Guest OSes may use this timer to +event sent at a specified system time by using the {\tt +set\_timer\_op()} hypercall. Guest OSes may use this timer to implement timeout values when they block. @@ -199,7 +204,8 @@ hardware. \section{Memory Allocation} -Xen resides within a small fixed portion of physical memory and + +Xen resides within a small fixed portion of physical memory; it also reserves the top 64MB of every virtual address space. The remaining physical memory is available for allocation to domains at a page granularity. Xen tracks the ownership and use of each page, which @@ -210,6 +216,52 @@ A guest OS may run a `balloon driver' to dynamically adjust its current memory allocation up to its limit. +%% XXX SMH: I use machine and physical in the next section (which +%% is kinda required for consistency with code); wonder if this +%% section should use same terms? +%% +%% Probably. +%% +%% Merging this and below section at some point prob makes sense. + +\section{Pseudo-Physical Memory} + +Since physical memory is allocated and freed on a page granularity, +there is no gaurantee that a domain will receive a contiguous stretch +of physical memory. However most operating systems do not have good +support for operating in a fragmented physical address space. To aid +porting such operating systems to run on top of Xen, we make a +distinction between \emph{machine memory} and \emph{pseduo-physical +memory}. + +Put simply, machine memory refers to the entire amount of memory +installed in the machine, including that reserved by Xen, in use by +various domains, or currently unallocated. We consider machine memory +to comprise a set of 4K \emph{machine page frames} numbered +consecutively starting from 0. Machine frame numbers mean the same +within Xen or any domain. + +Pseudo-physical memory, on the other hand, is a per-domain +abstraction. It allows a guest operating system to consider its memory +allocation to consist of a contiguous range of physical page frames +starting at physical frame 0, despite the fact that the underlying +machine page frames may be sparsely allocated and in any order. + +To achieve this, Xen maintains a globally readable {\it +machine-to-physical} table which records the mapping from machine page +frames to pseudo-physical ones. In addition, each domain is supplied +with a {\it physical-to-machine} table which performs the inverse +mapping. Clearly the machine-to-physical table has size proportional +to the amount of RAM installed in the machine, while each +physical-to-machine table has size proportional to the memory +allocation of the given domain. + +Architecture dependent code in guest operating systems can then use +the two tables to provide the abstraction of pseudo-physical +memory. In general, only certain specialized parts of the operating +system (such as page table management) needs to understand the +difference between machine and pseudo-physical addresses. + \section{Page Table Updates} In the default mode of operation, Xen enforces read-only access to @@ -280,43 +332,21 @@ Note also that, after registering the GDT, slots {\em FIRST\_} through may be overwritten by Xen. \end{quote} +The LDT is updated via the generic MMU update mechanism (i.e., via +the {\tt mmu\_update()} hypercall. -XXX SMH: HERE - - -\section{Pseudo-Physical Memory} - -The usual problem of external fragmentation means that a domain is -unlikely to receive a contiguous stretch of physical memory. However, -most guest operating systems do not have built-in support for -operating in a fragmented physical address space e.g. Linux has to -have a one-to-one mapping for its physical memory. There a notion of -{\it pseudo physical memory} is introdouced. Xen maintains a {\it -real physical} to {\it pseudo physical} mapping which can be consulted -by every domain. Additionally, at its start of day, a domain is -supplied a {\it pseudo physical} to {\it real physical} mapping which -it needs to keep updated itself. From that moment onwards {\it pseudo -physical} addresses are used instead of discontiguous {\it real -physical} addresses. Thus, the rest of the guest OS code has an -impression of operating in a contiguous address space. Guest OS page -tables contain real physical addresses. Mapping {\it pseudo physical} -to {\it real physical} addresses is needed on page table updates and -also on remapping memory regions with the guest OS. - -\section{start of day xxx} - - -Start-of-day issues such as building initial page tables -for a domain, loading its kernel image and so on are done by the {\it -domain builder} running in user-space in {\it domain0}. Paging to -disk and swapping is handled by the guest operating systems -themselves, if they need it. - -The amount of memory required by the domain is passed to the hypervisor -as one of the parameters for new domain initialization by the domain builder. - +\section{Start of Day} +The start-of-day environment for guest operating systems is rather +different to that provided by the underlying hardware. In particular, +the processor is already executing in protected mode with paging +enabled. +{\it Domain-0} is created and booted by Xen itself. For all subsequent +donains, the analogue of the boot-loader is the {\it domain builder}, +user-space software running in {\it domain-0}. The domain builder +is responsible for building the initial page tables for a domain +and loading its kernel image at the appropriate virtual address. @@ -458,11 +488,265 @@ of the CPU for each domain. Round-robin is provided as an example of Xen's internal scheduler API. More information on the characteristics and use of these schedulers is -available in { \tt Sched-HOWTO.txt }. +available in {\tt Sched-HOWTO.txt}. + + + + +\appendix + +%\newcommand{\hypercall}[1]{\vspace{5mm}{\large\sf #1}} + + + + + +\newcommand{\hypercall}[1]{\vspace{2mm}{\sf #1}} + + + +\hypercall{physdev\_op(void *physdev\_op)} + + +\hypercall{vm\_assist(unsigned int cmd, unsigned int type)} + + + + +\chapter{Xen Hypercalls} +\label{a:hypercalls} + +Hypercalls represent the procedural interface to Xen; this appendix +categorizes and describes the current set of hypercalls. + +\section{Invoking Hypercalls} + +\hypercall{multicall(void *call\_list, int nr\_calls)} + +Execute a series of hypervisor calls + + + + +\section{Virtual CPU Setup} + +\hypercall{set\_callbacks(unsigned long event\_selector, unsigned long + event\_address, unsigned long failsafe\_selector, unsigned long + failsafe\_address) } + +Register OS event processing routine. In +Linux both the event\_selector and failsafe\_selector are the +kernel's CS. The value event\_address specifies the address for an +interrupt handler dispatch routine and failsafe\_address specifies a +handler for application faults. + +\hypercall{set\_trap\_table(trap\_info\_t *table)} + +Install trap handler table. + + +\hypercall{set\_fast\_trap(int idx)} + + install traps to allow guest OS to bypass hypervisor + + + + +\section{Scheduling} + + +\hypercall{stack\_switch(unsigned long ss, unsigned long esp)} + +Request context switch from hypervisor. + + +\hypercall{fpu\_taskswitch(void)} + +Notify hypervisor that fpu registers needed to be save on context switch. + + +\hypercall{sched\_op(unsigned long op)} + +Request scheduling operation from hypervisor. The options are: {\it +yield}, {\it block}, and {\it shutdown}. {\it yield} keeps the +calling domain run-able but may cause a reschedule if other domains +are run-able. {\it block} removes the calling domain from the run +queue and the domains sleeps until an event is delivered to it. {\it +shutdown} is used to end the domain's execution and allows to specify +whether the domain should reboot, halt or suspend.. + +\hypercall{set\_timer\_op(uint64\_t timeout)} + +Request a timer event to be sent at the specified system time. + + +\section{Page Table Management} + +\hypercall{mmu\_update(mmu\_update\_t *req, int count, int *success\_count)} + +Update the page table for the domain. Updates can be batched. +success\_count will be updated to report the number of successfull +updates. The update types are: + +{\it MMU\_NORMAL\_PT\_UPDATE}: + +{\it MMU\_MACHPHYS\_UPDATE}: + +{\it MMU\_EXTENDED\_COMMAND}: + + +\hypercall{update\_va\_mapping(unsigned long page\_nr, unsigned long val, unsigned long flags)} + + +\hypercall{update\_va\_mapping\_otherdomain(unsigned long page\_nr, +unsigned long val, unsigned long flags, uint16\_t domid)} + + +\section{Segmentation Support} + + +\hypercall{set\_gdt(unsigned long *frame\_list, int entries)} + +Set the global descriptor table - virtualization for lgdt. + + + +\hypercall{update\_descriptor(unsigned long ma, unsigned long word1, unsigned long word2)} + + + + +\section{Inter-Domain Communication} + + +\hypercall{event\_channel\_op(void *op)} + +Inter-domain event-channel management. + + +\hypercall{grant\_table\_op(unsigned int cmd, void *uop, unsigned int count)} + + + +\section{Physical Memory Management} + +\hypercall{dom\_mem\_op(unsigned int op, unsigned long *extent\_list, +unsigned long nr\_extents, unsigned int extent\_order)} + +Increase or decrease memory reservations for guest OS + + + + + + +\section{Administrative Operations} + + +\hypercall{dom0\_op(dom0\_op\_t *op)} + +Administrative domain operations for domain management. The options are: + +{\it DOM0\_CREATEDOMAIN}: create new domain, specifying the name and memory usage +in kilobytes. + +{\it DOM0\_CREATEDOMAIN}: create domain + +{\it DOM0\_PAUSEDOMAIN}: mark domain as unschedulable + +{\it DOM0\_UNPAUSEDOMAIN}: mark domain as schedulable + +{\it DOM0\_DESTROYDOMAIN}: deallocate resources associated with the domain + +{\it DOM0\_GETMEMLIST}: get list of pages used by the domain + +{\it DOM0\_SCHEDCTL}: + +{\it DOM0\_ADJUSTDOM}: adjust scheduling priorities for domain + +{\it DOM0\_BUILDDOMAIN}: do final guest OS setup for domain + +{\it DOM0\_GETDOMAINFO}: get statistics about the domain + +{\it DOM0\_GETPAGEFRAMEINFO}: + +{\it DOM0\_IOPL}: set IO privilege level + +{\it DOM0\_MSR}: + +{\it DOM0\_DEBUG}: interactively call pervasive debugger + +{\it DOM0\_SETTIME}: set system time + +{\it DOM0\_READCONSOLE}: read console content from hypervisor buffer ring + +{\it DOM0\_PINCPUDOMAIN}: pin domain to a particular CPU + +{\it DOM0\_GETTBUFS}: get information about the size and location of + the trace buffers (only on trace-buffer enabled builds) + +{\it DOM0\_PHYSINFO}: get information about the host machine + +{\it DOM0\_PCIDEV\_ACCESS}: modify PCI device access permissions + +{\it DOM0\_SCHED\_ID}: get the ID of the current Xen scheduler + +{\it DOM0\_SHADOW\_CONTROL}: + +{\it DOM0\_SETDOMAINNAME}: set the name of a domain + +{\it DOM0\_SETDOMAININITIALMEM}: set initial memory allocation of a domain + +{\it DOM0\_SETDOMAINMAXMEM}: set maximum memory allocation of a domain + +{\it DOM0\_GETPAGEFRAMEINFO2}: + +{\it DOM0\_SETDOMAINVMASSIST}: set domain VM assist options + + + + +\section{Miscellaneous Hypercalls} + + +\hypercall{console\_io(int cmd, int count, char *str)} + +Interact with the console, operations are: + +{\it CONSOLEIO\_write}: Output count characters from buffer str. + +{\it CONSOLEIO\_read}: Input at most count characters into buffer str. + + + +\hypercall{set\_debugreg(int reg, unsigned long value)} + +set debug register reg to value + + +\hypercall{get\_debugreg(int reg)} + + get the debug register reg + + +\hypercall{xen\_version(int cmd)} + +Request Xen version number. + + + + + + +%% +%% XXX SMH: not really sure how useful below is -- if it's still +%% actually true, might be useful for someone wanting to write a +%% new scheduler... not clear how many of them there are... +%% \begin{comment} -\section{Scheduling API} +\chapter{Scheduling API} The scheduling API is used by both the schedulers described above and should also be used by any new schedulers. It provides a generic interface and also @@ -514,7 +798,7 @@ this scheduler. \subsubsection{sched\_id} This is an integer that uniquely identifies this scheduler. There should be a -macro corrsponding to this scheduler ID in {\tt }. +macro corrsponding to this scheduler ID in {\tt }. \subsubsection{init\_scheduler} @@ -731,6 +1015,20 @@ This method should dump any private settings for the specified task. This function is called with interrupts disabled and the {\tt schedule\_lock} for the task's CPU held. +\end{comment} + + + + +%% +%% XXX SMH: we probably should have something in here on debugging +%% etc; this is a kinda developers manual and many devs seem to +%% like debugging support :^) +%% Possibly sanitize below, else wait until new xendbg stuff is in +%% (and/or kip's stuff?) and write about that instead? +%% + +\begin{comment} \chapter{Debugging} @@ -795,196 +1093,9 @@ trace points, there is an example format file in {\tt tools/xentrace/formats }. For more information, see the manual pages for {\tt xentrace}, {\tt xentrace\_format} and {\tt xentrace\_cpusplit}. +\end{comment} -\appendix -\newcommand{\hypercall}[1]{\vspace{5mm}{\large\sf #1}} -\chapter{Xen Hypercalls} - -\hypercall{ set\_trap\_table(trap\_info\_t *table)} - -Install trap handler table. - - -\hypercall{ mmu\_update(mmu\_update\_t *req, int count, int *success\_count)} - -Update the page table for the domain. Updates can be batched. -success\_count will be updated to report the number of successfull -updates. The update types are: - -{\it MMU\_NORMAL\_PT\_UPDATE}: - -{\it MMU\_MACHPHYS\_UPDATE}: - -{\it MMU\_EXTENDED\_COMMAND}: - - -\hypercall{ set\_gdt(unsigned long *frame\_list, int entries)} - -Set the global descriptor table - virtualization for lgdt. - - -\hypercall{ stack\_switch(unsigned long ss, unsigned long esp)} - -Request context switch from hypervisor. - - -\hypercall{ set\_callbacks(unsigned long event\_selector, unsigned long event\_address, - unsigned long failsafe\_selector, unsigned - long failsafe\_address) } - -Register OS event processing routine. In -Linux both the event\_selector and failsafe\_selector are the -kernel's CS. The value event\_address specifies the address for an -interrupt handler dispatch routine and failsafe\_address specifies a -handler for application faults. - - -\hypercall{ fpu\_taskswitch(void)} - -Notify hypervisor that fpu registers needed to be save on context switch. - - -\hypercall{ sched\_op(unsigned long op)} - -Request scheduling operation from hypervisor. The options are: {\it -yield}, {\it block}, and {\it shutdown}. {\it yield} keeps the -calling domain run-able but may cause a reschedule if other domains -are run-able. {\it block} removes the calling domain from the run -queue and the domains sleeps until an event is delivered to it. {\it -shutdown} is used to end the domain's execution and allows to specify -whether the domain should reboot, halt or suspend.. - - -\hypercall{ dom0\_op(dom0\_op\_t *op)} - -Administrative domain operations for domain management. The options are: - -{\it DOM0\_CREATEDOMAIN}: create new domain, specifying the name and memory usage -in kilobytes. - -{\it DOM0\_CREATEDOMAIN}: create domain - -{\it DOM0\_PAUSEDOMAIN}: mark domain as unschedulable - -{\it DOM0\_UNPAUSEDOMAIN}: mark domain as schedulable - -{\it DOM0\_DESTROYDOMAIN}: deallocate resources associated with the domain - -{\it DOM0\_GETMEMLIST}: get list of pages used by the domain - -{\it DOM0\_SCHEDCTL}: - -{\it DOM0\_ADJUSTDOM}: adjust scheduling priorities for domain - -{\it DOM0\_BUILDDOMAIN}: do final guest OS setup for domain - -{\it DOM0\_GETDOMAINFO}: get statistics about the domain - -{\it DOM0\_GETPAGEFRAMEINFO}: - -{\it DOM0\_IOPL}: set IO privilege level - -{\it DOM0\_MSR}: - -{\it DOM0\_DEBUG}: interactively call pervasive debugger - -{\it DOM0\_SETTIME}: set system time - -{\it DOM0\_READCONSOLE}: read console content from hypervisor buffer ring - -{\it DOM0\_PINCPUDOMAIN}: pin domain to a particular CPU - -{\it DOM0\_GETTBUFS}: get information about the size and location of - the trace buffers (only on trace-buffer enabled builds) - -{\it DOM0\_PHYSINFO}: get information about the host machine - -{\it DOM0\_PCIDEV\_ACCESS}: modify PCI device access permissions - -{\it DOM0\_SCHED\_ID}: get the ID of the current Xen scheduler - -{\it DOM0\_SHADOW\_CONTROL}: - -{\it DOM0\_SETDOMAINNAME}: set the name of a domain - -{\it DOM0\_SETDOMAININITIALMEM}: set initial memory allocation of a domain - -{\it DOM0\_SETDOMAINMAXMEM}: set maximum memory allocation of a domain - -{\it DOM0\_GETPAGEFRAMEINFO2}: - -{\it DOM0\_SETDOMAINVMASSIST}: set domain VM assist options - - -\hypercall{ set\_debugreg(int reg, unsigned long value)} - -set debug register reg to value - - -\hypercall{ get\_debugreg(int reg)} - - get the debug register reg - - -\hypercall{ update\_descriptor(unsigned long ma, unsigned long word1, unsigned long word2)} - - -\hypercall{ set\_fast\_trap(int idx)} - - install traps to allow guest OS to bypass hypervisor - - -\hypercall{ dom\_mem\_op(unsigned int op, unsigned long *extent\_list, unsigned long nr\_extents, unsigned int extent\_order)} - -Increase or decrease memory reservations for guest OS - - -\hypercall{ multicall(void *call\_list, int nr\_calls)} - -Execute a series of hypervisor calls - - -\hypercall{ update\_va\_mapping(unsigned long page\_nr, unsigned long val, unsigned long flags)} - - -\hypercall{ set\_timer\_op(uint64\_t timeout)} - -Request a timer event to be sent at the specified system time. - - -\hypercall{ event\_channel\_op(void *op)} - -Inter-domain event-channel management. - - -\hypercall{ xen\_version(int cmd)} - -Request Xen version number. - - -\hypercall{ console\_io(int cmd, int count, char *str)} - -Interact with the console, operations are: - -{\it CONSOLEIO\_write}: Output count characters from buffer str. - -{\it CONSOLEIO\_read}: Input at most count characters into buffer str. - - -\hypercall{ physdev\_op(void *physdev\_op)} - - -\hypercall{ grant\_table\_op(unsigned int cmd, void *uop, unsigned int count)} - - -\hypercall{ vm\_assist(unsigned int cmd, unsigned int type)} - - -\hypercall{ update\_va\_mapping\_otherdomain(unsigned long page\_nr, unsigned long val, unsigned long flags, uint16\_t domid)} - - -\end{comment} \end{document} diff --git a/docs/src/user.tex b/docs/src/user.tex index e714179a4e..ff7978bba0 100644 --- a/docs/src/user.tex +++ b/docs/src/user.tex @@ -1,7 +1,6 @@ \documentclass[11pt,twoside,final,openright]{xenstyle} -\usepackage{a4,graphicx,setspace,times} -\setstretch{1.15} -%\input{style.tex} +\usepackage{a4,graphicx,parskip,setspace,times} +\setstretch{1.1} \begin{document} @@ -50,7 +49,7 @@ Contributions of material, suggestions and corrections are welcome. \renewcommand{\bottomfraction}{.8} \renewcommand{\textfraction}{.2} \renewcommand{\floatpagefraction}{.8} -\setstretch{1.15} +\setstretch{1.1} \newcommand{\path}[1]{{\tt #1}} @@ -80,7 +79,7 @@ The drawback of this approach is that it requires operating systems to be {\em ported} to run on Xen. This process is similar to a port of an operating system to a new hardware platform, although the process is simplified because the paravirtual machine architecture is very -similar to the underlying native hardware. Although operating system +similar to the underlying native hardware. Even though operating system kernels must explicitly support Xen, a key feature is that user space applications and libraries {\em do not} require modification. @@ -90,11 +89,6 @@ We expect that Xen support will ultimately be integrated into the official releases of Linux, NetBSD, FreeBSD and Dragonfly BSD. Other OS ports, including Plan 9, are in progress. -%Even running multiple copies of Linux can be very useful, providing a -%means of containing faults to one OS image, providing performance -%isolation between the various OS instances and trying out multiple -%distros. - Possible usage scenarios for Xen include: \begin{description} \item [Kernel development.] Test and debug kernel modifications in a @@ -102,18 +96,18 @@ Possible usage scenarios for Xen include: machine. \item [Multiple OS configurations.] Run multiple operating systems simultaneously, for instance for compatibility or QA purposes. -\item [Server consolidation.] Move multiple servers onto one box, - provided performance and fault isolation at virtual machine - boundaries. +\item [Server consolidation.] Move multiple servers onto one box + with performance and fault isolation provided at virtual machine + boundaries. \item [Cluster computing.] Improve manageability and efficiency by running services in virtual machines, isolated from - machine-specifics and load balance using live migration. + machine-specifics; load balance using live migration. \item [High availability computing.] Run device drivers in sandboxed domains for increased robustness. \item [Hardware support for custom OSes.] Export drivers from a - mainstream OS (e.g. Linux) with good hardware support + mainstream OS (e.g. Linux) with wide-ranging hardware support to your custom OS, avoiding the need for you to port existing - drivers to achieve good hardware support. + drivers. \end{description} \section{Structure of a Xen-Based System} @@ -132,15 +126,15 @@ other domains and manages their virtual devices. It also performs suspend, resume and migration of virtual machines. Where one is required, the X server is also run in domain 0. -Within Domain 0, a process called `Xend' runs to manage the system. +Within Domain 0, a process called `xend' runs to manage the system. Xend is responsible for managing virtual machines and providing access to their consoles. Commands are issued to Xend over an HTTP interface, either from a command-line tool or from a web browser. \section{Hardware Support} -Xen currently runs only on the x86 architecture (however, ports to other -architectures, including x86/64 and IA64, are in progress). +Xen currently runs only on the x86 architecture, although ports to other +architectures, including x86/64 and IA64, are in progress. Xen requires a `P6' or newer processor (e.g. Pentium Pro, Celeron, Pentium II, Pentium III, Pentium IV, Xeon, AMD Athlon, AMD Duron). Multiprocessor machines are supported, and we also have basic support @@ -152,7 +146,7 @@ mode. Xen can currently use up to 4GB of memory. It is possible for x86 machines to address up to 64GB of physical memory but there are no plans to support these systems. The x86\_64 port is the planned route -to supporting more than 4GB of memory. +to supporting larger memory sizes. Xen offloads most of the hardware support issues to the guest OS running in Domain 0. Xen itself only contains code to detect and @@ -192,16 +186,15 @@ first public release (1.0) was made in October 2003. Since then, Xen has been extensively developed and is now used in production scenarios on multiple sites. -Xen 2.0 feature greatly enhanced hardware support, configuration +Xen 2.0 features greatly enhanced hardware support, configuration flexibility, usability and a larger complement of supported operating -systems. We think that Xen has the potential to become {\em the} -definitive open source virtualisation solution and will work to -conclusively achieve that position. +systems. This latest release takes Xen a step closer to becoming the +definitive open source solution for virtualisation. \chapter{Installation} The Xen distribution includes three main components: Xen itself, -utilities to convert a standard Linux tree to run on Xen and the +utilities to convert a standard Linux tree to run on Xen, and the userspace tools required to operate a Xen-based system. This manual describes how to install the Xen 2.0 distribution from @@ -216,7 +209,7 @@ operating system distribution. \item A working installation of the GRUB bootloader. \item An installation of Twisted v1.3 or above (see {\tt http://www.twistedmatrix.com}). There may be a package available for -your distribution; alternatively it can be installed by running {\tt \# +your distribution; alternatively it can be installed by running {\tt make install-twisted} in the root of the Xen source tree. \item Python logging package (see {\tt http://www.red-dove.com/}) \item The Linux bridge control tools (see {\tt @@ -235,9 +228,11 @@ available for your distribution. \section{Install Bitkeeper (Optional)} To fetch a local copy, first download the BitKeeper tools. -Download instructions must be obtained by filling out the provided -form at: \\ {\tt -http://www.bitmover.com/cgi-bin/download.cgi } +Download instructions can be obtained by filling out the provided +form at: +\begin{quote} +{\tt http://www.bitmover.com/cgi-bin/download.cgi} +\end{quote} The BitKeeper install program is designed to be run with X. If X is not available, you can specify the install directory on the command @@ -247,8 +242,11 @@ line. \subsection{Using Bitkeeper} -The public master BK repository for the 2.0 release lives at: \\ -{\tt bk://xen.bkbits.net/xen-2.0.bk}. You can use Bitkeeper to +The public master BK repository for the 2.0 release lives at: +\begin{quote} +{\tt bk://xen.bkbits.net/xen-2.0.bk} +\end{quote} +You can use Bitkeeper to download it and keep it updated with the latest features and fixes. Change to the directory in which you want to put the source code, then @@ -257,6 +255,7 @@ run: # bk clone bk://xen.bkbits.net/xen-2.0.bk \end{verbatim} + Under your current directory, a new directory named `xen-2.0.bk' has been created, which contains all the source code for the Xen hypervisor and the Xen tools. The directory also contains `sparse' OS @@ -275,7 +274,8 @@ changes to the repository by running: The Xen source tree is also available in gzipped tarball form from the Xen downloads page:\\ {\tt http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads.html}. -Prebuilt tarballs are also available from this page but are very large. +Prebuilt tarballs are also available from this page but are relatively + large. \section{The distribution} @@ -310,8 +310,8 @@ following: Inspect the Makefile if you want to see what goes on during a build. Building Xen and the tools is straightforward, but XenLinux is more -complicated. The makefile needs a `pristine' Linux kernel tree which -it will then add the Xen architecture files to. You can tell the +complicated. The makefile needs a `pristine' Linux kernel tree to which +it will then add the Xen architecture files. You can tell the makefile the location of the appropriate Linux compressed tar file by setting the LINUX\_SRC environment variable, e.g. \\ \verb!# LINUX_SRC=/tmp/linux-2.6.8.1.tar.bz2 make world! \\ or by @@ -475,30 +475,36 @@ The first step in creating a new domain is to prepare a root filesystem for it to boot off. Typically, this might be stored in a normal partition, an LVM or other volume manager partition, a disk file or on an NFS server. - A simple way to do this is simply to boot from your standard OS install CD and install the distribution into another partition on your hard drive. -{\em N.b } you can boot with Xen and XenLinux without installing any -special userspace tools but will need to have the prerequisites -described in Section~\ref{sec:prerequisites} and the Xen control tools -installed before you proceed. +You can boot Xen and a single XenLinux instance without installing any +special user-space tools. To proceed further than this you will need +to install the prerequisites described in Section~\ref{sec:prerequisites} +and the Xen control tools. The control tools are installed by entering +the tools subdirectory of the repository and typing \\ +\verb!# LINUX_SRC=/path/to/linux2.4/source make linux24! \\ -\section{From the web interface} +To start the control daemon, type \\ \verb!# xend start! \\ If you +wish to start the daemon automatically, see the instructions in +Chapter~\ref{cha:xend}. Once the daemon is running, you can use the +{\tt xm} tool to monitor and maintain the domains running on your +system. This chapter provides only a brief tutorial: we provide full +details of the {\tt xm} tool in Chapter~\ref{cha:xm}. -Boot the Xen machine and start Xensv (see Chapter~\ref{cha:xensv} for -more details) using the command: \\ -\verb_# xensv start_ \\ -This will also start Xend (see Chapter~\ref{cha:xend} for more information). - -The domain management interface will then be available at {\tt -http://your\_machine:8080/}. This provides a user friendly wizard for -starting domains and functions for managing running domains. - -\section{From the command line} - -Full details of the {\tt xm} tool are found in Chapter~\ref{cha:xm}. +%\section{From the web interface} +% +%Boot the Xen machine and start Xensv (see Chapter~\ref{cha:xensv} for +%more details) using the command: \\ +%\verb_# xensv start_ \\ +%This will also start Xend (see Chapter~\ref{cha:xend} for more information). +% +%The domain management interface will then be available at {\tt +%http://your\_machine:8080/}. This provides a user friendly wizard for +%starting domains and functions for managing running domains. +% +%\section{From the command line} This example explains how to use the \path{xmdefconfig} file. If you require a more complex setup, you will want to write a custom diff --git a/extras/mini-os/Makefile b/extras/mini-os/Makefile index d2d478ac40..606454b6bb 100644 --- a/extras/mini-os/Makefile +++ b/extras/mini-os/Makefile @@ -14,16 +14,16 @@ TARGET := mini-os LOBJS := lib/malloc.o lib/math.o lib/printf.o lib/string.o OBJS := entry.o kernel.o traps.o hypervisor.o mm.o events.o time.o ${LOBJS} -HINTF := h/hypervisor-ifs/hypervisor-if.h +HINTF := h/xen-public/xen.h HDRS := h/os.h h/types.h h/hypervisor.h h/mm.h h/events.h h/time.h h/lib.h HDRS += $(HINTF) default: $(TARGET) -hypervisor-ifs: - ln -sf ../../../xen/include/hypervisor-ifs h/hypervisor-ifs +xen-public: + [ -e h/xen-public] || ln -sf ../../../xen/include/public h/xen-public -$(TARGET): hypervisor-ifs head.o $(OBJS) +$(TARGET): xen-public head.o $(OBJS) $(LD) -N -T minios.lds head.o $(OBJS) -o $@.elf objcopy -R .note -R .comment $@.elf $@ gzip -f -9 -c $@ >$@.gz diff --git a/extras/mini-os/h/events.h b/extras/mini-os/h/events.h index 5166876b76..c8f696ae90 100644 --- a/extras/mini-os/h/events.h +++ b/extras/mini-os/h/events.h @@ -20,7 +20,7 @@ #ifndef _EVENTS_H_ #define _EVENTS_H_ -/* _EVENT_* are defined in hypervisor-if.h */ +/* _EVENT_* are defined in xen-public/xen.h */ #define EV_BLKDEV _EVENT_BLKDEV #define EV_TIMER _EVENT_TIMER #define EV_DIE _EVENT_DIE diff --git a/extras/mini-os/h/hypervisor.h b/extras/mini-os/h/hypervisor.h index c29bd1723e..3a127e1290 100644 --- a/extras/mini-os/h/hypervisor.h +++ b/extras/mini-os/h/hypervisor.h @@ -11,9 +11,8 @@ #include -/* include the hypervisor interface */ -#include -#include "../../../tools/xu/lib/domain_controller.h" +#include +#include /* * a placeholder for the start of day information passed up from the hypervisor diff --git a/extras/mini-os/h/os.h b/extras/mini-os/h/os.h index c717b66961..cf15d92126 100644 --- a/extras/mini-os/h/os.h +++ b/extras/mini-os/h/os.h @@ -29,7 +29,7 @@ /* - * these are also defined in hypervisor-if.h but can't be pulled in as + * these are also defined in xen-public/xen.h but can't be pulled in as * they are used in start of day assembly. Need to clean up the .h files * a bit more... */ @@ -48,7 +48,7 @@ #ifndef __ASSEMBLY__ #include -#include +#include /* this struct defines the way the registers are stored on the diff --git a/linux-2.4.27-xen-sparse/arch/xen/Makefile b/linux-2.4.27-xen-sparse/arch/xen/Makefile index f8f1e96214..1db1b7f1b6 100644 --- a/linux-2.4.27-xen-sparse/arch/xen/Makefile +++ b/linux-2.4.27-xen-sparse/arch/xen/Makefile @@ -127,7 +127,7 @@ archclean: @$(MAKEBOOT) clean archmrproper: - rm -f include/asm-xen/hypervisor-ifs/arch + rm -f include/asm-xen/xen-public/arch archdep: @$(MAKEBOOT) dep diff --git a/linux-2.4.27-xen-sparse/arch/xen/drivers/blkif/frontend/common.h b/linux-2.4.27-xen-sparse/arch/xen/drivers/blkif/frontend/common.h index 03937e0e4c..d16895d2c2 100644 --- a/linux-2.4.27-xen-sparse/arch/xen/drivers/blkif/frontend/common.h +++ b/linux-2.4.27-xen-sparse/arch/xen/drivers/blkif/frontend/common.h @@ -18,11 +18,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include #if 0 #define DPRINTK(_f, _a...) printk ( KERN_ALERT _f , ## _a ) diff --git a/linux-2.4.27-xen-sparse/arch/xen/kernel/pci-pc.c b/linux-2.4.27-xen-sparse/arch/xen/kernel/pci-pc.c index 48dcecd6ec..b77703ac89 100644 --- a/linux-2.4.27-xen-sparse/arch/xen/kernel/pci-pc.c +++ b/linux-2.4.27-xen-sparse/arch/xen/kernel/pci-pc.c @@ -18,8 +18,8 @@ #include #include -#include -#include +#include +#include #include "pci-i386.h" diff --git a/linux-2.4.27-xen-sparse/arch/xen/kernel/process.c b/linux-2.4.27-xen-sparse/arch/xen/kernel/process.c index 9c1123b740..806e9a73f6 100644 --- a/linux-2.4.27-xen-sparse/arch/xen/kernel/process.c +++ b/linux-2.4.27-xen-sparse/arch/xen/kernel/process.c @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include diff --git a/linux-2.4.27-xen-sparse/arch/xen/kernel/setup.c b/linux-2.4.27-xen-sparse/arch/xen/kernel/setup.c index 61c2f73a07..92312734b8 100644 --- a/linux-2.4.27-xen-sparse/arch/xen/kernel/setup.c +++ b/linux-2.4.27-xen-sparse/arch/xen/kernel/setup.c @@ -48,7 +48,7 @@ static int errno; #include #include #include -#include +#include #include #include #include @@ -335,7 +335,7 @@ void __init setup_arch(char **cmdline_p) * and the bootmem bitmap. * NB. There is definitely enough room for the bootmem bitmap in the * bootstrap page table. We are guaranteed to get >=512kB unused 'padding' - * for our own use after all bootstrap elements (see hypervisor-if.h). + * for our own use after all bootstrap elements (see asm/xen-public/xen.h). */ boot_pfn = min((int)xen_start_info.nr_pages,lmax_low_pfn); bootmap_size = init_bootmem(start_pfn,boot_pfn); diff --git a/linux-2.4.27-xen-sparse/arch/xen/kernel/time.c b/linux-2.4.27-xen-sparse/arch/xen/kernel/time.c index 3a4f8bf2c5..d4b6f5edac 100644 --- a/linux-2.4.27-xen-sparse/arch/xen/kernel/time.c +++ b/linux-2.4.27-xen-sparse/arch/xen/kernel/time.c @@ -52,7 +52,7 @@ #include #include -#include +#include #include #include diff --git a/linux-2.4.27-xen-sparse/include/asm-xen/page.h b/linux-2.4.27-xen-sparse/include/asm-xen/page.h index 26e504485b..239daa6ede 100644 --- a/linux-2.4.27-xen-sparse/include/asm-xen/page.h +++ b/linux-2.4.27-xen-sparse/include/asm-xen/page.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include #ifdef CONFIG_XEN_SCRUB_PAGES #define scrub_pages(_p,_n) memset((void *)(_p), 0, (_n) << PAGE_SHIFT) diff --git a/linux-2.4.27-xen-sparse/include/asm-xen/segment.h b/linux-2.4.27-xen-sparse/include/asm-xen/segment.h index ca13028ce0..276765d1de 100644 --- a/linux-2.4.27-xen-sparse/include/asm-xen/segment.h +++ b/linux-2.4.27-xen-sparse/include/asm-xen/segment.h @@ -4,7 +4,7 @@ #ifndef __ASSEMBLY__ #include #endif -#include +#include #define __KERNEL_CS FLAT_RING1_CS #define __KERNEL_DS FLAT_RING1_DS diff --git a/linux-2.4.27-xen-sparse/mkbuildtree b/linux-2.4.27-xen-sparse/mkbuildtree index 3180d21675..ff5e789ccf 100755 --- a/linux-2.4.27-xen-sparse/mkbuildtree +++ b/linux-2.4.27-xen-sparse/mkbuildtree @@ -107,11 +107,11 @@ set ${RS}/../linux-2.6.*-xen-sparse LINUX_26="$1" -# Create links to the shared definitions of the hypervisor interface -rm -rf ${AD}/include/asm-xen/hypervisor-ifs -mkdir ${AD}/include/asm-xen/hypervisor-ifs -cd ${AD}/include/asm-xen/hypervisor-ifs -relative_lndir ../../../${RS}/../xen/include/hypervisor-ifs +# Create links to the shared definitions of the Xen interfaces. +rm -rf ${AD}/include/asm-xen/xen-public +mkdir ${AD}/include/asm-xen/xen-public +cd ${AD}/include/asm-xen/xen-public +relative_lndir ../../../${RS}/../xen/include/public # Create a link to the shared definitions for the control interface cd ${AD}/include/asm-xen diff --git a/linux-2.6.9-xen-sparse/arch/xen/Makefile b/linux-2.6.9-xen-sparse/arch/xen/Makefile index 224e0aa34f..1185a454fc 100644 --- a/linux-2.6.9-xen-sparse/arch/xen/Makefile +++ b/linux-2.6.9-xen-sparse/arch/xen/Makefile @@ -33,16 +33,16 @@ include/asm-xen/asm: @echo ' SYMLINK $@ -> include/asm-xen/asm-$(XENARCH)' @ln -fsn asm-$(XENARCH) $@ -include/asm-xen/asm-$(XENARCH)/hypervisor-ifs: - @echo ' SYMLINK $@ -> include/asm-xen/hypervisor-ifs' - @ln -fsn ../hypervisor-ifs $@ +include/asm-xen/asm-$(XENARCH)/xen-public: + @echo ' SYMLINK $@ -> include/asm-xen/xen-public' + @ln -fsn ../xen-public $@ arch/xen/arch: @rm -f $@ @ln -fsn $(XENARCH) $@ prepare: include/.asm-ignore include/asm-xen/asm \ - include/asm-xen/asm-$(XENARCH)/hypervisor-ifs \ + include/asm-xen/asm-$(XENARCH)/xen-public \ arch/xen/arch ; all: vmlinuz @@ -64,6 +64,7 @@ dist: archclean: @if [ -e arch/xen/arch ]; then $(MAKE) $(clean)=arch/xen/arch; fi; @rm -f arch/xen/arch include/.asm-ignore include/asm-xen/asm + @rm -f vmlinux-stripped vmlinuz define archhelp echo '* vmlinuz - Compressed kernel image' diff --git a/linux-2.6.9-xen-sparse/arch/xen/configs/xen0_defconfig b/linux-2.6.9-xen-sparse/arch/xen/configs/xen0_defconfig index 63f0dbb80f..0eb8b80171 100644 --- a/linux-2.6.9-xen-sparse/arch/xen/configs/xen0_defconfig +++ b/linux-2.6.9-xen-sparse/arch/xen/configs/xen0_defconfig @@ -1,5 +1,7 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.9-xen0 +# Sun Oct 31 21:30:07 2004 # CONFIG_XEN=y CONFIG_ARCH_XEN=y @@ -33,6 +35,7 @@ CONFIG_BROKEN_ON_SMP=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set @@ -53,6 +56,8 @@ CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +# CONFIG_TINY_SHMEM is not set # # Loadable module support @@ -113,10 +118,6 @@ CONFIG_HAVE_DEC_LOCK=y # Bus options (PCI, PCMCIA, EISA, MCA, ISA) # CONFIG_PCI=y -# CONFIG_PCI_GOBIOS is not set -# CONFIG_PCI_GOMMCONFIG is not set -CONFIG_PCI_GODIRECT=y -# CONFIG_PCI_GOANY is not set CONFIG_PCI_DIRECT=y CONFIG_PCI_LEGACY_PROC=y # CONFIG_PCI_NAMES is not set @@ -203,6 +204,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_BLK_DEV_XD is not set # CONFIG_BLK_CPQ_DA is not set CONFIG_BLK_CPQ_CISS_DA=y +# CONFIG_CISS_SCSI_TAPE is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set CONFIG_BLK_DEV_LOOP=y @@ -250,7 +252,6 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y # CONFIG_BLK_DEV_IDEDMA_FORCED is not set CONFIG_IDEDMA_PCI_AUTO=y # CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_ADMA=y # CONFIG_BLK_DEV_AEC62XX is not set # CONFIG_BLK_DEV_ALI15X3 is not set # CONFIG_BLK_DEV_AMD74XX is not set @@ -321,7 +322,6 @@ CONFIG_SCSI_AACRAID=y CONFIG_SCSI_AIC7XXX=y CONFIG_AIC7XXX_CMDS_PER_DEVICE=32 CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set CONFIG_AIC7XXX_DEBUG_ENABLE=y CONFIG_AIC7XXX_DEBUG_MASK=0 CONFIG_AIC7XXX_REG_PRETTY_PRINT=y @@ -329,7 +329,6 @@ CONFIG_AIC7XXX_REG_PRETTY_PRINT=y CONFIG_SCSI_AIC79XX=y CONFIG_AIC79XX_CMDS_PER_DEVICE=32 CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_BUILD_FIRMWARE is not set # CONFIG_AIC79XX_ENABLE_RD_STRM is not set CONFIG_AIC79XX_DEBUG_ENABLE=y CONFIG_AIC79XX_DEBUG_MASK=0 @@ -337,7 +336,8 @@ CONFIG_AIC79XX_REG_PRETTY_PRINT=y # CONFIG_SCSI_DPT_I2O is not set # CONFIG_SCSI_ADVANSYS is not set # CONFIG_SCSI_IN2000 is not set -CONFIG_SCSI_MEGARAID=y +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set CONFIG_SCSI_SATA=y # CONFIG_SCSI_SATA_SVW is not set CONFIG_SCSI_ATA_PIIX=y @@ -412,6 +412,7 @@ CONFIG_BLK_DEV_MD=y # CONFIG_MD_LINEAR is not set CONFIG_MD_RAID0=y CONFIG_MD_RAID1=y +# CONFIG_MD_RAID10 is not set CONFIG_MD_RAID5=y # CONFIG_MD_RAID6 is not set # CONFIG_MD_MULTIPATH is not set @@ -463,6 +464,7 @@ CONFIG_IP_PNP_DHCP=y # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set # # IP: Virtual Server Configuration @@ -477,6 +479,8 @@ CONFIG_BRIDGE_NETFILTER=y # IP: Netfilter Configuration # CONFIG_IP_NF_CONNTRACK=m +CONFIG_IP_NF_CT_ACCT=y +# CONFIG_IP_NF_CT_PROTO_SCTP is not set CONFIG_IP_NF_FTP=m # CONFIG_IP_NF_IRC is not set # CONFIG_IP_NF_TFTP is not set @@ -502,18 +506,20 @@ CONFIG_IP_NF_IPTABLES=m # CONFIG_IP_NF_MATCH_CONNTRACK is not set # CONFIG_IP_NF_MATCH_OWNER is not set # CONFIG_IP_NF_MATCH_PHYSDEV is not set +# CONFIG_IP_NF_MATCH_ADDRTYPE is not set +# CONFIG_IP_NF_MATCH_REALM is not set +# CONFIG_IP_NF_MATCH_SCTP is not set +# CONFIG_IP_NF_MATCH_COMMENT is not set # CONFIG_IP_NF_FILTER is not set -# CONFIG_IP_NF_NAT is not set -# CONFIG_IP_NF_MANGLE is not set # CONFIG_IP_NF_TARGET_LOG is not set # CONFIG_IP_NF_TARGET_ULOG is not set # CONFIG_IP_NF_TARGET_TCPMSS is not set +# CONFIG_IP_NF_NAT is not set +# CONFIG_IP_NF_MANGLE is not set +# CONFIG_IP_NF_RAW is not set # CONFIG_IP_NF_ARPTABLES is not set # CONFIG_IP_NF_COMPAT_IPCHAINS is not set # CONFIG_IP_NF_COMPAT_IPFWADM is not set -# CONFIG_IP_NF_RAW is not set -# CONFIG_IP_NF_MATCH_ADDRTYPE is not set -# CONFIG_IP_NF_MATCH_REALM is not set # # Bridge: Netfilter Configuration @@ -718,6 +724,7 @@ CONFIG_SERIO_I8042=y CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set # CONFIG_SERIO_PCIPS2 is not set +# CONFIG_SERIO_RAW is not set # # Input Device Drivers @@ -758,7 +765,6 @@ CONFIG_HW_CONSOLE=y CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -936,6 +942,7 @@ CONFIG_LOCKD_V4=y CONFIG_EXPORTFS=m CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set @@ -1008,6 +1015,7 @@ CONFIG_CRYPTO_MD5=m CONFIG_CRYPTO_SHA1=m # CONFIG_CRYPTO_SHA256 is not set # CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WP512 is not set CONFIG_CRYPTO_DES=m # CONFIG_CRYPTO_BLOWFISH is not set # CONFIG_CRYPTO_TWOFISH is not set diff --git a/linux-2.6.9-xen-sparse/arch/xen/configs/xenU_defconfig b/linux-2.6.9-xen-sparse/arch/xen/configs/xenU_defconfig index d6940f6fec..1d1ec8135a 100644 --- a/linux-2.6.9-xen-sparse/arch/xen/configs/xenU_defconfig +++ b/linux-2.6.9-xen-sparse/arch/xen/configs/xenU_defconfig @@ -1,5 +1,7 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.9-xen0 +# Sun Oct 31 21:32:23 2004 # CONFIG_XEN=y CONFIG_ARCH_XEN=y @@ -32,6 +34,7 @@ CONFIG_BROKEN_ON_SMP=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set @@ -51,6 +54,8 @@ CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +# CONFIG_TINY_SHMEM is not set # # Loadable module support @@ -180,9 +185,7 @@ CONFIG_BLK_DEV_SD=m # # SCSI low-level drivers # -# CONFIG_SCSI_AIC7XXX_OLD is not set # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_EATA_PIO is not set # CONFIG_SCSI_DEBUG is not set # @@ -217,6 +220,7 @@ CONFIG_IP_PNP=y # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -379,6 +383,7 @@ CONFIG_LOCKD_V4=y # CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set @@ -451,6 +456,7 @@ CONFIG_CRYPTO_MD5=m # CONFIG_CRYPTO_SHA1 is not set # CONFIG_CRYPTO_SHA256 is not set # CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WP512 is not set # CONFIG_CRYPTO_DES is not set # CONFIG_CRYPTO_BLOWFISH is not set # CONFIG_CRYPTO_TWOFISH is not set diff --git a/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/entry.S b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/entry.S index f1e60cc06c..e6978360e8 100644 --- a/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/entry.S +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/entry.S @@ -48,7 +48,7 @@ #include #include #include "irq_vectors.h" -#include +#include #define nr_syscalls ((syscall_table_size)/4) diff --git a/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/head.S b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/head.S index b41a96db42..b773a18e5e 100644 --- a/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/head.S +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/head.S @@ -15,7 +15,7 @@ #include #include #include -#include +#include /* * References to members of the new_cpu_data structure. diff --git a/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/ioport.c b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/ioport.c index bb3b0f3090..3c85bee294 100644 --- a/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/ioport.c +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/ioport.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include asmlinkage long sys_iopl(unsigned int new_io_pl) { diff --git a/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/process.c b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/process.c index 930e9151a3..66d9d6e4d0 100644 --- a/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/process.c +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/process.c @@ -47,7 +47,7 @@ #include #include #include -#include +#include #ifdef CONFIG_MATH_EMULATION #include #endif diff --git a/linux-2.6.9-xen-sparse/arch/xen/i386/pci/direct.c b/linux-2.6.9-xen-sparse/arch/xen/i386/pci/direct.c index 661221379b..e964ae00f1 100644 --- a/linux-2.6.9-xen-sparse/arch/xen/i386/pci/direct.c +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/pci/direct.c @@ -6,8 +6,8 @@ #include #include "pci.h" -#include -#include +#include +#include /* * Functions for accessing PCI configuration space with type xen accesses diff --git a/linux-2.6.9-xen-sparse/arch/xen/i386/pci/irq.c b/linux-2.6.9-xen-sparse/arch/xen/i386/pci/irq.c index 7dc8dfb0ba..b7761350a9 100644 --- a/linux-2.6.9-xen-sparse/arch/xen/i386/pci/irq.c +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/pci/irq.c @@ -19,8 +19,8 @@ #include "pci.h" -#include -#include +#include +#include /* * Never use: 0, 1, 2 (timer, keyboard, and cascade) diff --git a/linux-2.6.9-xen-sparse/arch/xen/kernel/evtchn.c b/linux-2.6.9-xen-sparse/arch/xen/kernel/evtchn.c index b779ac114c..37ba61846a 100644 --- a/linux-2.6.9-xen-sparse/arch/xen/kernel/evtchn.c +++ b/linux-2.6.9-xen-sparse/arch/xen/kernel/evtchn.c @@ -38,8 +38,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/linux-2.6.9-xen-sparse/arch/xen/kernel/reboot.c b/linux-2.6.9-xen-sparse/arch/xen/kernel/reboot.c index 9b9761e841..2e81929624 100644 --- a/linux-2.6.9-xen-sparse/arch/xen/kernel/reboot.c +++ b/linux-2.6.9-xen-sparse/arch/xen/kernel/reboot.c @@ -12,7 +12,7 @@ static int errno; #include #include #include -#include +#include #include #include diff --git a/linux-2.6.9-xen-sparse/drivers/xen/blkback/common.h b/linux-2.6.9-xen-sparse/drivers/xen/blkback/common.h index 0fa60cdceb..4a12ca8fe9 100644 --- a/linux-2.6.9-xen-sparse/drivers/xen/blkback/common.h +++ b/linux-2.6.9-xen-sparse/drivers/xen/blkback/common.h @@ -14,7 +14,7 @@ #include #include #include -#include +#include #if 0 #define ASSERT(_p) \ diff --git a/linux-2.6.9-xen-sparse/drivers/xen/blkfront/block.h b/linux-2.6.9-xen-sparse/drivers/xen/blkfront/block.h index 76255e8637..8503cfedcc 100644 --- a/linux-2.6.9-xen-sparse/drivers/xen/blkfront/block.h +++ b/linux-2.6.9-xen-sparse/drivers/xen/blkfront/block.h @@ -44,8 +44,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/linux-2.6.9-xen-sparse/drivers/xen/console/console.c b/linux-2.6.9-xen-sparse/drivers/xen/console/console.c index 8309c253d0..f2da97e1f4 100644 --- a/linux-2.6.9-xen-sparse/drivers/xen/console/console.c +++ b/linux-2.6.9-xen-sparse/drivers/xen/console/console.c @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/linux-2.6.9-xen-sparse/drivers/xen/netback/common.h b/linux-2.6.9-xen-sparse/drivers/xen/netback/common.h index 6646f5339f..a8eeac8aac 100644 --- a/linux-2.6.9-xen-sparse/drivers/xen/netback/common.h +++ b/linux-2.6.9-xen-sparse/drivers/xen/netback/common.h @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include diff --git a/linux-2.6.9-xen-sparse/drivers/xen/netfront/netfront.c b/linux-2.6.9-xen-sparse/drivers/xen/netfront/netfront.c index 831572b4b2..6f702fa8f8 100644 --- a/linux-2.6.9-xen-sparse/drivers/xen/netfront/netfront.c +++ b/linux-2.6.9-xen-sparse/drivers/xen/netfront/netfront.c @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include #include diff --git a/linux-2.6.9-xen-sparse/drivers/xen/privcmd/privcmd.c b/linux-2.6.9-xen-sparse/drivers/xen/privcmd/privcmd.c index 42c5b1309c..62994ba302 100644 --- a/linux-2.6.9-xen-sparse/drivers/xen/privcmd/privcmd.c +++ b/linux-2.6.9-xen-sparse/drivers/xen/privcmd/privcmd.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include static struct proc_dir_entry *privcmd_intf; diff --git a/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/page.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/page.h index 34e8f7f9eb..e2604817b6 100644 --- a/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/page.h +++ b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/page.h @@ -15,7 +15,7 @@ #include #include #include -#include +#include #ifdef CONFIG_XEN_SCRUB_PAGES #define scrub_pages(_p,_n) memset((void *)(_p), 0, (_n) << PAGE_SHIFT) diff --git a/linux-2.6.9-xen-sparse/include/asm-xen/evtchn.h b/linux-2.6.9-xen-sparse/include/asm-xen/evtchn.h index 2ad902ed6b..ace8984b08 100644 --- a/linux-2.6.9-xen-sparse/include/asm-xen/evtchn.h +++ b/linux-2.6.9-xen-sparse/include/asm-xen/evtchn.h @@ -35,7 +35,7 @@ #include #include #include -#include +#include /* * LOW-LEVEL DEFINITIONS diff --git a/linux-2.6.9-xen-sparse/include/asm-xen/gnttab.h b/linux-2.6.9-xen-sparse/include/asm-xen/gnttab.h index 6e52923b17..fa166ec6b1 100644 --- a/linux-2.6.9-xen-sparse/include/asm-xen/gnttab.h +++ b/linux-2.6.9-xen-sparse/include/asm-xen/gnttab.h @@ -14,7 +14,7 @@ #include #include -#include +#include int gnttab_grant_foreign_access( diff --git a/linux-2.6.9-xen-sparse/include/asm-xen/hypervisor.h b/linux-2.6.9-xen-sparse/include/asm-xen/hypervisor.h index 3054b30779..f3536bf38d 100644 --- a/linux-2.6.9-xen-sparse/include/asm-xen/hypervisor.h +++ b/linux-2.6.9-xen-sparse/include/asm-xen/hypervisor.h @@ -33,9 +33,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/linux-2.6.9-xen-sparse/mkbuildtree b/linux-2.6.9-xen-sparse/mkbuildtree index 20513e6ead..d353015ff2 100755 --- a/linux-2.6.9-xen-sparse/mkbuildtree +++ b/linux-2.6.9-xen-sparse/mkbuildtree @@ -103,9 +103,9 @@ relative_lndir ${RS} rm -f mkbuildtree -# Create links to the shared definitions of the hypervisor interface -rm -rf ${AD}/include/asm-xen/hypervisor-ifs -mkdir ${AD}/include/asm-xen/hypervisor-ifs -cd ${AD}/include/asm-xen/hypervisor-ifs -relative_lndir ../../../${RS}/../xen/include/hypervisor-ifs +# Create links to the shared definitions of the Xen interfaces. +rm -rf ${AD}/include/asm-xen/xen-public +mkdir ${AD}/include/asm-xen/xen-public +cd ${AD}/include/asm-xen/xen-public +relative_lndir ../../../${RS}/../xen/include/public diff --git a/netbsd-2.0-xen-sparse/mkbuildtree b/netbsd-2.0-xen-sparse/mkbuildtree index 2db906080a..1877db8a5e 100755 --- a/netbsd-2.0-xen-sparse/mkbuildtree +++ b/netbsd-2.0-xen-sparse/mkbuildtree @@ -103,11 +103,11 @@ relative_lndir ${RS} rm -f mkbuildtree -# Create links to the shared definitions of the hypervisor interface -rm -rf ${AD}/sys/arch/xen/include/hypervisor-ifs -mkdir ${AD}/sys/arch/xen/include/hypervisor-ifs -cd ${AD}/sys/arch/xen/include/hypervisor-ifs -relative_lndir ../../../../../${RS}/../xen/include/hypervisor-ifs +# Create links to the shared definitions of the Xen interface +rm -rf ${AD}/sys/arch/xen/include/xen-public +mkdir ${AD}/sys/arch/xen/include/xen-public +cd ${AD}/sys/arch/xen/include/xen-public +relative_lndir ../../../../../${RS}/../xen/include/public # Remove files which don't exist anymore rm -rf ${AD}/sys/arch/xen/xen/events.c diff --git a/netbsd-2.0-xen-sparse/sys/arch/xen/include/hypervisor.h b/netbsd-2.0-xen-sparse/sys/arch/xen/include/hypervisor.h index 3d3f1d38c7..035495d4be 100644 --- a/netbsd-2.0-xen-sparse/sys/arch/xen/include/hypervisor.h +++ b/netbsd-2.0-xen-sparse/sys/arch/xen/include/hypervisor.h @@ -54,12 +54,12 @@ struct xen_npx_attach_args { /* include the hypervisor interface */ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #undef u8 #undef u16 diff --git a/netbsd-2.0-xen-sparse/sys/arch/xen/include/xen.h b/netbsd-2.0-xen-sparse/sys/arch/xen/include/xen.h index 274dad8410..e590db5ae6 100644 --- a/netbsd-2.0-xen-sparse/sys/arch/xen/include/xen.h +++ b/netbsd-2.0-xen-sparse/sys/arch/xen/include/xen.h @@ -85,7 +85,7 @@ void vprintk(const char *, va_list); /* - * these are also defined in hypervisor-if.h but can't be pulled in as + * these are also defined in xen-public/xen.h but can't be pulled in as * they are used in start of day assembly. Need to clean up the .h files * a bit more... */ diff --git a/netbsd-2.0-xen-sparse/sys/arch/xen/xen/xenkbc.c b/netbsd-2.0-xen-sparse/sys/arch/xen/xen/xenkbc.c index e54615567b..ede2207965 100644 --- a/netbsd-2.0-xen-sparse/sys/arch/xen/xen/xenkbc.c +++ b/netbsd-2.0-xen-sparse/sys/arch/xen/xen/xenkbc.c @@ -74,7 +74,7 @@ __KERNEL_RCSID(0, "$NetBSD: xenkbc.c,v 1.3.2.1 2004/05/22 15:57:43 he Exp $"); #include #include #include -#include +#include #include #define KBC_DELAY DELAY(1000) diff --git a/tools/Make.defs b/tools/Make.defs index 1b4d4fec7f..7f40cfef6a 100644 --- a/tools/Make.defs +++ b/tools/Make.defs @@ -1,5 +1,5 @@ # -*- mode: Makefile; -*- -XEN_HYPERVISOR_IFS = $(XEN_ROOT)/xen/include/hypervisor-ifs +XEN_HYPERVISOR_IFS = $(XEN_ROOT)/xen/include/public XEN_LINUX_INCLUDE = $(XEN_ROOT)/linux-xen-sparse/include XEN_XC = $(XEN_ROOT)/tools/python/xen/lowlevel/xc XEN_LIBXC = $(XEN_ROOT)/tools/libxc diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile index 1678a1a448..761e43c632 100644 --- a/tools/libxc/Makefile +++ b/tools/libxc/Makefile @@ -8,9 +8,6 @@ CC = gcc XEN_ROOT = ../.. include $(XEN_ROOT)/tools/Make.defs -vpath %.h $(XEN_HYPERVISOR_IFS) -INCLUDES += -I $(XEN_HYPERVISOR_IFS) - vpath %h $(XEN_LINUX_INCLUDE) INCLUDES += -I $(XEN_LINUX_INCLUDE) @@ -44,7 +41,7 @@ OBJS = $(patsubst %.c,%.o,$(SRCS)) LIB = libxc.so libxc.so.$(MAJOR) libxc.so.$(MAJOR).$(MINOR) -all: check-for-zlib $(LIB) +all: check-for-zlib mk-symlinks $(LIB) check-for-zlib: @if [ ! -e /usr/include/zlib.h ]; then \ @@ -54,6 +51,9 @@ check-for-zlib: false; \ fi +mk-symlinks: + [ -e xen ] || ln -sf $(XEN_HYPERVISOR_IFS) xen + install: all mkdir -p $(prefix)/usr/lib mkdir -p $(prefix)/usr/include @@ -61,9 +61,7 @@ install: all install -m0644 xc.h $(prefix)/usr/include clean: - $(RM) *.a *.so *.o *.rpm $(LIB) - $(RM) *~ - $(RM) $(DEPS) + $(RM) *.a *.so *.o *.rpm $(LIB) *~ $(DEPS) xen rpm: all rm -rf staging diff --git a/tools/libxc/xc.h b/tools/libxc/xc.h index 027d76711f..ab3ace4ff1 100644 --- a/tools/libxc/xc.h +++ b/tools/libxc/xc.h @@ -3,7 +3,7 @@ * * A library for low-level access to the Xen control interfaces. * - * Copyright (c) 2003, K A Fraser. + * Copyright (c) 2003-2004, K A Fraser. */ #ifndef __XC_H__ @@ -18,6 +18,12 @@ typedef signed short s16; typedef signed long s32; typedef signed long long s64; +#include "xen/xen.h" +#include "xen/dom0_ops.h" +#include "xen/event_channel.h" +#include "xen/sched_ctl.h" +#include "xen/io/domain_controller.h" + /* Obtain or relinquish a handle on the 'xc' library. */ int xc_interface_open(void); int xc_interface_close(int xc_handle); @@ -34,14 +40,7 @@ typedef struct { unsigned long max_memkb; } xc_dominfo_t; -typedef struct xc_shadow_control_stats_st -{ - unsigned long fault_count; - unsigned long dirty_count; - unsigned long dirty_net_count; - unsigned long dirty_block_count; -} xc_shadow_control_stats_t; - +typedef dom0_getdomaininfo_t xc_domaininfo_t; int xc_domain_create(int xc_handle, unsigned int mem_kb, int cpu, @@ -60,10 +59,18 @@ int xc_domain_getinfo(int xc_handle, u32 first_domid, unsigned int max_doms, xc_dominfo_t *info); +int xc_domain_getfullinfo(int xc_handle, + u32 domid, + xc_domaininfo_t *info, + full_execution_context_t *ctxt); int xc_domain_setcpuweight(int xc_handle, u32 domid, float weight); +long long xc_domain_get_cpu_usage(int xc_handle, + domid_t domid); + +typedef dom0_shadow_control_stats_t xc_shadow_control_stats_t; int xc_shadow_control(int xc_handle, u32 domid, unsigned int sop, @@ -125,27 +132,7 @@ int xc_rrobin_global_set(int xc_handle, u64 slice); int xc_rrobin_global_get(int xc_handle, u64 *slice); -#define DOMID_SELF (0x7FF0U) -#define DOMID_IO (0x7FF1U) -#define DOMID_XEN (0x7FF2U) - -typedef struct { -#define EVTCHNSTAT_closed 0 /* Chennel is not in use. */ -#define EVTCHNSTAT_unbound 1 /* Channel is not bound to a source. */ -#define EVTCHNSTAT_interdomain 2 /* Channel is connected to remote domain. */ -#define EVTCHNSTAT_pirq 3 /* Channel is bound to a phys IRQ line. */ -#define EVTCHNSTAT_virq 4 /* Channel is bound to a virtual IRQ line */ - int status; - union { - struct { - u32 dom; - int port; - } interdomain; - int pirq; - int virq; - } u; -} xc_evtchn_status_t; - +typedef evtchn_status_t xc_evtchn_status_t; int xc_evtchn_alloc_unbound(int xc_handle, u32 dom, int *port); @@ -179,14 +166,7 @@ int xc_readconsolering(int xc_handle, unsigned int max_chars, int clear); -typedef struct { - int ht_per_core; - int cores; - unsigned long total_pages; - unsigned long free_pages; - unsigned long cpu_khz; -} xc_physinfo_t; - +typedef dom0_physinfo_t xc_physinfo_t; int xc_physinfo(int xc_handle, xc_physinfo_t *info); diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c index 958d85a69e..67168910e9 100644 --- a/tools/libxc/xc_domain.c +++ b/tools/libxc/xc_domain.c @@ -120,16 +120,21 @@ int xc_domain_getinfo(int xc_handle, int xc_domain_getfullinfo(int xc_handle, u32 domid, - dom0_op_t *op, - full_execution_context_t *ctxt ) + xc_domaininfo_t *info, + full_execution_context_t *ctxt) { int rc; - op->cmd = DOM0_GETDOMAININFO; - op->u.getdomaininfo.domain = (domid_t)domid; - op->u.getdomaininfo.ctxt = ctxt; + dom0_op_t op; - rc = do_dom0_op(xc_handle, op); - if ( ((u16)op->u.getdomaininfo.domain != domid) && rc > 0 ) + op.cmd = DOM0_GETDOMAININFO; + op.u.getdomaininfo.domain = (domid_t)domid; + op.u.getdomaininfo.ctxt = ctxt; + + rc = do_dom0_op(xc_handle, &op); + + memcpy(info, &op.u.getdomaininfo, sizeof(*info)); + + if ( ((u16)op.u.getdomaininfo.domain != domid) && rc > 0 ) return -ESRCH; else return rc; diff --git a/tools/libxc/xc_evtchn.c b/tools/libxc/xc_evtchn.c index 2f78ef7936..9371e61261 100644 --- a/tools/libxc/xc_evtchn.c +++ b/tools/libxc/xc_evtchn.c @@ -134,21 +134,7 @@ int xc_evtchn_status(int xc_handle, op.u.status.port = port; if ( (rc = do_evtchn_op(xc_handle, &op)) == 0 ) - { - switch ( status->status = op.u.status.status ) - { - case EVTCHNSTAT_interdomain: - status->u.interdomain.dom = (u16)op.u.status.u.interdomain.dom; - status->u.interdomain.port = op.u.status.u.interdomain.port; - break; - case EVTCHNSTAT_pirq: - status->u.pirq = op.u.status.u.pirq; - break; - case EVTCHNSTAT_virq: - status->u.virq = op.u.status.u.virq; - break; - } - } + memcpy(status, &op.u.status, sizeof(*status)); return rc; } diff --git a/tools/libxc/xc_linux_save.c b/tools/libxc/xc_linux_save.c index 7e0ab5c502..e9f4259494 100644 --- a/tools/libxc/xc_linux_save.c +++ b/tools/libxc/xc_linux_save.c @@ -319,9 +319,9 @@ static int analysis_phase( int xc_handle, u32 domid, } -int suspend_and_state( int xc_handle, XcIOContext *ioctxt, - dom0_op_t *op, - full_execution_context_t *ctxt ) +int suspend_and_state(int xc_handle, XcIOContext *ioctxt, + xc_domaininfo_t *info, + full_execution_context_t *ctxt) { int i=0; @@ -329,26 +329,26 @@ int suspend_and_state( int xc_handle, XcIOContext *ioctxt, retry: - if ( xc_domain_getfullinfo( xc_handle, ioctxt->domain, op, ctxt) ) + if ( xc_domain_getfullinfo(xc_handle, ioctxt->domain, info, ctxt) ) { xcio_error(ioctxt, "Could not get full domain info"); return -1; } - if ( (op->u.getdomaininfo.flags & - ( DOMFLAGS_SHUTDOWN | (SHUTDOWN_suspend<flags & + (DOMFLAGS_SHUTDOWN | (SHUTDOWN_suspend<u.getdomaininfo.flags & DOMFLAGS_PAUSED ) + if ( info->flags & DOMFLAGS_PAUSED ) { // try unpausing domain, wait, and retest xc_domain_unpause( xc_handle, ioctxt->domain ); xcio_error(ioctxt, "Domain was paused. Wait and re-test. (%lx)", - op->u.getdomaininfo.flags); + info->flags); usleep(10000); // 10ms goto retry; @@ -358,20 +358,21 @@ retry: if( ++i < 100 ) { xcio_error(ioctxt, "Retry suspend domain (%lx)", - op->u.getdomaininfo.flags); + info->flags); usleep(10000); // 10ms goto retry; } xcio_error(ioctxt, "Unable to suspend domain. (%lx)", - op->u.getdomaininfo.flags); + info->flags); return -1; } int xc_linux_save(int xc_handle, XcIOContext *ioctxt) { - dom0_op_t op; + xc_domaininfo_t info; + int rc = 1, i, j, k, last_iter, iter = 0; unsigned long mfn; u32 domid = ioctxt->domain; @@ -441,12 +442,12 @@ int xc_linux_save(int xc_handle, XcIOContext *ioctxt) return 1; } - if ( xc_domain_getfullinfo( xc_handle, domid, &op, &ctxt) ) + if ( xc_domain_getfullinfo( xc_handle, domid, &info, &ctxt) ) { xcio_error(ioctxt, "Could not get full domain info"); goto out; } - shared_info_frame = op.u.getdomaininfo.shared_info_frame; + shared_info_frame = info.shared_info_frame; /* A cheesy test to see whether the domain contains valid state. */ if ( ctxt.pt_base == 0 ){ @@ -454,7 +455,7 @@ int xc_linux_save(int xc_handle, XcIOContext *ioctxt) goto out; } - nr_pfns = op.u.getdomaininfo.max_pages; + nr_pfns = info.max_pages; /* cheesy sanity check */ if ( nr_pfns > 1024*1024 ){ @@ -536,10 +537,10 @@ int xc_linux_save(int xc_handle, XcIOContext *ioctxt) last_iter = 1; - if ( suspend_and_state( xc_handle, ioctxt, &op, &ctxt) ) + if ( suspend_and_state( xc_handle, ioctxt, &info, &ctxt) ) { xcio_error(ioctxt, "Domain appears not to have suspended: %lx", - op.u.getdomaininfo.flags); + info.flags); goto out; } @@ -900,17 +901,17 @@ int xc_linux_save(int xc_handle, XcIOContext *ioctxt) DPRINTF("Start last iteration\n"); last_iter = 1; - if ( suspend_and_state( xc_handle, ioctxt, &op, &ctxt) ) + if ( suspend_and_state( xc_handle, ioctxt, &info, &ctxt) ) { xcio_error(ioctxt, "Domain appears not to have suspended: %lx", - op.u.getdomaininfo.flags); + info.flags); goto out; } xcio_info(ioctxt, "SUSPEND flags %08lx shinfo %08lx eip %08lx " - "esi %08lx\n", op.u.getdomaininfo.flags, - op.u.getdomaininfo.shared_info_frame, + "esi %08lx\n",info.flags, + info.shared_info_frame, ctxt.cpu_ctxt.eip, ctxt.cpu_ctxt.esi ); } diff --git a/tools/libxc/xc_misc.c b/tools/libxc/xc_misc.c index 0019ffe96b..e8ea18c5ff 100644 --- a/tools/libxc/xc_misc.c +++ b/tools/libxc/xc_misc.c @@ -52,18 +52,14 @@ int xc_physinfo(int xc_handle, { int ret; dom0_op_t op; - dom0_physinfo_t *got_info = &op.u.physinfo; op.cmd = DOM0_PHYSINFO; op.interface_version = DOM0_INTERFACE_VERSION; - if((ret = do_dom0_op(xc_handle, &op))) return ret; + if ( (ret = do_dom0_op(xc_handle, &op)) != 0 ) + return ret; - put_info->ht_per_core = got_info->ht_per_core; - put_info->cores = got_info->cores; - put_info->total_pages = got_info->total_pages; - put_info->free_pages = got_info->free_pages; - put_info->cpu_khz = got_info->cpu_khz; + memcpy(put_info, &op.u.physinfo, sizeof(*put_info)); return 0; } diff --git a/tools/libxc/xc_private.h b/tools/libxc/xc_private.h index 3da14a16a8..8fd4559886 100644 --- a/tools/libxc/xc_private.h +++ b/tools/libxc/xc_private.h @@ -16,13 +16,6 @@ #include "xc.h" -/* from xen/include/hypervisor-ifs */ -#include -#include -#include -#include -#include - #include @@ -193,15 +186,8 @@ typedef struct mfn_mapper { } mfn_mapper_t; -long long xc_domain_get_cpu_usage( int xc_handle, domid_t domid ); - #include "xc_io.h" -int xc_domain_getfullinfo(int xc_handle, - u32 domid, - dom0_op_t *op, - full_execution_context_t *ctxt ); - unsigned long xc_get_m2p_start_mfn ( int xc_handle ); #endif /* __XC_PRIVATE_H__ */ diff --git a/tools/misc/Makefile b/tools/misc/Makefile index 741f32976c..0dc13c4b50 100644 --- a/tools/misc/Makefile +++ b/tools/misc/Makefile @@ -5,7 +5,6 @@ include $(XEN_ROOT)/tools/Make.defs CC = gcc CFLAGS = -Wall -O3 -INCLUDES += -I $(XEN_HYPERVISOR_IFS) INCLUDES += -I $(XEN_LINUX_INCLUDE) INCLUDES += -I $(XEN_XC) INCLUDES += -I $(XEN_LIBXC) diff --git a/tools/python/setup.py b/tools/python/setup.py index 7adae6cc94..ec7efc0b63 100644 --- a/tools/python/setup.py +++ b/tools/python/setup.py @@ -7,8 +7,7 @@ XEN_ROOT = "../.." extra_compile_args = [ "-fno-strict-aliasing", "-Wall", "-Werror" ] -include_dirs = [ XEN_ROOT + "/xen/include/hypervisor-ifs", - XEN_ROOT + "/linux-xen-sparse/include", +include_dirs = [ XEN_ROOT + "/linux-xen-sparse/include", XEN_ROOT + "/tools/python/xen/lowlevel/xu", XEN_ROOT + "/tools/libxc", XEN_ROOT + "/tools/libxutil", diff --git a/tools/python/xen/lowlevel/xu/xu.c b/tools/python/xen/lowlevel/xu/xu.c index d08a17aa11..5143700538 100644 --- a/tools/python/xen/lowlevel/xu/xu.c +++ b/tools/python/xen/lowlevel/xu/xu.c @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #include diff --git a/tools/xentrace/Makefile b/tools/xentrace/Makefile index de5350e3c2..7759b90f86 100644 --- a/tools/xentrace/Makefile +++ b/tools/xentrace/Makefile @@ -5,7 +5,6 @@ include $(XEN_ROOT)/tools/Make.defs CC = gcc CFLAGS = -Wall -Werror -O3 -CFLAGS += -I $(XEN_HYPERVISOR_IFS) CFLAGS += -I $(XEN_LINUX_INCLUDE) CFLAGS += -I $(XEN_XC) CFLAGS += -I $(XEN_LIBXC) diff --git a/tools/xentrace/xentrace.c b/tools/xentrace/xentrace.c index 2df1ed9462..351ecd71a8 100644 --- a/tools/xentrace/xentrace.c +++ b/tools/xentrace/xentrace.c @@ -22,9 +22,7 @@ #include #include "xc_private.h" - -/* from xen/include/hypervisor-ifs */ -#include +#include extern FILE *stderr; diff --git a/tools/xfrd/Makefile b/tools/xfrd/Makefile index 5824960ac9..9b8d9bc108 100644 --- a/tools/xfrd/Makefile +++ b/tools/xfrd/Makefile @@ -9,9 +9,6 @@ include $(XEN_ROOT)/tools/Make.defs XFRD_INSTALL_DIR = /usr/sbin -vpath %.h $(XEN_HYPERVISOR_IFS) -INCLUDES += -I $(XEN_HYPERVISOR_IFS) - vpath %h $(XEN_LINUX_INCLUDE) INCLUDES += -I $(XEN_LINUX_INCLUDE) diff --git a/xen/COPYING b/xen/COPYING index 8da935f55e..fb8fcc90fc 100644 --- a/xen/COPYING +++ b/xen/COPYING @@ -10,9 +10,9 @@ virtual machine monitor) is copyrighted by me and others who actually wrote it. Further note that the guest-OS interfacing header files, which -includes all files within the subdirectory include/hypervisor-ifs, are +includes all files within the subdirectory include/public, are *not* covered by the GPL but by a much weaker license: - include/hypervisor-ifs/COPYING + include/public/COPYING Also note that the only valid version of the GPL as far as Xen is concerned is _this_ particular version of the license (i.e., *only* diff --git a/xen/Makefile b/xen/Makefile index deda917692..e47e2ea8a6 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -22,6 +22,10 @@ install: $(TARGET) mkdir -p $(prefix)/boot install -m0644 $(TARGET).gz $(prefix)/boot install -m0644 $(TARGET)-syms $(prefix)/boot + mkdir -p $(prefix)/usr/include/xen/io + install -m0644 include/public/*.h $(prefix)/usr/include/xen + install -m0644 include/public/io/*.h $(prefix)/usr/include/xen/io + install -m0644 include/public/COPYING $(prefix)/usr/include/xen dist: $(TARGET) $(MAKE) prefix=`pwd`/../install dist=yes install diff --git a/xen/Rules.mk b/xen/Rules.mk index 12fde1e8e4..ecb20cb35a 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -18,7 +18,7 @@ TARGET_SUBARCH ?= $(COMPILE_SUBARCH) TARGET := $(BASEDIR)/xen HDRS := $(wildcard $(BASEDIR)/include/xen/*.h) HDRS += $(wildcard $(BASEDIR)/include/scsi/*.h) -HDRS += $(wildcard $(BASEDIR)/include/hypervisor-ifs/*.h) +HDRS += $(wildcard $(BASEDIR)/include/public/*.h) HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/*.h) HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/$(TARGET_SUBARCH)/*.h) # compile.h is always regenerated, but other files shouldn't be rebuilt diff --git a/xen/arch/x86/boot/x86_32.S b/xen/arch/x86/boot/x86_32.S index ce09feb6e8..305c279c5e 100644 --- a/xen/arch/x86/boot/x86_32.S +++ b/xen/arch/x86/boot/x86_32.S @@ -1,5 +1,5 @@ #include -#include +#include #include #define SECONDARY_CPU_FLAG 0xA5A5A5A5 diff --git a/xen/arch/x86/boot/x86_64.S b/xen/arch/x86/boot/x86_64.S index 73a23023e2..98289c7ab6 100644 --- a/xen/arch/x86/boot/x86_64.S +++ b/xen/arch/x86/boot/x86_64.S @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/xen/arch/x86/dom0_ops.c b/xen/arch/x86/dom0_ops.c index ce677b1165..62b2739d18 100644 --- a/xen/arch/x86/dom0_ops.c +++ b/xen/arch/x86/dom0_ops.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include @@ -19,7 +19,7 @@ #include #include #include -#include +#include #define TRC_DOM0OP_ENTER_BASE 0x00020000 #define TRC_DOM0OP_LEAVE_BASE 0x00030000 diff --git a/xen/arch/x86/pdb-stub.c b/xen/arch/x86/pdb-stub.c index c8d5421feb..774167c88b 100644 --- a/xen/arch/x86/pdb-stub.c +++ b/xen/arch/x86/pdb-stub.c @@ -44,9 +44,6 @@ static int remote_debug; static char pdb_in_buffer[PDB_BUFMAX]; static char pdb_out_buffer[PDB_BUFMAX]; static char pdb_buffer[PDB_BUFMAX]; -static int pdb_in_buffer_ptr; -static unsigned char pdb_in_checksum; -static unsigned char pdb_xmit_checksum; struct pdb_context pdb_ctx; int pdb_continue_thread = 0; diff --git a/xen/arch/x86/trampoline.S b/xen/arch/x86/trampoline.S index d625a47558..9c89ecf059 100644 --- a/xen/arch/x86/trampoline.S +++ b/xen/arch/x86/trampoline.S @@ -16,7 +16,7 @@ */ #include -#include +#include #include #ifdef CONFIG_SMP diff --git a/xen/arch/x86/x86_32/entry.S b/xen/arch/x86/x86_32/entry.S index 460104244c..5dad5b0b26 100644 --- a/xen/arch/x86/x86_32/entry.S +++ b/xen/arch/x86/x86_32/entry.S @@ -59,7 +59,7 @@ #include #include #include -#include +#include EBX = 0x00 ECX = 0x04 diff --git a/xen/common/debug-linux.c b/xen/common/debug-linux.c index 557997be3f..03c4995eb1 100644 --- a/xen/common/debug-linux.c +++ b/xen/common/debug-linux.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include /* from linux/sched.h */ diff --git a/xen/common/debug.c b/xen/common/debug.c index b17748a864..fa99d6bd8f 100644 --- a/xen/common/debug.c +++ b/xen/common/debug.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/xen/common/dom0_ops.c b/xen/common/dom0_ops.c index f949c7d7af..aa979f1dc0 100644 --- a/xen/common/dom0_ops.c +++ b/xen/common/dom0_ops.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include @@ -18,7 +18,7 @@ #include #include #include -#include +#include #define TRC_DOM0OP_ENTER_BASE 0x00020000 #define TRC_DOM0OP_LEAVE_BASE 0x00030000 diff --git a/xen/common/domain.c b/xen/common/domain.c index cbbd29c0cb..dff88d1fc0 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include /* Both these structures are protected by the tasklist_lock. */ diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index ca2eb46f12..40e218c731 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #define INIT_EVENT_CHANNELS 16 #define MAX_EVENT_CHANNELS 1024 diff --git a/xen/common/kernel.c b/xen/common/kernel.c index 79bb14324a..481b05de17 100644 --- a/xen/common/kernel.c +++ b/xen/common/kernel.c @@ -24,7 +24,7 @@ #include #include #include -#include +#include unsigned long xenheap_phys_end; diff --git a/xen/common/physdev.c b/xen/common/physdev.c index ff486ba29b..b1c16d00b3 100644 --- a/xen/common/physdev.c +++ b/xen/common/physdev.c @@ -26,8 +26,8 @@ #include #include #include -#include -#include +#include +#include /* Called by PHYSDEV_PCI_INITIALISE_DEVICE to finalise IRQ routing. */ extern void pcibios_enable_irq(struct pci_dev *dev); diff --git a/xen/common/sched_atropos.c b/xen/common/sched_atropos.c index b83d853d5d..1565b86ac9 100644 --- a/xen/common/sched_atropos.c +++ b/xen/common/sched_atropos.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #define ATROPOS_TASK_UNBLOCKED 16 diff --git a/xen/common/sched_rrobin.c b/xen/common/sched_rrobin.c index 1915b37632..fbf17ab84c 100644 --- a/xen/common/sched_rrobin.c +++ b/xen/common/sched_rrobin.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include diff --git a/xen/common/schedule.c b/xen/common/schedule.c index 7b7530616c..138234104d 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include /*#define WAKE_HISTO*/ /*#define BLOCKTIME_HISTO*/ diff --git a/xen/common/trace.c b/xen/common/trace.c index 1e4e634627..4b8d5b6f37 100644 --- a/xen/common/trace.c +++ b/xen/common/trace.c @@ -13,7 +13,7 @@ * it's possible to reconstruct a chronological record of trace events. * * See also include/xen/trace.h and the dom0 op in - * include/hypervisor-ifs/dom0_ops.h + * include/public/dom0_ops.h */ #include @@ -26,7 +26,7 @@ #include #include #include -#include +#include /* Pointers to the meta-data objects for all system trace buffers */ struct t_buf *t_bufs[NR_CPUS]; diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h index 5068294ded..31a669c08d 100644 --- a/xen/include/asm-x86/mm.h +++ b/xen/include/asm-x86/mm.h @@ -14,7 +14,7 @@ #include #include -#include +#include /* * Per-page-frame information. diff --git a/xen/include/asm-x86/pdb.h b/xen/include/asm-x86/pdb.h index db98294b7d..d718505089 100644 --- a/xen/include/asm-x86/pdb.h +++ b/xen/include/asm-x86/pdb.h @@ -14,8 +14,8 @@ #include #include -#include -#include /* for domain id */ +#include +#include /* for domain id */ extern int pdb_initialized; extern int pdb_com_port; diff --git a/xen/include/asm-x86/processor.h b/xen/include/asm-x86/processor.h index f6951c0bc1..e87c0986a1 100644 --- a/xen/include/asm-x86/processor.h +++ b/xen/include/asm-x86/processor.h @@ -15,7 +15,7 @@ #include #include #include -#include +#include struct domain; diff --git a/xen/include/hypervisor-ifs/COPYING b/xen/include/public/COPYING similarity index 100% rename from xen/include/hypervisor-ifs/COPYING rename to xen/include/public/COPYING diff --git a/xen/include/hypervisor-ifs/arch-x86_32.h b/xen/include/public/arch-x86_32.h similarity index 98% rename from xen/include/hypervisor-ifs/arch-x86_32.h rename to xen/include/public/arch-x86_32.h index 91a111bd92..1287cdbe04 100644 --- a/xen/include/hypervisor-ifs/arch-x86_32.h +++ b/xen/include/public/arch-x86_32.h @@ -1,11 +1,11 @@ /****************************************************************************** - * arch-i386/hypervisor-if.h + * arch-x86_32.h * * Guest OS interface to x86 32-bit Xen. */ -#ifndef __HYPERVISOR_IF_I386_H__ -#define __HYPERVISOR_IF_I386_H__ +#ifndef __XEN_PUBLIC_ARCH_X86_32_H__ +#define __XEN_PUBLIC_ARCH_X86_32_H__ /* * Pointers and other address fields inside interface structures are padded to diff --git a/xen/include/hypervisor-ifs/arch-x86_64.h b/xen/include/public/arch-x86_64.h similarity index 96% rename from xen/include/hypervisor-ifs/arch-x86_64.h rename to xen/include/public/arch-x86_64.h index 8eab08f669..856b5070a8 100644 --- a/xen/include/hypervisor-ifs/arch-x86_64.h +++ b/xen/include/public/arch-x86_64.h @@ -1,11 +1,11 @@ /****************************************************************************** - * arch-x86_64/hypervisor-if.h + * arch-x86_64.h * - * Guest OS interface to AMD x86-64 bit Xen. + * Guest OS interface to x86 64-bit Xen. */ -#ifndef __HYPERVISOR_IF_X86_64_H__ -#define __HYPERVISOR_IF_X86_64_H__ +#ifndef __XEN_PUBLIC_ARCH_X86_64_H__ +#define __XEN_PUBLIC_ARCH_X86_64_H__ /* Pointers are naturally 64 bits in this architecture; no padding needed. */ #define _MEMORY_PADDING(_X) @@ -131,4 +131,4 @@ typedef struct { #endif /* !__ASSEMBLY__ */ -#endif /* __HYPERVISOR_IF_H__ */ +#endif diff --git a/xen/include/hypervisor-ifs/dom0_ops.h b/xen/include/public/dom0_ops.h similarity index 98% rename from xen/include/hypervisor-ifs/dom0_ops.h rename to xen/include/public/dom0_ops.h index 05eaa4ad20..e19141ca02 100644 --- a/xen/include/hypervisor-ifs/dom0_ops.h +++ b/xen/include/public/dom0_ops.h @@ -8,10 +8,10 @@ */ -#ifndef __DOM0_OPS_H__ -#define __DOM0_OPS_H__ +#ifndef __XEN_PUBLIC_DOM0_OPS_H__ +#define __XEN_PUBLIC_DOM0_OPS_H__ -#include "hypervisor-if.h" +#include "xen.h" #include "sched_ctl.h" /* @@ -369,4 +369,4 @@ typedef struct { } PACKED u; } PACKED dom0_op_t; /* 80 bytes */ -#endif /* __DOM0_OPS_H__ */ +#endif /* __XEN_PUBLIC_DOM0_OPS_H__ */ diff --git a/xen/include/hypervisor-ifs/event_channel.h b/xen/include/public/event_channel.h similarity index 97% rename from xen/include/hypervisor-ifs/event_channel.h rename to xen/include/public/event_channel.h index 2da4f06d24..284326d9b6 100644 --- a/xen/include/hypervisor-ifs/event_channel.h +++ b/xen/include/public/event_channel.h @@ -6,8 +6,8 @@ * Copyright (c) 2003-2004, K A Fraser. */ -#ifndef __HYPERVISOR_IFS__EVENT_CHANNEL_H__ -#define __HYPERVISOR_IFS__EVENT_CHANNEL_H__ +#ifndef __XEN_PUBLIC_EVENT_CHANNEL_H__ +#define __XEN_PUBLIC_EVENT_CHANNEL_H__ /* * EVTCHNOP_alloc_unbound: Allocate a fresh local port and prepare @@ -158,4 +158,4 @@ typedef struct { } PACKED u; } PACKED evtchn_op_t; /* 32 bytes */ -#endif /* __HYPERVISOR_IFS__EVENT_CHANNEL_H__ */ +#endif /* __XEN_PUBLIC_EVENT_CHANNEL_H__ */ diff --git a/xen/include/hypervisor-ifs/grant_table.h b/xen/include/public/grant_table.h similarity index 98% rename from xen/include/hypervisor-ifs/grant_table.h rename to xen/include/public/grant_table.h index cb48c1f3b9..389e082646 100644 --- a/xen/include/hypervisor-ifs/grant_table.h +++ b/xen/include/public/grant_table.h @@ -7,8 +7,8 @@ * Copyright (c) 2004, K A Fraser */ -#ifndef __HYPERVISOR_IFS_GRANT_TABLE_H__ -#define __HYPERVISOR_IFS_GRANT_TABLE_H__ +#ifndef __XEN_PUBLIC_GRANT_TABLE_H__ +#define __XEN_PUBLIC_GRANT_TABLE_H__ /*********************************** @@ -248,4 +248,4 @@ typedef struct { } -#endif /* __HYPERVISOR_IFS_GRANT_TABLE_H__ */ +#endif /* __XEN_PUBLIC_GRANT_TABLE_H__ */ diff --git a/xen/include/hypervisor-ifs/io/blkif.h b/xen/include/public/io/blkif.h similarity index 97% rename from xen/include/hypervisor-ifs/io/blkif.h rename to xen/include/public/io/blkif.h index 1024629ea7..8cd3696eb6 100644 --- a/xen/include/hypervisor-ifs/io/blkif.h +++ b/xen/include/public/io/blkif.h @@ -6,8 +6,8 @@ * Copyright (c) 2003-2004, Keir Fraser */ -#ifndef __SHARED_BLKIF_H__ -#define __SHARED_BLKIF_H__ +#ifndef __XEN_PUBLIC_IO_BLKIF_H__ +#define __XEN_PUBLIC_IO_BLKIF_H__ #define blkif_vdev_t u16 #define blkif_sector_t u64 @@ -112,4 +112,4 @@ typedef struct { u16 info; /* 10: Device type and flags (VDISK_*). */ } PACKED vdisk_t; /* 12 bytes */ -#endif /* __SHARED_BLKIF_H__ */ +#endif /* __XEN_PUBLIC_IO_BLKIF_H__ */ diff --git a/xen/include/hypervisor-ifs/io/domain_controller.h b/xen/include/public/io/domain_controller.h similarity index 99% rename from xen/include/hypervisor-ifs/io/domain_controller.h rename to xen/include/public/io/domain_controller.h index ab04072fe8..5a4056cd4d 100644 --- a/xen/include/hypervisor-ifs/io/domain_controller.h +++ b/xen/include/public/io/domain_controller.h @@ -7,8 +7,8 @@ * Copyright (c) 2004, K A Fraser */ -#ifndef __DOMAIN_CONTROLLER_H__ -#define __DOMAIN_CONTROLLER_H__ +#ifndef __XEN_PUBLIC_IO_DOMAIN_CONTROLLER_H__ +#define __XEN_PUBLIC_IO_DOMAIN_CONTROLLER_H__ /* @@ -575,4 +575,4 @@ typedef struct { } PACKED mem_request_t; /* 8 bytes */ -#endif /* __DOMAIN_CONTROLLER_H__ */ +#endif /* __XEN_PUBLIC_IO_DOMAIN_CONTROLLER_H__ */ diff --git a/xen/include/hypervisor-ifs/io/netif.h b/xen/include/public/io/netif.h similarity index 97% rename from xen/include/hypervisor-ifs/io/netif.h rename to xen/include/public/io/netif.h index abb87bafaa..839cc8dade 100644 --- a/xen/include/hypervisor-ifs/io/netif.h +++ b/xen/include/public/io/netif.h @@ -6,8 +6,8 @@ * Copyright (c) 2003-2004, Keir Fraser */ -#ifndef __SHARED_NETIF_H__ -#define __SHARED_NETIF_H__ +#ifndef __XEN_PUBLIC_IO_NETIF_H__ +#define __XEN_PUBLIC_IO_NETIF_H__ typedef struct { memory_t addr; /* 0: Machine address of packet. */ diff --git a/xen/include/hypervisor-ifs/physdev.h b/xen/include/public/physdev.h similarity index 96% rename from xen/include/hypervisor-ifs/physdev.h rename to xen/include/public/physdev.h index 4e1aa135d3..ab1af9998a 100644 --- a/xen/include/hypervisor-ifs/physdev.h +++ b/xen/include/public/physdev.h @@ -6,8 +6,8 @@ * Description: Interface for domains to access physical devices on the PCI bus */ -#ifndef __HYPERVISOR_IFS_PHYSDEV_H__ -#define __HYPERVISOR_IFS_PHYSDEV_H__ +#ifndef __XEN_PUBLIC_PHYSDEV_H__ +#define __XEN_PUBLIC_PHYSDEV_H__ /* Commands to HYPERVISOR_physdev_op() */ #define PHYSDEVOP_PCI_CFGREG_READ 0 @@ -77,4 +77,4 @@ typedef struct _physdev_op_st } PACKED u; } PACKED physdev_op_t; /* 40 bytes */ -#endif /* __HYPERVISOR_IFS_PHYSDEV_H__ */ +#endif /* __XEN_PUBLIC_PHYSDEV_H__ */ diff --git a/xen/include/hypervisor-ifs/sched_ctl.h b/xen/include/public/sched_ctl.h similarity index 94% rename from xen/include/hypervisor-ifs/sched_ctl.h rename to xen/include/public/sched_ctl.h index 0c298f76d6..bd6a717521 100644 --- a/xen/include/hypervisor-ifs/sched_ctl.h +++ b/xen/include/public/sched_ctl.h @@ -4,8 +4,8 @@ * Mark Williamson, (C) 2004 Intel Research Cambridge */ -#ifndef __SCHED_CTL_H__ -#define __SCHED_CTL_H__ +#ifndef __XEN_PUBLIC_SCHED_CTL_H__ +#define __XEN_PUBLIC_SCHED_CTL_H__ /* Scheduler types */ #define SCHED_BVT 0 @@ -67,4 +67,4 @@ struct sched_adjdom_cmd } PACKED u; } PACKED; /* 40 bytes */ -#endif /* __SCHED_CTL_H__ */ +#endif /* __XEN_PUBLIC_SCHED_CTL_H__ */ diff --git a/xen/include/hypervisor-ifs/trace.h b/xen/include/public/trace.h similarity index 87% rename from xen/include/hypervisor-ifs/trace.h rename to xen/include/public/trace.h index 52d53842ca..5e7904d52a 100644 --- a/xen/include/hypervisor-ifs/trace.h +++ b/xen/include/public/trace.h @@ -1,9 +1,9 @@ /****************************************************************************** - * include/hypervisor-ifs/trace.h + * trace.h */ -#ifndef __HYPERVISOR_IFS_TRACE_H__ -#define __HYPERVISOR_IFS_TRACE_H__ +#ifndef __XEN_PUBLIC_TRACE_H__ +#define __XEN_PUBLIC_TRACE_H__ /* This structure represents a single trace buffer record. */ struct t_rec { @@ -28,4 +28,4 @@ struct t_buf { struct t_rec *vdata; /* virtual address pointer to data */ }; -#endif /* __HYPERVISOR_IFS_TRACE_H__ */ +#endif /* __XEN_PUBLIC_TRACE_H__ */ diff --git a/xen/include/hypervisor-ifs/hypervisor-if.h b/xen/include/public/xen.h similarity index 98% rename from xen/include/hypervisor-ifs/hypervisor-if.h rename to xen/include/public/xen.h index 1038d3c88d..f103509b04 100644 --- a/xen/include/hypervisor-ifs/hypervisor-if.h +++ b/xen/include/public/xen.h @@ -1,13 +1,13 @@ /****************************************************************************** - * hypervisor-if.h + * xen.h * * Guest OS interface to Xen. * * Copyright (c) 2004, K A Fraser */ -#ifndef __HYPERVISOR_IF_H__ -#define __HYPERVISOR_IF_H__ +#ifndef __XEN_PUBLIC_XEN_H__ +#define __XEN_PUBLIC_XEN_H__ /* GCC-specific way to pack structure definitions (no implicit padding). */ #define PACKED __attribute__ ((packed)) @@ -21,7 +21,7 @@ #endif /* - * HYPERVISOR "SYSTEM CALLS" + * XEN "SYSTEM CALLS" (a.k.a. HYPERCALLS). */ /* EAX = vector; EBX, ECX, EDX, ESI, EDI = args 1, 2, 3, 4, 5. */ @@ -62,7 +62,7 @@ /* * VIRTUAL INTERRUPTS * - * Virtual interrupts that a guest OS may receive from the hypervisor. + * Virtual interrupts that a guest OS may receive from Xen. */ #define VIRQ_MISDIRECT 0 /* Catch-all interrupt for unbound VIRQs. */ #define VIRQ_TIMER 1 /* Timebase update, and/or requested timeout. */ @@ -422,4 +422,4 @@ extern shared_info_t *HYPERVISOR_shared_info; #endif /* !__ASSEMBLY__ */ -#endif /* __HYPERVISOR_IF_H__ */ +#endif /* __XEN_PUBLIC_XEN_H__ */ diff --git a/xen/include/xen/grant_table.h b/xen/include/xen/grant_table.h index bbacae6e4c..eb9d8c15af 100644 --- a/xen/include/xen/grant_table.h +++ b/xen/include/xen/grant_table.h @@ -26,7 +26,7 @@ #include #include -#include +#include /* Active grant entry - used for shadowing GTF_permit_access grants. */ typedef struct { @@ -68,7 +68,7 @@ typedef struct { /* Per-domain grant information. */ typedef struct { - /* Shared grant table (see include/hypervisor-ifs/grant_table.h). */ + /* Shared grant table (see include/public/grant_table.h). */ grant_entry_t *shared; /* Active grant table. */ active_grant_entry_t *active; diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index 7c1e7bc909..6eba6ab425 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -10,8 +10,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/xen/include/xen/time.h b/xen/include/xen/time.h index 79ddb92309..dd476f9298 100644 --- a/xen/include/xen/time.h +++ b/xen/include/xen/time.h @@ -28,7 +28,7 @@ #define __XEN_TIME_H__ #include -#include +#include extern int init_xen_time(); diff --git a/xen/include/xen/trace.h b/xen/include/xen/trace.h index 3064c47a0b..88c0b23d39 100644 --- a/xen/include/xen/trace.h +++ b/xen/include/xen/trace.h @@ -15,13 +15,13 @@ * Access to the trace buffers is via a dom0 hypervisor op and analysis of * trace buffer contents can then be performed using a userland tool. * - * See also common/trace.c and the dom0 op in include/hypervisor-ifs/dom0_ops.h + * See also common/trace.c and the dom0 op in include/public/dom0_ops.h */ #ifndef __XEN_TRACE_H__ #define __XEN_TRACE_H__ -#include +#include #ifdef TRACE_BUFFER @@ -32,7 +32,7 @@ #include #include #include -#include +#include /* Used to initialise trace buffer functionality */ void init_trace_bufs(void);