ia64/xen-unstable

changeset 2709:8aa9d487a8dd

bitkeeper revision 1.1159.1.258 (417850302WC3Bkwm17w7QalyJOg3xg)

Merge ssh://srg//auto/groups/xeno/BK/xeno-unstable.bk
into equilibrium.research:/export/scratch/xeno-balloon.bk
author mwilli2@equilibrium.research
date Fri Oct 22 00:11:28 2004 +0000 (2004-10-22)
parents 02bd62ad47a6 5233708cfa46
children ed0f5b1a41ba
files .rootkeys COPYING linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/hypervisor.c linux-2.6.8.1-xen-sparse/arch/xen/kernel/ctrl_if.c linux-2.6.8.1-xen-sparse/arch/xen/kernel/evtchn.c linux-2.6.8.1-xen-sparse/drivers/xen/balloon/balloon.c linux-2.6.8.1-xen-sparse/drivers/xen/blkfront/blkfront.c linux-2.6.8.1-xen-sparse/drivers/xen/blkfront/block.h linux-2.6.8.1-xen-sparse/drivers/xen/blkfront/vbd.c linux-2.6.8.1-xen-sparse/drivers/xen/console/console.c linux-2.6.8.1-xen-sparse/drivers/xen/evtchn/evtchn.c linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c linux-2.6.8.1-xen-sparse/include/asm-xen/ctrl_if.h linux-2.6.8.1-xen-sparse/include/asm-xen/evtchn.h linux-2.6.8.1-xen-sparse/include/asm-xen/hypervisor.h linux-2.6.8.1-xen-sparse/include/asm-xen/multicall.h linux-2.6.8.1-xen-sparse/include/asm-xen/suspend.h tools/libxc/xc.h tools/libxc/xc_domain.c tools/libxc/xc_io.h tools/libxc/xc_linux_restore.c tools/libxc/xc_linux_save.c tools/python/xen/lowlevel/xc/xc.c tools/python/xen/xend/XendClient.py tools/python/xen/xend/XendDomain.py tools/python/xen/xend/XendDomainInfo.py tools/python/xen/xend/XendMigrate.py tools/python/xen/xend/server/SrvDomain.py tools/python/xen/xend/server/SrvDomainDir.py tools/python/xen/xend/server/blkif.py tools/python/xen/xend/server/controller.py tools/python/xen/xend/server/netif.py tools/python/xen/xm/migrate.py tools/xfrd/xen_domain.c tools/xfrd/xen_domain.h tools/xfrd/xfrd.c xen/arch/x86/setup.c xen/arch/x86/smpboot.c xen/common/dom0_ops.c xen/common/domain.c xen/include/hypervisor-ifs/dom0_ops.h xen/include/xen/sched.h xen/include/xen/smp.h
line diff
     1.1 --- a/.rootkeys	Thu Oct 21 14:27:34 2004 +0000
     1.2 +++ b/.rootkeys	Fri Oct 22 00:11:28 2004 +0000
     1.3 @@ -2,6 +2,7 @@ 3ddb6b0bKlMz_dz-M59a1mkUa1lASw BitKeeper
     1.4  3eba336c4BUxP3H1DjQl8sInORf1Yw BitKeeper/etc/gone
     1.5  3ddb6b0buTaC5zg1_a8FoAR9FWi_mw BitKeeper/etc/ignore
     1.6  3ddb79c9_hgSp-gsQm8HqWM_9W3B_A BitKeeper/etc/logging_ok
     1.7 +4177dbbfqsi01p2zgZa0geUOgScONw COPYING
     1.8  3eb788d6Kleck_Cut0ouGneviGzliQ Makefile
     1.9  3f5ef5a24IaQasQE2tyMxrfxskMmvw README
    1.10  3f5ef5a2l4kfBYSQTUaOyyD76WROZQ README.CD
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/COPYING	Fri Oct 22 00:11:28 2004 +0000
     2.3 @@ -0,0 +1,370 @@
     2.4 +
     2.5 +GNU General Public License
     2.6 +--------------------------
     2.7 +
     2.8 +Most files in this repository are licensed under the terms of the GNU
     2.9 +General Public License (GPL), a copy of which is attached at the end
    2.10 +of this notice. Note that the only valid version of the GPL as far as
    2.11 +the files in this repository are concerned is _this_ particular
    2.12 +version of the license (i.e., *only* v2, not v2.2 or v3.x or
    2.13 +whatever), unless explicitly otherwise stated.
    2.14 +
    2.15 +Licensing Exceptions (the relaxed BSD-style license)
    2.16 +----------------------------------------------------
    2.17 +
    2.18 +For the convenience of users and those who are porting OSes to run as
    2.19 +Xen guests, certain files in this repository are not subject to the
    2.20 +GPL when distributed separately or included in software packages
    2.21 +outside this repository. Instead we specify a much more relaxed
    2.22 +BSD-style license. Affected files include the Xen interface headers
    2.23 +(xen/include/hypervisor-ifs/COPYING), and various drivers, support
    2.24 +functions and header files within the Linux sparse source trees. In
    2.25 +all such cases, license terms are stated at the top of the file or in
    2.26 +a COPYING file in the same directory. Note that _any_ file that is
    2.27 +modified and then distributed within a Linux kernel is still subject
    2.28 +to the GNU GPL!
    2.29 +
    2.30 + -- Keir Fraser (on behalf of the Xen team)
    2.31 +
    2.32 +=====================================================================
    2.33 +
    2.34 +		    GNU GENERAL PUBLIC LICENSE
    2.35 +		       Version 2, June 1991
    2.36 +
    2.37 + Copyright (C) 1989, 1991 Free Software Foundation, Inc.
    2.38 +                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    2.39 + Everyone is permitted to copy and distribute verbatim copies
    2.40 + of this license document, but changing it is not allowed.
    2.41 +
    2.42 +			    Preamble
    2.43 +
    2.44 +  The licenses for most software are designed to take away your
    2.45 +freedom to share and change it.  By contrast, the GNU General Public
    2.46 +License is intended to guarantee your freedom to share and change free
    2.47 +software--to make sure the software is free for all its users.  This
    2.48 +General Public License applies to most of the Free Software
    2.49 +Foundation's software and to any other program whose authors commit to
    2.50 +using it.  (Some other Free Software Foundation software is covered by
    2.51 +the GNU Library General Public License instead.)  You can apply it to
    2.52 +your programs, too.
    2.53 +
    2.54 +  When we speak of free software, we are referring to freedom, not
    2.55 +price.  Our General Public Licenses are designed to make sure that you
    2.56 +have the freedom to distribute copies of free software (and charge for
    2.57 +this service if you wish), that you receive source code or can get it
    2.58 +if you want it, that you can change the software or use pieces of it
    2.59 +in new free programs; and that you know you can do these things.
    2.60 +
    2.61 +  To protect your rights, we need to make restrictions that forbid
    2.62 +anyone to deny you these rights or to ask you to surrender the rights.
    2.63 +These restrictions translate to certain responsibilities for you if you
    2.64 +distribute copies of the software, or if you modify it.
    2.65 +
    2.66 +  For example, if you distribute copies of such a program, whether
    2.67 +gratis or for a fee, you must give the recipients all the rights that
    2.68 +you have.  You must make sure that they, too, receive or can get the
    2.69 +source code.  And you must show them these terms so they know their
    2.70 +rights.
    2.71 +
    2.72 +  We protect your rights with two steps: (1) copyright the software, and
    2.73 +(2) offer you this license which gives you legal permission to copy,
    2.74 +distribute and/or modify the software.
    2.75 +
    2.76 +  Also, for each author's protection and ours, we want to make certain
    2.77 +that everyone understands that there is no warranty for this free
    2.78 +software.  If the software is modified by someone else and passed on, we
    2.79 +want its recipients to know that what they have is not the original, so
    2.80 +that any problems introduced by others will not reflect on the original
    2.81 +authors' reputations.
    2.82 +
    2.83 +  Finally, any free program is threatened constantly by software
    2.84 +patents.  We wish to avoid the danger that redistributors of a free
    2.85 +program will individually obtain patent licenses, in effect making the
    2.86 +program proprietary.  To prevent this, we have made it clear that any
    2.87 +patent must be licensed for everyone's free use or not licensed at all.
    2.88 +
    2.89 +  The precise terms and conditions for copying, distribution and
    2.90 +modification follow.
    2.91 +
    2.92 +		    GNU GENERAL PUBLIC LICENSE
    2.93 +   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
    2.94 +
    2.95 +  0. This License applies to any program or other work which contains
    2.96 +a notice placed by the copyright holder saying it may be distributed
    2.97 +under the terms of this General Public License.  The "Program", below,
    2.98 +refers to any such program or work, and a "work based on the Program"
    2.99 +means either the Program or any derivative work under copyright law:
   2.100 +that is to say, a work containing the Program or a portion of it,
   2.101 +either verbatim or with modifications and/or translated into another
   2.102 +language.  (Hereinafter, translation is included without limitation in
   2.103 +the term "modification".)  Each licensee is addressed as "you".
   2.104 +
   2.105 +Activities other than copying, distribution and modification are not
   2.106 +covered by this License; they are outside its scope.  The act of
   2.107 +running the Program is not restricted, and the output from the Program
   2.108 +is covered only if its contents constitute a work based on the
   2.109 +Program (independent of having been made by running the Program).
   2.110 +Whether that is true depends on what the Program does.
   2.111 +
   2.112 +  1. You may copy and distribute verbatim copies of the Program's
   2.113 +source code as you receive it, in any medium, provided that you
   2.114 +conspicuously and appropriately publish on each copy an appropriate
   2.115 +copyright notice and disclaimer of warranty; keep intact all the
   2.116 +notices that refer to this License and to the absence of any warranty;
   2.117 +and give any other recipients of the Program a copy of this License
   2.118 +along with the Program.
   2.119 +
   2.120 +You may charge a fee for the physical act of transferring a copy, and
   2.121 +you may at your option offer warranty protection in exchange for a fee.
   2.122 +
   2.123 +  2. You may modify your copy or copies of the Program or any portion
   2.124 +of it, thus forming a work based on the Program, and copy and
   2.125 +distribute such modifications or work under the terms of Section 1
   2.126 +above, provided that you also meet all of these conditions:
   2.127 +
   2.128 +    a) You must cause the modified files to carry prominent notices
   2.129 +    stating that you changed the files and the date of any change.
   2.130 +
   2.131 +    b) You must cause any work that you distribute or publish, that in
   2.132 +    whole or in part contains or is derived from the Program or any
   2.133 +    part thereof, to be licensed as a whole at no charge to all third
   2.134 +    parties under the terms of this License.
   2.135 +
   2.136 +    c) If the modified program normally reads commands interactively
   2.137 +    when run, you must cause it, when started running for such
   2.138 +    interactive use in the most ordinary way, to print or display an
   2.139 +    announcement including an appropriate copyright notice and a
   2.140 +    notice that there is no warranty (or else, saying that you provide
   2.141 +    a warranty) and that users may redistribute the program under
   2.142 +    these conditions, and telling the user how to view a copy of this
   2.143 +    License.  (Exception: if the Program itself is interactive but
   2.144 +    does not normally print such an announcement, your work based on
   2.145 +    the Program is not required to print an announcement.)
   2.146 +
   2.147 +These requirements apply to the modified work as a whole.  If
   2.148 +identifiable sections of that work are not derived from the Program,
   2.149 +and can be reasonably considered independent and separate works in
   2.150 +themselves, then this License, and its terms, do not apply to those
   2.151 +sections when you distribute them as separate works.  But when you
   2.152 +distribute the same sections as part of a whole which is a work based
   2.153 +on the Program, the distribution of the whole must be on the terms of
   2.154 +this License, whose permissions for other licensees extend to the
   2.155 +entire whole, and thus to each and every part regardless of who wrote it.
   2.156 +
   2.157 +Thus, it is not the intent of this section to claim rights or contest
   2.158 +your rights to work written entirely by you; rather, the intent is to
   2.159 +exercise the right to control the distribution of derivative or
   2.160 +collective works based on the Program.
   2.161 +
   2.162 +In addition, mere aggregation of another work not based on the Program
   2.163 +with the Program (or with a work based on the Program) on a volume of
   2.164 +a storage or distribution medium does not bring the other work under
   2.165 +the scope of this License.
   2.166 +
   2.167 +  3. You may copy and distribute the Program (or a work based on it,
   2.168 +under Section 2) in object code or executable form under the terms of
   2.169 +Sections 1 and 2 above provided that you also do one of the following:
   2.170 +
   2.171 +    a) Accompany it with the complete corresponding machine-readable
   2.172 +    source code, which must be distributed under the terms of Sections
   2.173 +    1 and 2 above on a medium customarily used for software interchange; or,
   2.174 +
   2.175 +    b) Accompany it with a written offer, valid for at least three
   2.176 +    years, to give any third party, for a charge no more than your
   2.177 +    cost of physically performing source distribution, a complete
   2.178 +    machine-readable copy of the corresponding source code, to be
   2.179 +    distributed under the terms of Sections 1 and 2 above on a medium
   2.180 +    customarily used for software interchange; or,
   2.181 +
   2.182 +    c) Accompany it with the information you received as to the offer
   2.183 +    to distribute corresponding source code.  (This alternative is
   2.184 +    allowed only for noncommercial distribution and only if you
   2.185 +    received the program in object code or executable form with such
   2.186 +    an offer, in accord with Subsection b above.)
   2.187 +
   2.188 +The source code for a work means the preferred form of the work for
   2.189 +making modifications to it.  For an executable work, complete source
   2.190 +code means all the source code for all modules it contains, plus any
   2.191 +associated interface definition files, plus the scripts used to
   2.192 +control compilation and installation of the executable.  However, as a
   2.193 +special exception, the source code distributed need not include
   2.194 +anything that is normally distributed (in either source or binary
   2.195 +form) with the major components (compiler, kernel, and so on) of the
   2.196 +operating system on which the executable runs, unless that component
   2.197 +itself accompanies the executable.
   2.198 +
   2.199 +If distribution of executable or object code is made by offering
   2.200 +access to copy from a designated place, then offering equivalent
   2.201 +access to copy the source code from the same place counts as
   2.202 +distribution of the source code, even though third parties are not
   2.203 +compelled to copy the source along with the object code.
   2.204 +
   2.205 +  4. You may not copy, modify, sublicense, or distribute the Program
   2.206 +except as expressly provided under this License.  Any attempt
   2.207 +otherwise to copy, modify, sublicense or distribute the Program is
   2.208 +void, and will automatically terminate your rights under this License.
   2.209 +However, parties who have received copies, or rights, from you under
   2.210 +this License will not have their licenses terminated so long as such
   2.211 +parties remain in full compliance.
   2.212 +
   2.213 +  5. You are not required to accept this License, since you have not
   2.214 +signed it.  However, nothing else grants you permission to modify or
   2.215 +distribute the Program or its derivative works.  These actions are
   2.216 +prohibited by law if you do not accept this License.  Therefore, by
   2.217 +modifying or distributing the Program (or any work based on the
   2.218 +Program), you indicate your acceptance of this License to do so, and
   2.219 +all its terms and conditions for copying, distributing or modifying
   2.220 +the Program or works based on it.
   2.221 +
   2.222 +  6. Each time you redistribute the Program (or any work based on the
   2.223 +Program), the recipient automatically receives a license from the
   2.224 +original licensor to copy, distribute or modify the Program subject to
   2.225 +these terms and conditions.  You may not impose any further
   2.226 +restrictions on the recipients' exercise of the rights granted herein.
   2.227 +You are not responsible for enforcing compliance by third parties to
   2.228 +this License.
   2.229 +
   2.230 +  7. If, as a consequence of a court judgment or allegation of patent
   2.231 +infringement or for any other reason (not limited to patent issues),
   2.232 +conditions are imposed on you (whether by court order, agreement or
   2.233 +otherwise) that contradict the conditions of this License, they do not
   2.234 +excuse you from the conditions of this License.  If you cannot
   2.235 +distribute so as to satisfy simultaneously your obligations under this
   2.236 +License and any other pertinent obligations, then as a consequence you
   2.237 +may not distribute the Program at all.  For example, if a patent
   2.238 +license would not permit royalty-free redistribution of the Program by
   2.239 +all those who receive copies directly or indirectly through you, then
   2.240 +the only way you could satisfy both it and this License would be to
   2.241 +refrain entirely from distribution of the Program.
   2.242 +
   2.243 +If any portion of this section is held invalid or unenforceable under
   2.244 +any particular circumstance, the balance of the section is intended to
   2.245 +apply and the section as a whole is intended to apply in other
   2.246 +circumstances.
   2.247 +
   2.248 +It is not the purpose of this section to induce you to infringe any
   2.249 +patents or other property right claims or to contest validity of any
   2.250 +such claims; this section has the sole purpose of protecting the
   2.251 +integrity of the free software distribution system, which is
   2.252 +implemented by public license practices.  Many people have made
   2.253 +generous contributions to the wide range of software distributed
   2.254 +through that system in reliance on consistent application of that
   2.255 +system; it is up to the author/donor to decide if he or she is willing
   2.256 +to distribute software through any other system and a licensee cannot
   2.257 +impose that choice.
   2.258 +
   2.259 +This section is intended to make thoroughly clear what is believed to
   2.260 +be a consequence of the rest of this License.
   2.261 +
   2.262 +  8. If the distribution and/or use of the Program is restricted in
   2.263 +certain countries either by patents or by copyrighted interfaces, the
   2.264 +original copyright holder who places the Program under this License
   2.265 +may add an explicit geographical distribution limitation excluding
   2.266 +those countries, so that distribution is permitted only in or among
   2.267 +countries not thus excluded.  In such case, this License incorporates
   2.268 +the limitation as if written in the body of this License.
   2.269 +
   2.270 +  9. The Free Software Foundation may publish revised and/or new versions
   2.271 +of the General Public License from time to time.  Such new versions will
   2.272 +be similar in spirit to the present version, but may differ in detail to
   2.273 +address new problems or concerns.
   2.274 +
   2.275 +Each version is given a distinguishing version number.  If the Program
   2.276 +specifies a version number of this License which applies to it and "any
   2.277 +later version", you have the option of following the terms and conditions
   2.278 +either of that version or of any later version published by the Free
   2.279 +Software Foundation.  If the Program does not specify a version number of
   2.280 +this License, you may choose any version ever published by the Free Software
   2.281 +Foundation.
   2.282 +
   2.283 +  10. If you wish to incorporate parts of the Program into other free
   2.284 +programs whose distribution conditions are different, write to the author
   2.285 +to ask for permission.  For software which is copyrighted by the Free
   2.286 +Software Foundation, write to the Free Software Foundation; we sometimes
   2.287 +make exceptions for this.  Our decision will be guided by the two goals
   2.288 +of preserving the free status of all derivatives of our free software and
   2.289 +of promoting the sharing and reuse of software generally.
   2.290 +
   2.291 +			    NO WARRANTY
   2.292 +
   2.293 +  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
   2.294 +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
   2.295 +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
   2.296 +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
   2.297 +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
   2.298 +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
   2.299 +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
   2.300 +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
   2.301 +REPAIR OR CORRECTION.
   2.302 +
   2.303 +  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
   2.304 +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
   2.305 +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
   2.306 +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
   2.307 +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
   2.308 +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
   2.309 +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
   2.310 +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
   2.311 +POSSIBILITY OF SUCH DAMAGES.
   2.312 +
   2.313 +		     END OF TERMS AND CONDITIONS
   2.314 +
   2.315 +	    How to Apply These Terms to Your New Programs
   2.316 +
   2.317 +  If you develop a new program, and you want it to be of the greatest
   2.318 +possible use to the public, the best way to achieve this is to make it
   2.319 +free software which everyone can redistribute and change under these terms.
   2.320 +
   2.321 +  To do so, attach the following notices to the program.  It is safest
   2.322 +to attach them to the start of each source file to most effectively
   2.323 +convey the exclusion of warranty; and each file should have at least
   2.324 +the "copyright" line and a pointer to where the full notice is found.
   2.325 +
   2.326 +    <one line to give the program's name and a brief idea of what it does.>
   2.327 +    Copyright (C) <year>  <name of author>
   2.328 +
   2.329 +    This program is free software; you can redistribute it and/or modify
   2.330 +    it under the terms of the GNU General Public License as published by
   2.331 +    the Free Software Foundation; either version 2 of the License, or
   2.332 +    (at your option) any later version.
   2.333 +
   2.334 +    This program is distributed in the hope that it will be useful,
   2.335 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   2.336 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   2.337 +    GNU General Public License for more details.
   2.338 +
   2.339 +    You should have received a copy of the GNU General Public License
   2.340 +    along with this program; if not, write to the Free Software
   2.341 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   2.342 +
   2.343 +
   2.344 +Also add information on how to contact you by electronic and paper mail.
   2.345 +
   2.346 +If the program is interactive, make it output a short notice like this
   2.347 +when it starts in an interactive mode:
   2.348 +
   2.349 +    Gnomovision version 69, Copyright (C) year name of author
   2.350 +    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
   2.351 +    This is free software, and you are welcome to redistribute it
   2.352 +    under certain conditions; type `show c' for details.
   2.353 +
   2.354 +The hypothetical commands `show w' and `show c' should show the appropriate
   2.355 +parts of the General Public License.  Of course, the commands you use may
   2.356 +be called something other than `show w' and `show c'; they could even be
   2.357 +mouse-clicks or menu items--whatever suits your program.
   2.358 +
   2.359 +You should also get your employer (if you work as a programmer) or your
   2.360 +school, if any, to sign a "copyright disclaimer" for the program, if
   2.361 +necessary.  Here is a sample; alter the names:
   2.362 +
   2.363 +  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
   2.364 +  `Gnomovision' (which makes passes at compilers) written by James Hacker.
   2.365 +
   2.366 +  <signature of Ty Coon>, 1 April 1989
   2.367 +  Ty Coon, President of Vice
   2.368 +
   2.369 +This General Public License does not permit incorporating your program into
   2.370 +proprietary programs.  If your program is a subroutine library, you may
   2.371 +consider it more useful to permit linking proprietary applications with the
   2.372 +library.  If this is what you want to do, use the GNU Library General
   2.373 +Public License instead of this License.
     3.1 --- a/linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/hypervisor.c	Thu Oct 21 14:27:34 2004 +0000
     3.2 +++ b/linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/hypervisor.c	Fri Oct 22 00:11:28 2004 +0000
     3.3 @@ -4,6 +4,27 @@
     3.4   * Update page tables via the hypervisor.
     3.5   * 
     3.6   * Copyright (c) 2002-2004, K A Fraser
     3.7 + * 
     3.8 + * This file may be distributed separately from the Linux kernel, or
     3.9 + * incorporated into other software packages, subject to the following license:
    3.10 + * 
    3.11 + * Permission is hereby granted, free of charge, to any person obtaining a copy
    3.12 + * of this source file (the "Software"), to deal in the Software without
    3.13 + * restriction, including without limitation the rights to use, copy, modify,
    3.14 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
    3.15 + * and to permit persons to whom the Software is furnished to do so, subject to
    3.16 + * the following conditions:
    3.17 + * 
    3.18 + * The above copyright notice and this permission notice shall be included in
    3.19 + * all copies or substantial portions of the Software.
    3.20 + * 
    3.21 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    3.22 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    3.23 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    3.24 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    3.25 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    3.26 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
    3.27 + * IN THE SOFTWARE.
    3.28   */
    3.29  
    3.30  #include <linux/config.h>
     4.1 --- a/linux-2.6.8.1-xen-sparse/arch/xen/kernel/ctrl_if.c	Thu Oct 21 14:27:34 2004 +0000
     4.2 +++ b/linux-2.6.8.1-xen-sparse/arch/xen/kernel/ctrl_if.c	Fri Oct 22 00:11:28 2004 +0000
     4.3 @@ -4,6 +4,27 @@
     4.4   * Management functions for special interface to the domain controller.
     4.5   * 
     4.6   * Copyright (c) 2004, K A Fraser
     4.7 + * 
     4.8 + * This file may be distributed separately from the Linux kernel, or
     4.9 + * incorporated into other software packages, subject to the following license:
    4.10 + * 
    4.11 + * Permission is hereby granted, free of charge, to any person obtaining a copy
    4.12 + * of this source file (the "Software"), to deal in the Software without
    4.13 + * restriction, including without limitation the rights to use, copy, modify,
    4.14 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
    4.15 + * and to permit persons to whom the Software is furnished to do so, subject to
    4.16 + * the following conditions:
    4.17 + * 
    4.18 + * The above copyright notice and this permission notice shall be included in
    4.19 + * all copies or substantial portions of the Software.
    4.20 + * 
    4.21 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    4.22 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    4.23 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    4.24 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    4.25 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    4.26 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
    4.27 + * IN THE SOFTWARE.
    4.28   */
    4.29  
    4.30  #include <linux/config.h>
     5.1 --- a/linux-2.6.8.1-xen-sparse/arch/xen/kernel/evtchn.c	Thu Oct 21 14:27:34 2004 +0000
     5.2 +++ b/linux-2.6.8.1-xen-sparse/arch/xen/kernel/evtchn.c	Fri Oct 22 00:11:28 2004 +0000
     5.3 @@ -4,6 +4,27 @@
     5.4   * Communication via Xen event channels.
     5.5   * 
     5.6   * Copyright (c) 2002-2004, K A Fraser
     5.7 + * 
     5.8 + * This file may be distributed separately from the Linux kernel, or
     5.9 + * incorporated into other software packages, subject to the following license:
    5.10 + * 
    5.11 + * Permission is hereby granted, free of charge, to any person obtaining a copy
    5.12 + * of this source file (the "Software"), to deal in the Software without
    5.13 + * restriction, including without limitation the rights to use, copy, modify,
    5.14 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
    5.15 + * and to permit persons to whom the Software is furnished to do so, subject to
    5.16 + * the following conditions:
    5.17 + * 
    5.18 + * The above copyright notice and this permission notice shall be included in
    5.19 + * all copies or substantial portions of the Software.
    5.20 + * 
    5.21 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    5.22 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    5.23 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    5.24 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    5.25 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    5.26 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
    5.27 + * IN THE SOFTWARE.
    5.28   */
    5.29  
    5.30  #include <linux/config.h>
     6.1 --- a/linux-2.6.8.1-xen-sparse/drivers/xen/balloon/balloon.c	Thu Oct 21 14:27:34 2004 +0000
     6.2 +++ b/linux-2.6.8.1-xen-sparse/drivers/xen/balloon/balloon.c	Fri Oct 22 00:11:28 2004 +0000
     6.3 @@ -4,6 +4,27 @@
     6.4   * Xen balloon driver - enables returning/claiming memory to/from Xen.
     6.5   *
     6.6   * Copyright (c) 2003, B Dragovic
     6.7 + * 
     6.8 + * This file may be distributed separately from the Linux kernel, or
     6.9 + * incorporated into other software packages, subject to the following license:
    6.10 + * 
    6.11 + * Permission is hereby granted, free of charge, to any person obtaining a copy
    6.12 + * of this source file (the "Software"), to deal in the Software without
    6.13 + * restriction, including without limitation the rights to use, copy, modify,
    6.14 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
    6.15 + * and to permit persons to whom the Software is furnished to do so, subject to
    6.16 + * the following conditions:
    6.17 + * 
    6.18 + * The above copyright notice and this permission notice shall be included in
    6.19 + * all copies or substantial portions of the Software.
    6.20 + * 
    6.21 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    6.22 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    6.23 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    6.24 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    6.25 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    6.26 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
    6.27 + * IN THE SOFTWARE.
    6.28   */
    6.29  
    6.30  #include <linux/config.h>
    6.31 @@ -415,6 +436,8 @@ claim_new_pages(unsigned long num_pages)
    6.32  
    6.33  static int balloon_try_target(int target)
    6.34  {
    6.35 +    int change, reclaim;
    6.36 +
    6.37      if ( target < current_pages )
    6.38      {
    6.39          int change = inflate_balloon(current_pages-target);
    6.40 @@ -427,7 +450,7 @@ static int balloon_try_target(int target
    6.41      }
    6.42      else if ( target > current_pages )
    6.43      {
    6.44 -        int change, reclaim = min(target,most_seen_pages) - current_pages;
    6.45 +        reclaim = min((unsigned long)target,most_seen_pages) - current_pages;
    6.46  
    6.47          if ( reclaim )
    6.48          {
     7.1 --- a/linux-2.6.8.1-xen-sparse/drivers/xen/blkfront/blkfront.c	Thu Oct 21 14:27:34 2004 +0000
     7.2 +++ b/linux-2.6.8.1-xen-sparse/drivers/xen/blkfront/blkfront.c	Fri Oct 22 00:11:28 2004 +0000
     7.3 @@ -6,6 +6,27 @@
     7.4   * Copyright (c) 2003-2004, Keir Fraser & Steve Hand
     7.5   * Modifications by Mark A. Williamson are (c) Intel Research Cambridge
     7.6   * Copyright (c) 2004, Christian Limpach
     7.7 + * 
     7.8 + * This file may be distributed separately from the Linux kernel, or
     7.9 + * incorporated into other software packages, subject to the following license:
    7.10 + * 
    7.11 + * Permission is hereby granted, free of charge, to any person obtaining a copy
    7.12 + * of this source file (the "Software"), to deal in the Software without
    7.13 + * restriction, including without limitation the rights to use, copy, modify,
    7.14 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
    7.15 + * and to permit persons to whom the Software is furnished to do so, subject to
    7.16 + * the following conditions:
    7.17 + * 
    7.18 + * The above copyright notice and this permission notice shall be included in
    7.19 + * all copies or substantial portions of the Software.
    7.20 + * 
    7.21 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    7.22 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    7.23 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    7.24 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    7.25 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    7.26 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
    7.27 + * IN THE SOFTWARE.
    7.28   */
    7.29  
    7.30  #include <linux/version.h>
     8.1 --- a/linux-2.6.8.1-xen-sparse/drivers/xen/blkfront/block.h	Thu Oct 21 14:27:34 2004 +0000
     8.2 +++ b/linux-2.6.8.1-xen-sparse/drivers/xen/blkfront/block.h	Fri Oct 22 00:11:28 2004 +0000
     8.3 @@ -2,6 +2,31 @@
     8.4   * block.h
     8.5   * 
     8.6   * Shared definitions between all levels of XenLinux Virtual block devices.
     8.7 + * 
     8.8 + * Copyright (c) 2003-2004, Keir Fraser & Steve Hand
     8.9 + * Modifications by Mark A. Williamson are (c) Intel Research Cambridge
    8.10 + * Copyright (c) 2004, Christian Limpach
    8.11 + * 
    8.12 + * This file may be distributed separately from the Linux kernel, or
    8.13 + * incorporated into other software packages, subject to the following license:
    8.14 + * 
    8.15 + * Permission is hereby granted, free of charge, to any person obtaining a copy
    8.16 + * of this source file (the "Software"), to deal in the Software without
    8.17 + * restriction, including without limitation the rights to use, copy, modify,
    8.18 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
    8.19 + * and to permit persons to whom the Software is furnished to do so, subject to
    8.20 + * the following conditions:
    8.21 + * 
    8.22 + * The above copyright notice and this permission notice shall be included in
    8.23 + * all copies or substantial portions of the Software.
    8.24 + * 
    8.25 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    8.26 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    8.27 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    8.28 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    8.29 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    8.30 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
    8.31 + * IN THE SOFTWARE.
    8.32   */
    8.33  
    8.34  #ifndef __XEN_DRIVERS_BLOCK_H__
     9.1 --- a/linux-2.6.8.1-xen-sparse/drivers/xen/blkfront/vbd.c	Thu Oct 21 14:27:34 2004 +0000
     9.2 +++ b/linux-2.6.8.1-xen-sparse/drivers/xen/blkfront/vbd.c	Fri Oct 22 00:11:28 2004 +0000
     9.3 @@ -6,6 +6,27 @@
     9.4   * Copyright (c) 2003-2004, Keir Fraser & Steve Hand
     9.5   * Modifications by Mark A. Williamson are (c) Intel Research Cambridge
     9.6   * Copyright (c) 2004, Christian Limpach
     9.7 + * 
     9.8 + * This file may be distributed separately from the Linux kernel, or
     9.9 + * incorporated into other software packages, subject to the following license:
    9.10 + * 
    9.11 + * Permission is hereby granted, free of charge, to any person obtaining a copy
    9.12 + * of this source file (the "Software"), to deal in the Software without
    9.13 + * restriction, including without limitation the rights to use, copy, modify,
    9.14 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
    9.15 + * and to permit persons to whom the Software is furnished to do so, subject to
    9.16 + * the following conditions:
    9.17 + * 
    9.18 + * The above copyright notice and this permission notice shall be included in
    9.19 + * all copies or substantial portions of the Software.
    9.20 + * 
    9.21 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    9.22 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    9.23 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    9.24 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    9.25 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    9.26 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
    9.27 + * IN THE SOFTWARE.
    9.28   */
    9.29  
    9.30  #include "block.h"
    10.1 --- a/linux-2.6.8.1-xen-sparse/drivers/xen/console/console.c	Thu Oct 21 14:27:34 2004 +0000
    10.2 +++ b/linux-2.6.8.1-xen-sparse/drivers/xen/console/console.c	Fri Oct 22 00:11:28 2004 +0000
    10.3 @@ -4,6 +4,27 @@
    10.4   * Virtual console driver.
    10.5   * 
    10.6   * Copyright (c) 2002-2004, K A Fraser.
    10.7 + * 
    10.8 + * This file may be distributed separately from the Linux kernel, or
    10.9 + * incorporated into other software packages, subject to the following license:
   10.10 + * 
   10.11 + * Permission is hereby granted, free of charge, to any person obtaining a copy
   10.12 + * of this source file (the "Software"), to deal in the Software without
   10.13 + * restriction, including without limitation the rights to use, copy, modify,
   10.14 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
   10.15 + * and to permit persons to whom the Software is furnished to do so, subject to
   10.16 + * the following conditions:
   10.17 + * 
   10.18 + * The above copyright notice and this permission notice shall be included in
   10.19 + * all copies or substantial portions of the Software.
   10.20 + * 
   10.21 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   10.22 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   10.23 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   10.24 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   10.25 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
   10.26 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
   10.27 + * IN THE SOFTWARE.
   10.28   */
   10.29  
   10.30  #include <linux/config.h>
    11.1 --- a/linux-2.6.8.1-xen-sparse/drivers/xen/evtchn/evtchn.c	Thu Oct 21 14:27:34 2004 +0000
    11.2 +++ b/linux-2.6.8.1-xen-sparse/drivers/xen/evtchn/evtchn.c	Fri Oct 22 00:11:28 2004 +0000
    11.3 @@ -4,6 +4,27 @@
    11.4   * Xenolinux driver for receiving and demuxing event-channel signals.
    11.5   * 
    11.6   * Copyright (c) 2004, K A Fraser
    11.7 + * 
    11.8 + * This file may be distributed separately from the Linux kernel, or
    11.9 + * incorporated into other software packages, subject to the following license:
   11.10 + * 
   11.11 + * Permission is hereby granted, free of charge, to any person obtaining a copy
   11.12 + * of this source file (the "Software"), to deal in the Software without
   11.13 + * restriction, including without limitation the rights to use, copy, modify,
   11.14 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
   11.15 + * and to permit persons to whom the Software is furnished to do so, subject to
   11.16 + * the following conditions:
   11.17 + * 
   11.18 + * The above copyright notice and this permission notice shall be included in
   11.19 + * all copies or substantial portions of the Software.
   11.20 + * 
   11.21 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   11.22 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   11.23 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   11.24 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   11.25 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
   11.26 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
   11.27 + * IN THE SOFTWARE.
   11.28   */
   11.29  
   11.30  #include <linux/config.h>
    12.1 --- a/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c	Thu Oct 21 14:27:34 2004 +0000
    12.2 +++ b/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c	Fri Oct 22 00:11:28 2004 +0000
    12.3 @@ -2,6 +2,27 @@
    12.4   * Virtual network driver for conversing with remote driver backends.
    12.5   * 
    12.6   * Copyright (c) 2002-2004, K A Fraser
    12.7 + * 
    12.8 + * This file may be distributed separately from the Linux kernel, or
    12.9 + * incorporated into other software packages, subject to the following license:
   12.10 + * 
   12.11 + * Permission is hereby granted, free of charge, to any person obtaining a copy
   12.12 + * of this source file (the "Software"), to deal in the Software without
   12.13 + * restriction, including without limitation the rights to use, copy, modify,
   12.14 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
   12.15 + * and to permit persons to whom the Software is furnished to do so, subject to
   12.16 + * the following conditions:
   12.17 + * 
   12.18 + * The above copyright notice and this permission notice shall be included in
   12.19 + * all copies or substantial portions of the Software.
   12.20 + * 
   12.21 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   12.22 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   12.23 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   12.24 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   12.25 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
   12.26 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
   12.27 + * IN THE SOFTWARE.
   12.28   */
   12.29  
   12.30  #include <linux/config.h>
    13.1 --- a/linux-2.6.8.1-xen-sparse/include/asm-xen/ctrl_if.h	Thu Oct 21 14:27:34 2004 +0000
    13.2 +++ b/linux-2.6.8.1-xen-sparse/include/asm-xen/ctrl_if.h	Fri Oct 22 00:11:28 2004 +0000
    13.3 @@ -4,6 +4,27 @@
    13.4   * Management functions for special interface to the domain controller.
    13.5   * 
    13.6   * Copyright (c) 2004, K A Fraser
    13.7 + * 
    13.8 + * This file may be distributed separately from the Linux kernel, or
    13.9 + * incorporated into other software packages, subject to the following license:
   13.10 + * 
   13.11 + * Permission is hereby granted, free of charge, to any person obtaining a copy
   13.12 + * of this source file (the "Software"), to deal in the Software without
   13.13 + * restriction, including without limitation the rights to use, copy, modify,
   13.14 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
   13.15 + * and to permit persons to whom the Software is furnished to do so, subject to
   13.16 + * the following conditions:
   13.17 + * 
   13.18 + * The above copyright notice and this permission notice shall be included in
   13.19 + * all copies or substantial portions of the Software.
   13.20 + * 
   13.21 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   13.22 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   13.23 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   13.24 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   13.25 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
   13.26 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
   13.27 + * IN THE SOFTWARE.
   13.28   */
   13.29  
   13.30  #ifndef __ASM_XEN__CTRL_IF_H__
    14.1 --- a/linux-2.6.8.1-xen-sparse/include/asm-xen/evtchn.h	Thu Oct 21 14:27:34 2004 +0000
    14.2 +++ b/linux-2.6.8.1-xen-sparse/include/asm-xen/evtchn.h	Fri Oct 22 00:11:28 2004 +0000
    14.3 @@ -5,6 +5,27 @@
    14.4   * Also definitions for the device that demuxes notifications to userspace.
    14.5   * 
    14.6   * Copyright (c) 2004, K A Fraser
    14.7 + * 
    14.8 + * This file may be distributed separately from the Linux kernel, or
    14.9 + * incorporated into other software packages, subject to the following license:
   14.10 + * 
   14.11 + * Permission is hereby granted, free of charge, to any person obtaining a copy
   14.12 + * of this source file (the "Software"), to deal in the Software without
   14.13 + * restriction, including without limitation the rights to use, copy, modify,
   14.14 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
   14.15 + * and to permit persons to whom the Software is furnished to do so, subject to
   14.16 + * the following conditions:
   14.17 + * 
   14.18 + * The above copyright notice and this permission notice shall be included in
   14.19 + * all copies or substantial portions of the Software.
   14.20 + * 
   14.21 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   14.22 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   14.23 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   14.24 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   14.25 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
   14.26 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
   14.27 + * IN THE SOFTWARE.
   14.28   */
   14.29  
   14.30  #ifndef __ASM_EVTCHN_H__
    15.1 --- a/linux-2.6.8.1-xen-sparse/include/asm-xen/hypervisor.h	Thu Oct 21 14:27:34 2004 +0000
    15.2 +++ b/linux-2.6.8.1-xen-sparse/include/asm-xen/hypervisor.h	Fri Oct 22 00:11:28 2004 +0000
    15.3 @@ -4,6 +4,27 @@
    15.4   * Linux-specific hypervisor handling.
    15.5   * 
    15.6   * Copyright (c) 2002-2004, K A Fraser
    15.7 + * 
    15.8 + * This file may be distributed separately from the Linux kernel, or
    15.9 + * incorporated into other software packages, subject to the following license:
   15.10 + * 
   15.11 + * Permission is hereby granted, free of charge, to any person obtaining a copy
   15.12 + * of this source file (the "Software"), to deal in the Software without
   15.13 + * restriction, including without limitation the rights to use, copy, modify,
   15.14 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
   15.15 + * and to permit persons to whom the Software is furnished to do so, subject to
   15.16 + * the following conditions:
   15.17 + * 
   15.18 + * The above copyright notice and this permission notice shall be included in
   15.19 + * all copies or substantial portions of the Software.
   15.20 + * 
   15.21 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   15.22 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   15.23 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   15.24 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   15.25 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
   15.26 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
   15.27 + * IN THE SOFTWARE.
   15.28   */
   15.29  
   15.30  #ifndef __HYPERVISOR_H__
    16.1 --- a/linux-2.6.8.1-xen-sparse/include/asm-xen/multicall.h	Thu Oct 21 14:27:34 2004 +0000
    16.2 +++ b/linux-2.6.8.1-xen-sparse/include/asm-xen/multicall.h	Fri Oct 22 00:11:28 2004 +0000
    16.3 @@ -1,5 +1,28 @@
    16.4  /******************************************************************************
    16.5   * multicall.h
    16.6 + * 
    16.7 + * Copyright (c) 2003-2004, K A Fraser
    16.8 + * 
    16.9 + * This file may be distributed separately from the Linux kernel, or
   16.10 + * incorporated into other software packages, subject to the following license:
   16.11 + * 
   16.12 + * Permission is hereby granted, free of charge, to any person obtaining a copy
   16.13 + * of this source file (the "Software"), to deal in the Software without
   16.14 + * restriction, including without limitation the rights to use, copy, modify,
   16.15 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
   16.16 + * and to permit persons to whom the Software is furnished to do so, subject to
   16.17 + * the following conditions:
   16.18 + * 
   16.19 + * The above copyright notice and this permission notice shall be included in
   16.20 + * all copies or substantial portions of the Software.
   16.21 + * 
   16.22 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   16.23 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   16.24 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   16.25 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   16.26 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
   16.27 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
   16.28 + * IN THE SOFTWARE.
   16.29   */
   16.30  
   16.31  #ifndef __MULTICALL_H__
    17.1 --- a/linux-2.6.8.1-xen-sparse/include/asm-xen/suspend.h	Thu Oct 21 14:27:34 2004 +0000
    17.2 +++ b/linux-2.6.8.1-xen-sparse/include/asm-xen/suspend.h	Fri Oct 22 00:11:28 2004 +0000
    17.3 @@ -1,10 +1,28 @@
    17.4  /******************************************************************************
    17.5   * suspend.h
    17.6   * 
    17.7 - * NB. This file is part of the Xenolinux interface with Xenoserver control 
    17.8 - * software. It can be included in such software without invoking the GPL.
    17.9 + * Copyright (c) 2003-2004, K A Fraser
   17.10 + * 
   17.11 + * This file may be distributed separately from the Linux kernel, or
   17.12 + * incorporated into other software packages, subject to the following license:
   17.13   * 
   17.14 - * Copyright (c) 2003, K A Fraser
   17.15 + * Permission is hereby granted, free of charge, to any person obtaining a copy
   17.16 + * of this source file (the "Software"), to deal in the Software without
   17.17 + * restriction, including without limitation the rights to use, copy, modify,
   17.18 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
   17.19 + * and to permit persons to whom the Software is furnished to do so, subject to
   17.20 + * the following conditions:
   17.21 + * 
   17.22 + * The above copyright notice and this permission notice shall be included in
   17.23 + * all copies or substantial portions of the Software.
   17.24 + * 
   17.25 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   17.26 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   17.27 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   17.28 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   17.29 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
   17.30 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
   17.31 + * IN THE SOFTWARE.
   17.32   */
   17.33  
   17.34  #ifndef __ASM_XEN_SUSPEND_H__
    18.1 --- a/tools/libxc/xc.h	Thu Oct 21 14:27:34 2004 +0000
    18.2 +++ b/tools/libxc/xc.h	Fri Oct 22 00:11:28 2004 +0000
    18.3 @@ -31,8 +31,6 @@ typedef struct {
    18.4      unsigned long nr_pages;
    18.5      unsigned long shared_info_frame;
    18.6      u64           cpu_time;
    18.7 -#define XC_DOMINFO_MAXNAME 16
    18.8 -    char          name[XC_DOMINFO_MAXNAME];
    18.9      unsigned long max_memkb;
   18.10  } xc_dominfo_t;
   18.11  
   18.12 @@ -46,7 +44,6 @@ typedef struct xc_shadow_control_stats_s
   18.13  
   18.14  int xc_domain_create(int xc_handle, 
   18.15                       unsigned int mem_kb, 
   18.16 -                     const char *name,
   18.17                       int cpu,
   18.18                       float cpu_weight,
   18.19                       u32 *pdomid);
   18.20 @@ -193,10 +190,6 @@ int xc_physinfo(int xc_handle,
   18.21  int xc_sched_id(int xc_handle,
   18.22                  int *sched_id);
   18.23  
   18.24 -int xc_domain_setname(int xc_handle,
   18.25 -                      u32 domid, 
   18.26 -                      char *name);
   18.27 -
   18.28  int xc_domain_setinitialmem(int xc_handle,
   18.29                              u32 domid, 
   18.30                              unsigned int initial_memkb);
    19.1 --- a/tools/libxc/xc_domain.c	Thu Oct 21 14:27:34 2004 +0000
    19.2 +++ b/tools/libxc/xc_domain.c	Fri Oct 22 00:11:28 2004 +0000
    19.3 @@ -10,7 +10,6 @@
    19.4  
    19.5  int xc_domain_create(int xc_handle,
    19.6                       unsigned int mem_kb, 
    19.7 -                     const char *name,
    19.8                       int cpu,
    19.9                       float cpu_weight,
   19.10                       u32 *pdomid)
   19.11 @@ -21,8 +20,6 @@ int xc_domain_create(int xc_handle,
   19.12      op.cmd = DOM0_CREATEDOMAIN;
   19.13      op.u.createdomain.domain = (domid_t)*pdomid;
   19.14      op.u.createdomain.memory_kb = mem_kb;
   19.15 -    strncpy(op.u.createdomain.name, name, MAX_DOMAIN_NAME);
   19.16 -    op.u.createdomain.name[MAX_DOMAIN_NAME-1] = '\0';
   19.17      op.u.createdomain.cpu = cpu;
   19.18  
   19.19      if ( (err = do_dom0_op(xc_handle, &op)) == 0 )
   19.20 @@ -113,8 +110,6 @@ int xc_domain_getinfo(int xc_handle,
   19.21          info->max_memkb = op.u.getdomaininfo.max_pages<<(PAGE_SHIFT);
   19.22          info->shared_info_frame = op.u.getdomaininfo.shared_info_frame;
   19.23          info->cpu_time = op.u.getdomaininfo.cpu_time;
   19.24 -        strncpy(info->name, op.u.getdomaininfo.name, XC_DOMINFO_MAXNAME);
   19.25 -        info->name[XC_DOMINFO_MAXNAME-1] = '\0';
   19.26  
   19.27          next_domid = (u16)op.u.getdomaininfo.domain + 1;
   19.28          info++;
   19.29 @@ -165,17 +160,6 @@ int xc_shadow_control(int xc_handle,
   19.30      return (rc == 0) ? op.u.shadow_control.pages : rc;
   19.31  }
   19.32  
   19.33 -int xc_domain_setname(int xc_handle,
   19.34 -                      u32 domid, 
   19.35 -                      char *name)
   19.36 -{
   19.37 -    dom0_op_t op;
   19.38 -    op.cmd = DOM0_SETDOMAINNAME;
   19.39 -    op.u.setdomainname.domain = (domid_t)domid;
   19.40 -    strncpy(op.u.setdomainname.name, name, MAX_DOMAIN_NAME);
   19.41 -    return do_dom0_op(xc_handle, &op);
   19.42 -}
   19.43 -
   19.44  int xc_domain_setcpuweight(int xc_handle,
   19.45                             u32 domid,
   19.46                             float weight)
    20.1 --- a/tools/libxc/xc_io.h	Thu Oct 21 14:27:34 2004 +0000
    20.2 +++ b/tools/libxc/xc_io.h	Fri Oct 22 00:11:28 2004 +0000
    20.3 @@ -8,6 +8,7 @@
    20.4  typedef struct XcIOContext {
    20.5      u32 domain;
    20.6      unsigned flags;
    20.7 +    int resource;
    20.8      IOStream *io;
    20.9      IOStream *info;
   20.10      IOStream *err;
    21.1 --- a/tools/libxc/xc_linux_restore.c	Thu Oct 21 14:27:34 2004 +0000
    21.2 +++ b/tools/libxc/xc_linux_restore.c	Fri Oct 22 00:11:28 2004 +0000
    21.3 @@ -102,9 +102,6 @@ int xc_linux_restore(int xc_handle, XcIO
    21.4      /* First 16 bytes of the state file must contain 'LinuxGuestRecord'. */
    21.5      char signature[16];
    21.6      
    21.7 -    /* A copy of the domain's name. */
    21.8 -    char name[MAX_DOMAIN_NAME];
    21.9 -
   21.10      /* A table containg the type of each PFN (/not/ MFN!). */
   21.11      unsigned long *pfn_type = NULL;
   21.12  
   21.13 @@ -149,8 +146,7 @@ int xc_linux_restore(int xc_handle, XcIO
   21.14          goto out;
   21.15      }
   21.16  
   21.17 -    if ( xcio_read(ioctxt, name,                  sizeof(name)) ||
   21.18 -         xcio_read(ioctxt, &nr_pfns,              sizeof(unsigned long)) ||
   21.19 +    if ( xcio_read(ioctxt, &nr_pfns,              sizeof(unsigned long)) ||
   21.20           xcio_read(ioctxt, pfn_to_mfn_frame_list, PAGE_SIZE) )
   21.21      {
   21.22          xcio_error(ioctxt, "Error reading header");
   21.23 @@ -163,17 +159,6 @@ int xc_linux_restore(int xc_handle, XcIO
   21.24          goto out;
   21.25      }
   21.26  
   21.27 -    for ( i = 0; i < MAX_DOMAIN_NAME; i++ ) 
   21.28 -    {
   21.29 -        if ( name[i] == '\0' ) break;
   21.30 -        if ( name[i] & 0x80 )
   21.31 -        {
   21.32 -            xcio_error(ioctxt, "Random characters in domain name");
   21.33 -            goto out;
   21.34 -        }
   21.35 -    }
   21.36 -    name[MAX_DOMAIN_NAME-1] = '\0';
   21.37 -
   21.38      if ( nr_pfns > 1024*1024 )
   21.39      {
   21.40          xcio_error(ioctxt, "Invalid state file -- pfn count out of range");
   21.41 @@ -199,30 +184,9 @@ int xc_linux_restore(int xc_handle, XcIO
   21.42          goto out;
   21.43      }
   21.44  
   21.45 -#if 0
   21.46 -    /* Set the domain's name to that from the restore file */
   21.47 -    if ( xc_domain_setname( xc_handle, dom, name ) )
   21.48 -    {
   21.49 -        xcio_error(ioctxt, "Could not set domain name");
   21.50 -        goto out;
   21.51 -    }
   21.52 -
   21.53 -    /* Set the domain's initial memory allocation 
   21.54 -       to that from the restore file */
   21.55 -
   21.56 -    if ( xc_domain_setinitialmem(xc_handle, dom, 
   21.57 -                                 nr_pfns * (PAGE_SIZE / 1024)) )
   21.58 -    {
   21.59 -        xcio_error(ioctxt, "Could not set domain %d initial memory. pfns=%d, %dKB",
   21.60 -		   dom, nr_pfns,nr_pfns * (PAGE_SIZE / 1024));
   21.61 -        goto out;
   21.62 -    }
   21.63 -#endif
   21.64 -
   21.65 -
   21.66 -    /* XXX create domain on CPU=-1 so that in future it auto load ballances by default */
   21.67 -    if ( xc_domain_create( xc_handle,  nr_pfns * (PAGE_SIZE / 1024),
   21.68 -			   "", -1, 1, &dom ) )
   21.69 +    /* Create domain on CPU -1 so that it may auto load-balance in future. */
   21.70 +    if ( xc_domain_create(xc_handle, nr_pfns * (PAGE_SIZE / 1024),
   21.71 +                          -1, 1, &dom) )
   21.72      {
   21.73  	xcio_error(ioctxt, "Could not create domain. pfns=%d, %dKB",
   21.74  		   nr_pfns,nr_pfns * (PAGE_SIZE / 1024));
    22.1 --- a/tools/libxc/xc_linux_save.c	Thu Oct 21 14:27:34 2004 +0000
    22.2 +++ b/tools/libxc/xc_linux_save.c	Fri Oct 22 00:11:28 2004 +0000
    22.3 @@ -303,9 +303,6 @@ int xc_linux_save(int xc_handle, XcIOCon
    22.4      /* A copy of the CPU context of the guest. */
    22.5      full_execution_context_t ctxt;
    22.6  
    22.7 -    /* A copy of the domain's name. */
    22.8 -    char name[MAX_DOMAIN_NAME];
    22.9 -
   22.10      /* A table containg the type of each PFN (/not/ MFN!). */
   22.11      unsigned long *pfn_type = NULL;
   22.12      unsigned long *pfn_batch = NULL;
   22.13 @@ -359,7 +356,6 @@ int xc_linux_save(int xc_handle, XcIOCon
   22.14          xcio_error(ioctxt, "Could not get full domain info");
   22.15          goto out;
   22.16      }
   22.17 -    memcpy(name, op.u.getdomaininfo.name, sizeof(name));
   22.18      shared_info_frame = op.u.getdomaininfo.shared_info_frame;
   22.19  
   22.20      /* A cheesy test to see whether the domain contains valid state. */
   22.21 @@ -539,7 +535,6 @@ int xc_linux_save(int xc_handle, XcIOCon
   22.22      /* Start writing out the saved-domain record. */
   22.23  
   22.24      if ( xcio_write(ioctxt, "LinuxGuestRecord",    16) ||
   22.25 -         xcio_write(ioctxt, name,                  sizeof(name)) ||
   22.26           xcio_write(ioctxt, &nr_pfns,              sizeof(unsigned long)) ||
   22.27           xcio_write(ioctxt, pfn_to_mfn_frame_list, PAGE_SIZE) ){
   22.28          xcio_error(ioctxt, "Error writing header");
    23.1 --- a/tools/python/xen/lowlevel/xc/xc.c	Thu Oct 21 14:27:34 2004 +0000
    23.2 +++ b/tools/python/xen/lowlevel/xc/xc.c	Fri Oct 22 00:11:28 2004 +0000
    23.3 @@ -42,21 +42,19 @@ static PyObject *pyxc_domain_create(PyOb
    23.4      XcObject *xc = (XcObject *)self;
    23.5  
    23.6      unsigned int mem_kb = 0;
    23.7 -    char        *name   = "(anon)";
    23.8      int          cpu = -1;
    23.9      float        cpu_weight = 1;
   23.10      u32          dom = 0;
   23.11      int          ret;
   23.12  
   23.13 -    static char *kwd_list[] = { "dom", "mem_kb", "name", 
   23.14 -                                "cpu", "cpu_weight", NULL };
   23.15 +    static char *kwd_list[] = { "dom", "mem_kb", "cpu", "cpu_weight", NULL };
   23.16  
   23.17 -    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "|iisif", kwd_list, 
   23.18 -                                      &dom, &mem_kb, &name, &cpu, &cpu_weight))
   23.19 +    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "|iiif", kwd_list, 
   23.20 +                                      &dom, &mem_kb, &cpu, &cpu_weight))
   23.21          return NULL;
   23.22  
   23.23      if ( (ret = xc_domain_create(
   23.24 -                    xc->xc_handle, mem_kb, name, cpu, cpu_weight, &dom)) < 0 )
   23.25 +                    xc->xc_handle, mem_kb, cpu, cpu_weight, &dom)) < 0 )
   23.26          return PyErr_SetFromErrno(xc_error);
   23.27  
   23.28      return PyInt_FromLong(dom);
   23.29 @@ -172,7 +170,7 @@ static PyObject *pyxc_domain_getinfo(PyO
   23.30          PyList_SetItem(
   23.31              list, i, 
   23.32              Py_BuildValue("{s:i,s:i,s:i,s:i,s:i,s:i,s:i,s:i"
   23.33 -                          ",s:l,s:L,s:s,s:l,s:i}",
   23.34 +                          ",s:l,s:L,s:l,s:i}",
   23.35                            "dom",       info[i].domid,
   23.36                            "cpu",       info[i].cpu,
   23.37                            "dying",     info[i].dying,
   23.38 @@ -183,7 +181,6 @@ static PyObject *pyxc_domain_getinfo(PyO
   23.39                            "running",   info[i].running,
   23.40                            "mem_kb",    info[i].nr_pages*4,
   23.41                            "cpu_time",  info[i].cpu_time,
   23.42 -                          "name",      info[i].name,
   23.43                            "maxmem_kb", info[i].max_memkb,
   23.44                            "shutdown_reason", info[i].shutdown_reason
   23.45                  ));
   23.46 @@ -779,27 +776,6 @@ static PyObject *pyxc_rrobin_global_get(
   23.47      return Py_BuildValue("{s:L}", "slice", slice);
   23.48  }
   23.49  
   23.50 -static PyObject *pyxc_domain_setname(PyObject *self,
   23.51 -                                     PyObject *args,
   23.52 -                                     PyObject *kwds)
   23.53 -{
   23.54 -    XcObject *xc = (XcObject *)self;
   23.55 -    u32 dom;
   23.56 -    char *name;
   23.57 -
   23.58 -    static char *kwd_list[] = { "dom", "name", NULL };
   23.59 -
   23.60 -    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "is", kwd_list, 
   23.61 -                                      &dom, &name) )
   23.62 -        return NULL;
   23.63 -
   23.64 -    if ( xc_domain_setname(xc->xc_handle, dom, name) != 0 )
   23.65 -        return PyErr_SetFromErrno(xc_error);
   23.66 -    
   23.67 -    Py_INCREF(zero);
   23.68 -    return zero;
   23.69 -}
   23.70 -
   23.71  static PyObject *pyxc_domain_setmaxmem(PyObject *self,
   23.72                                         PyObject *args,
   23.73                                         PyObject *kwds)
   23.74 @@ -830,7 +806,6 @@ static PyMethodDef pyxc_methods[] = {
   23.75        "Create a new domain.\n"
   23.76        " dom    [int, 0]:        Domain identifier to use (allocated if zero).\n"
   23.77        " mem_kb [int, 0]:        Memory allocation, in kilobytes.\n"
   23.78 -      " name   [str, '(anon)']: Informative textual name.\n\n"
   23.79        "Returns: [int] new domain identifier; -1 on error.\n" },
   23.80  
   23.81      { "domain_pause", 
   23.82 @@ -883,7 +858,6 @@ static PyMethodDef pyxc_methods[] = {
   23.83        " mem_kb   [int]:  Memory reservation, in kilobytes\n"
   23.84        " maxmem_kb [int]: Maximum memory limit, in kilobytes\n"
   23.85        " cpu_time [long]: CPU time consumed, in nanoseconds\n"
   23.86 -      " name     [str]:  Identifying name\n"
   23.87        " shutdown_reason [int]: Numeric code from guest OS, explaining "
   23.88        "reason why it shut itself down.\n" },
   23.89  
   23.90 @@ -1071,14 +1045,6 @@ static PyMethodDef pyxc_methods[] = {
   23.91        " op [int, 0]: operation\n\n"
   23.92        "Returns: [int] 0 on success; -1 on error.\n" },
   23.93  
   23.94 -    { "domain_setname", 
   23.95 -      (PyCFunction)pyxc_domain_setname, 
   23.96 -      METH_VARARGS | METH_KEYWORDS, "\n"
   23.97 -      "Set domain informative textual name\n"
   23.98 -      " dom [int]:  Identifier of domain.\n"
   23.99 -      " name [str]: Text string.\n\n"
  23.100 -      "Returns: [int] 0 on success; -1 on error.\n" },
  23.101 -
  23.102      { "domain_setmaxmem", 
  23.103        (PyCFunction)pyxc_domain_setmaxmem, 
  23.104        METH_VARARGS | METH_KEYWORDS, "\n"
    24.1 --- a/tools/python/xen/xend/XendClient.py	Thu Oct 21 14:27:34 2004 +0000
    24.2 +++ b/tools/python/xen/xend/XendClient.py	Fri Oct 22 00:11:28 2004 +0000
    24.3 @@ -239,11 +239,12 @@ class Xend:
    24.4                               {'op'      : 'save',
    24.5                                'file'    : filename })
    24.6  
    24.7 -    def xend_domain_migrate(self, id, dst, live=0):
    24.8 +    def xend_domain_migrate(self, id, dst, live=0, resource=0):
    24.9          return self.xendPost(self.domainurl(id),
   24.10                               {'op'         : 'migrate',
   24.11                                'destination': dst,
   24.12 -                              'live'       : live })
   24.13 +                              'live'       : live,
   24.14 +                              'resource'   : resource })
   24.15  
   24.16      def xend_domain_pincpu(self, id, cpu):
   24.17          return self.xendPost(self.domainurl(id),
    25.1 --- a/tools/python/xen/xend/XendDomain.py	Thu Oct 21 14:27:34 2004 +0000
    25.2 +++ b/tools/python/xen/xend/XendDomain.py	Fri Oct 22 00:11:28 2004 +0000
    25.3 @@ -355,15 +355,6 @@ class XendDomain:
    25.4          deferred.addCallback(cbok)
    25.5          return deferred
    25.6  
    25.7 -    def domain_setname(self, dom, name):
    25.8 -        """Set the name of a domain.
    25.9 -        For internal use only.
   25.10 -
   25.11 -        @param dom: domain id
   25.12 -        @param name: domain name
   25.13 -        """
   25.14 -        return xc.domain_setname(dom=dom, name=name)
   25.15 -
   25.16      def domain_restart(self, dominfo):
   25.17          """Restart a domain.
   25.18  
   25.19 @@ -594,7 +585,7 @@ class XendDomain:
   25.20          self.refresh_schedule()
   25.21          return val
   25.22  
   25.23 -    def domain_migrate(self, id, dst, live):
   25.24 +    def domain_migrate(self, id, dst, live=0, resource=0):
   25.25          """Start domain migration.
   25.26  
   25.27          @param id: domain id
   25.28 @@ -604,7 +595,7 @@ class XendDomain:
   25.29          # Don't forget to cancel restart for it.
   25.30          dominfo = self.domain_lookup(id)
   25.31          xmigrate = XendMigrate.instance()
   25.32 -        val = xmigrate.migrate_begin(dominfo, dst, live=live)
   25.33 +        val = xmigrate.migrate_begin(dominfo, dst, live=live, resource=resource)
   25.34          return val
   25.35  
   25.36      def domain_save(self, id, dst, progress=0):
    26.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Thu Oct 21 14:27:34 2004 +0000
    26.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Fri Oct 22 00:11:28 2004 +0000
    26.3 @@ -33,8 +33,6 @@ xend = server.SrvDaemon.instance()
    26.4  
    26.5  from XendError import VmError
    26.6  
    26.7 -from server.blkif import blkdev_name_to_number
    26.8 -
    26.9  """The length of domain names that Xen can handle.
   26.10  The names stored in Xen itself are not used for much, and
   26.11  xend can handle domain names of any length.
   26.12 @@ -92,24 +90,6 @@ def shutdown_reason(code):
   26.13      """
   26.14      return shutdown_reasons.get(code, "?")
   26.15  
   26.16 -def make_disk(vm, config, uname, dev, mode, recreate=0):
   26.17 -    """Create a virtual disk device for a domain.
   26.18 -
   26.19 -    @param vm:       vm
   26.20 -    @param uname:    device to export
   26.21 -    @param dev:      device name in domain
   26.22 -    @param mode:     read/write mode
   26.23 -    @param recreate: recreate flag (after xend restart)
   26.24 -    @return: deferred
   26.25 -    """
   26.26 -    idx = vm.next_device_index('vbd')
   26.27 -    # todo: The 'dev' should be looked up in the context of the domain.
   26.28 -    vdev = blkdev_name_to_number(dev)
   26.29 -    if not vdev:
   26.30 -        raise VmError("vbd: Device not found: uname=%s dev=%s" % (uname, dev))
   26.31 -    ctrl = xend.blkif_create(vm.dom, recreate=recreate)
   26.32 -    return ctrl.attachDevice(idx, config, uname, vdev, mode, recreate=recreate)
   26.33 -        
   26.34  def vif_up(iplist):
   26.35      """send an unsolicited ARP reply for all non link-local IP addresses.
   26.36  
   26.37 @@ -222,6 +202,7 @@ def vm_recreate(savedinfo, info):
   26.38      """
   26.39      vm = XendDomainInfo()
   26.40      vm.recreate = 1
   26.41 +    vm.savedinfo = savedinfo
   26.42      vm.setdom(info['dom'])
   26.43      #vm.name = info['name']
   26.44      vm.memory = info['mem_kb']/1024
   26.45 @@ -236,9 +217,10 @@ def vm_recreate(savedinfo, info):
   26.46      if config:
   26.47          d = vm.construct(config)
   26.48      else:
   26.49 -        vm.name = info['name']
   26.50 +        vm.name = sxp.child_value(savedinfo, 'name', "Domain-%d" % info['dom'])
   26.51          d = defer.succeed(vm)
   26.52      vm.recreate = 0
   26.53 +    vm.savedinfo = None
   26.54      return d
   26.55  
   26.56  def vm_restore(src, progress=0):
   26.57 @@ -288,6 +270,18 @@ def append_deferred(dlist, v):
   26.58      if isinstance(v, defer.Deferred):
   26.59          dlist.append(v)
   26.60  
   26.61 +def dlist_err(val):
   26.62 +    """Error callback suitable for a deferred list.
   26.63 +    In a deferred list the error callback is called with with Failure((error, index)).
   26.64 +    This callback extracts the error and returns it.
   26.65 +
   26.66 +    @param val: Failure containing (error, index)
   26.67 +    @type val: twisted.internet.failure.Failure 
   26.68 +    """
   26.69 +    
   26.70 +    (error, index) = val.value
   26.71 +    return error
   26.72 +
   26.73  class XendDomainInfo:
   26.74      """Virtual machine object."""
   26.75  
   26.76 @@ -324,6 +318,7 @@ class XendDomainInfo:
   26.77          self.restart_state = None
   26.78          self.restart_time = None
   26.79          self.console_port = None
   26.80 +        self.savedinfo = None
   26.81  
   26.82      def setdom(self, dom):
   26.83          """Set the domain id.
   26.84 @@ -385,10 +380,21 @@ class XendDomainInfo:
   26.85              sxpr.append(['restart_state', self.restart_state])
   26.86          if self.restart_time:
   26.87              sxpr.append(['restart_time', str(self.restart_time)])
   26.88 +        devs = self.sxpr_devices()
   26.89 +        if devs:
   26.90 +            sxpr.append(devs)
   26.91          if self.config:
   26.92              sxpr.append(['config', self.config])
   26.93          return sxpr
   26.94  
   26.95 +    def sxpr_devices(self):
   26.96 +        sxpr = ['devices']
   26.97 +        for devs in self.devices.values():
   26.98 +            for dev in devs:
   26.99 +                if hasattr(dev, 'sxpr'):
  26.100 +                    sxpr.append(dev.sxpr())
  26.101 +        return sxpr
  26.102 +
  26.103      def check_name(self, name):
  26.104          """Check if a vm name is valid. Valid names start with a non-digit
  26.105          and contain alphabetic characters, digits, or characters in '_-.:/+'.
  26.106 @@ -434,8 +440,6 @@ class XendDomainInfo:
  26.107                  self.cpu_weight = float(sxp.child_value(config, 'cpu_weight', '1'))
  26.108              except:
  26.109                  raise VmError('invalid cpu weight')
  26.110 -            if self.restore and self.dom:
  26.111 -                xc.domain_setname(self.dom, self.name)
  26.112              self.memory = int(sxp.child_value(config, 'memory'))
  26.113              if self.memory is None:
  26.114                  raise VmError('missing memory size')
  26.115 @@ -574,6 +578,25 @@ class XendDomainInfo:
  26.116                  return d
  26.117          return None
  26.118  
  26.119 +    def get_device_savedinfo(self, type, index):
  26.120 +        val = None
  26.121 +        if self.savedinfo is None:
  26.122 +            return val
  26.123 +        index = str(index)
  26.124 +        devinfo = sxp.child(self.savedinfo, 'devices')
  26.125 +        if devinfo is None:
  26.126 +            return val
  26.127 +        for d in sxp.children(devinfo, type):
  26.128 +            dindex = sxp.child_value(d, 'index')
  26.129 +            if dindex is None: continue
  26.130 +            if str(dindex) == index:
  26.131 +                val = d
  26.132 +                break
  26.133 +        return val
  26.134 +
  26.135 +    def get_device_recreate(self, type, index):
  26.136 +        return self.get_device_savedinfo(type, index) or self.recreate
  26.137 +
  26.138      def add_config(self, val):
  26.139          """Add configuration data to a virtual machine.
  26.140  
  26.141 @@ -690,7 +713,7 @@ class XendDomainInfo:
  26.142              raise VmError('invalid cpu')
  26.143          cpu_weight = self.cpu_weight
  26.144          dom = xc.domain_create(dom= dom, mem_kb= memory * 1024,
  26.145 -                               name= name, cpu= cpu, cpu_weight= cpu_weight)
  26.146 +                               cpu= cpu, cpu_weight= cpu_weight)
  26.147          if dom <= 0:
  26.148              raise VmError('Creating domain failed: name=%s memory=%d'
  26.149                            % (name, memory))
  26.150 @@ -701,6 +724,10 @@ class XendDomainInfo:
  26.151          """Build the domain boot image.
  26.152          """
  26.153          if self.recreate or self.restore: return
  26.154 +        if not os.path.isfile(kernel):
  26.155 +            raise VmError('Kernel image does not exist: %s' % kernel)
  26.156 +        if ramdisk and not os.path.isfile(ramdisk):
  26.157 +            raise VmError('Kernel ramdisk does not exist: %s' % ramdisk)
  26.158          if len(cmdline) >= 256:
  26.159              log.warning('kernel cmdline too long, domain %d', self.dom)
  26.160          dom = self.dom
  26.161 @@ -726,11 +753,6 @@ class XendDomainInfo:
  26.162          @param ramdisk: kernel ramdisk
  26.163          @param cmdline: kernel commandline
  26.164          """
  26.165 -        if not self.recreate:
  26.166 -            if not os.path.isfile(kernel):
  26.167 -                raise VmError('Kernel image does not exist: %s' % kernel)
  26.168 -            if ramdisk and not os.path.isfile(ramdisk):
  26.169 -                raise VmError('Kernel ramdisk does not exist: %s' % ramdisk)
  26.170          #self.init_domain()
  26.171          if self.console:
  26.172              self.console.registerChannel()
  26.173 @@ -763,6 +785,7 @@ class XendDomainInfo:
  26.174              append_deferred(dlist, v)
  26.175              index[dev_name] = dev_index + 1
  26.176          deferred = defer.DeferredList(dlist, fireOnOneErrback=1)
  26.177 +        deferred.addErrback(dlist_err)
  26.178          return deferred
  26.179  
  26.180      def device_create(self, dev_config):
  26.181 @@ -828,7 +851,7 @@ class XendDomainInfo:
  26.182      def configure_memory(self):
  26.183          """Configure vm memory limit.
  26.184          """
  26.185 -        maxmem = sxp.get_child_value(self.config, "maxmem")
  26.186 +        maxmem = sxp.child_value(self.config, "maxmem")
  26.187          if maxmem is None:
  26.188              maxmem = self.memory
  26.189          xc.domain_setmaxmem(self.dom, maxmem_kb = maxmem * 1024)
  26.190 @@ -994,6 +1017,7 @@ class XendDomainInfo:
  26.191                  log.warning("Unknown config field %s", field_name)
  26.192              index[field_name] = field_index + 1
  26.193          d = defer.DeferredList(dlist, fireOnOneErrback=1)
  26.194 +        d.addErrback(dlist_err)
  26.195          return d
  26.196  
  26.197  
  26.198 @@ -1007,7 +1031,7 @@ def vm_image_linux(vm, image):
  26.199      """
  26.200      kernel = sxp.child_value(image, "kernel")
  26.201      cmdline = ""
  26.202 -    ip = sxp.child_value(image, "ip", "dhcp")
  26.203 +    ip = sxp.child_value(image, "ip", None)
  26.204      if ip:
  26.205          cmdline += " ip=" + ip
  26.206      root = sxp.child_value(image, "root")
  26.207 @@ -1020,31 +1044,6 @@ def vm_image_linux(vm, image):
  26.208      vm.create_domain("linux", kernel, ramdisk, cmdline)
  26.209      return vm
  26.210  
  26.211 -def vm_image_netbsd(vm, image):
  26.212 -    """Create a VM for a bsd image.
  26.213 -
  26.214 -    @param name:     vm name
  26.215 -    @param memory:    vm memory
  26.216 -    @param image:     image config
  26.217 -    @return: vm
  26.218 -    """
  26.219 -    #todo: Same as for linux. Is that right? If so can unify them.
  26.220 -    kernel = sxp.child_value(image, "kernel")
  26.221 -    cmdline = ""
  26.222 -    ip = sxp.child_value(image, "ip", "dhcp")
  26.223 -    if ip:
  26.224 -        cmdline += "ip=" + ip
  26.225 -    root = sxp.child_value(image, "root")
  26.226 -    if root:
  26.227 -        cmdline += "root=" + root
  26.228 -    args = sxp.child_value(image, "args")
  26.229 -    if args:
  26.230 -        cmdline += " " + args
  26.231 -    ramdisk = sxp.child_value(image, "ramdisk", '')
  26.232 -    vm.create_domain("netbsd", kernel, ramdisk, cmdline)
  26.233 -    return vm
  26.234 -
  26.235 -
  26.236  def vm_dev_vif(vm, val, index, change=0):
  26.237      """Create a virtual network interface (vif).
  26.238  
  26.239 @@ -1057,9 +1056,11 @@ def vm_dev_vif(vm, val, index, change=0)
  26.240      vmac = sxp.child_value(val, "mac")
  26.241      ctrl = xend.netif_create(vm.dom, recreate=vm.recreate)
  26.242      log.debug("Creating vif dom=%d vif=%d mac=%s", vm.dom, vif, str(vmac))
  26.243 -    defer = ctrl.attachDevice(vif, val, recreate=vm.recreate)
  26.244 +    recreate = vm.get_device_recreate('vif', index)
  26.245 +    defer = ctrl.attachDevice(vif, val, recreate=recreate)
  26.246      def cbok(dev):
  26.247          dev.vifctl('up', vmname=vm.name)
  26.248 +        dev.setIndex(index)
  26.249          vm.add_device('vif', dev)
  26.250          if change:
  26.251              dev.interfaceChanged()
  26.252 @@ -1075,23 +1076,19 @@ def vm_dev_vbd(vm, val, index, change=0)
  26.253      @param index:     vbd index
  26.254      @return: deferred
  26.255      """
  26.256 +    idx = vm.next_device_index('vbd')
  26.257      uname = sxp.child_value(val, 'uname')
  26.258 -    if not uname:
  26.259 -        raise VmError('vbd: Missing uname')
  26.260 -    dev = sxp.child_value(val, 'dev')
  26.261 -    if not dev:
  26.262 -        raise VmError('vbd: Missing dev')
  26.263 -    mode = sxp.child_value(val, 'mode', 'r')
  26.264 -    log.debug("Creating vbd dom=%d uname=%s dev=%s", vm.dom, uname, dev)
  26.265 -    defer = make_disk(vm, val, uname, dev, mode, vm.recreate)
  26.266 -    def fn(vbd):
  26.267 -        vbd.dev = dev
  26.268 -        vbd.uname = uname
  26.269 -        vm.add_device('vbd', vbd)
  26.270 +    log.debug("Creating vbd dom=%d uname=%s", vm.dom, uname)
  26.271 +    ctrl = xend.blkif_create(vm.dom, recreate=vm.recreate)
  26.272 +    recreate = vm.get_device_recreate('vbd', index)
  26.273 +    defer = ctrl.attachDevice(idx, val, recreate=recreate)
  26.274 +    def cbok(dev):
  26.275 +        dev.setIndex(index)
  26.276 +        vm.add_device('vbd', dev)
  26.277          if change:
  26.278 -            vbd.interfaceChanged()
  26.279 -        return vbd
  26.280 -    defer.addCallback(fn)
  26.281 +            dev.interfaceChanged()
  26.282 +        return dev
  26.283 +    defer.addCallback(cbok)
  26.284      return defer
  26.285  
  26.286  def parse_pci(val):
  26.287 @@ -1168,7 +1165,6 @@ def vm_field_maxmem(vm, config, val, ind
  26.288  
  26.289  # Register image handlers.
  26.290  add_image_handler('linux',  vm_image_linux)
  26.291 -add_image_handler('netbsd', vm_image_netbsd)
  26.292  
  26.293  # Register device handlers.
  26.294  add_device_handler('vif',  vm_dev_vif)
    27.1 --- a/tools/python/xen/xend/XendMigrate.py	Thu Oct 21 14:27:34 2004 +0000
    27.2 +++ b/tools/python/xen/xend/XendMigrate.py	Fri Oct 22 00:11:28 2004 +0000
    27.3 @@ -260,7 +260,7 @@ class XendMigrateInfo(XfrdInfo):
    27.4      """Representation of a migrate in-progress and its interaction with xfrd.
    27.5      """
    27.6  
    27.7 -    def __init__(self, xid, dominfo, host, port, live):
    27.8 +    def __init__(self, xid, dominfo, host, port, live=0, resource=0):
    27.9          XfrdInfo.__init__(self)
   27.10          self.xid = xid
   27.11          self.dominfo = dominfo
   27.12 @@ -271,13 +271,15 @@ class XendMigrateInfo(XfrdInfo):
   27.13          self.dst_port = port
   27.14          self.dst_dom = None
   27.15          self.live = live
   27.16 +        self.resource = resource
   27.17          self.start = 0
   27.18          
   27.19      def sxpr(self):
   27.20          sxpr = ['migrate',
   27.21                  ['id',    self.xid   ],
   27.22                  ['state', self.state ],
   27.23 -                ['live',  self.live  ] ]
   27.24 +                ['live',  self.live  ],
   27.25 +                ['resource', self.resource] ]
   27.26          sxpr_src = ['src', ['host', self.src_host], ['domain', self.src_dom] ]
   27.27          sxpr.append(sxpr_src)
   27.28          sxpr_dst = ['dst', ['host', self.dst_host] ]
   27.29 @@ -300,7 +302,8 @@ class XendMigrateInfo(XfrdInfo):
   27.30                        vmconfig,
   27.31                        self.dst_host,
   27.32                        self.dst_port,
   27.33 -                      self.live ])
   27.34 +                      self.live,
   27.35 +                      self.resource ])
   27.36          
   27.37  ##     def xfr_vm_suspend(self, xfrd, val):
   27.38  ##         def cbok(val):
   27.39 @@ -490,7 +493,7 @@ class XendMigrate:
   27.40          reactor.connectTCP('localhost', XFRD_PORT, xcf)
   27.41          return info.deferred
   27.42      
   27.43 -    def migrate_begin(self, dominfo, host, port=XFRD_PORT, live=0):
   27.44 +    def migrate_begin(self, dominfo, host, port=XFRD_PORT, live=0, resource=0):
   27.45          """Begin to migrate a domain to another host.
   27.46  
   27.47          @param dominfo:  domain info
   27.48 @@ -499,7 +502,7 @@ class XendMigrate:
   27.49          @return: deferred
   27.50          """
   27.51          xid = self.nextid()
   27.52 -        info = XendMigrateInfo(xid, dominfo, host, port, live)
   27.53 +        info = XendMigrateInfo(xid, dominfo, host, port, live, resource)
   27.54          return self.session_begin(info)
   27.55  
   27.56      def save_begin(self, dominfo, file):
    28.1 --- a/tools/python/xen/xend/server/SrvDomain.py	Thu Oct 21 14:27:34 2004 +0000
    28.2 +++ b/tools/python/xen/xend/server/SrvDomain.py	Fri Oct 22 00:11:28 2004 +0000
    28.3 @@ -81,7 +81,8 @@ class SrvDomain(SrvDir):
    28.4          fn = FormFn(self.xd.domain_migrate,
    28.5                      [['dom', 'str'],
    28.6                       ['destination', 'str'],
    28.7 -                     ['live', 'int']])
    28.8 +                     ['live', 'int'],
    28.9 +                     ['resource', 'int']])
   28.10          deferred = fn(req.args, {'dom': self.dom.id})
   28.11          print 'op_migrate>', deferred
   28.12          deferred.addCallback(self._op_migrate_cb, req)
    29.1 --- a/tools/python/xen/xend/server/SrvDomainDir.py	Thu Oct 21 14:27:34 2004 +0000
    29.2 +++ b/tools/python/xen/xend/server/SrvDomainDir.py	Fri Oct 22 00:11:28 2004 +0000
    29.3 @@ -5,6 +5,7 @@ from StringIO import StringIO
    29.4  
    29.5  from twisted.protocols import http
    29.6  from twisted.web import error
    29.7 +from twisted.python.failure import Failure
    29.8  
    29.9  from xen.xend import sxp
   29.10  from xen.xend import XendDomain
   29.11 @@ -94,7 +95,10 @@ class SrvDomainDir(SrvDir):
   29.12      def _op_create_err(self, err, req):
   29.13          """Callback to handle errors in deferred domain creation.
   29.14          """
   29.15 +        if isinstance(err, Failure):
   29.16 +            err = err.getErrorMessage()
   29.17          print 'op_create> Deferred Exception creating domain:', err
   29.18 +        traceback.print_exc()
   29.19          req.setResponseCode(http.BAD_REQUEST, "Error creating domain: " + str(err))
   29.20          return str(err)
   29.21  
   29.22 @@ -127,6 +131,8 @@ class SrvDomainDir(SrvDir):
   29.23              return val
   29.24  
   29.25      def _op_restore_err(self, err, req):
   29.26 +        if isinstance(err, Failure):
   29.27 +            err = err.getErrorMessage()
   29.28          print 'op_create> Deferred Exception restoring domain:', err
   29.29          req.setResponseCode(http.BAD_REQUEST, "Error restoring domain: "+ str(err))
   29.30          return str(err)
    30.1 --- a/tools/python/xen/xend/server/blkif.py	Thu Oct 21 14:27:34 2004 +0000
    30.2 +++ b/tools/python/xen/xend/server/blkif.py	Fri Oct 22 00:11:28 2004 +0000
    30.3 @@ -16,6 +16,46 @@ import channel
    30.4  import controller
    30.5  from messages import *
    30.6  
    30.7 +
    30.8 +def blkdev_name_to_number(name):
    30.9 +    """Take the given textual block-device name (e.g., '/dev/sda1',
   30.10 +    'hda') and return the device number used by the OS. """
   30.11 +
   30.12 +    if re.match( '^/dev/', name ):
   30.13 +	n = name
   30.14 +    else:
   30.15 +	n = '/dev/' + name
   30.16 +    
   30.17 +    try:
   30.18 +	return os.stat(n).st_rdev
   30.19 +    except Exception, ex:
   30.20 +        log.debug("exception looking up device number for %s: %s", name, ex)
   30.21 +	pass
   30.22 +
   30.23 +    # see if this is a hex device number
   30.24 +    if re.match( '^(0x)?[0-9a-fA-F]+$', name ):
   30.25 +	return string.atoi(name,16)
   30.26 +	
   30.27 +    return None
   30.28 +
   30.29 +def blkdev_segment(name):
   30.30 +    """Take the given block-device name (e.g. '/dev/sda1', 'hda')
   30.31 +    and return a dictionary { device, start_sector,
   30.32 +    nr_sectors, type }
   30.33 +        device:       Device number of the given partition
   30.34 +        start_sector: Index of first sector of the partition
   30.35 +        nr_sectors:   Number of sectors comprising this partition
   30.36 +        type:         'Disk' or identifying name for partition type
   30.37 +    """
   30.38 +    val = None
   30.39 +    n = blkdev_name_to_number(name)
   30.40 +    if n:
   30.41 +	val = { 'device' : n,
   30.42 +                'start_sector' : long(0),
   30.43 +                'nr_sectors' : long(1L<<63),
   30.44 +                'type' : 'Disk' }
   30.45 +    return val
   30.46 +
   30.47  class BlkifBackendController(controller.BackendController):
   30.48      """ Handler for the 'back-end' channel to a block device driver domain.
   30.49      """
   30.50 @@ -231,26 +271,70 @@ class BlkDev(controller.SplitDev):
   30.51      """Info record for a block device.
   30.52      """
   30.53  
   30.54 -    def __init__(self, idx, ctrl, config, vdev, mode, segment):
   30.55 +    def __init__(self, idx, ctrl, config):
   30.56          controller.SplitDev.__init__(self, idx, ctrl)
   30.57 -        self.config = config
   30.58          self.dev = None
   30.59          self.uname = None
   30.60 -        self.vdev = vdev
   30.61 -        self.mode = mode
   30.62 -        self.device = segment['device']
   30.63 -        self.start_sector = segment['start_sector']
   30.64 -        self.nr_sectors = segment['nr_sectors']
   30.65 +        self.vdev = None
   30.66 +        self.mode = None
   30.67 +        self.type = None
   30.68 +        self.params = None
   30.69 +        self.node = None
   30.70 +        self.device = None
   30.71 +        self.start_sector = None
   30.72 +        self.nr_sectors = None
   30.73 +        self.configure(config)
   30.74 +
   30.75 +    def configure(self, config):
   30.76 +        self.config = config
   30.77 +        self.uname = sxp.child_value(config, 'uname')
   30.78 +        if not self.uname:
   30.79 +            raise VmError('vbd: Missing uname')
   30.80 +        # Split into type and type-specific params (which are passed to the
   30.81 +        # type-specific control script).
   30.82 +        (self.type, self.params) = string.split(self.uname, ':', 1)
   30.83 +        self.dev = sxp.child_value(config, 'dev')
   30.84 +        if not self.dev:
   30.85 +            raise VmError('vbd: Missing dev')
   30.86 +        self.mode = sxp.child_value(config, 'mode', 'r')
   30.87 +        # todo: The 'dev' should be looked up in the context of the domain.
   30.88 +        self.vdev = blkdev_name_to_number(self.dev)
   30.89 +        if not self.vdev:
   30.90 +            raise VmError('vbd: Device not found: %s' % self.dev)
   30.91          try:
   30.92              self.backendDomain = int(sxp.child_value(config, 'backend', '0'))
   30.93          except:
   30.94              raise XendError('invalid backend domain')
   30.95  
   30.96 +    def recreate(self, savedinfo):
   30.97 +        node = sxp.child_value(savedinfo, 'node')
   30.98 +        self.setNode(node)
   30.99 +
  30.100 +    def attach(self):
  30.101 +        node = Blkctl.block('bind', self.type, self.params)
  30.102 +        self.setNode(node)
  30.103 +        return self.attachBackend()
  30.104 +
  30.105 +    def unbind(self):
  30.106 +        if self.node is None: return
  30.107 +        log.debug("Unbinding vbd (type %s) from %s"
  30.108 +                  % (self.type, self.node))
  30.109 +        Blkctl.block('unbind', self.type, self.node)
  30.110 +
  30.111 +    def setNode(self, node):
  30.112 +        segment = blkdev_segment(node)
  30.113 +        if not segment:
  30.114 +            raise VmError("vbd: Segment not found: uname=%s" % self.uname)
  30.115 +        self.node = node
  30.116 +        self.device = segment['device']
  30.117 +        self.start_sector = segment['start_sector']
  30.118 +        self.nr_sectors = segment['nr_sectors']
  30.119 +
  30.120      def readonly(self):
  30.121          return 'w' not in self.mode
  30.122  
  30.123      def sxpr(self):
  30.124 -        val = ['blkdev',
  30.125 +        val = ['vbd',
  30.126                 ['idx', self.idx],
  30.127                 ['vdev', self.vdev],
  30.128                 ['device', self.device],
  30.129 @@ -259,13 +343,12 @@ class BlkDev(controller.SplitDev):
  30.130              val.append(['dev', self.dev])
  30.131          if self.uname:
  30.132              val.append(['uname', self.uname])
  30.133 +        if self.node:
  30.134 +            val.append(['node', self.node])
  30.135 +        if self.index is not None:
  30.136 +            val.append(['index', self.index])
  30.137          return val
  30.138  
  30.139 -    def unbind(self):
  30.140 -        log.debug("Unbinding block dev (type %s) from %s"
  30.141 -                  % (self.type, self.node))
  30.142 -        Blkctl.block('unbind', self.type, self.node)
  30.143 -
  30.144      def destroy(self, change=0):
  30.145          """Destroy the device. If 'change' is true notify the front-end interface.
  30.146  
  30.147 @@ -283,7 +366,7 @@ class BlkDev(controller.SplitDev):
  30.148          """
  30.149          self.getBackendInterface().interfaceChanged()
  30.150  
  30.151 -    def attach(self):
  30.152 +    def attachBackend(self):
  30.153          """Attach the device to its controller.
  30.154  
  30.155          """
  30.156 @@ -340,8 +423,8 @@ class BlkDev(controller.SplitDev):
  30.157          val = unpackMsg('blkif_be_vbd_grow_t', msg)
  30.158  	status = val['status']
  30.159  	if status != BLKIF_BE_STATUS_OKAY:
  30.160 -            raise XendError("Adding extent to vbd failed: device %d, error %d"
  30.161 -                            % (self.vdev, status))
  30.162 +            raise XendError("Adding extent to vbd failed: device %s, error %d"
  30.163 +                            % (sxp.to_string(self.config), status))
  30.164          return self
  30.165  
  30.166      def send_be_vbd_destroy(self):
  30.167 @@ -356,46 +439,6 @@ class BlkDev(controller.SplitDev):
  30.168          return d
  30.169          
  30.170  
  30.171 -def blkdev_name_to_number(name):
  30.172 -    """Take the given textual block-device name (e.g., '/dev/sda1',
  30.173 -    'hda') and return the device number used by the OS. """
  30.174 -
  30.175 -    if not re.match( '^/dev/', name ):
  30.176 -	n = '/dev/' + name
  30.177 -    else:
  30.178 -	n = name
  30.179 -    
  30.180 -    try:
  30.181 -	return os.stat(n).st_rdev
  30.182 -    except Exception, e:
  30.183 -        print "blkdev_name_to_number> exception looking up device number for %s: %s" % (name, e)
  30.184 -	pass
  30.185 -
  30.186 -    # see if this is a hex device number
  30.187 -    if re.match( '^(0x)?[0-9a-fA-F]+$', name ):
  30.188 -	return string.atoi(name,16)
  30.189 -	
  30.190 -    return None
  30.191 -
  30.192 -def lookup_raw_partn(name):
  30.193 -    """Take the given block-device name (e.g., '/dev/sda1', 'hda')
  30.194 -    and return a dictionary { device, start_sector,
  30.195 -    nr_sectors, type }
  30.196 -        device:       Device number of the given partition
  30.197 -        start_sector: Index of first sector of the partition
  30.198 -        nr_sectors:   Number of sectors comprising this partition
  30.199 -        type:         'Disk' or identifying name for partition type
  30.200 -    """
  30.201 -
  30.202 -    n = blkdev_name_to_number(name)
  30.203 -    if n:
  30.204 -	return [ { 'device' : n,
  30.205 -		   'start_sector' : long(0),
  30.206 -		   'nr_sectors' : long(1L<<63),
  30.207 -		   'type' : 'Disk' } ]
  30.208 -    else:
  30.209 -	return None
  30.210 -
  30.211  class BlkifController(controller.SplitController):
  30.212      """Block device interface controller. Handles all block devices
  30.213      for a domain.
  30.214 @@ -418,65 +461,37 @@ class BlkifController(controller.SplitCo
  30.215          val = ['blkif', ['dom', self.dom]]
  30.216          return val
  30.217  
  30.218 -    def addDevice(self, idx, config, vdev, mode, segment):
  30.219 +    def addDevice(self, idx, config):
  30.220          """Add a device to the device table.
  30.221  
  30.222          @param vdev:     device index
  30.223          @type  vdev:     int
  30.224 -        @param mode:     read/write mode
  30.225 -        @type  mode:     string
  30.226 -        @param segment:  segment
  30.227 -        @type  segment:  int
  30.228 +        @param config: device configuration
  30.229          @return: device
  30.230          @rtype:  BlkDev
  30.231          """
  30.232          if idx in self.devices:
  30.233              raise XendError('device exists: ' + str(idx))
  30.234 -        dev = BlkDev(idx, self, config, vdev, mode, segment)
  30.235 +        dev = BlkDev(idx, self, config )
  30.236          self.devices[idx] = dev
  30.237          return dev
  30.238  
  30.239 -    def attachDevice(self, idx, config, uname, vdev, mode, recreate=0):
  30.240 +    def attachDevice(self, idx, config, recreate=0):
  30.241          """Attach a device to the specified interface.
  30.242          On success the returned deferred will be called with the device.
  30.243  
  30.244          @param idx:      device id
  30.245          @param config:   device configuration
  30.246 -        @param vdev:     device index
  30.247 -        @type  vdev:     int
  30.248 -        @param mode:     read/write mode
  30.249 -        @type  mode:     string
  30.250 -        @param segment:  segment
  30.251 -        @type  segment:  int
  30.252          @param recreate: if true it's being recreated (after xend restart)
  30.253          @type  recreate: bool
  30.254          @return: deferred
  30.255          @rtype:  Deferred
  30.256          """
  30.257 -        if not recreate:
  30.258 -            # Split into type and type-specific details (which are passed to the
  30.259 -            # type-specific control script).
  30.260 -            type, dets = string.split(uname, ':', 1)
  30.261 -            # Special case: don't bother calling a script for phy.  Could
  30.262 -            # alternatively provide a "do nothing" script for phy devices...
  30.263 -            node = Blkctl.block('bind', type, dets)
  30.264 -
  30.265 -        segments = lookup_raw_partn(node)
  30.266 -
  30.267 -        if not segments:
  30.268 -            raise VmError("vbd: Segments not found: uname=%s" % uname)
  30.269 -        if len(segments) > 1:
  30.270 -            raise VmError("vbd: Multi-segment vdisk: uname=%s" % uname)
  30.271 -
  30.272 -        segment = segments[0]            
  30.273 -
  30.274 -        dev = self.addDevice(idx, config, vdev, mode, segment)
  30.275 -            
  30.276 +        dev = self.addDevice(idx, config)
  30.277          if recreate:
  30.278 +            dev.recreate(recreate)
  30.279              d = defer.succeed(dev)
  30.280          else:
  30.281 -            dev.node = node
  30.282 -            dev.type = type
  30.283              d = dev.attach()
  30.284          return d
  30.285  
    31.1 --- a/tools/python/xen/xend/server/controller.py	Thu Oct 21 14:27:34 2004 +0000
    31.2 +++ b/tools/python/xen/xend/server/controller.py	Fri Oct 22 00:11:28 2004 +0000
    31.3 @@ -682,10 +682,17 @@ class SplitDev(Dev):
    31.4      def __init__(self, idx, controller):
    31.5          Dev.__init__(self, idx, controller)
    31.6          self.backendDomain = 0
    31.7 +        self.index = None
    31.8  
    31.9      def getBackendInterface(self):
   31.10          return self.controller.getBackendInterface(self.backendDomain)
   31.11  
   31.12 +    def getIndex(self):
   31.13 +        return self.index
   31.14 +
   31.15 +    def setIndex(self, index):
   31.16 +        self.index = index
   31.17 +
   31.18  
   31.19  
   31.20      
    32.1 --- a/tools/python/xen/xend/server/netif.py	Thu Oct 21 14:27:34 2004 +0000
    32.2 +++ b/tools/python/xen/xend/server/netif.py	Fri Oct 22 00:11:28 2004 +0000
    32.3 @@ -198,6 +198,8 @@ class NetDev(controller.SplitDev):
    32.4              val.append(['evtchn',
    32.5                          self.evtchn['port1'],
    32.6                          self.evtchn['port2']])
    32.7 +        if self.index is not None:
    32.8 +            val.append(['index', self.index])
    32.9          return val
   32.10  
   32.11      def get_vifname(self):
    33.1 --- a/tools/python/xen/xm/migrate.py	Thu Oct 21 14:27:34 2004 +0000
    33.2 +++ b/tools/python/xen/xm/migrate.py	Fri Oct 22 00:11:28 2004 +0000
    33.3 @@ -26,6 +26,10 @@ gopts.opt('live', short='l',
    33.4            fn=set_true, default=0,
    33.5            use="Use live migration.")
    33.6  
    33.7 +gopts.opt('resource', short='r',
    33.8 +          fn=set_int, default=0,
    33.9 +          use="Set level of resource usage for migration.")
   33.10 +
   33.11  def help(argv):
   33.12      gopts.argv = argv
   33.13      gopts.usage()
   33.14 @@ -42,5 +46,5 @@ def main(argv):
   33.15      dst = args[1]
   33.16      if dom in [DOM0_NAME, DOM0_ID]:
   33.17          opts.err('Cannot migrate ' + dom)
   33.18 -    server.xend_domain_migrate(dom, dst, opts.vals.live)
   33.19 +    server.xend_domain_migrate(dom, dst, opts.vals.live, opts.vals.resource)
   33.20          
    34.1 --- a/tools/xfrd/xen_domain.c	Thu Oct 21 14:27:34 2004 +0000
    34.2 +++ b/tools/xfrd/xen_domain.c	Fri Oct 22 00:11:28 2004 +0000
    34.3 @@ -60,7 +60,7 @@ void xcfini(void){
    34.4  int xen_domain_snd(Conn *xend, IOStream *io,
    34.5                     uint32_t dom,
    34.6                     char *vmconfig, int vmconfig_n,
    34.7 -                   int live){
    34.8 +                   int live, int resource){
    34.9      int err = 0;
   34.10  #ifdef _XEN_XFR_STUB_
   34.11      char buf[1024];
   34.12 @@ -99,6 +99,7 @@ int xen_domain_snd(Conn *xend, IOStream 
   34.13      if(live){
   34.14          ioctxt->flags |= XCFLAGS_LIVE;
   34.15      }
   34.16 +    ioctxt->resource = resource;
   34.17      err = xc_linux_save(xcinit(), ioctxt);
   34.18  #endif   
   34.19      dprintf("< err=%d\n", err);
    35.1 --- a/tools/xfrd/xen_domain.h	Thu Oct 21 14:27:34 2004 +0000
    35.2 +++ b/tools/xfrd/xen_domain.h	Fri Oct 22 00:11:28 2004 +0000
    35.3 @@ -10,7 +10,7 @@
    35.4  extern int xen_domain_snd(Conn *xend, IOStream *io,
    35.5                            uint32_t dom,
    35.6                            char *vmconfig, int vmconfig_n,
    35.7 -                          int live);
    35.8 +                          int live, int resource);
    35.9  extern int xen_domain_rcv(IOStream *io,
   35.10                            uint32_t *dom,
   35.11                            char **vmconfig, int *vmconfig_n,
    36.1 --- a/tools/xfrd/xfrd.c	Thu Oct 21 14:27:34 2004 +0000
    36.2 +++ b/tools/xfrd/xfrd.c	Fri Oct 22 00:11:28 2004 +0000
    36.3 @@ -96,7 +96,7 @@ receiver:
    36.4  Sxpr oxfr_configure; // (xfr.configure <vmid> <vmconfig>)
    36.5  Sxpr oxfr_err;       // (xfr.err <code>)
    36.6  Sxpr oxfr_hello;     // (xfr.hello <major> <minor>)
    36.7 -Sxpr oxfr_migrate;   // (xfr.migrate <vmid> <vmconfig> <host> <port> <live>)
    36.8 +Sxpr oxfr_migrate;   // (xfr.migrate <vmid> <vmconfig> <host> <port> <live> <resource>)
    36.9  Sxpr oxfr_migrate_ok;// (xfr.migrate.ok <value>)
   36.10  Sxpr oxfr_progress;  // (xfr.progress <percent> <rate: kb/s>)
   36.11  Sxpr oxfr_restore;   // (xfr.restore <file>)
   36.12 @@ -241,6 +241,7 @@ typedef struct XfrState {
   36.13      char *xfr_host;
   36.14      uint32_t vmid_new;
   36.15      int live;
   36.16 +    int resource;
   36.17  } XfrState;
   36.18  
   36.19  /** Get the name of a transfer state.
   36.20 @@ -623,7 +624,7 @@ int xfr_send_state(XfrState *state, Conn
   36.21      err = xen_domain_snd(xend, peer->out,
   36.22                           state->vmid,
   36.23                           state->vmconfig, state->vmconfig_n,
   36.24 -                         state->live);
   36.25 +                         state->live, state->resource);
   36.26      dprintf(">*** Sent domain %u\n", state->vmid);
   36.27      if(err) goto exit;
   36.28      // Sending the domain suspends it, and there's no way back.
   36.29 @@ -771,7 +772,7 @@ int xfr_save(Args *args, XfrState *state
   36.30      err = xen_domain_snd(xend, io,
   36.31                           state->vmid,
   36.32                           state->vmconfig, state->vmconfig_n,
   36.33 -                         0);
   36.34 +                         0, 0);
   36.35      if(err){
   36.36          err = xfr_error(xend, err);
   36.37      } else {
   36.38 @@ -926,6 +927,8 @@ int xfrd_service(Args *args, int peersoc
   36.39          if(err) goto exit;
   36.40          err = intof(sxpr_childN(sxpr, n++, ONONE), &state->live);
   36.41          if(err) goto exit;
   36.42 +        err = intof(sxpr_childN(sxpr, n++, ONONE), &state->resource);
   36.43 +        if(err) goto exit;
   36.44          err = xfr_send(args, state, conn, addr, port);
   36.45  
   36.46      } else if(sxpr_elementp(sxpr, oxfr_save)){
    37.1 --- a/xen/arch/x86/setup.c	Thu Oct 21 14:27:34 2004 +0000
    37.2 +++ b/xen/arch/x86/setup.c	Fri Oct 22 00:11:28 2004 +0000
    37.3 @@ -23,7 +23,7 @@ extern void time_init(void);
    37.4  extern void ac_timer_init(void);
    37.5  extern void initialize_keytable();
    37.6  extern int opt_nosmp, opt_watchdog, opt_noacpi;
    37.7 -extern int opt_ignorebiostables, opt_noht;
    37.8 +extern int opt_ignorebiostables;
    37.9  extern int do_timer_lists_from_pit;
   37.10  
   37.11  char ignore_irq13;		/* set if exception 16 works */
   37.12 @@ -116,12 +116,6 @@ static void __init init_intel(struct cpu
   37.13      if ( c->x86 == 6 && c->x86_model < 3 && c->x86_mask < 3 )
   37.14          clear_bit(X86_FEATURE_SEP, &c->x86_capability);
   37.15  
   37.16 -    if ( opt_noht )
   37.17 -    {
   37.18 -        opt_noacpi = 1; /* Virtual CPUs only appear in ACPI tables. */
   37.19 -        clear_bit(X86_FEATURE_HT, &c->x86_capability[0]);
   37.20 -    }
   37.21 -
   37.22  #ifdef CONFIG_SMP
   37.23      if ( test_bit(X86_FEATURE_HT, &c->x86_capability) )
   37.24      {
   37.25 @@ -129,8 +123,11 @@ static void __init init_intel(struct cpu
   37.26          int     initial_apic_id, siblings, cpu = smp_processor_id();
   37.27          
   37.28          cpuid(1, &eax, &ebx, &ecx, &edx);
   37.29 -        siblings = (ebx & 0xff0000) >> 16;
   37.30 -        
   37.31 +        ht_per_core = siblings = (ebx & 0xff0000) >> 16;
   37.32 +
   37.33 +        if ( opt_noht )
   37.34 +            clear_bit(X86_FEATURE_HT, &c->x86_capability[0]);
   37.35 +
   37.36          if ( siblings <= 1 )
   37.37          {
   37.38              printk(KERN_INFO  "CPU#%d: Hyper-Threading is disabled\n", cpu);
    38.1 --- a/xen/arch/x86/smpboot.c	Thu Oct 21 14:27:34 2004 +0000
    38.2 +++ b/xen/arch/x86/smpboot.c	Fri Oct 22 00:11:28 2004 +0000
    38.3 @@ -57,6 +57,9 @@ static int max_cpus = -1;
    38.4  /* Total count of live CPUs */
    38.5  int smp_num_cpus = 1;
    38.6  
    38.7 +/* Number of hyperthreads per core */
    38.8 +int ht_per_core = 1;
    38.9 +
   38.10  /* Bitmask of currently online CPUs */
   38.11  unsigned long cpu_online_map;
   38.12  
   38.13 @@ -868,6 +871,12 @@ void __init smp_boot_cpus(void)
   38.14          if (apicid == boot_cpu_apicid)
   38.15              continue;
   38.16  
   38.17 +        /* 
   38.18 +         * Don't start hyperthreads if option noht requested.
   38.19 +         */
   38.20 +        if (opt_noht && (apicid & (ht_per_core - 1)))
   38.21 +            continue;
   38.22 +
   38.23          if (!(phys_cpu_present_map & (1 << bit)))
   38.24              continue;
   38.25          if ((max_cpus >= 0) && (max_cpus <= cpucount+1))
    39.1 --- a/xen/common/dom0_ops.c	Thu Oct 21 14:27:34 2004 +0000
    39.2 +++ b/xen/common/dom0_ops.c	Fri Oct 22 00:11:28 2004 +0000
    39.3 @@ -42,9 +42,10 @@ static inline int is_free_domid(domid_t 
    39.4      return 0;
    39.5  }
    39.6  
    39.7 -/** Allocate a free domain id. We try to reuse domain ids in a fairly low range,
    39.8 - * only expanding the range when there are no free domain ids. This is to
    39.9 - * keep domain ids in a range depending on the number that exist simultaneously,
   39.10 +/*
   39.11 + * Allocate a free domain id. We try to reuse domain ids in a fairly low range,
   39.12 + * only expanding the range when there are no free domain ids. This is to keep 
   39.13 + * domain ids in a range depending on the number that exist simultaneously,
   39.14   * rather than incrementing domain ids in the full 32-bit range.
   39.15   */
   39.16  static int allocate_domid(domid_t *pdom)
   39.17 @@ -208,12 +209,6 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
   39.18          if ( (d = do_createdomain(dom, pro)) == NULL )
   39.19              break;
   39.20  
   39.21 -        if ( op->u.createdomain.name[0] )
   39.22 -        {
   39.23 -            strncpy(d->name, op->u.createdomain.name, MAX_DOMAIN_NAME);
   39.24 -            d->name[MAX_DOMAIN_NAME - 1] = '\0';
   39.25 -        }
   39.26 -
   39.27          ret = alloc_new_dom_mem(d, op->u.createdomain.memory_kb);
   39.28          if ( ret != 0 ) 
   39.29          {
   39.30 @@ -359,7 +354,6 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
   39.31          read_unlock_irqrestore(&tasklist_lock, flags);
   39.32  
   39.33          op->u.getdomaininfo.domain = d->domain;
   39.34 -        strcpy(op->u.getdomaininfo.name, d->name);
   39.35          
   39.36          op->u.getdomaininfo.flags =
   39.37              (test_bit(DF_DYING,     &d->flags) ? DOMFLAGS_DYING    : 0) |
   39.38 @@ -504,16 +498,9 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
   39.39  
   39.40      case DOM0_PHYSINFO:
   39.41      {
   39.42 -        extern int phys_proc_id[];
   39.43 -
   39.44          dom0_physinfo_t *pi = &op->u.physinfo;
   39.45  
   39.46 -        int old_id = phys_proc_id[0];
   39.47 -        int ht = 0;
   39.48 -
   39.49 -        while( ( ht < smp_num_cpus ) && ( phys_proc_id[ht] == old_id ) ) ht++;
   39.50 -
   39.51 -        pi->ht_per_core = ht;
   39.52 +        pi->ht_per_core = opt_noht ? 1 : ht_per_core;
   39.53          pi->cores       = smp_num_cpus / pi->ht_per_core;
   39.54          pi->total_pages = max_page;
   39.55          pi->free_pages  = avail_domheap_pages();
   39.56 @@ -543,20 +530,6 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
   39.57      }
   39.58      break;
   39.59  
   39.60 -    case DOM0_SETDOMAINNAME:
   39.61 -    {
   39.62 -        struct domain *d; 
   39.63 -        ret = -ESRCH;
   39.64 -        d = find_domain_by_id( op->u.setdomainname.domain );
   39.65 -        if ( d != NULL )
   39.66 -        {
   39.67 -            strncpy(d->name, op->u.setdomainname.name, MAX_DOMAIN_NAME);
   39.68 -            put_domain(d);
   39.69 -            ret = 0;
   39.70 -        }
   39.71 -    }
   39.72 -    break;
   39.73 -
   39.74      case DOM0_SETDOMAININITIALMEM:
   39.75      {
   39.76          struct domain *d; 
    40.1 --- a/xen/common/domain.c	Thu Oct 21 14:27:34 2004 +0000
    40.2 +++ b/xen/common/domain.c	Fri Oct 22 00:11:28 2004 +0000
    40.3 @@ -24,7 +24,6 @@ struct domain *task_list;
    40.4  
    40.5  struct domain *do_createdomain(domid_t dom_id, unsigned int cpu)
    40.6  {
    40.7 -    char buf[100];
    40.8      struct domain *d, **pd;
    40.9      unsigned long flags;
   40.10  
   40.11 @@ -59,11 +58,6 @@ struct domain *do_createdomain(domid_t d
   40.12              return NULL;
   40.13          }
   40.14  
   40.15 -        /* We use a large intermediate to avoid overflow in sprintf. */
   40.16 -        sprintf(buf, "Domain-%u", dom_id);
   40.17 -        strncpy(d->name, buf, MAX_DOMAIN_NAME);
   40.18 -        d->name[MAX_DOMAIN_NAME-1] = '\0';
   40.19 -
   40.20          arch_do_createdomain(d);
   40.21  
   40.22          sched_add_domain(d);
   40.23 @@ -81,7 +75,6 @@ struct domain *do_createdomain(domid_t d
   40.24      }
   40.25      else
   40.26      {
   40.27 -        sprintf(d->name, "Idle-%d", cpu);
   40.28          sched_add_domain(d);
   40.29      }
   40.30  
    41.1 --- a/xen/include/hypervisor-ifs/dom0_ops.h	Thu Oct 21 14:27:34 2004 +0000
    41.2 +++ b/xen/include/hypervisor-ifs/dom0_ops.h	Fri Oct 22 00:11:28 2004 +0000
    41.3 @@ -19,9 +19,7 @@
    41.4   * This makes sure that old versions of dom0 tools will stop working in a
    41.5   * well-defined way (rather than crashing the machine, for instance).
    41.6   */
    41.7 -#define DOM0_INTERFACE_VERSION   0xAAAA0017
    41.8 -
    41.9 -#define MAX_DOMAIN_NAME    16
   41.10 +#define DOM0_INTERFACE_VERSION   0xAAAA0019
   41.11  
   41.12  /************************************************************************/
   41.13  
   41.14 @@ -53,15 +51,14 @@ typedef struct {
   41.15      /* IN parameters. */
   41.16      memory_t     memory_kb;           /*  0 */
   41.17      MEMORY_PADDING;
   41.18 -    u8           name[MAX_DOMAIN_NAME]; /*  8 */
   41.19 -    u32          cpu;                 /* 24 */
   41.20 -    u32          __pad0;              /* 28 */
   41.21 +    u32          cpu;                 /*  8 */
   41.22 +    u32          __pad0;              /* 12 */
   41.23      /* IN/OUT parameters. */
   41.24      /* If 0, domain is allocated. If non-zero use it unless in use. */
   41.25 -    domid_t      domain;              /* 32 */
   41.26 +    domid_t      domain;              /* 16 */
   41.27      u16          __pad1;
   41.28      /* OUT parameters. */
   41.29 -} PACKED dom0_createdomain_t; /* 36 bytes */
   41.30 +} PACKED dom0_createdomain_t; /* 20 bytes */
   41.31  
   41.32  #define DOM0_DESTROYDOMAIN     9
   41.33  typedef struct {
   41.34 @@ -101,17 +98,16 @@ typedef struct {
   41.35  #define DOMFLAGS_SHUTDOWNMASK 255 /* DOMFLAGS_SHUTDOWN guest-supplied code.  */
   41.36  #define DOMFLAGS_SHUTDOWNSHIFT 16
   41.37      u32      flags;                   /*  4 */
   41.38 -    u8       name[MAX_DOMAIN_NAME];   /*  8 */
   41.39 -    full_execution_context_t *ctxt;   /* 24 */ /* NB. IN/OUT variable. */
   41.40 +    full_execution_context_t *ctxt;   /*  8 */ /* NB. IN/OUT variable. */
   41.41      MEMORY_PADDING;
   41.42 -    memory_t tot_pages;               /* 32 */
   41.43 +    memory_t tot_pages;               /* 16 */
   41.44      MEMORY_PADDING;
   41.45 -    memory_t max_pages;               /* 40 */
   41.46 +    memory_t max_pages;               /* 24 */
   41.47      MEMORY_PADDING;
   41.48 -    memory_t shared_info_frame;       /* 48: MFN of shared_info struct */
   41.49 +    memory_t shared_info_frame;       /* 32: MFN of shared_info struct */
   41.50      MEMORY_PADDING;
   41.51 -    u64      cpu_time;                /* 56 */
   41.52 -} PACKED dom0_getdomaininfo_t; /* 64 bytes */
   41.53 +    u64      cpu_time;                /* 40 */
   41.54 +} PACKED dom0_getdomaininfo_t; /* 48 bytes */
   41.55  
   41.56  #define DOM0_BUILDDOMAIN      13
   41.57  typedef struct {
   41.58 @@ -298,15 +294,6 @@ typedef struct {
   41.59      dom0_shadow_control_stats_t stats;
   41.60  } PACKED dom0_shadow_control_t;
   41.61  
   41.62 -
   41.63 -#define DOM0_SETDOMAINNAME     26
   41.64 -typedef struct {
   41.65 -    /* IN variables. */
   41.66 -    domid_t  domain;                  /*  0 */
   41.67 -    u16      __pad;
   41.68 -    u8       name[MAX_DOMAIN_NAME];   /*  4 */
   41.69 -} PACKED dom0_setdomainname_t; /* 20 bytes */
   41.70 -
   41.71  #define DOM0_SETDOMAININITIALMEM   27
   41.72  typedef struct {
   41.73      /* IN variables. */
   41.74 @@ -375,7 +362,6 @@ typedef struct {
   41.75          dom0_pcidev_access_t     pcidev_access;
   41.76          dom0_sched_id_t          sched_id;
   41.77  	dom0_shadow_control_t    shadow_control;
   41.78 -	dom0_setdomainname_t     setdomainname;
   41.79  	dom0_setdomaininitialmem_t setdomaininitialmem;
   41.80  	dom0_setdomainmaxmem_t   setdomainmaxmem;
   41.81  	dom0_getpageframeinfo2_t getpageframeinfo2;
    42.1 --- a/xen/include/xen/sched.h	Thu Oct 21 14:27:34 2004 +0000
    42.2 +++ b/xen/include/xen/sched.h	Fri Oct 22 00:11:28 2004 +0000
    42.3 @@ -2,7 +2,6 @@
    42.4  #define __SCHED_H__
    42.5  
    42.6  #define STACK_SIZE (2*PAGE_SIZE)
    42.7 -#define MAX_DOMAIN_NAME 16
    42.8  
    42.9  #include <xen/config.h>
   42.10  #include <xen/types.h>
   42.11 @@ -85,7 +84,6 @@ struct domain
   42.12       */
   42.13  
   42.14      domid_t  domain;
   42.15 -    char     name[MAX_DOMAIN_NAME];
   42.16      s_time_t create_time;
   42.17  
   42.18      spinlock_t       page_alloc_lock; /* protects all the following fields  */
   42.19 @@ -135,7 +133,7 @@ struct domain
   42.20                          * "interesting" (i.e. have clear bits) */
   42.21  
   42.22      /* Handy macro - number of bytes of the IO bitmap, per selector bit. */
   42.23 -#define IOBMP_SELBIT_LWORDS ( IO_BITMAP_SIZE / 64 )
   42.24 +#define IOBMP_SELBIT_LWORDS (IO_BITMAP_SIZE / 64)
   42.25      unsigned long *io_bitmap; /* Pointer to task's IO bitmap or NULL */
   42.26  
   42.27      unsigned long flags;
    43.1 --- a/xen/include/xen/smp.h	Thu Oct 21 14:27:34 2004 +0000
    43.2 +++ b/xen/include/xen/smp.h	Fri Oct 22 00:11:28 2004 +0000
    43.3 @@ -52,6 +52,8 @@ extern int smp_call_function (void (*fun
    43.4  extern int smp_threads_ready;
    43.5  
    43.6  extern int smp_num_cpus;
    43.7 +extern int ht_per_core;
    43.8 +extern int opt_noht;
    43.9  
   43.10  extern volatile unsigned long smp_msg_data;
   43.11  extern volatile int smp_src_cpu;