Commit Graph
7286 Commits
Author SHA1 Message Date
Keir Fraser 55eb5c4259 pass-through: use vdevn in xm_pci_attach()
Use vdevfn in xm_pci_attach() for non-zero functions,
the vslot element of dev dictionaries no longer exists.

Signed-off-by: Simon Horman <horms@verge.net.au>
2009-07-14 14:38:56 +01:00
Keir Fraser e7a00028f9 netbsd: remove qemu-ifup-nbsd, now that it is in the right place
(ioemu c/s 5cc34ea27f1cbd1a0560cfca91fb89ccd6d5726f)

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-07-09 17:06:40 +01:00
Keir Fraser df65440f41 Make python check scripts use of $(PYTHON) make variable.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-07-09 17:05:07 +01:00
Keir Fraser 75577f42e0 tools: python -> $(PYTHON)
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-07-09 16:06:52 +01:00
Keir Fraser ab7dec0345 blktap2: Fix compile warning with gcc4.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-08 11:00:23 +01:00
Keir Fraser 6d821524b1 fs-back: better error handling in fs-backend
Currently most of the error checking in fs-backend is done by the use
of asserts that would terminate the daemon in case of a single error
on a single request.  This patch replaces the asserts with debugging
messages and terminates the connection on which the error occurred.
With this patch applied I was able to complete successfully over 1000
live migrations with stubdoms.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-07-08 10:58:09 +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 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 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 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 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 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 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 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 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 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 4cc88b66d7 xend: pass-through: Implement least-mapping of virtual functions
This is an alternative to identity mapping virtual functions.

It works by assigning the numerically lowest virtual function that is
available.

* The order of assignment is thus dependent on the order that physical
  functions are specified.

  e.g.
  config         physical     virtual
  01.00.0,2  ->  01:00.0  ->  00:07.0
             ->  01:00.2  ->  00:07.1

  is different to

  config         physical     virtual
  01.00.2,0  ->  01:00.2  ->  00:07.0
             ->  01:00.0  ->  00:07.1

* Physical function 0 need not be present

  e.g.
  config         physical     virtual
  01.00.1,2  ->  01:00.1  ->  00:07.0
             ->  01:00.2  ->  00:07.1

* Functions from the same physical multi-function device
  may be exported as multiple multi-function and single-function
  devices

  e.g.
  01.00.0,2  ->  01:00.0  ->  00:07.0
             ->  01:00.2  ->  00:07.1
  and
  01.00.1,3  ->  01:00.1  ->  00:08.1
             ->  01:00.3  ->  00:08.1
  and
  01.00.5    ->  01:00.5  ->  00:09.0

Cc: Dexuan Cui <dexuan.cui@intel.com>
Cc: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
2009-06-27 10:01:20 +01:00
Keir Fraser e22b1a81b3 xend: pass-through: rename vslot to vdevfn and vslots to vdevfns
This is a noisy patch that makes not functional changes.
It renames vslot to vdevfn and vslots to vdevfns.

Cc: Dexuan Cui <dexuan.cui@intel.com>
Cc: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
2009-06-27 10:00:24 +01:00
Keir Fraser 82334d45f3 xend: pass-through: Parse command line for multi-function hot-plug and unplug
Hook things up to allow multi-function pass-through.

This includes making sure that request is valid.
In the case of pci-detach:

* All the functions requested must be attached to the same virtual
  slot * and;
* A request must include the functions attached to a virtual slot

Cc: Dexuan Cui <dexuan.cui@intel.com>
Cc: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
2009-06-27 09:56:15 +01:00
Keir Fraser 437cbbf3fb xend: pass-through: Add key to pci device dictionary
This will be used to identify the functions belonging to
a multi-function device.

Cc: Dexuan Cui <dexuan.cui@intel.com>
Cc: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
2009-06-27 09:55:42 +01:00
Keir Fraser 88b7aa5e4c xend: pass-through: Add pci_dict_bin_to_str()
Break out the device list gathering code from xm_pci_list()
so that it can be re-used by subsequent changes.

Cc: Dexuan Cui <dexuan.cui@intel.com>
Cc: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
2009-06-27 09:54:54 +01:00
Keir Fraser 7fd42f5b88 xend: pass-through: Only tell qemu-xen to unplug function 0
When unplugging a function, all functions in the same vslot must be
unplugged, and function 0 must be one of the functions present when a
vslot is hot-plugged. Telling qemu-dm to unplug function 0 also tells
it to unplug all other functions in the same vslot.

Cc: Dexuan Cui <dexuan.cui@intel.com>
Cc: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
2009-06-27 09:54:29 +01:00
Keir Fraser 2327a50d23 xend: pass-through: Allow multi-function device specifications to be parsed
The general format is as follows:

  Now: SEQ:BUS:DEV.FUNC[@VSLOT][,OPT...]
  New: SEQ:BUS:DEV.FUNC0-FUNCN[@VSLOT][,OPT...]
       SEQ:BUS:DEV.FUNC0,FUNCM,FUNCN[@VSLOT][,OPT...]
       SEQ:BUS:DEV.*[@VSLOT][,OPT...]

  In the case of unplug the VSLOT and OPT must be omitted.

  Xm expands this notation notation out and passes
  more conventional parameters to qemu-xen.

  E.g:
       0000:00:01.00-03 becomes:
         0000:00:01.00
         0000:00:01.01
         0000:00:01.02
         0000:00:01.03

       0000:00:01.00,03,05,07 becomes:
         0000:00:01.00
         0000:00:01.03
         0000:00:01.05
         0000:00:01.07

       For a device that has functions 0, 1, 2, 3, 5 and 7,
       0000:00:01.* becomes:
         0000:00:01.00
         0000:00:01.01
         0000:00:01.02
         0000:00:01.03
         0000:00:01.05
         0000:00:01.07

Cc: Dexuan Cui <dexuan.cui@intel.com>
Cc: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Cc: Akio Takebe <takebe_akio@jp.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
2009-06-27 09:53:56 +01:00
Keir Fraser 83d82e6f35 hvmloader: pass-through: multi-function PCI hot-plug
This registers information to allow guests to recognise non-zero
functions when hot-plugged.

Cc: Dexuan Cui <dexuan.cui@intel.com>
Cc: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
2009-06-27 09:53:19 +01:00
Keir Fraser 55d9f87d5c xend: pass-through: use devfn instead of slots as the unit for pass-through
Instead of suppling a slot number to qemu-xen, supply a devfn.

This and subsequent other changes will allow xend to ask
for more than one function to be inserted into a single slot -
by specifying which function of the slot should be used.

This is a minimal patch for this change. A subsequent
patch that has a lot of noise to rename slot to devfn
is intended to follow.

Cc: Dexuan Cui <dexuan.cui@intel.com>
Cc: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
2009-06-27 09:51:37 +01:00
Keir Fraser d7e7ef6859 tools: fix inverted logic check
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-06-25 13:15:32 +01:00
Keir Fraser 369b997d51 xend: create /var/lock/subsys at startup
Ubuntu puts /var/lock on tmpfs, so we should create /var/lock at
startup, rather than at installation time.

Signed-off-by: Jun Koi <junkoi2004@gmail.com>
2009-06-25 13:14:03 +01:00
Keir Fraser 6cba5a2ed1 Fix buildsystem to detect udev > version 124
udev removed the udevinfo symlink from versions higher than 123 and
xen's build-system could not detect if udev is in place and has the
required version.

Signed-off-by: Marc-A. Dahlhaus <mad@wol.de>
2009-06-25 13:02:37 +01:00
Keir Fraser a8ccb671c3 tools: fix x11 check
X.org is installed in /usr/X11R7.
Attached patch covers this in the x11 check.
Xen has no direct X11 dependency
(it's inherited from SDL and SDL is optional for qemu-dm)
so warn but don't fail if no X11 is installed.
Fixes build problem on distributions which build their packages (*BSD
and Gentoo).

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-06-25 12:59:46 +01:00
Keir Fraser 1d998d8224 blktap2: A final few NetBSD fixes
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-06-24 15:24:53 +01:00
Keir Fraser a61c4df7f6 blktap2: Further netbsd build fixes.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-06-24 14:03:20 +01:00
Keir Fraser ed072758a7 tools: remove hard coded paths in example config files
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-06-24 11:17:11 +01:00
Keir Fraser a05dfcaccf blktap2: Fix a & vs && typo
Signed-off-by: Jun Koi <junkoi2004@gmail.com>
2009-06-24 11:16:42 +01:00
Keir Fraser e5654d4fbf xend: Fix vbd/tapdisk device destruction
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-06-24 11:14:32 +01:00
Keir Fraser 13b3999edb blktap2: Fix some printf format specifiers (PRIu64).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-06-24 11:11:58 +01:00
Keir Fraser 01dc757ea3 xend: Fix python syntax error
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-06-23 17:27:01 +01:00
Keir Fraser 157794e512 tools python: remove unused auxbin functions
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-06-23 17:26:28 +01:00
Keir Fraser a2b4af7d77 Get rid of hardcoded pathes for stubdom and hotplug scripts
- Have the buid system generate a file which exports the install paths
   for the hotplug scripts and stubdom / stubdom-dm
- Move file generation code from tools/python/Makefile into a gmake
   macro
  in Config.mk to avoid maintenance of three duplicates each with its
   own
  tweaks and bugs
- Export gmake variables into ioemu as shell variables
  for upcoming ioemu patches
- Do above as a gmake macro to avoid maintenance of several duplicates
- Adjust hotplug scripts to find the right xen binaries from the
  install directory
- Adjust stubdom-dm to use the install directories

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-06-23 17:25:51 +01:00
Keir Fraser 2b8ba91b50 blktap2: portability fixes for NetBSD
- Use standard off_t and lseek() instead of non-portable off64_t and
  lseek64()
- Use uuid API as documented in DCE 1.1 RPC specification
- Add NetBSD implementation for blk_getimagesize() and
  blk_getsectorsize()
- Use blk_getimagesize() and blk_getsectorsize()
- Fix uuid header check

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-06-23 17:24:14 +01:00