aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [IA64] Cleanup: remove unused functions and definitionsAlex Williamson2008-02-132-98/+17
| | | | Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* [IA64] Cleanup in xc_ia64_linux_save.cAlex Williamson2008-02-131-38/+14
| | | | | | | xc_ia64_shadow_control() is not needed any more since xc_shadow_control() was xencommized. Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* [IA64] Make xenitp more '|tee' friendlyAlex Williamson2008-02-131-0/+1
| | | | | | Flush stdout after printing the prompt. Signed-off-by: Tristan Gingold <tgingold@free.fr>
* merge with xen-unstable.hgAlex Williamson2008-02-0762-4408/+627
|\
| * ioemu: use POSIX int type.Keir Fraser2008-02-071-1/+1
| | | | | | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
| * x86: physaddr_bitsize must always be initialised for 32-on-64 dom0.Keir Fraser2008-02-071-24/+16
| | | | | | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
| * ioemu: Fix build after LIST->QEMU_LIST changes.Keir Fraser2008-02-072-8/+8
| | | | | | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
| * vmx: Clean up VPMU code a little and remove noisy printk.Keir Fraser2008-02-072-44/+50
| | | | | | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
| * hvm: Clean up CPUID_0000_0001 return values.Keir Fraser2008-02-076-67/+40
| | | | | | | | | | | | The fix to EBX.ApicID was pointed out by Andre Przywara <andre.przywara@amd.com>. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
| * Add 'coredump-destroy' and 'coredump-restart' actions for crashed domains.Keir Fraser2008-02-0710-21/+83
| | | | | | | | | | | | | | | | Xen-API already specifies these actions for the 'on_crash' domain exit event. This patch makes them available for use in traditional domU config files and through the xm tool as well. Signed-off-by: Jim Fehlig <jfehlig@novell.com>
| * xm reboot: Fix wait option of xm reboot commandKeir Fraser2008-02-071-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When I rebooted a domain by xm reboot command with wait option, I saw the following message. But, rebooting the domain succeeded. Domain vm1 destroyed for failed in rebooting The cause why the message was shown is the domain is destroyed temporarily by processing of xm reboot command. The domain information is not gotten from Xend by server.xend.domains() function till recreating the domain is completed. This patch fixes processing of xm reboot command in Xm side. It waits just a bit till recreating the domain is completed, then it measures the success or failure of the reboot of the domain. Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
| * ioemu: avoid name clashes due to LIST_* macrosKeir Fraser2008-02-075-48/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here is what I wrote in my submission to qemu upstream: qemu's audio subdirectory contains a copy of BSD's sys-queue.h, which defines a bunch of LIST_ macros. This makes it difficult to build a program made partly out of qemu and partly out of the Linux kernel[1], since Linux has a different set of LIST_ macros. It might also cause trouble when mixing with BSD-derived code. Under the circumstances it's probably best to rename the versions in qemu. The attached patch does this. [1] You might well ask why anyone would want to do this. In Xen we are moving our emulation of IO devices from processes which run on the host into a dedicated VM (one per actual VM) which we call a `stub domain'. This dedicated VM runs a very cut-down `operating system' which uses some code from Linux. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * ioemu: config cleanup re AF_UNIX sockets on non-WindowsKeir Fraser2008-02-073-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | Here is what I wrote in my submission to qemu upstream: The patch below makes it possible to disable AF_UNIX (unix-domain) sockets in host environments which do not define _WIN32, by adding -DNO_UNIX_SOCKETS to the compiler flags. This is useful in the effectively-embedded qemu host which are going to be using for device emulation in Xen. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * minios: Fix blkfront grant map leakKeir Fraser2008-02-072-3/+4
| | | | | | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
| * minios: Support net/block backend in domUKeir Fraser2008-02-072-25/+29
| | | | | | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
| * hvmloader: Remove dead function check_amd().Keir Fraser2008-02-061-14/+0
| | | | | | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
| * x86 vmx: Remove vmxassist.Keir Fraser2008-02-0625-4087/+5
| | | | | | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
| * Revert 16973:b5427f2d83c3, which breaks automated testing (HVM qemu-dmKeir Fraser2008-02-051-1/+1
| | | | | | | | | | will not die when it is told to). Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
| * x86_emulate: fix side-effect macro call.Keir Fraser2008-02-051-3/+6
| | | | | | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
| * vmx realmode: Emulate protected-mode transition while CS and SS haveKeir Fraser2008-02-0511-53/+302
| | | | | | | | | | | | | | | | | | bad selector values (bottom two bits non-zero). Allows opensuse 10.3 install CD to boot. Unfortunately SUSE Linux 10.1 install CD still fails to work... Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
| * xend: Scrub vnc password for vfb from xend.log.Keir Fraser2008-02-051-4/+5
| | | | | | | | Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
| * xend: Restore values of /vm/uuid/xend/* to recreated domains.Keir Fraser2008-02-051-3/+9
| | | | | | | | | | | | | | | | | | | | When guest domains are restarted, previous values of /vm/uuid/xend/* in xenstore are lost. (e.g. previous_restart_time, last_shutdown_reason). This patch restores them to restarting domains. And we should update /vm/uuid/xend/restart_count of restarting domains, not previous domains. Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
| * x86_emulate: Fix SAHF emulation.Keir Fraser2008-02-051-1/+1
| | | | | | | | | | Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com> Signed-off-by: Kevin Tian <kevin.tian@intel.com>
* | [IA64] Fix vcpu_tranlate()Alex Williamson2008-02-071-2/+3
| | | | | | | | | | | | When handling resion7 opt feature, it should check the range. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* | [IA64] Fix shadow_op hypercallAlex Williamson2008-02-063-1/+30
| | | | | | | | | | | | | | | | Fix SHADOW_OP_ENABLE_LOGDIRTY and SHADOW_OP_CLEAN hypercall. Live migation doesn't work because the VHPT is not flushed. Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* | [IA64] Fix live migrationAlex Williamson2008-02-071-0/+3
| | | | | | | | | | | | | | | | In live migration, a domain is paused and *entire* memory is copied after pre-copy phase. (i.e. live migration is not live) Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* | [IA64] Fix maximum_gpfn hypercallAlex Williamson2008-02-053-4/+4
| | | | | | | | | | | | | | | | | | HVM livemigation fails without this patch. according to x86 side: http://xenbits.xensource.com/xen-unstable.hg?rev/55d0a5c70986 Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* | [IA64] Add EXTRA_AFLAGS for platform-pci/xcom_asm.SAlex Williamson2008-02-051-0/+1
| | | | | | | | | | Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com> Acked-by: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
* | [IA64] Fix domain refernece countingAlex Williamson2008-02-051-14/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the domain refernece counting caused by allocated pages from domheap for shared page and hyperregister page. Calling share_xen_page_with_guest() with domain heap page is wrong so that it increments domian->xenpages which is never decremented. Thus the domian refcount doesn't decrease to 0 so that destroy_domain() is never called. This patch make the allocation done from xenheap again. The other way to fix it is to work around domain->xenheap and the page refrence count somehow, but it would be very ugly. The right way to do so is to enhance the xen page allocator to be aware of this kind of page in addition to xenheap and domheap. But we don't want to touch the common code. And given that the limitation on xenheap of xen/ia64 is much relaxed, probably it isn't necessary to be so nervouse not to allocate those pages from xenheap. If it happend to be necessary to allocate those pages from domheap, we could address it at that time. For now just allocate them from xenheap. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* | [IA64] Add xencomm_arch_hypercall_suspend to fix module loadAlex Williamson2008-02-042-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Make use of split out xencomm_arch_hypercall_suspend to fix the following module load error: Loading xen-platform-pci.ko module xen_platform_pci: Unknown symbol xencomm_hypercall_suspend insmod: error inserting '/lib/xen-platform-pci.ko': -1 Unknown symbol in module ERROR: /bin/insmod exited abnormally! (pid 210) Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* | merge with xen-unstable.hgAlex Williamson2008-02-0444-2340/+5052
|\|
| * x86: adjust reserved bit page fault handlingKeir Fraser2008-02-041-3/+19
| | | | | | | | | | Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
| * x86 shadow: Cleanup for early-unshadow code.Keir Fraser2008-02-042-16/+3
| | | | | | | | | | | | | | The unhooking of toplevel shadow entries has been removed; the rest of the early-unshadow code needs to reflect that. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
| * ioemu: use SIGHUP instead of SIGKILLKeir Fraser2008-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | The stub domain device model needs to trap the termination signal so as to actually destroy the stub domain. SIGKILL can't be trapped, SIGTERM is caught by SDL and so may be unnoticed. SIGHUP can be trapped and is not caught by SDL (and by default causes a process termination without core). Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
| * Revert 16947:32b898768217027. Breaks HVM qcow-backed discs.Keir Fraser2008-02-044-11/+7
| | | | | | | | Sigend-off-by: Keir Fraser <keir.fraser@citrix.com>
| * hvm: FPU management cleanups.Keir Fraser2008-02-036-97/+98
| | | | | | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
| * vmx realmode: HOST_CR0.TS must be cleared when restoring guest FPUKeir Fraser2008-02-034-14/+15
| | | | | | | | | | | | | | state, otherwise in-Xen CR0.TS value becomes set again on next vmexit. Then we crash the next time we try to emulate an FPU instruction. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
| * Revert 16963:d29d74d4eeac and 16750:2ac0fd9fd4b4.Keir Fraser2008-02-032-28/+5
| | | | | | | | | | | | Continue to SIGKILL qemu-dm so that 'xm destroy' should always work rather than hang if qemu-dm is in a bad state. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
| * Fix hvmloader makefile dependencies, and do not recurse intoKeir Fraser2008-02-022-2/+2
| | | | | | | | | | | | | | tools/firmware/etherboot by default (the dependency of eb_roms.h on Config does not seem to always prevent the build from going ahead, for some reason). Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
| * etherboot: Supply pre-built option ROMs to avoid needing to buildKeir Fraser2008-02-026-25/+4135
| | | | | | | | | | Etherboot from scratch in most situations. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
| * Fix to Xen NAT network scripts for Debian.Keir Fraser2008-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | Xen recently (changeset 16873:86c32269ba60) started looking for a DHCP defaults file in /etc/sysconfig/dhcpd or /etc/defaults/dhcp. Debian (lenny) puts this file in a different place though: /etc/default/dhcp3-server. I added this location to Xen's search path. From: Michael Abd-El-Malek <mabdelmalek@cmu.edu> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
| * xend: Fix grow of the LEGACY_UNSUPPORTED_BY_XENAPI_CFG list each timeKeir Fraser2008-02-021-2/+2
| | | | | | | | | | we instantiate a new XendConfig. Signed-off-by: Pascal Bouchareine <pascal@gandi.net>
| * Fix save/restore failure cleanupKeir Fraser2008-02-021-3/+11
| | | | | | | | | | | | | | | | | | | | | | The save failure cleanup introduced in 13543:207523704fb1 is incorrect: if we didn't get as far as actually suspending the domain, then the guest domain will not be expecting the devices to be removed (seen on both Linux and Solaris, which don't expect a 'Closing' state when they hold the device open). Only re-jig devices if we definitely shut the domain down. Signed-off-by: John Levon <john.levon@sun.com>
| * hvm: Fix 'xm save' bug in qhich qemu-dm ignores SIGTERM.Keir Fraser2008-02-011-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When saving a guest in early ChangeSet (Before 16750), Xend will send "SIGKILL" signal to kill qemu process. But in ChangeSet 16750, the signal is modified to "SIGTERM". However, "SIGTERM" handler has been registered by SDL in qemu. So when qemu process receives a "SIGTERM", SDL will catch it and it will push out a "SDL_QUIT" even to qemu. If qemu can receive that event, it will be successfully terminated. While we do "xm save", qemu can't go out from the dead loop "while (suspend_requested) {...}" in main_loop() to handle the SQL_QUIT event. So it is unable to poll that "SDL_QUIT" event. This makes xm save command hang. This fix enables qemu to poll the "SDL_QUIT" event while doing save. Signed-off-by: Xu Dongxiao <dongxiao.xu@intel.com>
| * x86 shadow: Fix cross-page write emulation failure.Keir Fraser2008-02-011-1/+1
| | | | | | | | Signed-off-by: Disheng Su <disheng.su@intel.com>
| * Direct Linux boot: XenD changes for HVM direct Linux boot.Keir Fraser2008-02-013-6/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch provides the tools support for direct kernel boot of HVM guests. Currently the config files in /etc/xen support the args 'kernel', 'ramdisk' and 'extra'. For PV guests these have the obvious meaning. Unfortunately HVM guest configs hijacked the 'kernel' parameter and use it to refer to the path of the HVM firmware. So, this patch adds a new config file parameter called 'loader' which is used to refer to the HVM firmware instead. The conventions for loading the initrd image say that it should live at the end of memory. This requires QEMU to know the size of the guest's initial RAM allocation, so image.py is changed to pass the '-m' flag to QEMU. The HVMImageHandler class in image.py is changed so that if the 'kernel', 'ramdisk' or 'extra' params were given in the config these are passed to QEMU with the '-kernel', '-initrd' and '-append' flags respectively. Finally, the 'loader' param is used as the arg to 'xc_hvm_build' instead of the old 'kernel' param. For the sake of compatability with old HVM guest config files, if the config file has a 'kernel' param whose path matches that of the HVM firmware, then we automatically convert this 'kernel' param into the 'loader' param. This ensures existing HVM guests work without changes required. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
| * Direct Linux boot: Support booting non-relocatable Linux kernels.Keir Fraser2008-02-011-2/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces a hack to make non-relocatable kernels bootable too. Non-relocatable kernels absolutely want to run at 0x100000 and are not at all happy about being at 0x200000. Fortunately, thanks to crazy programs like LOADLIN, Linux has a couple of hooks in its boot process which can be used to play games. The 'code32_switch' hook is executed immediately following the switch to protected mode. So, this patch installs a hook at 0x200000+kernel_size. The hook is hand crafted assembly which sets up all the segments as needed, then essentially does memmove(0x100000,0x200000,kernel_size) and finally does an unconditional jmp to 0x100000. Amazingly this actually really does work. It has been successfully tested with RHEL-2.1 and Fedora Core 6 install kernels on i386, and Fedora Core 6 and 7 kernels on x86_64. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
| * Direct Linux boot: Support booting relocatable Linux kernels.Keir Fraser2008-02-011-88/+266
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces the basic infrastructure for direct kernel boot in the ioemu copy of QEMU. The current #ifdef disabled code is actually obsolete wrt to upstream QEMU code. So this is removed entirely. In its place I have imported the latest upstream QEMU code. The QEMU code assumes that the guest RAM is directly mapped into the QEMU process, so there were some changes neccessary. Instead of strcpy/memcpy'ing the args and kernel header into guest RAM, cpu_physical_memory_rw is used. Intead of fread() the initrd and kernel into guest RAM a helper function is used fread2guest which reads into a small buffer and then uses cpu_physical_memory_rw. NB in reading the following, Documentation/i386/boot.txt is a useful reference for what's going on. Next, instead of loading the kernel at 0x100000, this code loads it at 0x200000. This is far enough away that there's no risk of it overlapping with the HVM firmware image. If the Linux kernel boot protocol is 0x205 or later, and the flag at offset 0x234 in the kernel header is 1, then the guest kernel was built with CONFIG_RELOCATABLE=y. In this scenario we merely need to tell the kernel what address it has been relocated to by writing 0x200000 into the kernel header at offset 0x214. When switching from real mode into protected mode the kernel will immediately start executing at 0x200000 and be happy with life. This should work for 2.6.20 or later on i386, and 2.6.22 or later on x86_64. This has been verified with Fedora 7 and Fedora 8 bare metal kernels on i386 and x86_64 from the $TREE/images/pxeboot of the install trees. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
| * hvm: Etherboot for E100 NICKeir Fraser2008-01-315-28/+77
| | | | | | | | | | Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
| * Remove unused find-gcc-3 script.Keir Fraser2008-01-311-10/+0
| | | | | | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>