aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* PV-on-HVM: Fix __xen_suspend() for changed XenLinux interface.Keir Fraser2008-02-291-1/+2
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Shadow audit: paging-disabled shadows no longer need special treatmentKeir Fraser2008-02-281-22/+9
| | | | | | when translating the frame numbers found in the entries. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* x86 shadow: shadow_check_gwalk() must sh_unmap_domain_page() each pageKeir Fraser2008-02-281-14/+12
| | | | | it temporarily maps. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Fix x86 build.Keir Fraser2008-02-282-4/+4
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* stubdom: Fix compilation after abs_z to rel_z changeKeir Fraser2008-02-282-9/+7
| | | | | From: Samuel Thibault <samuel.thibault@eu.citrix.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* NUMA node migrationKeir Fraser2008-02-284-7/+45
| | | | | | | | | | | | | | | | | | Adds NUMA node migration based on live migration to xend. By adding another parameter to "xm migrate" the target NUMA node number gets propagated to the target host (can be both localhost or a remote host). The restore function then sets the VCPU affinity accordingly. Only changes Python code in xend. I hope that the patch doesn't break XenAPI compatibility (adding a parameter seems fine?). # xm migrate --live --node=<nodenr> <domid> localhost <nodenr> is the number as shown with 'xm info' under node_to_cpu I am aware that using live migration isn't the best approach (takes twice the memory and quite some time), but it's less intrusive and works fine (given localhost migration stability...) Signed-off-by: Andre Przywara <andre.przywara@amd.com>
* x86 shadow: Audit tables and guest walk when we know they are consistent.Keir Fraser2008-02-281-2/+3
| | | | | From: Gianluca Guida <gianluca.guida@eu.citrix.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Add ACPI tables support for AMD IOMMUKeir Fraser2008-02-2812-54/+1314
| | | | | | | | Configuration information for AMD IOMMU control fields are descirbed by I/O virtualization Reporting Structure (IVRS) table, this patch set parses IVRS table and updates iommu control flags according to the result. Signed-off-by: Wei Wang <wei.wang2@amd.com>
* blktap: Fix unused warnings in block-qcow2.c with -D_FORTIFY_SOURCE=2.Keir Fraser2008-02-281-161/+0
| | | | Signed-off-by: Kevin Wolf <kwolf@suse.de>
* x86 shadow: Remove lock on first guest table walk.Keir Fraser2008-02-284-43/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Existing shadow fault path grabs big lock before walking guest tables, to ensure consistency with shadow content lest concurrent change from other vcpu in a bad OS. But this lock brings more lock contention when scaled up for a good guest which already prevents above case happen. So this patch tries to remove the lock on first guest table walk, and then delay check at some special points. The key is to check whether any guest table update happens between 1st walk and holding shadow lock. Here we take two hints for guest table update: * write permission removal * write emulation If any above two operations are observed within the race window, it indicates possiblity that previous walk result may be inaccurate and re-check is requried. If mismatch, simply return to trigger another fault. I made some experiment to sample perfc count: <64bit guest> 3.7% of gwalks are re-checked For re-check, 68% comes from write permission removal <32bit pae guest> 7.2% of gwalks are re-checked For re-check, 54.9% comes from write permission removal Actually previous fast emulation optimization already skip lots of guest table walks, and thus above ratio can be smaller if compared to total shadow fault count. Basically shadow promotion with write permision removal does suffer higher overhead, but the benefit to reduce lock contention is more obvious. Improvement on kernel compile for this patch is: (64bit Xen) 32bit guest: 1.1% pae guest: 0.4% 64bit guest: 0.5% Signed-off-by Kevin Tian <kevin.tian@intel.com>
* stubdom: fix mini-os messages log and SDL terminationKeir Fraser2008-02-281-18/+9
| | | | | | | | | | | We can now let the stubdom-dm script output mini-os messages to stdout/err so that it gets output to the new /var/log/xen/qemu-dm-$domname.log In the SDL case, we must not wait for the VNC server port to appear, as it won't ever. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* Rename struct xenkbd_position member abs_z to rel_z. Z-axis motion isKeir Fraser2008-02-282-4/+6
| | | | | | relative, not absolute. From: Markus Armbruster <armbru@redhat.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* kexec: extend hypercall for efi memory map, boot parameter and xenheap regionsKeir Fraser2008-02-282-7/+50
| | | | | | | | | | | | | | | | | Extend the kexec hypercall to allow it to return the efi memory map, boot parameter and xen heap regions. The efi memory map and boot parameter regions need to be supplied by xen to dom0, rather than established by dom0 as dom0's memory is not machine memory and thus the regions are not in the correct location. These regions are inserted into machine_iomem by dom0. The xen heap region is needed as on xen the hypervisor code and heap exist in two different EFI memory regions, which are reflected in machine_iomem. Thus a single xen code region can't be inserted into machine_iomem. Signed-off-by: Simon Horman <horms@verge.net.au>
* kexec: Add machine_kexec_get()Keir Fraser2008-02-289-14/+103
| | | | | | | Introduce machine_kexec_get to allow architecture-specific handling of the xen region. x86_64 is currently different to x86_32 and ia64. Signed-off-by: Simon Horman <horms@verge.net.au>
* kexec: limit scope of the use of compat_kexec_range_tKeir Fraser2008-02-282-22/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Unless I am mistaken, the compat functions are provided a stable ABI. This includes providing a stable version of xen_kexec_range_t in the form of compat_kexec_range_t. However, internally it doesn't really matter how xen represents the data. Currently the code provides for the creation of a compat version of all kexec range functions, which use the compat_kexec_range_t function. This is difficult to extend if range code exists outside of xen/common/kexec.c. The existence of "#ifdef CONFIG_X86_64" in the code suggests that some of the range code might be better off in architecture specific code. Furthermore, subsequent patches will introduce ia64-specific range handling code, which really would be much better off somewhere in arch/ia64/. With this in mind, the handling of compat_kexec_range_t is changed such that the code which reads and returns data from user-space translates between compat_kexec_range_t and xen_kexec_range_t. As, padding aside, the two structures are currently the same this is quite easy. Things may get more tricky in the future, but I don't believe this change is likely to make things significantly worse (or better) in that regard. In any case, refactoring can occur again as required. Signed-off-by: Simon Horman <horms@verge.net.au>
* xend: Remove duplicate setResume() method.Keir Fraser2008-02-281-3/+0
| | | | Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* Fix error message of xm suspend and xm resume for Domain-0.Keir Fraser2008-02-281-2/+2
| | | | Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* ioemu: Send logs to stderr and have xend redirect stderr to theKeir Fraser2008-02-284-7/+32
| | | | | | | | | | | | | | | | | correct log file. At the same time, this patch renames the logfile to be 'qemu-dm-{NAME}.log' instead of qemu-dm-{ID}.log. This makes it easier to track/find the QEMU logfile associated with a VM. It will also save 1 backup qemu-dm-{NAME}.log.1 so if a domain crashes & restart, you don't loose/overwrite the logfile immediately. Finally it changes the QEMU monitor prompt back to '(qemu)' instead of '(HVMXen)' because automated tools /scripts interacting with QEMU's monitor need a consistent prompt to look for & changing it for Xen serves no useful purpose. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* stubdom: use PVFB so as to e.g. permit SDL displayKeir Fraser2008-02-287-29/+311
| | | | | | | | This adds support in ioemu for PVFB frontend as stubdomain display. This permits for instance to use SDL in dom0 to perform the eventual display. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* Fix non-portability in xentraceKeir Fraser2008-02-281-4/+4
| | | | | | | Replace statfs() with the equivalent statvfs(), and correct the block size multiplier. Signed-off-by: John Levon <john.levon@sun.com>
* ioemu: Expandable storage backends should defeat block-device range checks.Keir Fraser2008-02-277-7/+24
| | | | Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Fix xm save command's #params check.Keir Fraser2008-02-271-5/+2
| | | | Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* xend: Set default vcpu affinity for better performance in NUMA systems.Keir Fraser2008-02-271-0/+33
| | | | Signed-off-by: Duan Ronghui <ronghui.duan@intel.com>
* ioemu: Fix e1000 mmio range size.Keir Fraser2008-02-271-1/+1
| | | | | | | | | Per Intel 82540EM Software Developer's Manual pp. 211, the mmio size is 0x20000, or address overlapping occurs and causes the second card to fail, which happened to me earlier. From: Tina Yang <tina.yang@oracle.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* minios: have xenbus_printf return the error returned by xenbus_writeKeir Fraser2008-02-271-3/+1
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* Fix libxenstat on SolarisKeir Fraser2008-02-271-33/+7
| | | | | | | Recent Solaris enhancements have changed the way virtual NIC statistics are collected - fix libxenstat up for this. Signed-off-by: John Levon <john.levon@sun.com>
* stubdom: log and documentation fixesKeir Fraser2008-02-262-9/+13
| | | | | | | | - Document that for vnclisten names and 127.0.0.1 should not be used. - Documentation cosmetic fixes - Dump qemu output to the usual logs Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* stubdom: fix x86_32 compilation by __moddi3 from FreeBSDKeir Fraser2008-02-261-0/+23
| | | | | | (like has been done previously for umoddi3 etc.) Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* Fix xm mem-max command to restore previous setting if xc.domain_setmaxmem fails.Keir Fraser2008-02-261-0/+2
| | | | Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* xend: Add free memory size of every node in physinfo to help user toKeir Fraser2008-02-262-2/+29
| | | | | | get usage of memory of their NUMA machine. Signed-off-by: Duan Ronghui <ronghui.duan@intel.com>
* ioemu: VNC updates should be sent only when requested.Keir Fraser2008-02-261-22/+174
| | | | | | | | | | | | | | | | | | | | Reading qemu code I realized that the qemu vnc server sometimes sends framebuffer updates even if the client didn't request any. This is not consistent with the RFB protocol spec and can break some clients. This patch strictly enforces compliance with the RFB protocol making sure framebuffer updates are sent only if the client requested one. Doing so is more difficult than it seems because some framebuffer pseudo-encoding updates cannot be discarded but must be sent anyway: for example desktop resize and pixel format change messages. To solve the problem I wrote a queue that stores those messages and sends them as soon as the client asks for an update. Since 90% of the times the queue is used to store only few elements, the queue allocates 10 elements at the beginning and every time it runs out of elements allocates other 10 elements. This is should drastically limit the number of malloc and free needed to maintain the queue. I did some stress tests in the last couple of days and seems to work well. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* minios: add PVFB supportKeir Fraser2008-02-265-0/+683
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* ioemu: Do not sue xce_handle directly as a file descriptor.Keir Fraser2008-02-262-2/+2
| | | | | | | xce handles are not supposed to be used as file descriptors, but xc_evtchn_fd() be used. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* x86_emulate: Fix FNSTCW/FNSTSW modrm range check.Keir Fraser2008-02-261-2/+2
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* x86 hvm: Fix bugzilla bug 1172.Keir Fraser2008-02-261-1/+1
| | | | | | | Bug 1172 is caused by missing a type cast from mfn_t to paddr_t, when in pae mode and hsot memory is larger than 4G. Signed-off-by: Disheng Su <disheng.su@intel.com>
* xentrace: Add a time parameterKeir Fraser2008-02-261-1/+12
| | | | Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
* xentrace: Disable tracing by default on exitKeir Fraser2008-02-261-1/+38
| | | | | Includes an option to disable this behavior. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
* xentrace: Add option to reserve disk spaceKeir Fraser2008-02-261-2/+38
| | | | | | Before writing records, xentrace will check to make sure that there is a minimum amount of space left on the output filesystem. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
* xentrace: Fix --discard-buffers optionKeir Fraser2008-02-261-0/+7
| | | | Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
* ioemu: e1000 emulationKeir Fraser2008-02-265-1/+1868
| | | | | | | | | This is a direct port of the e1000 driver currently in Qemu CVS with extremely minimal changes. This is useful for Xen as new OSes may not support the old 100Mbps NICs we currently support (especially on non-x86). Drivers for e1000 should be more readily available. Signed-off-by: Alex Williamson <alex.williamson@hp.com>
* Fix restore of saved image containing rtc_timeoffsetKeir Fraser2008-02-261-1/+1
| | | | | | | | | Saved images contain rtc_timeoffset as a string value, resulting in a TypeError exception when calling xc.domain_set_time_offset() on restore. Cast rtc_timeoffset to int before calling xc.domain_set_time_offset(). Signed-off-by: Jim Fehlig <jfehlig@novell.com>
* vtpm: script function for identifying vTPM by its UUIDKeir Fraser2008-02-262-6/+32
| | | | | | | | I am adding some functions for external tools to call the vTPM scripts. It also contains a fix for the functions that previously used to be called by domain name, but now are using the vTPM's uuid as parameter. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* stubdom: Disable PCI passthrough functionality for now.Keir Fraser2008-02-251-1/+1
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* x86: Foreign mappings of HVM-guest pages should not affect type count,Keir Fraser2008-02-254-27/+30
| | | | | even when the mapping is made via a grant reference. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* hvmloader/acpi: Simplify Processor Object definitions.Keir Fraser2008-02-253-594/+563
| | | | | | | | | | No need to generate the correct number dynamically since present/not-present can be determined from the MADT. What *is* required is that we have a Processor Object for every present processor. We statically declare 16 Objects, which should be plenty for now. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xenoprof: Fix x86 32-on-64 xenoprof_arch_counter() implementation.Keir Fraser2008-02-253-0/+27
| | | | | From: George Dunlap <George.Dunlap@eu.citrix.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* blktap: Remove some code duplicationKeir Fraser2008-02-255-568/+324
| | | | | | | | With my qcow2 patch to blktap I contributed a bit to the mess, so here an attempt to clean up and remove at least some of the code duplication in the functions dealing with aio operations. Signed-off-by: Kevin Wolf <kwolf@suse.de>
* ioemu: Fix Solaris build.Keir Fraser2008-02-251-1/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* svm: Fix stupid typo in svm_set_interrupt_shadow().Keir Fraser2008-02-251-3/+4
| | | | | | | | Signed-off-by: Christoph Egger <christoph.egger@amd.com> svm: Also return STI *and* MOV-SS blocking from svm_get_interrupt_shadow(). Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* hvm: More emulation changes: push some of the realmode or HVM-emulateKeir Fraser2008-02-2213-281/+238
| | | | | specific stuff into core x86_emulate(). Signed-off-by: Keir Fraser <keir.fraser@citrix.com>