Commit Graph
558 Commits
Author SHA1 Message Date
Stefano Stabellini ea4dce89d4 xl: free memory before building a domain
Free the needed amount of memory before proceeding with the domain
build.

Use a filelock to prevent other xl instances from conflicting during
this operation.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-09-22 18:02:36 +01:00
Ian Jackson 2dbb423e17 xl: Change default global config not to contain uncommented default
[mistakenly applied v4 of patch 7/12 rather than v4b -iwj]

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-09-22 17:55:38 +01:00
Stefano Stabellini 73c54d46b1 xl: add a global configuration file
Add a global configuration file: /etc/xen/xl.conf; the only option
currently parsed is autoballoon that is 1 by default.

[fixed up for conflicts with libxl__ naming policy changes -iwj]

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-09-22 17:42:01 +01:00
"Dube, Lutz" c290fa1c4b tools/xend: Fix performance of xend with more than 10000 FC device paths
On server startup xend start or a later xend restart needs approx. 30 min to
start/restart. Without attached FC devices xend start/restart needs only some
seconds.

server type: Fujitsu Primergy RX600-S5

The time gets lost in xen/xend/XendNode.py line 329 while calling
vscsi_util.get_all_scsi_device().

329         for pscsi_record in vscsi_util.get_all_scsi_devices():
330             scsi_id = pscsi_record['scsi_id']
331             if scsi_id:
332                 saved_HBA_uuid = None

I think, in most cases we don't need all the PSCSI devices registered in
xend, but only a few of it.
So a good solution for this perforamce issue is to scan only the SCSI device
paths we need, controlled by a new option in xend-config.sxp.

I have made a patch to allow specification of scsi devices we need in xend
in the config file xend-config.sxp.
The new options pscsi-device-mask expects a list of device ids oder partial
device ids like the option of lsscsi, e.g.
(pscsi-device-mask ('<partial-dev-id1' 'partial-dev-id2' ...))

Without this option set in xend-config.sxp or if lsscsi is not support, all
device paths are process like today.

Signed-off-by: Lutz Dube Lutz.Dube@ts.fujitsu.com
Comment from Masaki Kanno <kanno.masaki@jp.fujitsu.com>: "Well done"
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-07-23 17:34:35 +01:00
Keir Fraser edf9a6a284 xend: Do not mess with bridge if admin has set one up already
Previously, the default "network-script",
/etc/xen/scripts/network-bridge, would attempt to do its horrid work
even if you had already set everything up in /etc/network/interfaces.

Setting up your bridge in /etc/network/interfaces is:
 * easy
 * required for libxl since libxl never does it for you
 * not a fragile piece of lunacy
 * properly documented
 * the way everyone would expect it to work

In this small patch we make it so that the default config for xend
doesn't mess about on startup if you already have a bridge, and
doesn't mess about on shutdown unless your first-named bridge (eth0 or
xenbr0, normally) doesn't also have a physical interface named
p<whatever> (peth0 or pxenbr0) enslaved to it.  The latter test is not
ideal but will hopefully do from now until the time xend finally dies.

We also fix the "documentation" - ie, the comments in the default
xend-config.sxp - to correspond to reality.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-06-15 11:36:27 +01:00
Keir Fraser e13255b6c5 xend: Add interface name definition support for xend-relocation-address
Add a new feature for xend-relocation-address option to support
definition by interface name which can be useful for people having
e.g. a cluster environment with multiple network interfaces on all of
the machines with only one reserved to be registered to a private
cluster network. This way they won't need to specify the relocation
address manually on all the machines but just simple providing the
interface name to get the IP address from would do the job (all the
machines have to have this interface named the same to make it
working, of course).

Technically it reads the interface name and gets its IP address using
ioctl call of SIOCGIFADDR and if the interface doesn't have the
address, i.e. if non-existing interface or hostname was provided the
original ifname is returned to preserve the old behaviour.

Signed-off-by: Michal Novotny <minovotn@redhat.com>
2010-05-25 09:08:34 +01:00
Keir Fraser 8973872b34 VT-d, tools: Intel IGD passthrough 2/2: hvm config file example
Add an option into hvm config file to enable graphics passthrough
including discrete and IGD. To passthrough graphics to guest, need to
set gfx_passthru=1, and also specify graphics device BDF in pci
passthrough option, like pci=['xx:xx.x'] in hvm config file.

Signed-off-by: Weidong Han <weidong.han@intel.com>
2010-02-04 09:09:13 +00:00
Keir Fraser f3bbcc7995 tools: Do not append trailing slash to XEN_ROOT in Makefiles
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-02-04 09:03:42 +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 e45215a3fe xend: Memory pool for pv guest on systems with >128G memory
The main idea of this patch is:

1) The admin sets aside some memory below 128G for 32-bit paravirtual
domain creation (via dom0_mem=-<value> in kernel comand line).

2) The admin also explicitly states to the tools (i..e xend) how much
memory is supposed to be left untouched by 64-bit domains

3) If a 32-bit pv DomU gets created, no ballooning ought to be
necessary (since if it is, no guarantee can be made about the address
range of the memory ballooned out), and memory gets allocated from the
reserved range.

4) Upon 64-bit (or 32-bit HVM or HVM) DomU creation, the tools
determine the amount of memory to be ballooned out of Dom0 by adding
the amount needed for the new guest and the amount still in the
reserved pool (and then of course subtracting the total amount of
memory the hypervisor has available for guest use).

Signed-off-by: james song (wei) <jsong@novell.com>
2009-12-02 08:51:12 +00:00
Keir Fraser 08a0b4ab0d Replace tsc_native config option with tsc_mode config option
(NOTE: pvrdtscp mode not finished yet, but all other
modes have been tested so sooner seemed better than
later to submit this fairly major patch so we can get
more mileage on it before next release.)

New tsc_mode config option supercedes tsc_native and
offers a more intelligent default and an additional
option for intelligent apps running on PV domains
("pvrdtscp").

For PV domains, default mode will determine if the initial
host has a "safe"** TSC (meaning it is always synchronized
across all physical CPUs).  If so, all domains will
execute all rdtsc instructions natively; if not,
all domains will emulate all rdtsc instructions but
providing the TSC hertz rate of the initial machine.
After being restored or live-migrated, all PV domains will
emulate all rdtsc instructions.  Hence, this default mode
guarantees correctness while providing native performance
in most conditions.

For PV domains, tsc_mode==1 will always emulate rdtsc
and tsc_mode==2 will never emulate rdtsc.  For tsc_mode==3,
rdtsc will never be emulated, but information is provided
through pvcpuid instructions and rdtscp instructions
so that an app can obtain "safe" pvclock-like TSC information
across save/restore and live migration. (Will be completed in
a follow-on patch.)

For HVM domains, the default mode and "always emulate"
mode do the same as tsc_native==0; the other two modes
do the same as tsc_native==1.  (HVM domains since 3.4
have implemented a tsc_mode=default-like functionality,
but also can preserve native TSC across save/restore
and live-migration IFF the initial and target machines
have a common TSC cycle rate.)

** All newer AMD machines, and Nehalem and future Intel
machines have "Invariant TSC"; many newer Intel machines
have "Constant TSC" and do not support deep-C sleep states;
these and all single-processor machines are "safe".

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
2009-11-25 14:05:28 +00:00
Keir Fraser 81a8a749f5 x86: document tsc_native configuration option in xmexample.hvm.
Set the default value to 1

Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
2009-10-16 08:34:49 +01:00
Keir Fraser f703973da4 xend: passthrough: add an option pci-passthrough-strict-check
Currently when assigning device to HVM guest, we use the strict check
for HVM guest by default.(For PV guest we use loose check
automatically if necessary.)

When we assign device to HVM guest, if we meet with the co-assignment
issues or the ACS issue (see changeset 20081: 4a517458406f), we could
try changing the option to 'no' -- however, we have to realize this
may incur security issue and we can't make sure the device assignment
could really work properly even after we do this.

The option is located in /etc/xen/xend-config.sxp:
(pci-passthrough-strict-check yes)

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2009-09-07 13:52:48 +01:00
Keir Fraser 8449b7b053 Fix a couple of comment typos.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-07-15 10:30:59 +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 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 60c32a612f stubdom: update config example to reflect that the serial option can
now be used.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-06-17 07:23:40 +01:00
Keir Fraser 41af6f38d9 xend: Make hotplug script timeouts configurable
In some configurations, when dom0 is busy with I/O, it may take
several minutes to complete all hotplug scripts required when a new
domain is being created. As device create timeout is set to 100
seconds, users get "hotplug scripts not working" error instead of a
new domain.

This patch makes both DEVICE_CREATE_TIMEOUT and DEVICE_DESTROY_TIMEOUT
configurable in xend-config.sxp to allow users to easily adapt hotplug
timeouts to their environment.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2009-05-19 02:18:48 +01:00
Keir Fraser 94c3a1b680 tools: clean up handling of xen config and scripts directories.
For now hardcode /etc w/o a prefix as there are hardcoded
config paths in the code which would break otherwise.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-05-19 01:48:18 +01:00
Keir Fraser a9f4e68513 stubdom docs: Update to reflect the new way of configuring stubdom domains.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-05-11 13:50:34 +01:00
Keir Fraser b04cc386ed xmexample: fix cpuid example
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-03-20 10:36:40 +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 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 7402207f8c [IA64] fix issue of can not find the qemu-dm in ia64
IA64 uses the /usr/lib/ for xen. We do not=20
need to check the arch_libdir in ia64. It will
return the wrong value to arch_libdir. And guest
can not boot.

Signed-off-by: Yang Zhang <yang.zhang@intel.com>
2009-03-09 09:18:08 +00:00
Keir Fraser 3ba7d233c7 xend: allow VM configuration with both sdl=1 and vnc=1
In the stubdom case you can now specify sdl=1 and vnc=1 (again, both
can be selected at the same time) in the vfb configuration.
So instead of:

vfb = [ 'type=vnc' ]

now you have:

vfb = [ 'vnc=1,sdl=1' ]

the former configuration option is deprecated but still supported for
backward compatibility.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-03-06 19:13:23 +00:00
Keir Fraser f3cc74d2f1 tool: make management of PCI D-states by guest optional
D3hot state in some PCI devices causes the failure of domain
creation/destruction.

The default is "pci_power_mgmt=3D0" which disables the guest OS from
managing D-states because it would be better to avoid the trouble than
advantage of low power consumption.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2009-03-06 18:58:41 +00:00
Keir Fraser f70473e487 xmexample: portability fix
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-03-02 11:04:43 +00:00
Keir Fraser f5bf427cd3 passthough: MSI-INTx translation documentation
Signed-off-by: Qing He <qing.he@intel.com>
2009-01-08 11:27:11 +00:00
Keir Fraser 57bcfa11b1 tools/hotplug: Separate OS-specific scripts.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-11-04 12:13:42 +00:00
Keir Fraser 5e58cce9f7 hvm: Battery Management virtual firmware and toolstack changes
Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
2008-10-14 11:08:15 +01:00
Keir Fraser e8ca11f2f6 xendomains script: A few bug fixes.
Contributed-by: Artur Linhart <AL.LINUX@bcpraha.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-09-11 15:16:11 +01:00
Keir Fraser 4b4f92e98d x86, xend: Fix processing of cpuid config parameters
There is an python indentation issue keeping the full range of syntax
for the cpuid config file parameter from working correctly.  This
patch fixes that.  It also fixes some misspelling and a missing 'x' in
two of the example config files (must have 32 bits represented for
cpuid registers).

Signed-off-by: Bruce Rogers <brogers@novell.com>
2008-09-10 10:51:48 +01:00
Keir Fraser 06cfe5df7b xsm, python tools: remove autogenerated xsm.py
- The patch does away with the autogenerated xsm.py file and
introduces a config parameter in xend-config.sxp to determine the
security module. The parameter is (xsm_module_name {acm, dummy,
flask}).  The default setting/option is dummy.  .hgignore is also
updated to stop ignoring xsm.py on commits.

- The patch has created an xsconstant for XS_POLICY_FLASK and updated
  the toolchain to check the instance of XS_POLICY_USE.  XS_POLICY_USE
  evalauates to XS_POLICY_FLASK or XS_POLICY_ACM or XS_POLICY_DUMMY
  depending on configuration.

- Flask relies on the current value of ssidref returned by dominfo to
  ensure that the label to sid mapping is consistent.  ssidref had
  been pop'ed from the dominfo object.  The patch addresses this
  issue.

- Flask python module style cleanups.

Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
2008-09-04 11:23:08 +01:00
Keir Fraser ec6869dadc pv-grub: fix example file
Apparently 64MB is too short for the domain builder.
No kernel option should be passed, as they are provided by menu.lst,
and would only confuse grub.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-29 10:45:09 +01:00
Keir Fraser 203c11a813 stubdom: fix documentation file names
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-06 11:38:20 +01:00
Keir Fraser be408edf70 xend: Expose persistent domain path in xend conf file
This patch exposes the persistent (aka managed) domain path in xend
configuration file.  This option is already supported in XendOptions
but is not annotated in the configuration file.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2008-08-06 09:38:43 +01:00
Keir Fraser 66e56e754b install more documentation to /usr/share/doc/xen and /etc/xen
Also resync xmexample3 with xmexample1 and 2.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-06 09:34:55 +01:00
Keir Fraser fa982a5874 Remove vncconsole from example HVM configs. It's deprecated.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-08-05 13:45:53 +01:00
Keir Fraser 1883561885 PV-GRUB: add sample config file
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-04 18:10:51 +01:00
Keir Fraser 23566e775d stubdom: rename the ioemu-dm domain config file to domainname-dm,
which is shorter, makes more sense, and sorts better.

From: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-08-04 16:47:52 +01:00
Keir Fraser a395f12adb x86 hvm: stubdom and hvmloader always live under /usr/lib, never /usr/lib64
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-22 07:59:44 +01:00
Keir Fraser 5a932f3328 doc: Fix multi-core amd example
Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
2008-07-21 16:24:19 +01:00
Keir Fraser cd3b21408f Check phy: block device existence
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-07-18 12:44:58 +01:00
Keir Fraser fbc96ef66e pvscsi: Install vscsi script.
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
2008-07-18 11:22:12 +01:00
Keir Fraser 2d7612f2fe blktap scripts: deletion of double check and permission of using /dev/sdxx
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
2008-07-18 11:21:06 +01:00
Keir Fraser ddebb2820e stubdom: add example config file
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-18 11:19:17 +01:00
Keir Fraser 96f900ef40 Choice of network interface for establishing a bridge on if NFSROOT is used
This patch fixes a problem related to machines that are booted using
nfsroot ( '/' provided via nfs). Previously the code was assuming that
nfsroot would be provided via eth0. Now this additional code checks
over which interface the nfsroot is provided after detecting that
nfsroot is actually being used. To determine from where nfsroot is
mounted I am reading the kernel command line (/proc/cmdline) and
filter for an argument starting with 'nfsroot=' and determine the nfs
server's IP address by assuming the format 'nfsroot=<ip
adddress>:<path to root>' - if there's a better way of doing this,
please let me know.  After that I determine the interface over which
this IP address would be accessed using 'ip route get <address>'. Then
I compare that interface against a previously determined default
interface and if they are equal return a value that causes an
alternative interface to be chosen.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-07-14 10:04:41 +01:00
Keir Fraser 08a42ca0b5 pvSCSI: xend changes
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
2008-07-03 13:39:06 +01:00
Keir Fraser 8d574cc772 vtpm: Add two missing quotes in the vTPM hotplug script.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-07-03 11:31:40 +01:00
Keir Fraser da67ff89f7 xend: improve the rotation of qemu-dm logfiles.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-07-01 10:58:43 +01:00