Commit Graph
2602 Commits
Author SHA1 Message Date
Keir Fraser 499681128c xend: Add syntax check for block devices
If we define wrong values to a disk parameter in domain configuration
files, we get an error message or a guest OS panic.

 1. If we define a wrong disk type, xm create command error occurs
    about 100 seconds later.
      e.g.  disk=['xyz:/xen/root-vm1.img,hda1,w']

 2. If we forget a disk type, a guest OS panic occurs.
      e.g.  disk=['/xen/root-vm1.img,hda1,w']

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-05-12 11:19:09 +01:00
Keir Fraser 126d4342c6 xend: Fix and improve error handling for failed suspend/migrate
This has been broken since cset 16964:5d84464dc1fc
Also deal better with very early errors (close sender side socket)

Signed-off-by: Steven Hand <steven.hand@cl.cam.ac.uk>
2008-05-08 14:33:31 +01:00
Keir Fraser 1aa3c54a31 Remove defunct powerpc port.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-08 13:40:40 +01:00
Keir Fraser 5e5a6aa9be Xend: Fix handling of vnc params.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-05-08 11:20:04 +01:00
Keir Fraser ef4c89d294 xend: Improve "cpus" parameter to be able to define CPU affinities for each VCPU
If we define the form of list of string to "cpus" parameter,
different CPU affinities are set for each VCPU as follows.

 # grep cpus /etc/xen/vm1
 cpus = ["2", "3"]
 vcpus = 2
 # xm create vm1
 Using config file "/etc/xen/vm1".
 Started domain vm1
 # xm vcpu-list vm1
 Name                                ID  VCPU   CPU State   Time(s)
 CPU Affinity
 vm1                                  1     0     2   r--       3.5 2
 vm1                                  1     1     3   -b-       3.2 3

If we define the form of string to "cpus" parameter as before,
a same CPU affinity is set for each VCPU as follows.

 # grep cpus /etc/xen/vm2
 cpus = "2,3"
 vcpus = 2
 # xm create vm2
 Using config file "/etc/xen/vm2".
 Started domain vm2
 # xm vcpu-list vm2
 Name                                ID  VCPU   CPU State   Time(s)
 CPU Affinity
 vm2                                  2     0     3   -b-       3.0
 2-3
 vm2                                  2     1     2   r--       2.6
 2-3

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-05-08 11:15:58 +01:00
Keir Fraser ed2e517bac XM/XenAPI: Enable Console other_config parameters to be passed through Xen API.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-05-07 14:16:48 +01:00
Keir Fraser d4a7565965 msix: Further fixes to Python arithmetic.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-07 09:17:52 +01:00
Keir Fraser 9787d88dcf xend: Only import OpenSSL package when it is required.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-06 15:31:15 +01:00
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