Commit Graph
3158 Commits
Author SHA1 Message Date
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
Keir Fraser 3781952178 xend: Fix 'monitor' domain config parameter.
Introduce new 'monitor_path' parameter, so that 'monitor' can revert
to its old type and meaning.

Fixes domain reboot and save/restore.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-12-24 08:59:47 +00:00
Keir Fraser b4b0f9dcc4 xend: Extra qemu options: parallel,serial,monitor
Allows par/ser ports to be configured with a path to backing device.
Allows qemu monitor to be disabled or redirected.

Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
2009-12-23 07:36:33 +00:00
Keir Fraser b8ae241fc9 Remove videoram option from vfb config.
This option is only valid in main config.

Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
2009-12-23 07:26:31 +00:00
Keir Fraser 70248054c9 Revert 20709:085627544270 2009-12-21 16:51:40 +00:00
Keir Fraser 9ffb378fde xend: Enable vHPET in HVM guests by default.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-12-21 10:50:28 +00:00
Keir Fraser 57ea955dd3 Adds 'memory_sharing' option to domain config scripts. It passes domain id to
the tapdisk2 process if sharing is enabled (tapdisk2 is not normally aware what
domain it is working for).

Signed-off-by: Grzegorz Milos <Grzegorz.Milos@citrix.com>
2009-12-17 06:27:57 +00:00
Keir Fraser 37f8a59c7c Fix bug in c/s 20332 "Add commands to hotplug usb devices to hvm guests"
Signed-off-by: James Song Wei <jsong@novell.com>
2009-12-14 09:36:26 +00:00
Keir Fraser b8a087fb41 HVM vcpu add/remove: parse vcpu_avail to Qemu
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>

Disable qemu cmdline option until our qemu supports it.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-12-14 09:31:00 +00:00
Keir Fraser cf75018188 HVM vcpu add/remove: parse 'vcpu_avail' to firmware and set up madt
accordingly

-- currently firmware has got 'vcpus' from xend, this patch add parse
   'vcpu_avail' to firmware;
-- setup madt 'lapic' subitems of processors accoring to vcpus and
   vcpu_avail which finally come from config;

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-12-14 09:25:47 +00:00
Keir Fraser a4a7c638f7 xend: fix empty 'cpus' parsing
/etc/xen/xmexample.hvm says "" means "leave to Xen to pick", but we
get a "Error: string index out of range" currently.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2009-12-14 07:59:12 +00:00
Keir Fraser 51dfdb01ad xend: fix a typo introduced by changeset 20621:f9392f6eda79
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2009-12-14 07:58:47 +00:00
Keir Fraser 30acac4606 Fix bug in c/s 20332 "Add commands to hotplug usb devices to hvm guests"
Signed-off-by: James Song Wei <jsong@novell.com>
2009-12-14 07:58:15 +00:00
Keir Fraser b501c6cfa8 tools: improve NUMA guest placement when ballooning
the "guest to a single NUMA node" constrain algorithm does not work
well when we do ballooning. Ballooning and NUMA don't play together
anyway, as Dom0 and thus ballooning is not NUMA aware, I am working on
this but it will not be ready for the Xen 4.0 release window.  The
usual ballooning situation will result in an empty candidate list, as
no node has enough free memory to host the guest. In this case the
code will simply pick the first node: again and again, because all
nodes without enough memory will be ultimately penalized with the same
maxint value (regardless of the actual load).  The attached patch will
change this to use a relative penalty in case of not-enough memory, so
that low-load low-memory nodes will be used at one point. A half
loaded node has shown to be a good value, as an unbalanced system is
much worse than non-local memory access for guests.  Regardless of
that you should restrict the Dom0 on a NUMA system to a reasonable
memory size, so that ballooning is not necessary most of the time. In
this case the guest's memory will be NUMA local.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
2009-12-11 08:59:54 +00:00
Keir Fraser fc63162a09 PVUSB: xm/xend support
You can see the following slides to understand the usage.
http://www.xen.org/files/xensummit_intel09/PVUSBStatusUpdate.pdf
Limitations:
"xm usb-hc-create" accepts up to 16 ports, but, current usbfront
can work with up to 15 ports. This may be bug and I'm preparing
to fix it.

This xm/xend support requires linux-2.6.18-xen.hg c/s 939 or above.
I recommend latest tip.

Signed-off-by: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
2009-12-11 08:52:17 +00:00
Keir Fraser 80b20a2fa0 tools: simplify PYTHON_PATH computation (and fixes for NetBSD)
Doesn't work when build-time python path differs from install-time. Do
we care about this given tools should be packaged/built for the
specific run-time distro?

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-12-09 10:58:52 +00:00