aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* pv-on-hvm: Signal crash to Xen tools when HVM guest panics.Keir Fraser2008-02-133-0/+59
| | | | | | | | | | | | | | | | | Attached patch adds a function to automatically dump core file when guest linux on HVM domain panics, in the same way as PV domain. I tested this patch with kernel 2.6.9 and 2.6.18 on both of x86 and ia64 (to buid for ia64, some patches in the ia64 tree are needed) by the following steps, and confirmed it works well: 1. Build xen-platform-pci.ko. 2. In /etc/xen/xend-config.sxp, set (enable-dump yes). 3. On guest linux, execute insmod: # insmod xen-platform-pci.ko 4. When guest linux panics, a core file is dumped. Signed-off-by: Tetsu Yamamoto <yamamoto.tetsu@jp.fujitsu.com>
* stubdom: missing two renames (avoids always re-compiling newlib)Keir Fraser2008-02-121-2/+2
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* stubdom: Rename stubdom/*.build into stubdom/*-build, newlib intoKeir Fraser2008-02-125-30/+279
| | | | | | | newlib-cvs, lwip into lwip-cvs. Fix .hgignore to ignore only them and not the patches. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* Make stubdom/Makefile override XEN_OS to MiniOS, and addKeir Fraser2008-02-126-17/+16
| | | | | | | config/MiniOS.mk. Add PTHREAD_LIBS to configs (usually holding -lpthread). Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* [BUILD] Disable LOCALVERSION_AUTO in upstream Linux builds.Keir Fraser2008-02-121-0/+1
| | | | | | | | | | If this option is enabled then the Xen mercurial version ID gets tacked onto the kernel version (e.g. 2.6.24-git22-hg2593b69b183b) which is unlikely to be useful or desirable. All the trees which we build using this method already have uniquely identifying versions (e.g. 2.6.24-git22 or 2.6.24-mm1). Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* [BUILD] Fixup support for building upstream kernels.Keir Fraser2008-02-124-17/+79
| | | | | | | | | | In particular: - support merged x86 architecture. To facilitate this it made sense to encode some existing logic in shell scripts rather than increasing complicated make conditionals. - set CONFIG_PARAVIRT_GUEST=y which is required for newer kernels. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* [BUILD] Add option to ensure kernel build is non-interactive.Keir Fraser2008-02-121-1/+7
| | | | | | | | This is useful for the non 2.6.18-xen builds where the defconfig at any particular momement may require additional questions to be answered. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* Add stubdomain support. See stubdom/README for usage details.Keir Fraser2008-02-1282-130/+3612
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move PAGE_SIZE and STACK_SIZE into __PAGE_SIZE and __STACK_SIZE in arch_limits.h so as to permit getting them from there without pulling all the internal Mini-OS defines. - Setup a xen-elf cross-compilation environment in stubdom/cross-root - Add a POSIX layer on top of Mini-OS by linking against the newlib C library and lwIP, and implementing the Unixish part in mini-os/lib/sys.c - Cross-compile zlib and libpci too. - Add an xs.h-compatible layer on top of Mini-OS' xenbus. - Cross-compile libxc with an additional xc_minios.c and a few things disabled. - Cross-compile ioemu with an additional block-vbd, but without sound, tpm and other details. A few hacks are needed: - Align ide and scsi buffers at least on sector size to permit direct transmission to the block backend. While we are at it, just page-align it to possibly save a segment. Also, limit the scsi buffer size because of limitations of the block paravirtualization protocol. - Allocate big tables dynamically rather that letting them go to bss: when Mini-OS gets installed in memory, bss is not lazily allocated, and doing so during Mini-OS is unnecessarily trick while we can simply use malloc. - Had to change the Mini-OS compilation somehow, so as to export Mini-OS compilation flags to the Makefiles of libxc and ioemu. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* libxenctrl headers should not pollute macro namespace withKeir Fraser2008-02-1212-49/+56
| | | | | | | mb/rmb/wmb. Instead add a xen_ prefix. Modify Xen's public headers to expect the prefixed names instead of bare mb/rmb/wmb, but gate this expectation on a bump of __XEN_INTERFACE_VERSION__. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* device-dm: Use SIGHUP before SIGKILLKeir Fraser2008-02-122-5/+18
| | | | | | | | | Make qemu unblock SIGHUP and make sure the default handler is in place. Have the domain killer send SIGHUP to the device-model script, allow the script 10s to clean up, and if still not dead, send SIGKILL. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* xend: Remove redundant check of maximum memory size.Keir Fraser2008-02-121-3/+0
| | | | | | | Currently, a wrong value of maximum memory size is checked by _safe_set_memory() and _memory_sanity_check(). Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* Add timestamp option to xenconsoledKeir Fraser2008-02-122-11/+99
| | | | | | | | | | | Similar to the --log option, --timestamp or -t takes: - none : No timestamping - hv : Timestamp hypervisor logs - guest: Timestamp guest logs - all : Timestamp guest and hypervisor logs From: Cole Robinson <crobinso@redhat.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Rendezvous selected cpus in softirq (stop_machine).Keir Fraser2008-02-119-13/+239
| | | | | | | | | | | | | This is similar to stop_machine_run stub from Linux, to pull selected cpus in rendezvous point and the do some batch work under a safe environment. Current one usage is from S3 path, where individual cpu is pulled down with related online footprints being cleared. It's dangerous to have other cpus checking clobbered data structure in the middle, such as cpu_online_map, cpu_sibling_map, etc. Signed-off-by: Kevin Tian <kevin.tian@intel.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* ioemu: Dynamic VNC colour depth.Keir Fraser2008-02-117-80/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The qemu vnc server changes its internal colour depth based on the client request. This way just one colour conversion is done: the one in vga_template.h, from the guest colour depth and the vnc server internal colour depth. This patch is meant to remove this colour conversion to improve performances. It accomplishes the goal making the qemu internal colour depth always the same as the guest colour depth. The basic idea is that the vnc client is the one that should do the colour conversion, if necessary. In general it should accept the pixel format suggested by the server during the initial negotiation. This behaviour can be set in most vnc clients (vncviewer included). If the guest changes colour depth, the qemu vnc server changes colour depth too and notifies the client. The problem is that the vnc protocol doesn't provide a message from the server to the client to ask for a colour depth change. So what I am doing is either: 1) quietly starting to do the conversion on vnc server (not gaining any performance here); 2) closing the vnc connection with the client, so the client can reconnect and choose the new pixel format. By default I am doing 1), however the second choice can be enabled passing the -vnc-switch-bpp command line option. In order to do the colour conversion on the vnc server I had to improve the colour conversion code already in place because it only supported conversions from 32 bpp. The patch adds colour conversion code that support conversions from any resolution to any resolution. A last note: to get most out of this patch it is best to set Windows to 16 bit colour depth, because the 24 bit mode is 24 bit depth and 24 bpp, meaning no alpha channel. The vnc protocol doesn't support 24 bpp, only 32 bpp, so this conversion is unavoidable. From: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xen-api: Fix some errors in Xen-API's PBD class.Keir Fraser2008-02-111-11/+11
| | | | Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* xen-api: Add TOC and hyperlink cross reference to xen-api documentKeir Fraser2008-02-113-1/+13
| | | | Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* ioemu: save 3MB of ioport tables (on 64bit machines)Keir Fraser2008-02-111-20/+40
| | | | | | by keeping then initialized to NULL and check for it in the handlers. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* ioemu: cope with partial reads/writes when using the read()/write()Keir Fraser2008-02-111-6/+19
| | | | | syscall interfaces. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* x86 hvm: Allow HPET to be configured as a per-domain config option.Keir Fraser2008-02-1111-454/+496
| | | | | | | | | | A new platform variable 'hpet' is added, which defaults to 0 for new guests (that is, hpet disabled). Default is off (no hpet) because hpet is currently less accurate in keeping time than PIT (because no timer_mode adjustments). Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xend: Better support for legacy HVM config with hvmloader configuredKeir Fraser2008-02-112-7/+5
| | | | | | | | via the 'kernel' config option: 1. Look for any string containing 'hvmloader'. 2. The 'kernel' option must be scrubbed to avoid taking PV-kernel-loading paths during later guest setup. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: Compile fix for p2m audit code.Keir Fraser2008-02-111-3/+4
| | | | | From Tom Woller. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* vt-d: Remap interrupt for passthru device if such HW is detected on VT-d ↵Keir Fraser2008-02-116-7/+356
| | | | | | platforms. Signed-off-by: Allen Kay <allen.m.kay@intel.com>
* x86: Fix build after xentrace changes.Keir Fraser2008-02-111-15/+18
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Document XenStore's new SET_TARGET messageKeir Fraser2008-02-111-0/+10
| | | | Signed-off-by: Ryan O'Connor <colossus@interchange.ubc.ca>
* x86 shadow: Move the shadow linear mapping for n-on-3-on-4 shadows soKeir Fraser2008-02-111-34/+70
| | | | | | | | that guest mappings of the bottom 4GB are not reflected in the monitor pagetable. This ensures in particular that page 0 is not mapped, allowing us to catch NULL dereferences in the hypervisor. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* xend: Remove redundant xc.domain_setcpuweight() all the way down to libxenctrl.Keir Fraser2008-02-114-49/+0
| | | | | Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* domain builder: make vfb = [ 'type=sdl' ] workKeir Fraser2008-02-111-3/+9
| | | | | | | | | | | When setting vfb = [ 'type=sdl' ] in a domain config file, qemu seems to be still using vnc. Make it use sdl as expected. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* ioemu stubdom: make daemonize optionalKeir Fraser2008-02-111-2/+13
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* ioemu: some ifndef NO_UNIX_SOCKETS were missingKeir Fraser2008-02-112-8/+8
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* ioemu: make AIO optional (already done upstream)Keir Fraser2008-02-111-0/+8
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* ioemu: fix compilation without softfloatKeir Fraser2008-02-112-0/+14
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* ioemu stubdom: make TPM optionalKeir Fraser2008-02-112-0/+3
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* qemu: Queue mouse clicks.Keir Fraser2008-02-112-15/+82
| | | | | | | | | qemu doesn't enqueue mouse events, just records the latest mouse state. This can cause some lost mouse double clicks if the events are not processed fast enought. This patch implements a simple queue for left mouse click events. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* xentrace: Remove redundant tb_done_init checks, and add missing ones.Keir Fraser2008-02-114-63/+79
| | | | | | | Hand inspection of gcc -02 output confirms significantly shorter codepaths for inactive (i.e. normal case) tracing. Signed-off-by: Michael A Fetterman <Michael.Fetterman@cl.cam.ac.uk>
* xentrace: Improve xentrace to use VIRQ_TBUF interrupts as well as aKeir Fraser2008-02-111-56/+82
| | | | | | | | user-specified polling interval in order to determine when to empty the trace buffers. Removed the old and unused/unimplemented new_data_threshold logic. Signed-off-by: Michael A Fetterman <Michael.Fetterman@cl.cam.ac.uk>
* xentrace: Allow xentrace to handle >4G of trace data.Keir Fraser2008-02-113-17/+69
| | | | | | | | | | | | | It was previously assert'ing when it hit 4G. Also, because the trace buffer is not a power of 2 in size, using modulo arithmetic to address the buffer does not work when the index wraps around 2^32. This patch fixes both issues, and as a side effect, removes all integer division from the hypervisor side of the trace mechanism. Signed-off-by: Michael A Fetterman <Michael.Fetterman@cl.cam.ac.uk>
* xentrace: Fix bug in logic for bytes_to_wrap in trace buffer.Keir Fraser2008-02-111-19/+10
| | | | | | | | | Admittedly, the bug could only be manifest with much larger trace records than are currently allowed (or equivalently, much smaller trace buffers), but the old code was harder to read, and thus hid the logic bug well, too. Signed-off-by: Michael A Fetterman <Michael.Fetterman@cl.cam.ac.uk>
* x86_emulate: Fix IMUL r/m8 emulation.Keir Fraser2008-02-071-0/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* vmx realmode: Add REP MOVS handler.Keir Fraser2008-02-071-0/+53
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86_emulate: Handle rep_ins, rep_outs, rep_movs hook failure and fallKeir Fraser2008-02-071-12/+15
| | | | | back to slow path. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86_emulate: Fix MUL emulation.Keir Fraser2008-02-071-0/+4
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* 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>