Hello community, here is the log from the commit of package xen checked in at Tue May 23 01:37:50 CEST 2006. -------- --- arch/i386/xen/xen.changes 2006-05-19 02:01:41.000000000 +0200 +++ xen/xen.changes 2006-05-19 23:39:30.000000000 +0200 @@ -1,0 +2,13 @@ +Fri May 19 11:01:29 MDT 2006 - ccoffing@novell.com + +- Update from Intel to previous patch to fix installation of HVM + W2k. Adds decoding for two more instructions. (#176717) +- Updated the README. +- Included updated version of KY's patch to reserve some lowmem + for PAE, to avoid kernel BUG() during boot. The amounts of + memory reserved at various physical memory sizes have been + adjusted. (#175124) +- Include Intel's patch for unchecked allocations in shadow*.c. + (#149179) + +------------------------------------------------------------------- Old: ---- xen-hvm-xor-and.diff New: ---- xen-hvm-decode.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xen.spec ++++++ --- /var/tmp/diff_new_pack.hKvRE9/_old 2006-05-23 01:37:26.000000000 +0200 +++ /var/tmp/diff_new_pack.hKvRE9/_new 2006-05-23 01:37:26.000000000 +0200 @@ -19,7 +19,7 @@ %define with_pygrub 1 %define xen_build_dir xen-3.0-testing Version: 3.0.2_09668 -Release: 4 +Release: 5 License: GPL Group: System/Kernel Autoreqprov: on @@ -76,7 +76,7 @@ Patch36: xen-paths.diff Patch37: xen-hvm-rep-movs.diff Patch38: xen-lowmem-emergency-pool.diff -Patch39: xen-hvm-xor-and.diff +Patch39: xen-hvm-decode.diff Patch40: xen-console.diff Patch49: xen-enable-hvm-debug.diff Patch50: xen-enable-debug @@ -805,6 +805,16 @@ %{insserv_cleanup} %changelog -n xen +* Fri May 19 2006 - ccoffing@novell.com +- Update from Intel to previous patch to fix installation of HVM + W2k. Adds decoding for two more instructions. (#176717) +- Updated the README. +- Included updated version of KY's patch to reserve some lowmem + for PAE, to avoid kernel BUG() during boot. The amounts of + memory reserved at various physical memory sizes have been + adjusted. (#175124) +- Include Intel's patch for unchecked allocations in shadow*.c. + (#149179) * Thu May 18 2006 - ccoffing@novell.com - Include Intel's patch to fix installation of HVM W2k. This patch adds decoding for 'xor' and 'and' instructions. Without this, ++++++ README.SuSE ++++++ --- arch/i386/xen/README.SuSE 2006-05-03 19:19:53.000000000 +0200 +++ xen/README.SuSE 2006-05-19 21:18:37.000000000 +0200 @@ -21,7 +21,7 @@ from YaST) check-mark the "XEN Virtualization" selection. If, instead, you wish to install Xen manually later, install the following packages: bridge-utils - kernel-xen + kernel-xen or kernel-xenpae python xen xen-libs @@ -32,10 +32,9 @@ yast2-vm (Optional, to facilitate creation and management of VMs) multipath-tools (Required by yast2-vm, for domUloader) -You then need to reboot your machine (after, perhaps, editing your bootloader -configuration, as discussed below). Instead of booting a normal Linux kernel, -you will boot the Xen microkernel and a slightly changed Linux kernel. This -Linux kernel runs in the first virtual machine and will drive most of your +You then need to reboot your machine. Instead of booting a normal Linux +kernel, you will boot the Xen hypervisor and a slightly changed Linux kernel. +This Linux kernel runs in the first virtual machine and will drive most of your hardware. This approach is called para-virtualization, since it is a partial @@ -43,8 +42,8 @@ virtualization easier). It results in very good performance (consult http://www.cl.cam.ac.uk/Research/SRG/netos/xen/performance.html) but has the downside of unchanged operating systems not being supported. However, -upcoming hardware features (e.g., Intel's VT and AMD's Pacifica) will help -overcome this limitation. +upcoming hardware features (e.g., Intel's VT and AMD's Virtualization) will +help overcome this limitation. Terminology @@ -55,10 +54,12 @@ A "domain" is Xen's term for a virtual machine. "Domain 0" is the first virtual machine. It can control all other virtual -machines. It also (usually) controls the physical hardware. +machines. It also (usually) controls the physical hardware. A kernel used in +domain 0 may sometimes be referred to as a dom0 kernel. "Domain U" is any virtual machine other than domain 0. The "U" indicates it -is unprivileged (that is, it cannot control other domains). +is unprivileged (that is, it cannot control other domains). A kernel used in +an unprivileged domain may be referred to as a domU kernel. Novell documentation will use the more industry-standard term "virtual machine", or "VM", rather than "domain" where possible. And to that end, @@ -68,19 +69,16 @@ The acronym "HVM" refers to a hardware-assisted virtual machine. These are VMs that have not been modified (e.g., Windows) and therefore need hardware -support such as Intel's VT or AMD's Pacifica to run on Xen. +support such as Intel's VT or AMD's Virtualization to run on Xen. Kernels ------- Xen supports two kinds of kernels: A privileged kernel (which boots the machine, controls other VMs, and usually controls all your physical hardware) -and unprivileged kernels (which don't need drivers for physical hardware). -The privileged kernel boots first (as the VM server); an unprivileged kernel -is used in all subsequent VMs. - -A kernel used in domain 0 (the VM server) may sometimes be referred to as a -dom0 kernel. Similarly, domain U kernels may be referred to as domU kernels. +and unprivileged kernels (which can't control other VMs, and usually don't need +drivers for physical hardware). The privileged kernel boots first (as the VM +server); an unprivileged kernel is used in all subsequent VMs. The VM server takes control of the boot process after Xen has initialized the CPU and the memory. This VM contains a privileged kernel and all the hardware @@ -97,16 +95,19 @@ are modules anyway, using this kernel as an unprivileged kernel has very little extra overhead. -The kernel is contained in the kernel-xen package, which you need to install -to use Xen. +The kernel is contained in the kernel-xen package (or kernel-xenpae for 32 bit +hardware with > 4G of RAM), which you need to install to use Xen. Booting ------- -If you installed Xen during the initial SUSE installation, a "XEN" option -should already exist in your Grub bootloader. If you installed Xen later, you -will have to edit Grub yourself. In that case, add an entry like this to your -Grub configuration (usually /boot/grub/menu.lst): +If you installed Xen during the initial SUSE installation, or installed one +of the kernel-xen* packages later, a "XEN" option should exist in your Grub +bootloader. Select that to boot SUSE on top of Xen. + +If you want to add additional entries, or modify the existing ones, you will +have to edit Grub yourself. All Xen entries in the Grub configuration file +(usually /boot/grub/menu.lst) look something like this: title XEN root (hd0,5) @@ -117,24 +118,15 @@ Replace (hd0,5) with the partition that holds your /boot directory in grub-speak, e.g., hda1 -> (hd0,0) and sda5 -> (hd2,4). +Normally, xen.gz requires no parameters. If you want to add parameters, +see the documentation in the xen-doc-* packages for a complete discussion. + Replace "<parameters>" with the kernel parameters that you want to pass to your kernel. These should be very similar, if not identical, to those passed to a normal kernel that you boot on bare iron. -You may also pass parameters to Xen, by appending them after xen.gz (similar -as is done with vmlinuz-xen). One possible parameter is "dom0_mem=", which -can limit the amount of memory seen by domain 0. (This number assumes kB, or -you can specify units. So, for example, "dom0_mem=131072" and "dom0_mem=128M" -are the same.) If this is not specified, Xen will give the maximum possible -memory to domain 0. You can later take memory away from domain 0, and give it -to other domains, via ballooning. You can pass lower numbers as well, which -will be useful after you have stripped down domain 0 and want to run several -additional domains. - Once you have booted this configuration successfully, you are running Xen with -a privileged kernel on top of it. Use "xm list" to see the list of VMs and -"xm dmesg" to see the boot log from Xen. The xm command only works if xend is -running. +a privileged kernel on top of it. Start Scripts @@ -144,85 +136,74 @@ activated at installation time. You can (de)activate it using insserv (or chkconfig). You can also start it manually with "rcxend start". -One other relevant startup script rcxendomains. This script can be used to +One other relevant startup script is xendomains. This script can be used to start other VMs when the VM server boots. It also cleanly shuts down the other VMs when the VM server shuts down. To use this feature, place a symbolic link in /etc/xen/auto that points to the VM's configuration file. -Installing Root Filesystems or Filesystem Images ------------------------------------------------- -Each VM needs to have its own root filesystem. The root filesystem can live on -a block device (e.g., a hard disk partition, or an LVM2 or EVMS volume) or in -a file that holds the filesystem image. - -VMs can share filesystems, such as /usr or /opt, that are mounted read-only -from _all_ VMs. Never try to share a filesystem that is mounted read-write; -filesystem corruption will result. For sharing writable data between VMs, use -NFS or other networked or cluster filesystems. +Creating a VM with YaST +----------------------- +YaST is the recommended method to create VMs. The YaST module (from the +yast2-vm package) handles creating both the VM's configuration file and +disk(s). YaST can help install any operating system, not just SUSE. + +From the command line, run "yast2 xen". From the GUI, start YaST, select +"System", then start "Virtual Machine Management (Xen)". For full +functionality, YaST must run in graphical mode, not ncurses. -Below, we'll discuss three possible ways to get a root filesystem installed -for Xen. They are: - 1) Create a filesystem image based on the Novell SUSE rescue image - 2) Use YaST to install a virtual machine - 3) Reuse an existing installation - -Note that methods 1 and 2 will create a SUSE Linux installation; installation -of other operating systems may require you to use method 3. - -1) Rescue image based root filesystem -To get started quickly, you can use the rescue image from the Novell SUSE -installation CD/DVD. It's on the first CD/DVD in the boot/ directory with the -name "rescue". To make it usable with Xen, copy it to the hard disk, loop -mount it, remove the kernel modules, and copy your Xen-enabled kernel (and a -selection of needed kernel modules) there. When done, umount it. To boot it, -use the configuration file /etc/xen/examples/xmexample.rescue as a template and -enter the location of the image file as hda1. - -There's a script mk-xen-rescue-img.sh in /usr/share/doc/packages/xen/ that -automates the above steps. The use of this script is highly recommended. Run -it with no arguments to obtain help. - -The disadvantage of using the rescue way of constructing a root filesystem is -that the result does not have an RPM database, so you can't easily add -packages using rpm. On the positive side, the result is relatively small yet -has most of what's needed to get started with networking. - -2) YaST Virtual Machine Installation - a) Start YaST, and select "System". - b) Select "Virtual Machine Management (Xen)". - c) Click "Add" to add a new virtual machine. - d) Adjust the VM configuration and click "Next". - e) YaST will now create a configuration file for the VM, and create a disk - image. The disk image will exist in /var/lib/xen/images, and a - corresponding config file will exist in /etc/xen/vm. The operating - system's installation program will then run within the VM. - f) For SUSE VMs, the installation process will automatically configure some - things within the VM (such as disabling unneeded services like acpid and - kbd). Optionally, have a look at - /usr/share/doc/packages/xen/boot.local.xenU and copy the boot command - line parsing bits into the new VM. +The first screen shows all created and running VMs. To create a new one, click +"Add". Now adjust the VM's configuration to your liking. Note that is is possible to install SUSE Linux graphically, even when it is paravirtualized. Add "vnc=1" to the "Installation Options" in YaST, and see this page for further guidance: http://www.novell.com/coolsolutions/feature/15568.html -3) Reuse an existing installation -You can use an existing installation (whether on a partition or disk) as the -root filesystem of a VM. YaST can help create a configuration file to boot +Once you have the VM configured, click "Next". YaST will now create a +configuration file for the VM, and create a disk image. The disk image will +exist in /var/lib/xen/images, and a corresponding config file will exist in +/etc/xen/vm. The operating system's installation program will then run within the VM. +When the VM shuts down (because the installation -- or at least the first stage +of it -- is done), YaST gives you a chance to finalize the VM's configuration. +This is useful, for example, if the installer and the application that will +run in the VM have different memory or network requirements. -Creating a Configuration File ------------------------------ -Unless you used the YaST tool to create a VM, you'll need to manually create a -configuration file. Start by making a copy of one of the /etc/xen/examples/* -files, and modifying it to suit your needs. For para-virtualized VMs, start -with /etc/xen/examples/xmexample1; for fully-virtualized VMs, start with -/etc/xen/examples/xmexample.hvm. -You'll need to change (at very least) the "name" and "disk" parameters. +Creating a VM Manually +---------------------- +If you create a VM manually (as opposed to using YaST), you will need to create +a disk (or reuse an existing one) and a configuration file. + +Each VM needs to have its own root filesystem. The root filesystem can live on +a block device (e.g., a hard disk partition, or an LVM2 or EVMS volume) or in +a file that holds the filesystem image. + +VMs can share filesystems, such as /usr or /opt, that are mounted read-only +from _all_ VMs. Never try to share a filesystem that is mounted read-write; +filesystem corruption will result. For sharing writable data between VMs, use +NFS or other networked or cluster filesystems. + +If you are using a disk or disk image that is already installed with an +operating system, you'll probably need to replace its kernel with a Xen-enabled +kernel. + +The kernel and ramdisk used to bootstrap the VM must match any kernel modules +that might be present in the VM's disk. It is possible to manually copy the +kernel and ramdisk from the VM's disk (for example, after updating the kernel +within that VM) to the VM server's filesystem. However, an easier (and less +error-prone) method is to use something called the "domUloader". Before a new +VM is started, this loader automatically copies the kernel and ramdisk into +the VM server's filesystem, so that it can be used to bootstrap the new VM. +See /etc/xen/examples/xmexample.domUloader for an example. + +Next, make a copy of one of the /etc/xen/examples/* files, and modify it to +suit your needs. For para-virtualized VMs, start with +/etc/xen/examples/xmexample1; for fully-virtualized VMs, start with +/etc/xen/examples/xmexample.hvm. You'll need to change (at very least) the +"name" and "disk" parameters. When defining the virtual network adapter(s), we recommend using a static MAC for the VM rather than allowing Xen to randomly select one each time the VM @@ -230,18 +211,27 @@ range of MAC addresses with the OUI of 00-16-3E. By using MACs from this range you can be sure they will not conflict with any physical adapters. - -Booting Virtual Machines ------------------------- -Before you can boot additional VMs, you need to have some memory available. -The VM server (domain 0) will automatically relinquish memory (down to a -minimum defined in /etc/xen/xend-config.sxp) when you attempt to create a new -VM. Or you may manually adjust domain 0's memory allocation with the command - xm mem-set 0 <N> -with <N> being the number of megabytes that you want to give to your domain 0. - -To create a new VM, use a command like: - xm create /etc/xen/vm/my-vm +To get started quickly, you can use a modified rescue image from the Novell +SUSE installation CD/DVD. It's on the first CD/DVD in the boot/ directory with +the name "rescue". To make it usable with Xen, run the script +/usr/share/doc/packages/xen/mk-xen-rescue-img.sh (run it with no arguments to +get help). The script replaces the normal Linux kernel in the image with a +Xen-enabled Linux kernel (among other things; read the script for details). +The script also creates a matching configuration file. The disadvantage of +using the rescue way of constructing a root filesystem is that the result does +not have an RPM database, so you can't easily add packages using rpm. On the +positive side, the result is relatively small yet has most of what's needed to +get started with networking. + + +Managing Virtual Machines +------------------------- +VMs can be managed from the command line or from YaST. + +To create a new VM from the command line, use a command like: + xm create my-vm +If your VM's configuration file is not located in /etc/xen/vm, you must +specify the full path. Have a look at running sessions with "xm list". Note the ID of the newly created VM. Attach to that VM with "xm console <ID>" (replacing ID with the @@ -249,24 +239,20 @@ immediately connect to the console. Attaching to multiple VM consoles is most conveniently done with the terminal multiplexer "screen". -You can start other VMs the same way; just remember that every VM needs its -own root filesystem. - Have a look at the other xm commands by typing "xm help". Note that most xm commands must be done as root. -The VMs don't all need to be the same kind of system. You can just as well -boot a 2.4 Linux kernel, or a Debian distribution, or NetWare, or even NetBSD -VMs. -The kernel and ramdisk used to bootstrap the VM must match any kernel modules -that might be present in the VM's disk. It is possible to manually copy the -kernel and ramdisk from the VM's disk (for example, after updating the kernel -within that VM) to the VM server's filesystem. However, an easier (and less -error-prone) method is to use something called the "domUloader". Before a new -VM is started, this loader automatically copies the kernel and ramdisk into -the VM server's filesystem, so that it can be used to bootstrap the new VM. -See /etc/xen/examples/xmexample.domUloader for an example. +CD-ROM / DVD Support +-------------------- +The physical CD/DVD drive can be shared between multiple VMs, but some special +steps have to be taken. + +The physical CD/DVD drive can be visible to only one fully virtualized VM at +a time. To virtually "insert" the CD/DVD (that is, to attach the physical +drive to the VM) press Ctrl-Alt-i while in the VM's window. The VM that +previously had control of the CD/DVD drive will still see a drive, but it will +appear to have no media. Networking @@ -345,36 +331,28 @@ called. It's not recommended to use ifplugd nor NetworkManager for managing the -interfaces if you use bridging mode. Use routing with nat or proxy-arp -in that case. You also need to do that in case you want to send out packets +interfaces if you use bridging mode. Use routing with nat or proxy-arp +in that case. You also need to do that in case you want to send out packets on wireless; you can't bridge Xen "ethernet" packets into 802.11 packets. Limitations ----------- -You can change the number of available CPUs per VM and the amount of available -memory in a running domain. This is done via hotplug-CPU and hotplug-mem, so -unlike in older versions of Xen, "free -m" will really report a lower amount -of possible memory. Such changes work in domain 0 as well. - -When booting, Linux reserves data structures, etc., matching the amount of -(virtual) hardware found. This has the side-effect that you can't grow the -number of CPUs beyond what a (virtual) kernel has been booted with. Nor can -the amount of memory be grown beyond the initial value, so you can trick domU -Linux by passing the mem= boot parameter. - -Network and block devices are hotplugged as well; Xen currently does not offer -a neat interface to change the configuration at runtime yet, though. - -The export of harddisk and partitions from files in Xen is handled via the -loopback driver; you can easily run out of those, as by default only 8 -loopback devices are supported. You can change this by inserting +When booting, Linux reserves data structures matching the amount of (virtual) +processors and RAM found. This has the side-effect that you can't dynamically +grow the virtual hardware beyond what the kernel has been booted with. But +you can trick domU Linux to prepare for a larger amount of RAM by passing the +mem= boot parameter. + +The export of virtual hard disks from files in Xen is handled via the loopback +driver. You can easily run out of those, as by default only 8 loopback devices +are supported. You can change this by inserting: options loop max_loop=64 into /etc/modprobe.conf.local in domain 0. Similarly, the netback driver comes up with 8 virtual network device pairs -(vif0.X - vethX); you can change this by placing the netloop's nloopbacks=N -parameter to the kernel/module. +(vif0.X - vethX). You can change this by plassing the netloop's nloopbacks=N +parameter to the kernel module. Thread-Local Storage @@ -391,7 +369,6 @@ affected. SUSE Linux 9.2 and 9.3 are affected. For SUSE Linux 10.x and SLES 10, we have disabled negative segment references in gcc and glibc, and so these are not affected. Other non-SUSE Linux distributions may be affected. -Mono is affected though, so you'll suffer a performance impact there. For affected distributions, one way to work around the problem is to rename the /lib/tls directory, so the pre-i686 version gets used, where no such @@ -400,22 +377,25 @@ renames /lib/tls when running on Xen, and restores it when not running on Xen. Modify this script to work with your specific distribution. +Mono has a similar problem, but this has been fixed in SUSE Linux 10.1 and +SLES 10. Older or non-SUSE verions of Mono may have a performance impact. + Security -------- Domain 0 has control over all domains. This means that care should be taken to keep domain 0 safe; ideally you strip it down to only do as little there as -possible, preferably with no local users except for the system -administrator. Most commands in domain 0 can only be performed as root, but -this protection scheme only has moderate security and might be defeated. In -case domain 0 is compromised, all other domains are compromised as well. +possible, preferably with no local users except for the system administrator. +Most commands in domain 0 can only be performed as root, but this protection +scheme only has moderate security and might be defeated. In case domain 0 is +compromised, all other domains are compromised as well. To allow relocation of VMs (migration), the receiving machine listens on TCP -port 8002; you might want to put firewall rules in place in domain 0 to +port 8002. You might want to put firewall rules in place in domain 0 to restrict this to machines which you trust. You have some access control in xend-config.sxp as well by tweaking the xend-relocation-hosts-allow -setting. Relocating VMs with sensitive data is not a good idea in untrusted -networks. +setting. Relocating VMs with sensitive data is not a good idea in untrusted +networks, since the data is not sent encrypted. The memory protections for the domUs are effective; so far no way to break out of a virtual machine is known. A VM is an effective jail. @@ -427,10 +407,11 @@ For starting it's easiest to disable any firewall on the VM server, but enable IP_FORWARD in /etc/sysconfig/sysctl (/proc/sys/net/ipv4/ip_forward). If you -want to enable SuSEfirewall2 with bridging, add xenbr0 to a device class set -FW_ROUTE and FW_ALLOW_CLASS_ROUTING. Watch the kernel reject messages ... +want to enable SuSEfirewall2 with bridging, add xenbr0 to a device class, set +FW_ROUTE and FW_ALLOW_CLASS_ROUTING. Watch the kernel reject messages ... -Switch off ifplugd and NetworkManager. +Switch off ifplugd and NetworkManager. These can interfere with the changes +xend makes to the network setup. Specify a static virtual MAC in the VM's configuration file. Random MACs can be problematic, since with each boot of the VM it appears that some hardware @@ -465,8 +446,8 @@ kernel (hd0,5)/xen.gz To something like this: kernel (hd0,5)/xen-dbg.gz noreboot -After rebooting, the Xen hypervisor will write any error messages directly to -the text console. +After rebooting, the Xen hypervisor will write any error messages to the log +file (viewable with the "xm dmesg" command). If problems persist, check if a newer version is available. Well-tested versions will be shipped with SUSE and via YaST Online Update. More frequent @@ -485,11 +466,6 @@ Some large-memory machines may not boot with ACPI enabled. -The VM server (domain 0) will automatically shrink its memory usage to -accommodate a new VM, during an "xm create" command. This auto-shrinking may -fail when starting a fully-virtualized VM. In that case, manually perform an -"xm mem-set 0 <N>" before the "xm create". - Be sure your Xen hypervisor (xen) and VM kernels (kernel-xen) are compatible. While Xen 3.x attempts to preserve compatibility between the hypervisor and VMs, changes sometimes occur. In particular: ++++++ xen-hvm-decode.diff ++++++ I have submitted a new bug on Novell bugzilla for the win2k installation issue. The patch has been attached in the bug. https://bugzilla.novell.com/show_bug.cgi?id=176717 "Zhao, Yunfeng" <yunfeng.zhao@intel.com> Index: xen-3.0-testing/xen/arch/x86/hvm/platform.c =================================================================== --- xen-3.0-testing.orig/xen/arch/x86/hvm/platform.c +++ xen-3.0-testing/xen/arch/x86/hvm/platform.c @@ -364,6 +364,12 @@ static int hvm_decode(int realmode, unsi } switch (*opcode) { + case 0x0A: /* or r8, m8 */ + instr->instr = INSTR_OR; + instr->op_size = BYTE; + GET_OP_SIZE_FOR_BYTE(size_reg); + return mem_reg(instr->op_size, opcode, instr, rex); + case 0x0B: /* or m32/16, r32/16 */ instr->instr = INSTR_OR; GET_OP_SIZE_FOR_NONEBYTE(instr->op_size); @@ -380,6 +386,12 @@ static int hvm_decode(int realmode, unsi GET_OP_SIZE_FOR_NONEBYTE(instr->op_size); return reg_mem(instr->op_size, opcode, instr, rex); + case 0x22: /* and m8, r8 */ + instr->instr = INSTR_AND; + instr->op_size = BYTE; + GET_OP_SIZE_FOR_BYTE(size_reg); + return mem_reg(size_reg, opcode, instr, rex); + case 0x23: /* and m32/16, r32/16 */ instr->instr = INSTR_AND; GET_OP_SIZE_FOR_NONEBYTE(instr->op_size); @@ -396,6 +408,12 @@ static int hvm_decode(int realmode, unsi GET_OP_SIZE_FOR_NONEBYTE(instr->op_size); return reg_mem(instr->op_size, opcode, instr, rex); + case 0x32: /* xor m8, r8*/ + instr->instr = INSTR_XOR; + instr->op_size = BYTE; + GET_OP_SIZE_FOR_BYTE(size_reg); + return mem_reg(size_reg, opcode, instr, rex); + case 0x39: /* cmp r32/16, m32/16 */ instr->instr = INSTR_CMP; GET_OP_SIZE_FOR_NONEBYTE(instr->op_size); @@ -516,6 +534,11 @@ static int hvm_decode(int realmode, unsi GET_OP_SIZE_FOR_NONEBYTE(instr->op_size); return DECODE_success; + case 0xAC: /* lods/lodsb */ + instr->instr = INSTR_STOS; + instr->op_size = BYTE; + return DECODE_success; + case 0xC6: if (((opcode[1] >> 3) & 7) == 0) { /* mov $imm8, m8 */ instr->instr = INSTR_MOV; ++++++ xen-hvm-memory-check.diff ++++++ --- /var/tmp/diff_new_pack.hKvRE9/_old 2006-05-23 01:37:29.000000000 +0200 +++ /var/tmp/diff_new_pack.hKvRE9/_new 2006-05-23 01:37:29.000000000 +0200 @@ -74,3 +74,69 @@ vmcb->iopm_base_pa = (u64) virt_to_maddr(iopm); vmcb->msrpm_base_pa = (u64) virt_to_maddr(msrpm); +Index: xen-3.0-testing/xen/arch/x86/shadow.c +=================================================================== +--- xen-3.0-testing.orig/xen/arch/x86/shadow.c ++++ xen-3.0-testing/xen/arch/x86/shadow.c +@@ -430,7 +430,8 @@ no_shadow_page: + perfc_value(shadow_l2_pages), + perfc_value(hl2_table_pages), + perfc_value(snapshot_pages)); +- BUG(); /* XXX FIXME: try a shadow flush to free up some memory. */ ++ /* XXX FIXME: try a shadow flush to free up some memory. */ ++ domain_crash_synchronous(); + + return 0; + } +@@ -3018,7 +3019,8 @@ static inline unsigned long init_bl2( + if ( unlikely(!(smfn = alloc_shadow_page(d, gpfn, gmfn, PGT_l4_shadow))) ) + { + printk("Couldn't alloc an L4 shadow for pfn=%lx mfn=%lx\n", gpfn, gmfn); +- BUG(); /* XXX Deal gracefully with failure. */ ++ /* XXX Deal gracefully with failure. */ ++ domain_crash_synchronous(); + } + + spl4e = (l4_pgentry_t *)map_domain_page(smfn); +Index: xen-3.0-testing/xen/arch/x86/shadow32.c +=================================================================== +--- xen-3.0-testing.orig/xen/arch/x86/shadow32.c ++++ xen-3.0-testing/xen/arch/x86/shadow32.c +@@ -246,7 +246,8 @@ alloc_shadow_page(struct domain *d, + perfc_value(shadow_l2_pages), + perfc_value(hl2_table_pages), + perfc_value(snapshot_pages)); +- BUG(); /* XXX FIXME: try a shadow flush to free up some memory. */ ++ /* XXX FIXME: try a shadow flush to free up some memory. */ ++ domain_crash_synchronous(); + } + + smfn = page_to_mfn(page); +@@ -976,6 +977,11 @@ alloc_p2m_table(struct domain *d) + else + { + page = alloc_domheap_page(NULL); ++ if (!page) ++ { ++ printk("Alloc p2m table fail\n"); ++ domain_crash(d); ++ } + + l1tab = map_domain_page(page_to_mfn(page)); + memset(l1tab, 0, PAGE_SIZE); +Index: xen-3.0-testing/xen/arch/x86/shadow_public.c +=================================================================== +--- xen-3.0-testing.orig/xen/arch/x86/shadow_public.c ++++ xen-3.0-testing/xen/arch/x86/shadow_public.c +@@ -315,6 +315,11 @@ static void alloc_monitor_pagetable(stru + + mmfn_info = alloc_domheap_page(NULL); + ASSERT( mmfn_info ); ++ if (!mmfn_info) ++ { ++ printk("Fail to allocate monitor pagetable\n"); ++ domain_crash(v->domain); ++ } + + mmfn = page_to_mfn(mmfn_info); + mpl4e = (l4_pgentry_t *) map_domain_page_global(mmfn); ++++++ xen-lowmem-emergency-pool.diff ++++++ --- /var/tmp/diff_new_pack.hKvRE9/_old 2006-05-23 01:37:29.000000000 +0200 +++ /var/tmp/diff_new_pack.hKvRE9/_new 2006-05-23 01:37:29.000000000 +0200 @@ -1,20 +1,47 @@ -Index: xen-3.0-testing/xen/common/page_alloc.c +Index: xen-3.0-testing/xen/arch/x86/x86_32/mm.c =================================================================== ---- xen-3.0-testing.orig/xen/common/page_alloc.c -+++ xen-3.0-testing/xen/common/page_alloc.c -@@ -273,6 +273,15 @@ void end_boot_allocator(void) - if ( curr_free ) - free_heap_pages(pfn_dom_zone_type(i), mfn_to_page(i), 0); - } +--- xen-3.0-testing.orig/xen/arch/x86/x86_32/mm.c ++++ xen-3.0-testing/xen/arch/x86/x86_32/mm.c +@@ -62,6 +62,8 @@ l2_pgentry_t *virt_to_xen_l2e(unsigned l + return &idle_pg_table_l2[l2_linear_offset(v)]; + } + ++extern unsigned long lowmem_emergency_pool_pages; ++ + void __init paging_init(void) + { + void *ioremap_pt; +@@ -126,6 +128,20 @@ void __init paging_init(void) + l2e_from_page(virt_to_page(idle_vcpu[0]->domain-> + arch.mm_perdomain_pt) + i, + __PAGE_HYPERVISOR); + -+ if (lowmem_emergency_pool_pages == 0) -+ { -+ /* Size the lowmem_emergency_pool based on the total memory on the box */ -+ if ((total_pages > (1000 * 1000) && (total_pages <= (2000*1000)))) -+ lowmem_emergency_pool_pages = 4000; -+ else if ((total_pages > (2000 * 1000) && (total_pages < (4*1000*1000)))) -+ lowmem_emergency_pool_pages = 8000; -+ } ++ /* ++ * Size the lowmem_emergency_pool based on the total memory on the box ++ * This pool is needed only on 32 bit PAE configurations (4g to 16g). ++ */ ++ if (lowmem_emergency_pool_pages) ++ return; ++ ++ if (total_pages > (4 * 1024 * 1024)) ++ lowmem_emergency_pool_pages = 12000; ++ else if (total_pages > (2 * 1024 * 1024)) ++ lowmem_emergency_pool_pages = 8000; ++ else if (total_pages > (1 * 1024 * 1024) || max_page >= (1 * 1024 * 1024)) ++ lowmem_emergency_pool_pages = 4000; } - /* Hand the specified arbitrary page range to the specified heap zone. */ + void __init zap_low_mappings(l2_pgentry_t *base) +Index: xen-3.0-testing/xen/common/page_alloc.c +=================================================================== +--- xen-3.0-testing.orig/xen/common/page_alloc.c ++++ xen-3.0-testing/xen/common/page_alloc.c +@@ -47,7 +47,7 @@ string_param("badpage", opt_badpage); + * allocation requests. Ordinary requests will not fall back to the + * lowmem emergency pool. + */ +-static unsigned long lowmem_emergency_pool_pages; ++unsigned long lowmem_emergency_pool_pages; + static void parse_lowmem_emergency_pool(char *s) + { + unsigned long long bytes; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...
participants (1)
-
root@suse.de