Commit Graph
3174 Commits
Author SHA1 Message Date
Keir Fraser a667809cd4 xend: fix best NUMA node allocation
Since we moved several NUMA info fields from physinfo into separate
functions/structures, we must adapt the node picking algorithm, too.
Currently xm create complains about undefined hash values.
The patch uses the new Python xc binding to get the information and
create a reverse mapping for node_to_cpu, since we now only have a
cpu_to_node field.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
2010-04-15 17:36:16 +01:00
Keir Fraser 254a13846c xend: make NUMA in xm info optional (dependent on new -n switch)
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
2010-04-15 13:16:17 +01:00
Keir Fraser d8ffa3fa6b xend: Fix numainfo/topologyinfo loop iterators in Xc extension.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2010-04-15 12:29:48 +01:00
Keir Fraser 1844bfe6f8 Fix changeset 21153:d2d8805868f1 (xend can't start)
21153 forgets to update the format string so xend can't start.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2010-04-15 12:28:33 +01:00
Keir Fraser 82e84243c3 Remus: fix alignment bug in python rtnl library
Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
2010-04-15 08:42:40 +01:00
Keir Fraser 3ac51fc221 credit2: Add toolstack options to control credit2 scheduler parameters
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
2010-04-14 12:10:19 +01:00
Keir Fraser 66ff9844c1 Clean up numa-info sysctl.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-04-13 13:27:46 +01:00
Keir Fraser 645f5ea7cb Topology-info sysctl cleanups.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-04-13 09:38:54 +01:00
Keir Fraser 81f77532b5 sysctl: Remove sockets_per_node field from physinfo command.
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2010-04-13 08:37:16 +01:00
Keir Fraser bf294945ed 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>
2010-04-09 08:54:25 +01:00
Keir Fraser 4d6e834ba9 Host Numa information in dom0
'xm info' command now also gives the cpu topology & host numa
information. This will be later used to build guest numa support.  The
patch basically changes physinfo sysctl, and adds topology_info &
numa_info sysctls, and also changes the python & libxc code
accordingly.

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2010-04-07 16:22:05 +01:00
Keir Fraser 5657c1d9cb 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>
2010-03-30 18:31:39 +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