Commit Graph
2586 Commits
Author SHA1 Message Date
Keir Fraser f0dc96dc71 [Xend/ACM] Embed the policy schema in the python file
This patch embeds the ACM policy's schema in the python file where the
schema is being accessed for verifying the policy XML. This way also
programs that cannot access a protected directory where the schema may
be located in can use this class.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-05-01 09:55:06 +01:00
Keir Fraser 65bdbfa43a VT-d: Separate VT-d page table from P2M table
Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
2008-05-01 09:53:26 +01:00
Keir Fraser 0f26d15c7b Add SSL/TLS support to relocation
* SSL/TLS support is disabled by default, as other server did.

 * If "xend-relocation-server-ssl-key-file" and
   "xend-relocation-server-ssl-cert-file" exist, SSL/TLS is enabled
   automatically.

 * "xend-relocation-tls" is used by relocation client only.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2008-05-01 09:50:16 +01:00
Keir Fraser 5f14a87ceb x86, hvm: Guest CPUID configuration.
CPUID's replies are now pre-calculated in libxc and given to the
hypervisor via a new domctl.

There are two parts to this feature:
   - We can overwrite cpuid's replies.
   - We can check that a vm is compatible with a host's processor.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-25 13:44:45 +01:00
Keir Fraser 9fb02748d0 xm: Add a new option to xm dump-core
The option is -R|--reset.  A guest domain is reset after saving
a core dump of the guest domain when specified the option.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-04-25 13:40:39 +01:00
Keir Fraser 17da362de7 xm: Fix cmdHelp() for xm reset
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-04-25 13:40:05 +01:00
Keir Fraser 0501e7a2ab ia64: fix domain builder
Windows on ia64 can't boot since cset 17397:61a3e041ea12.
The memory for video RAM must be added as the x86 does.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2008-04-24 10:01:27 +01:00
Keir Fraser defe5e9a30 blktap: Automatically start tapdisk-ioemu on demand
When a domain wants to use a tap:ioemu disk but has no device model,
start a tapdisk-ioemu instance as provider. Also, move the creation
and removal of communication pipes to xend so that qemu-dm doesn't
need the unwanted SIGHUP handler anymore.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
2008-04-23 16:57:23 +01:00
Keir Fraser a7f2eeb898 ACM: Put hash of XML policy into binary policy to tie them together
This patch extends the ACM binary policy format with an embedded hash
of the corresponding XML policy in order to tie them together. This
allows xend to determine whether it has the correct XML policy in its
repository and react appropriately if it does not have it.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-04-23 13:29:09 +01:00
Keir Fraser 8318d7d63d Revert 17499:451ae3b8e5c8
Breaks HVM guest creation (bugzilla #1221).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-23 13:30:24 +01:00
Keir Fraser 3b64ad17ca blktap: Automatically start tapdisk-ioemu on demand
When a domain wants to use a tap:ioemu disk but has no device model,
start a tapdisk-ioemu instance as provider. Also, move the creation
and removal of communication pipes to xend so that qemu-dm doesn't
need the unwanted SIGHUP handler anymore.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
2008-04-22 14:39:33 +01:00
Keir Fraser bd5b777ef9 xm: Add a new command: xm reset
If a hang-up of a guest OS occurs, we will restart the guest OS by
using
the following commands.
 1. xm destroy
 2. xm create or xm start

To reduce the number of xm commands to use, this patch adds a new
command.  The command is "xm reset".  The command executes destruction
of a domain, and then creation of the domain.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-04-22 10:18:13 +01:00
Keir Fraser ef3c86eb81 xend/acm: Fixes to labelling of resources.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-04-15 10:24:55 +01:00
Keir Fraser aa3ca83fda tools: Make xend set time offset for all kinds of domains, so that
ioemu doesn't need to do it.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-04-11 09:14:03 +01:00
Keir Fraser 7c4dc2c627 xm: Fix xm shutdown for xendomains.
If xm shutdown command is passed the domain ID, it should still wait
for the shutdown completion of the domain if passed option --wait.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-04-08 09:57:37 +01:00
Keir Fraser 54cdc383f1 Split the meaning of "dom0-min-mem = 0" to a new option.
I have written a patch to split the current meaning of
"dom0-min-mem = 0" to a new option "enable-dom0-ballooning".

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-07 15:01:26 +01:00
Keir Fraser 01d02daa5f xend: Don't allow dom0 memory to be ballooned below dom0-min-mem
configuration parameter.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-04-05 22:25:30 +01:00
Keir Fraser 3fd29b158f acm: Modify the default ACM boot policy so that unlabeled domains can always start
I am modifying the xen- and xend-internal default policy so that
unlabeled domains can always start. A more restrictive security policy
can then be set on top of that policy.

Signed-off-by: Stefan Beger <stefanb@us.ibm.com>
2008-04-04 12:59:28 +01:00
Keir Fraser b6eb51444c xm: When dumping core of an errant domain do not unpause after the
dump. This could allow the domain to e.g., access disks after
fail-over.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-04-04 10:18:45 +01:00
Keir Fraser 739fe1e943 xend: Add "dumpcore_in_progress" flag to xenstore information
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-04-03 11:37:23 +01:00
Keir Fraser 4586f27b6c xend, acm: Assign an unlabeled resource the __UNLABELED__ label
Assign an unlabeled resource the __UNLABELED__ label rather than
failing the lookup in the dictionary and catching the exception.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-04-03 11:33:10 +01:00
Keir Fraser 0103c5e512 xend, acm: Prevent labeling of vlans with the same color
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-04-03 11:32:20 +01:00
Keir Fraser 1f0c3f742d tools: Obtain platform capabilities via physinfo sysctl.
Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-01 18:04:19 +01:00
Keir Fraser cd0ce97288 xend: XSPolicy.can_run xend support
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-04-01 10:08:03 +01:00
Keir Fraser efeb49b813 Revert all usages of gcc's __extension__ keyword, and instead assert
that our headers are not built with __GNUC__ and __STRICT_ANSI__.

__extension__ had some weird (and buggy) behaviours when nested which
make it a risky proposition for general usage in our header
files. Better to disallow -ansi, -std=c99, and similar gcc options
when building against Xen headers.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-03-31 17:43:18 +01:00
Keir Fraser e358d917c4 xend: Improve localtime calculation -- Python time module already
provides the relevant information.

From: Ross Walker <rwalker@medallion.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-03-31 10:40:43 +01:00
Keir Fraser 6e6b79115c xm: Make xm's printout of security errors look better
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-03-31 10:37:19 +01:00
Keir Fraser 178252351a xend: Fix XendBootloader bogus reference to 'attr'.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-03-28 07:34:47 +00:00
Keir Fraser 8d4aef298f pygrub: cleanup and support for NetBSD
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-03-26 14:41:47 +00:00
Keir Fraser e687956536 xenfb: Dynamic modes support.
Attached patch adds dynamic frame buffer size support to the xenfb PV
backend QEMU xenfb.  Backend sets feature-resize and handles the
resize frame buffer event.

Corresponding frontend LINUX patch is required for functionality but
this patch is not dependent on it, preserving backwards
compatibility.

Signed-off-by: Pat Campbell <plc@novell.com>
2008-03-26 09:09:16 +00:00
Keir Fraser f28927a991 xend: typo
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-03-25 10:26:05 +00:00
Keir Fraser 8f04d55021 xend: Fix writing domain's VDI UUID into domain state file.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-03-20 17:45:00 +00:00
Keir Fraser 2795200267 tools: More accurate parsing of pci config.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-03-19 10:21:01 +00:00
Keir Fraser cccd453197 xend: Fix and improve default NUMA node selection.
Add the missing condition check and use average value instead of the
sum value of Vcpus pinning cpus on certain node to choose relaxed node.

Signed-off-by: Duan Ronghui <ronghui.duan@intel.com>
2008-03-19 10:20:17 +00:00
Keir Fraser 67ae17b562 Fix methods in SrvDomain class for inactive managed domains
This patch fixes methods in SrvDomain class for inactive managed
domains.  They should use a domain name because inactive managed
domains don't have a domID.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-03-19 10:18:36 +00:00
Keir Fraser 102cd68e62 vfb: Add opengl option
(and replace bogus vncpasswd copy in xenapi_create in the SDL case)

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-03-18 15:51:19 +00:00
Keir Fraser 751e5ae7c3 Xend forgets to write the domain's VDI UUID into the domain state file
once the domain is started (before it's there). Once xend is restarted
it will not know the association between the VBD and VDI anymore due
to the missing UUID. This patch fixes this.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-03-18 13:14:26 +00:00
Keir Fraser 1fa1369d8a ioemu: SDL rendering using OpenGL
Add opengl support for rendering the guest framebuffer in the SDL
window. SDL is needed anyway to open the window and handle the
events. Opengl rendering is optional and can be turned off at both
compile time and in the vm configuration file.

Some of the benefits of using opengl are:

 - faster rendering, less CPU intensive, especially with good graphic
   cards;
 - makes the window resizing possible and hardware accelerated, thus
   very efficient and smooth;
 - allows other optimizations like sharing directly a buffer in vram
   with the guest (not yet implemented).

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2008-03-18 11:47:58 +00:00
Keir Fraser d61f17ab72 tools: Add PV passthrough PCI device hotplug support.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-03-18 11:39:21 +00:00
Keir Fraser bfe18b4f3a Fix domain suspend by xend stop
When I stopped xend by xend stop command, a domain suspend processing
is frequently failed.  This patch solves the problem.

Step to reproduce:
 1. xm new XXX on_xend_stop="suspend"
 2. xm start XXX
 3. xend stop

In the xend stop, if the domain suspend processing is slept by
state_updated.wait() of waitForShutdown(), then the domain suspend
processing is not waked up again because state_updated.notifyAll()
of _stateSet() is not executed.

For the reason, processing of _on_domains_changed() is waited by
domains_lock.acquire() because the domain suspend processing is
keeping domains_lock and sleeping.  The domain suspend processing
got domains_lock at cleanup_domains().

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-03-18 11:34:44 +00:00
Keir Fraser 7564231fbc xm: allow non-existent readline module
Let xm work even if Python doesn't have its readline module installed.

Signed-off-by: John Levon <john.levon@sun.com>
2008-03-18 11:32:06 +00:00
Keir Fraser 83d6140b39 Allow libvirt to specify force, rm_cfg
When doing a 'virsh detach-disk' on a running domain, the disk is not
removed from the configuration file.  Allow a caller to specify
whether or not to change the file.

Signed-off-by: Ryan Scott <ryan.scott@sun.com>
2008-03-18 11:31:39 +00:00
Keir Fraser 37a1d36134 stubdom: add support for reading the command line from the config
file, and merge the dmargs with it in the case of qemu.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-03-18 11:27:05 +00:00
Keir Fraser 8ff66a38fa Convert XenAPI platform values to appropriate types.
XenAPI defines the platform attribute of a VM as a string-string map
but in various code paths in xend the platform entries are expected to be
another type, e.g. int.  This patch defines the types of each platform
entry and converts the entry values to appropriate type when new domU
configuration is created via XenAPI.

Alternatively the values could be casted to appropriate type when used
but seems prudent to do the conversion when domU configuration is
created.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2008-03-18 11:07:00 +00:00
Keir Fraser 97ae3c0202 Set device model when creating rfb console via XenAPI
When creating a rfb console via XenAPI the device model is not being
set to qemu-dm, resulting in no pvfb since qemu-dm is not launched
when domU is started.  This patch sets device model when a rfb console
is created via XenAPI.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2008-03-18 11:06:26 +00:00
Keir Fraser d8cdbecc65 Initialization of new domU config options via XenAPI
Many of the new domU config options related to hvm guests (e.g. hpet,
rtc_timeoffset, etc.) are not initialized with default values via
XenAPI, which prevents starting an hvm domU created through XenAPI.
This patch ensures the new options are set with appropriate default
values in XendConfig platform sanity check.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2008-03-18 11:05:53 +00:00
Keir Fraser 6dc8df55ea Each TAP/TUN device name for a HVM guest includes its domain ID.
The TAP/TUN devices are used for connection to a HVM domain, but there
is no relationship between each name of the devices and its domain
ID. This patch assigns a HVM domain ID to each TAP/TUN device name.

Signed-off-by: MIYAJIMA Mitsuharu <miyajima.mitsuharu@anchor.jp>
2008-03-18 11:02:00 +00:00
Keir Fraser 45b676a245 Use ioemu block drivers through blktap.
Add support for a tap:ioemu pseudo driver. Devices using this driver
won't use tapdisk (containing the code duplication) any more, but will
connect to the qemu-dm of the domain. In this way no working
configuration should be broken right now as you can still choose to
use the tapdisk drivers.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
2008-03-18 10:58:47 +00:00
Keir Fraser 6329505217 xm: Fix 2nd argument value of arg_check() for a few xm commands.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-03-04 09:35:08 +00:00
Keir Fraser 4d5bf67dd1 Fix xm vcpu-pin for inactive managed domains
We cannot currently change cpu affinity definitions of inactive
managed domains by xm vcpu-pin command. This patch enables changing
cpu affinity definitions of inactive managed domains. However, we
cannot change cpu affinity definitions to each vcpu because we cannot
currently define cpu affinity definitions to each vcpu to domain
configuration definitions.  Therefore, we need to specify 'all' to
VCPU argument of xm vcpu-pin command.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-03-03 11:09:33 +00:00