Commit Graph
7034 Commits
Author SHA1 Message Date
Keir Fraser b21c09a4ff cpuidle and xenpm small cleanups.
Signed-off-by: Guanqun Lu <guanqun.lu@intel.com>
2009-03-19 10:10:31 +00:00
Keir Fraser cb4343bf2e xenpm: add timeout option to 'xenpm start' command.
Thus we can sample a fixed time of period without manual interruption.

Signed-off-by: Guanqun Lu <guanqun.lu@intel.com>
2009-03-19 10:09:59 +00:00
Keir Fraser 93d17a53a3 xentrace: Add acpi pm tick output to idle tracing
The reason is that tsc stops and it causes the inaccuracy.
And later we can write some scripts based on this patch.

Signed-off-by: Guanqun Lu <guanqun.lu@intel.com>
2009-03-19 10:08:48 +00:00
Keir Fraser d046c2261f x86 dom builder: Allocate domU pages in batches.
Allows a 32-bit dom0 to create very large guests.

Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-03-19 10:04:15 +00:00
Keir Fraser ef940f08d5 libxc: Use write_exact() in lock_suspend_event().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-03-18 17:25:54 +00:00
Keir Fraser b832b2b46c fs-back: build fixes
Remove some unused variables and replaces read and write
to the pipe with read_exact and write_exact (these two functions are
implemented in libxc, that we have to link anyway).

This allows fs-backed to be compiled with -D_FORTIFY_SOURCE=2, hence
should fix the problems reported by Boris.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-03-18 13:25:25 +00:00
Keir Fraser 655d4f2e58 fs-backend.c misses the unistd.h include for read() and write().
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2009-03-18 11:51:30 +00:00
Keir Fraser cce99fb132 Move the suspend event channel function to libxc, it will use the
/var/lib/xen/suspend_evtchn_lock.d to protect the access.

Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
2009-03-18 11:49:26 +00:00
Keir Fraser 760f973171 xc_save: remove the dependency on the global si structure
Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
2009-03-18 11:48:48 +00:00
Keir Fraser 0456ddb432 Disable xen platform PCI device when xen_platform_pci=0 is specified
- Change guest firmware to use new fixed byte port 0x10.
 - Add "xen_platform_pci" option into guest config file and APIs.
    xen_platform_pci=0: Disable xen platform device.
    xen_platform_pci=1: Enable xen platform device. (default)
 - Add "disable_pf" entry into xenstore.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
2009-03-18 11:37:59 +00:00
Keir Fraser 84b150afdb xend: Fix vscsi assignment when XenAPI is available
When XenAPI is available, xm scsi-attach fails.  Also xm new and
xm create fail if a vscsi parameter is defined into domain
configuration files.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-03-18 11:34:20 +00:00
Keir Fraser 34bbd7a252 xend: Use vnc-listen setting specified in xend config file
If domU frame buffer configuration has no vnclisten attribute set, use
the global vnc-listen address specified in xend configuration file
when updating vfb location.  Currently the hardcoded value 'localhost'
is used.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2009-03-18 11:32:46 +00:00
Keir Fraser a26e304487 fs-back: Fixes and cleanups
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-03-17 14:28:33 +00:00
Keir Fraser 063dd0319a xend: Add s3_integrity attribute for XenAPI
When XenAPI is available, xm new and xm create fail.

# xm new vm1
Using config file "/etc/xen/vm1".
Attribute 's3_integrity' not declared
# xm create vm1
Using config file "/etc/xen/vm1".
Attribute 's3_integrity' not declared

This patch adds an s3_integrity into create.dtd.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-03-17 10:49:42 +00:00
Keir Fraser 57f692c8e9 hvmloader: Allow any unused PCI device to be used for PCI hotplug
Signed-off-by: Simon Horman <horms@verge.net.au>
2009-03-17 10:48:52 +00:00
Keir Fraser 33548d1102 xend: Use AUTO_PHP_SLOT_STR=0xff rather than 0x0 for auto pci allocation
Rather than use "0x0" to signify that the hotplug slot should
be automatically selected by qemu-dm, define AUTO_PHP_SLOT_STR.

At the same time, change the magic value form 0x0 to 0xff,
in line with changes made to qemu-dm to allow any unused PCI
device to be used for hotplug.

Signed-off-by: Simon Horman <horms@verge.net.au>
2009-03-17 10:42:32 +00:00
Keir Fraser 27db6136ea xend: Accept udev events and update physical resource information
When a udev event is received, udevevent.py parses the udev data and
tells XendNode.py to update the physical resource information.
This patch also add a boolean parameter 'xend-udev-event-server', to
let users indicate whether we should enable this function or not.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2009-03-17 10:40:47 +00:00
Keir Fraser 4d4d14e8e8 Add udev rules to deliver hw events to xend
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2009-03-17 10:38:06 +00:00
Keir Fraser c48d2caadd xend: Add lock for lspci_info in pci.py
Add lspci_info_lock to protect lspci_info.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2009-03-17 10:37:12 +00:00
Keir Fraser 90797ec872 xend: Add lock for xen-api class instances in XendAPIStore.py
Add __classes_lock to protect __classes, since it can be modified by
the udev listener thread.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2009-03-17 10:36:51 +00:00
Keir Fraser c48f8a0105 xend: Implement DGRAM (connectionless) type socket listeners
Introduce SocketDgramListener and UnixDgramListener classes.
We already have STREAM (connection) type socket listener classes in
the source tree, but we need DGRAM (connectionless) type listeners to
receive udev events.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2009-03-17 10:36:20 +00:00
Keir Fraser 550686e4fd xenpm: Add CPU topology info (thread/core/socket)
CPU topology info is necessary for power management analysis. For
example, to analysis the effect of Px state coordination, Cx
package/core coordination,  the thread/core/socket topology
information is needed.

This patch add new command "get-cpu-topology" in xenpm to print the
CPU topology info:

Signed-off-by: Yu Ke <ke.yu@intel.com>
2009-03-13 10:09:25 +00:00
Keir Fraser b82b238521 xend: Fix xm scsi-attach for host OS without lsscsi
In the case of a host OS without lsscsi command, xm scsi-attach
command fails even if you specify existing SCSI device.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-03-13 07:38:47 +00:00
Keir Fraser 5fedaf9ef7 xend: Fix domain core-dumping about reset option
This patch moves a call processing of a domain reset processing
from xm to xend.  Also, it adds a reset argument to do_dump() of
SrvDomain.py.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2009-03-13 07:38:05 +00:00
Keir Fraser cde518aa71 blktap: Move error signaling to blktapctrl
Until now the udev script for blktap devices needs to decide if to
signal success or failure to xend. As this script runs completely
independent of blktapctrl and tapdisk/ioemu which do the real work,
the udev script can't even theoretically know if tapdisk is happy.

This patch removes the udev script and replaces its checks by new
ones in libblktap.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
2009-03-12 18:48:09 +00:00
Keir Fraser 3dc413c7bd blktapctrl: Fix too early close of pipes
Connections to ioemu have single_handler set, so they are closed as
soon as all images of a certain type are closed. This is wrong with
ioemu: All images that belong to the same domain are handled by the
same backend process (usually qemu-dm, but also tapdisk-ioemu for
domains without device model), regardless of the image type.

This patch checks for the same-domain condition for ioemu connections.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
2009-03-12 18:46:26 +00:00
Keir Fraser 57871f919d blktap: Export disk type constants for ioemu
Currently all disk types that are supported are defined in a header
file private to blktapctrl and tapdisk. When restoring ioemu as a
backend for blktap these constants are needed by ioemu, so move them
to a more public header file.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
2009-03-12 18:42:59 +00:00
Keir Fraser 8b173f5236 blktapctrl: Select backend by prefix
This patch adds support for specifying the backend (tapdisk or ioemu)
to blktapctrl. Images can be specified e.g. as tap:tapdisk:aio,
tap:ioemu:qcow2 or tap:vmdk. When omitting the backend, a default is
chosen based on the image type (currently always tapdisk because ioemu
as a backend is broken until a follow-up patch series against qemu-xen
is applied)

Signed-off-by: Kevin Wolf <kwolf@suse.de>
2009-03-12 18:42:31 +00:00
Keir Fraser 6dde5f55da xend: fix regression in c/s 19330
attached patch fixes a regression in c/s 19330 which
prevents to start guests on a Linux Dom0.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-03-12 15:40:52 +00:00
Keir Fraser 0aef8a0311 xend: Fix removing /vm/UUID/device paths when device cannot be disconnected
This is a corrected version of a patch commited as c/s 19250 and
reverted by c/s 19314. Thanks to "trap sigerr ERR" in
xen-hotplug-common.sh the xen-hotplug-cleanup would exit when reading
/local/domain/ID/vm fails thus skipping all the xenstore-rm lines in
the rest of the script.

Change deviceDestroy behavior to remove /vm/UUID/device/...
path only when force was used (as it already does so for both frontend
and backend) and do the removing from xen-hotplug-cleanup script when
we are sure the device is really not attached to the guest any more.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2009-03-12 15:08:08 +00:00
Keir Fraser 677a041f1f xentrace: error handling on non-existent formats file
Attached patch does proper error handling when specified
formats file doesn't exist.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-03-12 15:07:20 +00:00
Keir Fraser 7caeec9358 xend: Use parse_hex() in XendPPCI.py
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2009-03-12 11:33:35 +00:00
Keir Fraser 0dc8a04b2b xend: Do not create XendNetwork instance of tmpbridge
This patch prevents xend from creating a XendNetwork instance of
tmpbridge (a temporary bridge used in network-bridge script).

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2009-03-12 11:33:06 +00:00
Keir Fraser 2ab3db9aae Fix xenstore permissions for Solaris domUs.
Solaris domUs use hvmpv/ and guest/ frontend xenstore directories.

Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 11:14:22 +00:00
Keir Fraser d188e4cc7e rombios: __STRING() is Linux-specific
Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 11:12:43 +00:00
Keir Fraser 2b9e3c9a48 pygrub: Detect NetWare PV in pygrub
Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 11:10:22 +00:00
Keir Fraser fb0a30b839 Domain core-dumping fixes
The code was attempting to use the domain's current number of pages
(info.nr_pages) as a maximum index.  We then walk the memory map and
can easily over-write past the end of the nr_pages-sized array, if the
domain has more pages mapped in than earlier (live dump).  Restrict
ourselves to the current number of pages.

Also fix the dump core method in xend to actually implement the crash
and live options.  In particular this means that xend clients other
than xm now get non-live dumps by default.

Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 11:09:57 +00:00
Keir Fraser 51494c8651 xend: Skip tap pipe creation on Solaris
Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 11:08:45 +00:00
Keir Fraser d88a38225c xend: Crash the domain if qemu-dm stops running
The comment about the lack of restart prevention is not accurate.

Bump the minimum restart time to 60 seconds.

Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 11:07:34 +00:00
Keir Fraser 43a12c170e Fix qemu spawn for Solaris
On Solaris, xend runs in a 'process contract' such that all children
are killed when the service is restarted.  Spawn qemu processes in a
new contract to avoid this.

Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 11:07:00 +00:00
Keir Fraser eb10d0f954 xend: Allow replacement of a cdrom device on a device_add
When adding a device, allow a cd to replace another if the device is a
cdrom.

Signed-off by: Ryan Scott <ryan.scott@sun.com>
2009-03-12 11:01:25 +00:00
Keir Fraser e36d0b0d06 xend: Time-out if guest fails to suspend
If a guest fails to re-write control/shutdown node within a minute,
fail the suspend operation.

Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 11:00:52 +00:00
Keir Fraser f87a6848fc xend: Allow off-line NIC removal
Match a MAC address so device_destroy can remove off-line NICs.

Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 10:59:53 +00:00
Keir Fraser 7865c25877 xend: Correctly catch invalid domain lookups
If a client asks about a non-existent domain, report the error back
properly instead of just backtracing within xend.

Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 10:59:19 +00:00
Keir Fraser 4696ce5d87 libfsimage: Support for zfs version 14.
Signed-off-by: Susan Kamm-Worrell <susan.kamm-worrell@sun.com>
2009-03-12 10:58:47 +00:00
Keir Fraser dc350ed2b5 pygrub: Workaround for Solaris CR 1143256.
The Solaris curses library has a broken timeout() function: after a
first timeout() call with a positive value for an argument, subsequent
calls will fail to reset it. So, getch() always times out, confusing
the pygrub timer in the main loop. Add an extra check to avoid exiting
prematurely.

Signed-off-by: Frank van der Linden <frank.vanderlinden@sun.com>
2009-03-12 10:58:21 +00:00
Keir Fraser 75c9ba7911 xend: Add support for cpuinfo data on Solaris
Signed-off-by: Russell Blaine <russell.blaine@sun.com>
2009-03-12 10:57:44 +00:00
Keir Fraser 1f7a575203 tools: Make some code compile only on Linux
Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 10:57:19 +00:00
Keir Fraser 275c6ccdc9 xenconsole: Solaris ptys have different semantics.
Make sure that tty semantics are active for Solaris ptys, or if they
aren't (and not needed) to not do tcget/setattr on the filedescriptor
in Python code.

Also work around a bug in the Solaris ptm streams driver, which will
cause a write error on the master side of a pty (because of e.g. a
missing slave) to persist forever.

Signed-off-by: Frank van der Linden <frank.vanderlinden@sun.com>
2009-03-12 10:56:55 +00:00
Keir Fraser 08dade96d9 Fix solaris xc_map_foreign_ranges()
Signed-off-by: John Levon <john.levon@sun.com>
2009-03-12 10:56:08 +00:00