aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [XEN] Shadow: cache gva->gfn+rights translations between guest TLB flushessparse-tree-deprecatedTim Deegan2007-06-015-8/+163
| | | | | to make lookups faster for emulation and hvm_copy. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [XEN] Shadow: emulate a few extra instructions on PAE pagetable writesTim Deegan2007-06-015-25/+101
| | | | | in the hope of catching the "other half" write without another enter/exit. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* VMX: Only write top-half of machine addresses into VMCS fields in PAE mode.kfraser@localhost.localdomain2007-05-312-3/+3
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* hvm: Pause domain during state save/load.kfraser@localhost.localdomain2007-05-311-0/+4
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Updates for XEN_LINUX_SOURCE=hg-clone.Ian Campbell2007-05-315-20/+82
| | | | | | | | | | | | | | | | | | By default search for mercurial repositories in $(LINUX_SRC_PATH) followed by a location derived from the current Xen repository's default parent. e.g. A clone of http://xenbits.xensource.com/xen-unstable.hg will derive http://xenbits.xensource.com/linux-2.6.18-xen.hg. A specific repository can be specified by giving XEN_LINUX_HGREPO=<URL or path> on the make command line. Add capability to put XEN_LINUX_UPDATE=y on the make command line to update the Linux repository. Disabled by default since we don't want to touch a developers repository without permission. Dropped XEN_LINUX_HGUPDATES since it was unecessary and confusing. Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
* hvm: Exceed maximum number of ioemu's NIC for VNIF.kfraser@localhost.localdomain2007-05-311-23/+23
| | | | | | | QEMU should ignore excess NICs instead of failing to initialise. Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com> Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
* hvm: Allow GNTTABOP_query_size.kfraser@localhost.localdomain2007-05-311-8/+19
| | | | | | Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com> Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* Fix stale email addresses in xenstat and xentop.kfraser@localhost.localdomain2007-05-318-20/+20
| | | | | | | | | | | | Our @us.ibm.com emails cannot forward to us; we do not have access to them when not interning at IBM. People have attempted to reach us via those addresses and failed; occasionally they've Googled for a current address, which made us realize the problem. Change each email to a more permanent address, so people can reach us in the future. Change bug reporting addresses to a xen mailing list rather than an individual. Signed-off-by: Josh Triplett <josh@kernel.org>
* Fix the very-slow-IDE-IO-speed issue of Qemu 0.90kfraser@localhost.localdomain2007-05-311-0/+6
| | | | | | | | | | | | | | | | | | | | | | c/s 15021 updated Qemu to 0.90. In the new Qemu's ide.c, asynchronous IO (AIO) is used to replace the previous DMA thread; here when an AIO request is completed, dom0 sends a signal SIGUSR2 to Qemu (see block-raw.c: qemu_aio_init(),raw_aio_setup()), then the signal interrupts the select() in main_loop_wait() at once, next, qemu_aio_poll() is called to reap a completed AIO request. However, in certain Linux distributions (i.e., x86_64 RHEL 4u4), if Qemu is spawned by the python script image.py of Control Panel, the SIGUSR2 of Qemu is blocked by default due to some reasons (i.e. it seems Python 2.3.4 has this issue; 2.4.2 is ok); so in most cases the select() in main_loop_wait() can only time out in 10ms, then the qemu_aio_poll() is called - this results in a very slow disk IO speed... This patch ensures aio_sig_num is unblocked when the AIO is used in Qemu 0.90. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* hvm: Correctly hook VLAPIC MSR change notification for VMX intokfraser@localhost.localdomain2007-05-314-2/+12
| | | | | save/restore path. Signed-off-by: Keir Fraser <keir@xensource.com>
* Remove 'hpet_force' option. Replace with 'clocksource' option to allowkfraser@localhost.localdomain2007-05-301-13/+24
| | | | | | | | | forced selection of platform clocksource, overriding the default priority ordering. Usage: clocksource={pit,hpet,cyclone,acpi} Signed-off-by: Keir Fraser <keir@xensource.com>
* Add support for ACPI PM Timer as platform clock source.kfraser@localhost.localdomain2007-05-302-1/+56
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Clean up around domain init/destroy.kfraser@localhost.localdomain2007-05-304-29/+28
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Make header mismatch checking more robust against build time changes inIan Campbell2007-05-302-1/+9
| | | | | | | | | | xen/include/public/foreign. Unfortunately diff's -x and -X options do not support excluding paths just individual files so we have to list unqualified filenames. This is ok for now since there are no filename clashes. Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
* Simplify APIC_ACCESS VMX support.kfraser@localhost.localdomain2007-05-3012-201/+157
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Add VMX memory-mapped Local APIC access optimization.kfraser@localhost.localdomain2007-05-3010-9/+196
| | | | | | | | | | | | | | | | | | | Some operating systems access the local APIC TPR very frequently, and we handle that using software-based local APIC virtualization in Xen today. Such virtualization incurs a number of VM exits from the memory-access instructions against the APIC page in the guest. The attached patch enables the TPR shadow feature that provides APIC TPR virtualization in hardware. Our tests indicate it can significantly boost the performance of such guests including 32-bit Windows XP/2003. Moreover, with the patch, local APIC accesses other than TPR in guests are intercepted directly as APIC_ACCESS VM exits rather than PAGE_FAULT VM exits; this can lower the emulation cost of such accesses. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* Check for mismatch between headers shared by Linux and Xen.Ian Campbell2007-05-305-0/+18
| | | | | | | | This is only enabled for the linux-2.6-xen tree and is intended to ensure that the separate Linux tree stays up to date once we switch away from the sparse tree. Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
* Fix preemption of multicalls in compat mode.Ian Campbell2007-05-303-5/+15
| | | | | | | | | | | | | | | | mcs->call (struct multicall_entry) always needs to be translated into mcs->compat_call (struct compat_multicall_entry) when a multicall is preempted in compat mode. Previously this translation only occured for those hypercalls which explicitly called hypercall_xlat_continuation() which doesn't cover all hypercalls which could potentially be preempted. Change hypercall_xlat_continuation() to only translate only the hypercall arguments themselves and not the multicall_entry layout. Translate the layout for all hypercalls in in compat_multicall() instead. Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
* [NET] back: Add lazy copyingkfraser@localhost.localdomain2007-05-303-20/+143
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds lazy copying using the new unmap_and_replace grant table operation. We keep a list of pending entries sorted by arrival order. We'll process this list every time net_tx_action is invoked. We ensure that net_tx_action is invoked within one second of the arrival of the first packet in the list. When we process the list any entry that has been around for more than half a second is copied. This allows up to free the grant table entry and return it to domU. If the new grant table operation is not available (e.g., old HV or architectures that don't support it yet) we simply copy each packet as we receive them using skb_linearize. We also disable SG/TSO if this is the case. By default the new code is disabled. In order to enable it, the module needs to be loaded with the argument copy_skb=1. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* [LINUX] gnttab: Add basic DMA trackingkfraser@localhost.localdomain2007-05-304-11/+169
| | | | | | | | | | | | | | | | | | This patch adds basic tracking of outstanding DMA requests on grant table entries marked as PageForeign. When a PageForeign struct page is about to be mapped for DMA, we set its map count to 1 (or zero in actual value). This is then checked for when we need to free a grant table entry early to ensure that we don't free an entry that's currently used for DMA. So any entry that has been marked for DMA will not be freed early. If the unmapping API had a struct page (which exists for the sg case) then we could do this properly. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* [XEN] gnttab: Add new op unmap_and_replacekfraser@localhost.localdomain2007-05-3011-24/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The operation unmap_and_replace is an extension of unmap_grant_ref. A new argument in the form of a virtual address (for PV) is given. Instead of modifying the PTE for the mapped grant table entry to null, we change it to the PTE for the new address. In turn we point the new address to null. As it stands grant table entries once mapped cannot be remapped by the guest OS (it can however perform a new mapping on the same entry but that is within our control). Therefore it's safe to manipulate the mapped PTE entry to redirect it to a normal page where we've copied the contents. It's intended to be used as follows: 1) map_grant_ref to v1 2) ... 3) alloc page at v2 4) copy the page at v1 to v2 5) unmap_and_replace v1 with v2 Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Added compat integration (PAE-on-64). Signed-off-by: Keir Fraser <keir@xensource.com>
* xend: Don't destroy domains on shutdown timeout.kfraser@localhost.localdomain2007-05-301-4/+4
| | | | | | | Do not destroy domains on shutdown timeout: the administrator needs to be able to decide what to do if a domain does not shut down. Signed-off-by: John Levon <john.levon@sun.com>
* Fix xenstore entry accountingkfraser@localhost.localdomain2007-05-304-11/+104
| | | | | | | | | xenstored is incorrectly accounting domain nodes when transactions fail. Store pending count changes in the transaction structure, and apply at transaction completion, instead of directly applying the changes. Signed-off-by: Max Zhen <max.zhen@sun.com>
* Fix xen build on NetBSD.kfraser@localhost.localdomain2007-05-303-3/+5
| | | | | From: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* xen: Remove assumption that first NUMA node to be discovered is node0.kfraser@localhost.localdomain2007-05-301-19/+24
| | | | | | Based on a patch by Alex Williamson. Signed-off-by: Keir Fraser <keir@xensource.com>
* pv-on-hvm: Re-init hypercall stubs page after HVM save/restore.kfraser@localhost.localdomain2007-05-251-15/+61
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* x86: Sanitise the MFN passed to mod_l1_entry().kfraser@localhost.localdomain2007-05-251-2/+6
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Correct 32on64 handling of VCPUOP_register_runstate_memory_area. WeIan Campbell2007-05-253-3/+9
| | | | | | | | | | | | were copying too many bytes from the guest so the test for area.addr.h.c != area.addr.p was failing. Added a WARN_ON to the kernel to catch this case. It would be a BUG_ON but this would break the new kernel on older hypervisors and the only real problem is that stolen time is not updated, which we can live with. Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
* Revert 15164:d93e560c1d50afcf39c99a4211c20c8b9ce63c38kfraser@localhost.localdomain2007-05-251-10/+4
|
* xend: Fix PAM authentication method for some versions of PyPAM.kfraser@localhost.localdomain2007-05-251-1/+1
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* LINUX/x86_64: Cleanup 15129:a40967e39652 by using __pgd rather thanIan Campbell2007-05-252-3/+3
| | | | | | | | | | abusing mk_kernel_pgd. Also set the user bit on the vsyscall entry in the user pgd. Both changes suggested by Jan Beulich. Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
* Factor out sparse tree makefile fragments and introduce hg-clone andIan Campbell2007-05-2516-134/+247
| | | | | | | | | | | | | tarball methods in preparation for migrating away from the sparse tree layout. This re-introduces 14883:6568c1882af5 and 14862:98efd2e410ae plus further fixes. Also add makefile fragments to support building the paravirt ops tree (make linux-2.6-paravirt-build). Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
* xend: Fix checkname so that it detects duplicate domains.kfraser@localhost.localdomain2007-05-251-1/+1
| | | | Signed-off-by: Mats Petersson <mats.petersson@amd.com>
* [XEND/XM] Improve error reporting in 'xm restore'.kfraser@localhost.localdomain2007-05-252-4/+10
| | | | | From: Mats Petersson <Mats.Petersson@amd.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* linux: Fix PV-on-HVM crash when installing PV drivers on native system.kfraser@localhost.localdomain2007-05-252-0/+2
| | | | | From: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* xend: Increase shutdown timeout.kfraser@localhost.localdomain2007-05-251-1/+1
| | | | | | | | 30 seconds is not a very long time for a busy domain to cleanly shutdown all its services, which may be arbitrary in complexity. Increase the timeout to 5 minutes. Signed-off-by: John Levon <john.levon@sun.com>
* Do not destroy domains that timeout when shutting down.kfraser@localhost.localdomain2007-05-251-4/+10
| | | | | | | | | Instead of violently destroying a domain that is not responding to a shutdown request, rename the domain to indicate the problem and leave it alone; this allows the admin to make corrective actions (which may or may not include destroying the domain). Signed-off-by: John Levon <john.levon@sun.com>
* xm: Extend width of ID in 'xm list' to 5 digits.kfraser@localhost.localdomain2007-05-241-12/+12
| | | | | | | | | | | | The Domain ID is currently expected to fit in 3 digits. When doing extensive testing on SAVE/RESTORE I can easily get ID's into the 4-digit range, which makes some of the formatting to get out of sync. Extend the width to 5 digits (and change some %-ns to %ns, as the ID for example is right justified, %-ns is left-justified, which didn't look too good). Signed-off-by: Mats Petersson <mats.petersson@amd.com>
* xm-test: ia64 min memory & arbitrarily large ramdiskkfraser@localhost.localdomain2007-05-241-0/+14
| | | | | | | | | | | | | | | | | | | 1) Sets a minimum of 128MB RAM for an ia64 domU; this limit was set after experimentation, which seems to indicate it's a reasonable lower limit (the 32MB limit previously in place did not allow an ia64 domU to start). If there's any problem with this, I don't mind splitting the patch and sending it to the ia64 list, but it was small, so I hope it's okay to include it. 2) xm-test uses ramdisks built with uClibc, which doesn't compile on ia64. I was able to create a ramdisk by hand, but as it was too large, the resultant domU crashed after boot. This patch enables the use of an arbitrarily large ramdisk, so long as it's uncompressed. As xm-test builds only uncompressed ramdisks, I figured this was reasonable for that specific application. Suggestions on how to detect and handle a compressed ramdisk would be welcome. Signed-off-by: Alex Williamson <alex.williamson@hp.com>
* xend: Give "xm start" a -c parameter for connecting to the consolekfraser@localhost.localdomain2007-05-241-14/+53
| | | | | From: Chris Lalancette <clalance@redhat.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* xend: Add site-packages into Python search pathkfraser@localhost.localdomain2007-05-241-6/+7
| | | | Signed-off-by: S.Caglar Onur <caglar@pardus.org.tr>
* VTPM: Fix bug where enabling vtpm causes installation errorkfraser@localhost.localdomain2007-05-241-1/+1
| | | | Signed-off-by: S.Caglar Onur <caglar@pardus.org.tr>
* ioemu: Attempt to setup tap interface up to 3 times.kfraser@localhost.localdomain2007-05-241-2/+4
| | | | | | | | | | | | | | | | As there is a (small) chance that vl.c:tap_open() fails (due to some sort of race-condition in the Linux kernel, which is noted as a bug in the source .../net/core/dev.c), we should attempt it again a couple of times if it doesn't succeed on the first attempt. I think three times in total is sufficient to avoid the problem. If tap_open() fails, qemu-dm will exit, which means that the domain dies - which is not such a good thing when attempting to restore a saved domain [of course, it would be even worse if it started, but didn't have networking - because there may not be a way to shut it down cleanly without network]. Signed-off-by: Mats Petersson <mats.petersson@amd.com>
* xend: Fix for removing devices at save/destroy domain.kfraser@localhost.localdomain2007-05-241-20/+29
| | | | | | | | | | | | | | | | | | | | | | | | The function XendDomainInfo:_releaseDevices() is called during the save/destroy phase of a domain. It made some attempt to clean up the devices, but wasn't complete, leaving dangling devices in the xenstore. Not a big problem with normal use of Xen, but a buildup over a large number of save/destroy instances, it would make the xenstore database grow quite large, which in turn meant swap-thrashing in Dom0. This patch makes use of the destroyDevices() function in XendDomainInfo. This function needed some re-writing to make it work correctly - I think it had some old code (not sure how old, as xm annotate says that it's changeset 12071, but that, I think, is when it was split out from XendDomain.py, rather than when it was created). I have tested this over a few hundred save/restore cycles [two domains constantly saved/restored with a short sleep to let them process some work] combined with a loop of "xenstore-ls|wc". The output of the latter is pretty much constant (it obviously varies a bit depending on when in the save/restore cycle it hits). Previously, it would increase by some 10 lines or so per save/restore cycle. Signed-off-by: Mats Petersson <mats.petersson@amd.com>
* linux/x86: consolidate pte_val/p[mug]d_val replacementskfraser@localhost.localdomain2007-05-248-73/+71
| | | | | | | | - replace incomplete pXX_val_ma() set with complete __pXX_val() set - use __pXX_val() instead of pXX_val() when only flags are accessed or the frame number is only compared against zero Signed-off-by: Jan Beulich <jbeulich@novell.com>
* linux/x86-64: force _PAGE_NX on the 1:1 mapping (matching native)kfraser@localhost.localdomain2007-05-241-10/+7
| | | | Signed-off-by: Jan Beulich <jbeulich@novell.com>
* blktap: Fix compile errorskfraser@localhost.localdomain2007-05-243-6/+13
| | | | | | | When compiling the various blktap drivers with warnings cranked up, I get errors that return values are not checked. Signed-off-by: Charles Coffing <ccoffing@novell.com>
* xend: Tear down domain if device hotplug fails during startupkfraser@localhost.localdomain2007-05-241-2/+8
| | | | | | | | | | | | | | | | If creating an unmanaged guest (eg xm create), if device hotplug fails during the startup of the guest, then the guest will be torn down again. If creating and starting a managed guest (eg xm new && xm start), then if device hotplug fails, the still born guest gets left in 'paused' state. This confuses users no end, who go an unpause and then get all upset when it shortly crashes (due to lack of disk or network devices). The attached patch fixes XenDomain.py's domain_start() method so that if waitForDevices() fails, then the entire domain is torn down. This is the same approach used in xm create. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* xend: Fix CPU affinity reset across save/restore.kfraser@localhost.localdomain2007-05-241-23/+41
| | | | | Fixes bug #936. Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* Console daemon - remove duplicate include.kfraser@localhost.localdomain2007-05-241-1/+0
| | | | Signed-off-by: Mats Petersson <mats.petersson@amd.com>