Commit Graph
19906 Commits
Author SHA1 Message Date
Keir Fraser 6e56d8aa4a docs: update vtd.txt for pv-ops dom0
Now VT-d works with pv-ops dom0, update vtd.txt to tell how to build
and use VT-d with pv-ops.

Signed-off-by: Weidong Han <weidong.han@intel.com>=
2009-07-07 14:07:08 +01:00
Keir Fraser b67758cda1 vmx: Add support for Pause-Loop Exiting
New NHM processors will support Pause-Loop Exiting by adding 2
VM-execution control fields:
PLE_Gap    - upper bound on the amount of time between two successive
             executions of PAUSE in a loop.
PLE_Window - upper bound on the amount of time a guest is allowed to
             execute in a PAUSE loop

If the time, between this execution of PAUSE and previous one, exceeds
the PLE_Gap, processor consider this PAUSE belongs to a new loop.
Otherwise, processor determins the the total execution time of this
loop(since 1st PAUSE in this loop), and triggers a VM exit if total
time exceeds the PLE_Window.
* Refer SDM volume 3b section 21.6.13 & 22.1.3.

Pause-Loop Exiting can be used to detect Lock-Holder Preemption, where
one VP is sched-out after hold a spinlock, then other VPs for same
lock are sched-in to waste the CPU time.

Our tests indicate that most spinlocks are held for less than 2^12
cycles.  Performance tests show that with 2X LP over-commitment we can
get +2% perf improvement for kernel build(Even more perf gain with
more LPs).

Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
2009-07-07 14:06:35 +01:00
Keir Fraser aa4af83c50 xenstat: Use backend path which is compatible with pvops and 2.6.18-xen kernels.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2009-07-07 14:01:30 +01:00
Keir Fraser df117d7fe3 x86, hvm: fix get msix entry error
There is a mistake to get the msix entry number. It should be
divide instead of modulus.

Signed-off-by: Yang Zhang <yang.zhang@intel.com>
Signed-off-by: Qing He <qing.he@intel.com>
2009-07-06 11:58:02 +01:00
Keir Fraser 6e07e93194 AMD IOMMU: Add suspend and resume support for amd iommu.
Signed-off-by: Wei Wang <wei.wang2@amd.com>
2009-07-06 11:57:18 +01:00
Keir Fraser 9699ac1856 AMD IOMMU: Make iommu suspend & resume functions more generic.
Signed-off-by: Wei Wang <wei.wang2@amd.com>
2009-07-06 11:56:51 +01:00
Keir Fraser ffc066ece3 AMD IOMMU: Clean up hardware initialization functions to make them
more friendly to iommu suspend and resume operations.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
2009-07-06 11:56:17 +01:00
Keir Fraser 583731dce8 32on64: increase size of compat argument translation area to 2 pages.
The existing single page is not quite large enough to translate a
XENMEM_exchange hypercall with order=3D9. Since Linux uses
MAX_CONTIG_ORDER of 9 this seems like a reasonable upper bound to
support.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2009-07-06 11:55:17 +01:00
Keir Fraser 8259ef78d3 x86: PERCPU_SHIFT can be reduced to 12 now compat_arg_xlat_area is not
directly a per-cpu object.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-06 11:55:01 +01:00
Keir Fraser 4a5c769015 Avoid compat_arg_xlat to be a large per-CPU object
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-07-06 11:51:19 +01:00
Keir Fraser 34d140eaa7 x86 shadow: disable fast np path in OOS.
Signed off by: Gianluca Guida <gianluca.guida@eu.citrix.com>
2009-07-06 11:50:30 +01:00
Keir Fraser 535501ae64 x86 shadow: Fix lock-less race between resync and fast path.
Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
2009-07-06 11:49:56 +01:00
Keir Fraser 51dd9a1427 xend: allow pv_ops kernel driver pci-stub to hide devices for assignment
pciback is used by VT-d to hide device for assigment. But in pv-ops
dom0, pciback is not supported yet. Fortunately, pci-stub module is
used to hide device in Linux for KVM VT-d device assignment and it's
included in pv-ops dom0. So can use pci-stub to hide devices for
assignment.

Device must be hidden before assignment. Control panel has checks if
devices can be assigned or not, and can list assignable devices via
reading devices owned by pciback. This patch changes the checks, and
also list assignable devices which are owned by pci-stub. Use pci-stub
to hide devices, and use this patch to pass checkes in control panel,
device assignemnt with VT-d works on Xen with pv-ops dom0.

Signed-off-by: Weidong Han <weidong.han@intel.com>
2009-07-06 11:48:44 +01:00
Keir Fraser 26bfb945fc blktap2: fix save/restore/migration
blktap2 devices use a regular 'phy' vbd blkback backend, causing
Blktap2Controller to trample the devices' parameters. This causes
problems with save/restore and managed domains, among other
things. This patch modifies Blktap2Controller to store both the vbd
and tap2 parameters in xenstore, and stops it from trampling the
device's config on device creation.

 * store blktap2 parameters in xenstore
 * restore blktap2 device config to original state once the underlying
 * vbd
   device is created (this fixes managed domains)
 * use blktap2 parameters rather than vbd parameters when building
 * blktap2
   device configurations
 * remove blktap2 specific code from XendConfig

Signed-off-by: Ryan O'Connor <rjo@cs.ubc.ca>
2009-07-06 11:47:34 +01:00
Keir Fraser 158299ee06 blktap2: seperate blktap1/blktap2 disk types
* seperate blktap1/blktap2 disk types
 * use blktap1 when driver is not in explicit list of blktap2 drivers,
 * rather than current check against list of blktap1 only drivers
 * remove 'tapdisk' disk type (it is not a tapdisk disk type) and fix
 * tapdisk disk type check in XenConfig

Signed-off-by: Ryan O'Connor <rjo@cs.ubc.ca>
2009-07-06 11:47:02 +01:00
Keir Fraser ae9820b4b0 x86: Process only pending timers in acpi idle handler, not all
softirqs. This fixes a bug where bailing into SCHEDULE_SOFTIRQ may not
actually return.

From: Ke Yu <ke.yu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-06 11:46:22 +01:00
Keir Fraser 674801b080 libfsimage: Support for zfs version 16.
Remove version checks to support boot of ZFS root filesystem version
16.

Signed-off-by: Susan Kamm-Worrell <susan.kamm-worrell@sun.com>
2009-07-06 11:42:05 +01:00
Keir Fraser d918a60f89 Fix c/s 19886: Must free pages after synchronously scrubbing them
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-03 08:54:51 +01:00
Keir Fraser cfafda4169 tools: Always check for __linux__ not __Linux__
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-02 21:45:30 +01:00
Keir Fraser 428dc303f5 Remove page-scrub lists and async scrubbing.
The original user for this was domain destruction. Now that this is
preemptible all the way back up to dom0 userspace, asynchrony is
better iontroduced at that level, if at all, imo.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-02 16:45:31 +01:00
Keir Fraser 4cb90ae29a kexec: switch to a known good/static GDT before kexec
kexec has been failing (at least on 32on64, didn't try others) since
18771:8e18dd41c6c7 "x86: reduce GDT switching". Ensure that we are
using a known good GDT before attempting to switch to compatability
mode.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2009-07-02 16:16:15 +01:00
Keir Fraser 47eb698d53 gtraceview: compile fixes for NetBSD.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-07-02 11:36:17 +01:00
Keir Fraser f8128d6e5d xend: Remove disused constants
This patch removes disused constants from XendConstants.py.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-07-02 11:35:30 +01:00
Keir Fraser f6833dff97 xend: fix an undefined name error: mac may be referenced before definition.
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2009-07-02 11:34:48 +01:00
Keir Fraser 14fbdbd3d3 libxc: Fix bugs in xc_exchange_page: pfn_type indexed by gpfn.
Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
2009-07-02 11:33:43 +01:00
Keir Fraser add9e579b6 xend: Restore uname of blktap for managed domains
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-07-02 11:32:49 +01:00
Keir Fraser 4e0aaab31b x86 hvm: Remove assertion that PIC IRQs are delivered only to VCPU0.
It's no longer true, if the guest reprograms IOAPIC pin0 for example.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2009-07-02 11:31:58 +01:00
Keir Fraser 773e0fb2ff buikd: Fix the detection of udev with udevadm version < 128
Signed-off-by: Marc-A. Dahlhaus <mad@wol.de>
2009-07-02 11:31:00 +01:00
Keir Fraser 89c6cf58e8 x86 hvm: Allow delivery of legacy 8259 interrupts to VCPUs != 0.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-01 20:22:29 +01:00
Keir Fraser 70116ff260 x86 hvm: Fix #UD interception.
* Interception should be standard part of HVM_TRAP_MASK
 * Failed intercept should quietly forward #UD to the guest

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-01 14:58:31 +01:00
Keir Fraser a0f0199e90 Remove redundant semicolons
Signed-off-by: Rikiya Ayukawa <ayukawa.rikiya@jp.fujitsu.com>
2009-07-01 10:54:25 +01:00
Keir Fraser 286423408d blktap2: add blktap2 device class and device controller
blktap2 devices must be handled differently than blktap2
devices. blktap2 devices require a sysfs write to close the underlying
device, as well as extra sysfs writes when the domU is
paused/unpaused. The differences between blktap1 and blktap2 are great
enough to warrant the creation of a new device class, 'tap2', and
device controller for blktap2 devices.

  * add a new device controller (Blktap2Controller) and device class
    (tap2) for blktap2 devices
  * move blktap2 specific code from DevController to Blktap2Controller
  * if possible, check xenstore to determine block device class
  * use vmpath (/vm/<uuid>/) when releasing devices
  * modify linux hotplug cleanup script to handle blktap2 device
    removal

Signed-off-by: Ryan O'Connor <rjo@cs.ubc.ca>
2009-07-01 10:53:15 +01:00
Keir Fraser 756b7b81f9 Update QEMU_TAG to b471f03d51cde3976b6d52179ca2a86d8906a587 2009-06-30 16:00:57 +01:00
Keir Fraser 8d7ad8b7aa VT-d: Remove the dprintk() in alloc_pgtable_maddr()
The trivial message is printed too many when xen boots and when we
create hvm guests with devices assigned.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2009-06-30 16:00:29 +01:00
Keir Fraser db49191f3e x86 hvm mce: Support HVM Guest virtual MCA handling.
When MCE# happens, if the error has been contained/recovered by XEN
and it impacts one guest Domain(DOM0/HVM Guest/PV Guest), we will
inject the corresponding vMCE# into the impacted Domain. Guest OS will
go on its own recovery job if it has MCA handler.

Signed-off-by: Liping Ke <liping.ke@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
2009-06-30 15:40:39 +01:00
Keir Fraser 5a76d5de5c xend: get rid of hardcoded path in xend config file
* Change default settings to relative pathes.
* Make xend to prepend install directory if entries have no absolute
* path

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-06-30 15:37:14 +01:00
Keir Fraser bdd6b8ce48 x86 svm: Fix svm_update_guest_efer() after c/s 19856.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-06-29 15:50:32 +01:00
Keir Fraser 5dc9ac92ad x86 Cx tracing: adds gtraceview & gtracestat utilities
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
2009-06-29 11:03:24 +01:00
Keir Fraser 71eb0dfc66 x86 Cx tracing: export the Cx exit reason (pending interrupt during Cx)
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
2009-06-29 11:01:50 +01:00
Keir Fraser c18a0f7d6d x86 Cx tracing: export expected/predicted Cx to xentrace
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
2009-06-29 11:00:56 +01:00
Keir Fraser 64b50fa83a x86 tboot: Fix c/s 19577
Signed-off-by: Shane Wang <shane.wang@intel.com>
2009-06-29 10:58:56 +01:00
Keir Fraser 9dafbb7098 Merge with ia64 tree 2009-06-29 10:51:35 +01:00
Isaku Yamahata 025d0facf2 [IA64] replace MAX_VCPUS with d->max_vcpus where necessary.
don't use MAX_VCPUS, and use vcpu::max_vcpus.
The changeset of 2f9e1348aa98 introduced max_vcpus to allow more vcpus
per guest. This patch is ia64 counter part.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-06-29 11:26:05 +09:00
Isaku Yamahata e905b7c2c4 [IA64] plumb tmem hypercall entry point on ia64.
add do_tmem_op() to ia64_hypercall_table to support tmem.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-06-29 11:23:53 +09:00
Isaku Yamahata ee70f02d2d [IA64] remove a warning
This patch removes the following warning.
> unwind.c:40:1: warning: "write_trylock" redefined
> In file included from xen/include/xen/sched.h:7,
>                  from unwind.c:33:
> xen/include/xen/spinlock.h:115:1: warning: this is the location of the previous definition

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-06-29 11:23:31 +09:00
Keir Fraser b3dac9ec91 fs-backend: fix default export and filename checks
This patch changes fs-backend to use /var/lib/xen as default export
and check all the file names and paths given by the frontend against the
export path, so that the frontend can only operate under the export
directory.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-06-27 10:47:38 +01:00
Keir Fraser da5e66e536 tmem: extra stats
This patch collects a few additional valuable per-domain
performance stats.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
2009-06-27 10:40:11 +01:00
Keir Fraser 02e1301f01 minios: fix free_fbfront
When a stubdom is destroyed, fbfront tries to unbind the evtchn
twice.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-06-27 10:39:10 +01:00
Keir Fraser babdd63395 docs: Add network_setup.txt file explaining bridge setup.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2009-06-27 10:37:51 +01:00
Keir Fraser d2c06ef63f x86 svm: Make 32bit legacy guests boot again
Attached patch fixes a bug introduced in c/s 19648.

32bit legacy guests have the sysenter/sysexit instructions available.
Therefore, we have to disable intercepts for the sysenter MSRs or the
guest stucks in an infinite loop of #GPs, otherwise.

For guests in 64bit mode and 32bit compat mode, sysenter/sysexit
instructions aren't available. The sysenter MSRs have to be
intercepted to make the instruction emulation working.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-06-27 10:33:33 +01:00