Commit Graph
3173 Commits
Author SHA1 Message Date
Keir Fraser 0bfde44856 tools: Fix time offset when localtime=0
localtime can be stored in vm config as a string, resulting in
incorrect calculation of rtc_timeoffset.  Cast localtime to int
to ensure rtc_timeoffset is calculated properly.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
xen-unstable changeset:   21460:15f4ead9e686
xen-unstable date:        Wed May 26 08:15:31 2010 +0100
2010-05-26 08:29:15 +01:00
Keir Fraser 88ab606b02 xend: Fix getStubdomDomid function
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   21394:4dc64aa43692
xen-unstable date:        Sat May 15 08:31:42 2010 +0100
2010-05-15 08:39:03 +01:00
Keir Fraser a80b94ef60 xm: explicitly differentiate between tap and tap2 in config parsing.
From: Jim Fehlig <jfehlig@novell.com>
Signed-off-by: Keir Fraser <Keir.Fraser@eu.citrix.com>
xen-unstable changeset:   21338:a915a11908e3
xen-unstable date:        Tue May 11 08:31:16 2010 +0100
2010-05-11 08:40:52 +01:00
Keir Fraser 22cc6a8b61 xend: support blktap2 in xend blkif utils
Support tap2 device type in xend blkif utils parse method.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
xen-unstable changeset:   21317:5ac6e33fa3a7
xen-unstable date:        Fri May 07 09:27:40 2010 +0100
2010-05-10 09:54:18 +01:00
Keir Fraser 85bef2cc8d xm: Add exception handling when launching vncviewer
Also replaces the call to 'puts' with 'print' as the former is
undefined in python

Signed-off-by: Goncalo Gomes <Goncalo.Gomes@eu.Citrix.com>
xen-unstable changeset:   21296:460d156da874
xen-unstable date:        Thu May 06 11:13:22 2010 +0100
2010-05-10 09:49:33 +01:00
Keir Fraser d7be97a877 xend: fix bug in option parsing
If you enable legacy tcp xmlrpc in xend's config but omit to enable
ssl then a backtrace is generated when starting xend.

Signed-off-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de>
xen-unstable changeset:   21265:71cf9b12ac9e
xen-unstable date:        Tue May 04 12:23:54 2010 +0100
2010-05-10 09:45:08 +01:00
Keir Fraser d8c2c71f17 xm: catch TypeError if xenconsole is nonexistent
Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
xen-unstable changeset:   21258:31a6937e2359
xen-unstable date:        Tue May 04 12:10:54 2010 +0100
2010-05-10 09:44:37 +01:00
Keir Fraser 9858ac44e7 xend: don't drop device config on domain start failure
If domain creation in xend fails before devices are configured, e.g.
insufficient memory, device config is dropped from xend's managed
domain config.

Once xend is restarted, the domain's devices are lost.

This patch fixes a bug in XendConfig where only the device
controller was consulted for device configuration.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
xen-unstable changeset:   21223:5b72f9832cc2
xen-unstable date:        Thu Apr 22 09:42:37 2010 +0100
2010-04-23 08:44:50 +01:00
Keir Fraser 84bd8799da xend: support 'ioemu' subtype in tap protocol specification
blktapctrl supports both 'tapdisk' and 'ioemu' subtypes in tap
protocol specification.  Support the 'ioemu' subtype in xend
BlktapController as well.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
xen-unstable changeset:   21194:551a8406e840
xen-unstable date:        Mon Apr 19 08:59:14 2010 +0100
2010-04-21 08:35:41 +01:00
Keir Fraser dc5a2ae231 xm: Fix string index out of range in 'vcpu-pin' command
if <PCPUs> contins '' (e.g. '1,,2'), error 'string index out of range'
occurs. Fix this trivial bug.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
xen-unstable changeset:   21126:aae7cb2f1841
xen-unstable date:        Fri Apr 09 08:54:25 2010 +0100
2010-04-12 18:06:02 +01:00
Keir Fraser b3fddf563a xend: Fix bug of cpu affinity/ vcpu pin under ia32pae
c/s 21040 and 21044 used to break cpu number limit (<=64).
However, they result in bug under ia32pae model:
1. things will go wrong for affinity, making all vcpus pin to a same
cpu with same time;
2. when 'xm vcpu-pin' vpu to cpu, xend will exit abnormally.

This patch is to fix the bugs described above.

Signed-off-by: Xu, Jiajun <jiajun.xu@intel.com>
Signed-off-by: Zhang, Jianwu <jianwu.zhang@inte.com>
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
xen-unstable changeset:   21087:ebd84be3420a
xen-unstable date:        Tue Mar 30 18:31:39 2010 +0100
2010-03-30 18:32:48 +01:00
Keir Fraser b1ded68a3c pygrub/xend: Fix console plumbing to xenconsole client.
Domain's console tty now lives at serial/0/tty in xenstore.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-03-27 16:01:35 +00:00
Keir Fraser 1e1c984579 xend: Do not set execute permission on qemu-dm log file.
Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
2010-03-27 16:00:30 +00:00
Keir Fraser fc1a26595e xend: fix traceback in pci.py
Signed-off-by:  Jim Fehlig <jfehlig@novell.com>
2010-03-23 07:29:10 +00:00
Keir Fraser 978f36d60a Fix vcpu hotplug bug: transfer vcpu_avail hex string to qemu
Currently qemu has a bug: When maxvcpus > 64, qemu will get wrong
vcpu bitmap (s->cpus_sts[i]) since it only get bitmap from a long
variable.

This patch, cooperate with another qemu patch, is to fix this bug.
This patch transfer a vcpu_avail string in a hex string format, so
that at qemu side it's more easier to get vcpu bitmap from hex string,
especially when many vcpus, like more than 64.

(Also update QEMU_TAG for matching qemu-side update)

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
2010-03-20 07:35:04 +00:00
Keir Fraser caf500204f Fixes for 21040:b64a8d2a80ad "support affinity for >64 CPUs"
Signed-off-by: James (Song Wei) <jsong@novell.com>
2010-03-18 07:44:21 +00:00
Keir Fraser 5a4d4554c3 libxc: Support set affinity for more than 64 CPUs.
There are more than 64 cpus on new intel platform especially on NUMA
system, so that we need break the pcpu limit (that is 64)  when set
affinity of a VCPU.

Signed-off-by: James (song wei) <jsong@novell.com>
2010-03-17 09:17:27 +00:00
Keir Fraser 35d60c59af Increase default console ring allocation size and reduce default verbosity
In order to have better chance that relevant messages fit into the
ring buffer, allocate a dynamic (larger) one in more cases, and make
the default allocation size depend on both the number of CPUs and the
log level. Also free the static buffer if a dynamic one was obtained.

In order for "xm dmesg" to retrieve larger buffers, eliminate
pyxc_readconsolering()'s 32k limitation resulting from the use of a
statically allocated buffer.

Finally, suppress on x86 most per-CPU boot time messages (by default,
most of them can be re-enabled with a new command line option
"cpuinfo", some others are now only printed more than once when there
are inconsistencies between CPUs). This reduces both boot time (namely
when a graphical console is in use) and pressure on the console ring
and serial transmit buffers.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-03-17 08:34:16 +00:00
Keir Fraser a7e7bb6199 xend: Remove warning message from xend.log
When I created a domain, I saw the following warning message in
xend.log.  This patch removes the message from xend.log.

[2010-03-16 19:04:16 3623] WARNING (XendConfig:872) Unconverted key:
Description

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2010-03-17 08:31:17 +00:00
Keir Fraser 05eacf31fd xend: XenAPI does not support pvSCSI multipath
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2010-03-05 14:42:25 +00:00
Keir Fraser ad709c500b Fix domain exit actions that contain hyphen
Domain exit actions that contain a hyphen (e.g. rename-restart) were
not being detected properly when xm is configured to use xenapi.
Domain config containing on_crash=3D"rename-restart" results in

xen53:~ # xm new /tmp/domU.config
Using config file "/tmp/domU.config".
Unexpected error: <type 'exceptions.TypeError'>

This patch fixes the raised exception and at the same time
handles the replacement of hyphen with underscore properly.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2010-03-03 17:40:22 +00:00
Keir Fraser d8f8f35470 xm: Show usage message of xm commands
The following commands don't show an usage message even if we give
a wrong option to the commands.

 - xm block-list
 - xm network-list
 - xm network2-list
 - xm vtpm-list
 - xm pci-list
 - xm scsi-list

e.g.
 # xm block-list --xxx vm1
 Error: option --xxx not recognized

This patch shows the usage message of the commands.

e.g.
 # xm block-list --xxx vm1
 Error: option --xxx not recognized
 Usage: xm block-list <Domain> [--long]
 List virtual block devices for a domain.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2010-02-24 10:46:49 +00:00
Keir Fraser 078a073a6c xend: notify xenpv device model that console info is ready
Sometimes PV domain with vfb doesn't boot up. /sbin/kudzu is stuck.
After investigation, I've found that the evtchn for console is not
bound at all.

Normal sequence of evtchn initialization in qemu-dm for xenpv is:
1) watch xenstore backpath (/local/domain/0/backend/console/<domid>/0)
2) read console info (/local/domain/<domid>/console/{type, ring-ref,
port..=
})
3) bind the evtchn to the port.

But in some case, xend writes to the backpath before the console info
is prepared, and never write to the backpath again. So the qemu-dm
fails at 2) and never reach to 3).

When this happens, manually xenstore-write command on Domain-0
resumes the guest.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2010-02-24 09:38:35 +00:00
Keir Fraser 79e0b9479d python: Don't install anything directly under /usr/share
Signed-off-by: Guillaume Rousse <Guillaume.Rousse@inria.fr>
2010-02-22 18:47:22 +00:00
Keir Fraser fa2959b21f xm: Fix xm network-list for XenAPI
When I use XenAPI, MAC addresses are not shown by xm network-list.
MAC addresses are shown by this patch.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2010-02-22 10:00:24 +00:00
Keir Fraser e8918e36f9 xend: Remove redundant 'name' from LEGACY_CFG_TYPES and LEGACY_XENSTORE_VM_PARAMS
Two 'name's are defined in LEGACY_CFG_TYPES of XendConfig.py.
LEGACY_XENSTORE_VM_PARAMS also is same.
This patch removes redundant 'name's.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2010-02-15 08:19:07 +00:00
Keir Fraser 7527c26d47 Fix a small bug about HVM_MAX_VCPUS related array
Currently it doesn't block running, anyway, it better fix the small
bug considering if in the future HVM_MAX_VCPUS will not necessarily be
8x value.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>=
2010-02-15 08:15:08 +00:00
Keir Fraser 541a47d53d xend: Enlarge the memory balloon size for domain creation since shadow
pre-allocation size has changed from 1M to 4M.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
2010-02-10 09:07:48 +00:00
Keir Fraser 3c29b3fd3c VT-d, tools: Intel IGD passthrough 1/2: vendor-specific FLR
Due to FLR capability of IGD is not exposed on some platforms, this
patch uses vendor specific FLR to reset those IGDs.

Signed-off-by: Weidong Han <weidong.han@intel.com>
2010-02-04 09:08:05 +00:00
Keir Fraser afea05486c xend: Disallow "/" in domain names
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2010-02-03 09:45:02 +00:00
Keir Fraser 4dc7c3daba xend: destroy restored domain when its device doesn't exist
A migrated domain keeps on running even though its disk doesn't
exist. This situation must be undesirable.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2010-01-27 08:59:47 +00:00
Keir Fraser 224c24a3df tools/xsm: Expose Flask XSM AVC functions to user-space
This patch exposes the flask_access, flask_avc_cachestats,
flask_avc_hashstats, flask_getavc_threshold, flask_setavc_threshold,
and flask_policyvers functions to user-space. A python wrapper was
created for the flask_access function to facilitate policy based
user-space access control decisions. flask.h was renamed to libflask.h
to remove a naming conflict.

Signed-off-by : Machon Gregory <mbgrego@tycho.ncsc.mil>
2010-01-26 07:50:04 +00:00
Keir Fraser ec78952374 xend: Dis-allow device assignment if PoD is enabled.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
2010-01-21 14:40:05 +00:00
Keir Fraser b304702a73 tools: fix sysfs error path
Attached patch fixes sysfs error path.
NetBSD also has a /proc/mounts file but no sysfs.
On Linux you can test this with sysfs not mounted.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2010-01-21 11:27:11 +00:00
Keir Fraser 1e4743291b xend: Unbreak live migration with tapdisk2 after 20691:054042ba73b6
vm.image does not exist at this point in the restore process.
I haven't looked at the memory_sharing code. It's likely something
better is needed to make that work across relocation.

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
2010-01-21 09:03:00 +00:00
Keir Fraser 9e5e0eb840 xend: Fix 20825:49a2c1069e14
Converting an Python Int, sizeof(long) already returns byte length
rather than bit length so do not divide-by-8.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-01-20 09:51:38 +00:00
Keir Fraser 2e883df395 xend: Properly interpret vcpu_avail Long Integer in xc.hvm_build().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-01-20 09:33:59 +00:00
Keir Fraser 41449bf35b Revert 20746:042b371d8728 --- Breaks stubdoms.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-01-18 10:37:28 +00:00
Keir Fraser 36197bd847 xend: Use max_node_id rather than nr_nodes where appropriate.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-01-17 18:20:04 +00:00
Keir Fraser c9aa64e062 xend: NUMA: fix division by zero on unpopulated nodes
nodes without memory will currently be disabled by also moving the
physical cores connected to them to other nodes. This leads to nodes
without CPUs and thus to a division by zero in the node allocation
algorithm.  Attached patch fixes this by checking for 0 before the
division. This fixes domain creation on boxes with memory-less nodes.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
2010-01-17 18:01:08 +00:00
Keir Fraser fb95b70c12 xend: Fix wait-for-stubdom loop to avoid possible infinite loop
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-01-14 10:14:17 +00:00
Keir Fraser 735f8ebd53 xend, NUMA: Fix computation of needed nodes
Enumerate the best nodes and add CPU affinity until all VCPUs can be
backed by at least one physical core. This should fix problems with
asymmetric NUMA configurations and cropped number of CPUs in Xen.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
2010-01-14 09:44:08 +00:00
Keir Fraser b57e4ee13e xend, pciquirk: fix uninitialized variable
Fixes uninitialized variable when there's no
PERMISSIVE_CONFIG_FILE

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2010-01-12 06:56:56 +00:00
Keir Fraser dbaa1e3603 xend: fix options for assigned pci
pci global options and per-device options for HVM device model have
been broken for some time, the patch tries to fix the problem. It:
    * maintains global options in xend, and merge it into
      per-device option when creating the backend
    * merge the global options also into the parameter of pci-ins
      dm-command

The second one is there because the backend is effectively skipped
in ioemu at present, ioemu solely relies on the parameter string to
create the device.

Cc: Simon Horman <horms@verge.net.au>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Qing He <qing.he@intel.com>
2010-01-08 11:39:06 +00:00
Keir Fraser 66e24c20de xend: Fix xc.physinfo() Py_BuildValue format string.
Fix for 20762:a1d0a575b4ba

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2010-01-08 11:33:37 +00:00
Keir Fraser a78d15f986 sysctl: Return max_node_id rather than nr_nodes from physinfo command.
Python extension continues to synthesise a nr_nodes value.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-01-06 10:13:55 +00:00
Keir Fraser 8c5fdc54a7 xend: passthrough: also do_FLR when a device is assigned.
To workaround a race condition about guest hotplug, c/s
18338:7c10be016e4 disabled do_FLR when we create guest or 'xm
pci-attach' device into guest, so now we actually only do_FLR when a
guest is destroyed or 'xm pci-detach'.

By moving the FLR-related checking/do_FLR logic a little earlier, this
patch re-enables do_FLR in these 2 cases disabled by 18338.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2010-01-06 08:17:20 +00:00
Keir Fraser 9b0440ff26 xend: Pass -vcpu-avail option to QEMU now it is supported.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-01-05 08:36:54 +00:00
Keir Fraser f3c8a24596 xend: Allow disable QEMU monitor by settinbg option to 0 in config file.
Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
2010-01-04 09:04:53 +00:00
Keir Fraser f0a326072f XendAPI: After VBD_destroy and VIF_destroy the managed config must be saved
...otherwise already deleted devices appear again in configuration
after a xend restart.

Signed-off-by: Lutz Dube <Lutz.Dube@ts.fujitsu.com>
2009-12-29 15:04:17 +00:00