Commit Graph
2594 Commits
Author SHA1 Message Date
Keir Fraser 89266413bf xend: Refactor security.on() call
I am refactoring the security.on() call to return the actual type of
the security module that is found to be enabled rather than just
returning True or False.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-05-06 10:05:52 +01:00
Keir Fraser d60778fcdc Calculation of MSI-X table size needs to be masked.
Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
2008-05-05 10:12:44 +01:00
Keir Fraser b404bb0ba9 Remove unimplemented xm migrate --resource option.
Signed-off-by: Gary Pennington <gary.pennington@sun.com>
2008-05-01 16:35:49 +01:00
Keir Fraser 84736d7607 Accept decimal block device IDs
Solaris uses a simple indexing scheme for block devices. Parts of xend
translate them as hexadecimal (such as block-attach), and decimal, or
unconverted, elsewhere (such as block-detach). Harmonise these
interfaces by allowing decimal specifications.

Also allow Solaris-style block device names.

Signed-off-by: John Levon <john.levon@sun.com>
2008-05-01 16:35:28 +01:00
Keir Fraser 1d45c8ef8c x86 hvm cpuid: fix some problem with the hvm's cpuid configuration.
- When we overwrite a cpuid's input, apply the default policy
    for the other registers.
  - For the python binding, get unsigned long instead long.
  - Fix the multiple inputs cpuid's configuration parsing.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
2008-05-01 16:08:36 +01:00
Keir Fraser 46ac8f31a0 MSI 4/6: remove io_mem permission for MSI-X, since MSI-X
facilities are allocted through and located in PCI BAR.

Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Shan Haitao <haitao.shan@intel.com>
2008-05-01 10:32:10 +01:00
Keir Fraser ca0074e519 MSI 2/6: change the pirq to be per-domain
Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Shan Haitao <haitao.shan@intel.com>
2008-05-01 10:30:22 +01:00
Keir Fraser a2f23ae851 [Xend/ACM] Provide explicit initialization function for bootloader class
This patch refactors the initialization code for the bootloader class
and puts it into an explicit initialization function that is called
from another class.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-05-01 09:55:45 +01:00
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