Commit Graph
3270 Commits
Author SHA1 Message Date
Keir Fraser 547cb1849c build: Make XEN_ROOT an absolute path.
Otherwise make can search the path relative to certain standard paths
such as /usr/include (e.g., the line '-include $(XEN_ROOT)/.config' in
Config.mk suffers from this).

Signed-off-by: Keir Fraser <keir@xen.org>
2011-03-17 10:36:25 +00:00
Ian Campbell 4c8c24a088 xl/xm: make pci-list use same BDF format as all other commands
In particular using the same syntax as pci-{attach,detach} uses is
very helpful.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-03-09 17:05:43 +00:00
Kamala Narasimhan 546a764045 libxl: disk specification interface change
Currently we pile all the backend and format information pertaining to
disk option in a single enum.  This check-in separates the two and
uses two enums, one for disk format and another for disk backend.
This helps clearly differentiate between disk format and backend
within the implementation and also helps cleanup the code in this area
in preparation for the impending parser revamping to be done post 4.1.
Along with separating format and backend, this check-in also removes
unwanted types and renames variables in the disk interface and fixes
the code affected by the interface changes.

In specific, here are the disk interface changes made - In
libxl_device_disk structure physpath was renamed to pdev_path,
virtpath was renamed to vdev, phystype was removed and replaced with
backend and format enums.  Also previously a single enum
libxl_disk_phystype held the values for qcow, qcow2, vhd, aio, file,
phy, empty and that got refactored into two enums, libxl_disk_format
to hold unknown, qcow, qcow2, vhd, raw, empty and libxl_disk_backend
to hold unknown, phy, tap and qdisk.

Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-02-15 19:59:37 +00:00
James Harper 31960417a9 xend: canonicalise symlinks found in /dev for vbds (helps vscsi)
By default, vscsi expects to be passed the final device name (eg
/dev/st3) instead of one of the various udev symlinks (eg
/dev/tape/by-path/pci-0000:01:08.0-scsi-0:0:2:0-st). The following patch
resolves the path to the real path if the name starts with /dev/

Signed-off-by: James Harper <james.harper@bendigoit.com.au>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-02-08 16:35:35 +00:00
Stefano Stabellini 1b1d0b8b75 tools: Change the name of the qemu save file at restore time
Change the name of the qemu save file to qemu-resume at restore time so
that it doesn't collide with the name of the next save file.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-01-21 17:57:31 +00:00
Kouya Shimura c398531ffa xend: pci.py: fix open file descriptor leak
I got the following error:
    $ xm pci-list-assignable-devices
    Error: [Errno 24] Too many open files

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2011-01-20 16:41:23 +00:00
Jim Fehlig 891436a0e8 xend: improve psudeo-bootloader support for external block scripts
Userspace tools support external block scripts (e.g. block-drbd
provided by drbd project).  The psuedo-bootloader setup code in
xend has a few limitations wrt external block scripts, which this
patch addresses.

blkif.py: parse_uname() utility function should be able to parse a
disk specifier understood by the rest of the tools.

XendDomainInfo.py: Block devices using external block scripts must
be attached to dom0 before running the psuedo-bootloader.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
Tested-by: Shriram Rajagopalan <rshriram@gmail.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-01-18 17:23:24 +00:00
Jim Fehlig 9418284397 xend: drbd: Revert 19444:152257350930
Remove some more "drbd" cruft from xend.  This is not necessary for
drbd to work with Xen.

Requested-by: Jim Fehlig <jfehlig@novell.com>
Tested-by: Shriram Rajagopalan <rshriram@gmail.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-01-18 17:20:55 +00:00
Gianni Tedesco 0479adbbc3 tools/python/pyxl: Updates to builtin-type marshalling functions
Allow setting a string field to None as a way to zero it out.
Implement setting/getting libx_file_references as strings.
Produce relevant Exceptions marshallers which remain unimplemented.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-01-11 18:58:02 +00:00
Gianni Tedesco 56994c4fb3 tools/python/pyxl: Export PCI passthrough related libxl functions
Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-01-11 18:57:37 +00:00
Gianni Tedesco a174473317 tools/python/pyxl: Allow subclassing of auto-generated python types
Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-01-11 18:57:16 +00:00
Gianni Tedesco e1d9a99f18 tools/python/pyxl: Export relevant integer constants from python wrapper
Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-01-11 18:56:48 +00:00
Gianni Tedesco 61097895f0 tools/python/pyxl: Un-muddle libxl_domain_(pause|unpause) wrappers
Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-01-11 18:55:24 +00:00
Gianni Tedesco 5644ab84f7 tools/python/pyxl: Fix reference counting of Py_(None|True|False)
The incorrect refcounting causes the python interpreter to crash

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-01-11 18:54:44 +00:00
Michal Novotny a7eac41469 tools/xend: check for device model if path is not specified
this is the patch to check for device model (in XendConfig.py) when the
device_model had no path specified, i.e. XenD was trying to read the
file on the auxbin path. Without this patch applied the meaningless
python error "coercing to Unicode: need string or buffer, NoneType
found" occurred:

[2010-11-30 13:56:47 5255] ERROR (xmlrpclib2:181) Internal error
handling xend.domain.create
Traceback (most recent call last):
   File "/usr/lib64/python2.4/site-packages/xen/util/xmlrpclib2.py",
line 134, in _marshaled_dispatch
     response = self._dispatch(method, params)
   File "/usr/lib64/python2.4/SimpleXMLRPCServer.py", line 406, in _dispatch
     return func(*params)
   File
"/usr/lib64/python2.4/site-packages/xen/xend/server/XMLRPCServer.py",
line 80, in domain_create
     info = XendDomain.instance().domain_create(config)
   File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomain.py",
line 1001, in domain_create
     dominfo = XendDomainInfo.create(config)
   File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py",
line 97, in create
     domconfig = XendConfig.XendConfig(sxp_obj = config)
   File "/usr/lib64/python2.4/site-packages/xen/xend/XendConfig.py",
line 367, in __init__
     self.validate()
   File "/usr/lib64/python2.4/site-packages/xen/xend/XendConfig.py",
line 558, in validate
     self._platform_sanity_check()
   File "/usr/lib64/python2.4/site-packages/xen/xend/XendConfig.py",
line 502, in _platform_sanity_check
     if not os.path.exists(self['platform']['device_model']):
   File "/usr/lib64/python2.4/posixpath.py", line 171, in exists
     st = os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found

This patch raises VmError with message that no valid device model was
specified if None type was found in the device_model specification.

It's been tested on non-existing device model where the message is being
printed. If an invalid (but existing) device_model is set in the
configuration file the domain was destroyed because it crashed. If there
is a path specified (i.e. it's not using auxbin path) it bails with
error that the device model was not found (which was already implemented
there).

Signed-off-by: Michal Novotny <minovotn@redhat.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-01-11 18:51:28 +00:00
Ian Jackson 2cf5846885 tools/xend: drbd: fix things by reverting 20158
drbd's block-drbd script handles all of the details that c/s 20158
introduces within xend :-(.  This c/s should be reverted as it causes
a regression.  Jim Fehlig tested drbd without 20158 and it works fine.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Tested-by: Jim Fehlig <jfehlig@novell.com>
2011-01-05 23:31:24 +00:00
Juergen Gross 93039a68a5 Support getting topology info in libxl
Added new function libxl_get_topologyinfo() to obtain this information from
hypervisor.

Signed-off-by: juergen.gross@ts.fujitsu.com
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
2010-12-09 11:21:30 +01:00
Ian Campbell 3e446a35ee libxc: convert evtchn interfaces to use an opaque handle type
This makes the interface consistent with the changes made to the main
interface in 21483:779c0ef9682c.

Also fix some references to "struct xc_interface" which should have
been simply "xc_interface" in tools/xenpaging, and update QEMU_TAG to
pull in the corresponding qemu change.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-12-23 15:25:57 +00:00
Juergen Gross 8e6048545a tools/python: Rebuild python extensions if depends have changed
Adds depends information for building python extensions.
The extensions depend on the library binaries they are using.

Signed-off-by: juergen.gross@ts.fujitsu.com
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-12-10 18:13:15 +00:00
Jan Beulich d3d32407be xend: fix "xm block-detach 0 ..." for extended-ID devices
Simply taking stat()'s st_rdev doesn't work here, as the minor is
split into two parts, the major is present, and the "extended" bit
isn't set.

Rather than fixing this in a way that would likely be OS-dependent,
simply remove the access to the device file, and instead just parse
the provided string (as is done e.g. for block-attach).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-12-10 18:08:19 +00:00
Juergen Gross 9d679c393b tools: Add xl python bindings for cpumap
Signed-off-by: juergen.gross@ts.fujitsu.com
2010-11-23 19:35:09 +00:00
Jim Fehlig 0d84911192 Fix pci passthru in xend interface used by libvirt
Attempting to define or create a domain whose XML config contains a
passthru PCI device fails with libvirt

xen84: # cat win2k8r2.xml
...
   <hostdev mode='subsystem' type='pci' managed='no'>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
      </source>
    </hostdev>
...

xen84: # virsh create ./win2k8r2.xml
error: Failed to create domain from ./win2k8r2.xml
error: POST operation failed: xend_post: error from xen daemon:
  (xend.err "Error creating domain: 'key'")

The PCI device config maintained by xend includes a 'key' field, which is
initialized by xm client when using that tool and traditional xen config
file.  libvirt, which uses xend's sexpr-over-http interface (is that the
proper name for that interface??), does not initialize this field - and
shouldn't be expected to do so IMO.  Clients should not be bothered with
xend's internal representation of a PCI device.

This patch populates the 'key' field within xend if it is uninitialized,
similar to current initialization of 'uuid' field.  The 'vdevfn' field
suffers a similar problem if not (optionally) specified by user.
AFAICT, the xm client initializes 'vdevfn' to 0x100 if not specified so
I've done the same here.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-11-08 16:24:22 +00:00
Lutz Dube eb37dccf5b tools: fix cpu_weight/cap loss (22000:4fc66044477d)
Correction/Extension of changeset 22000:4fc66044477d
  "Values of cpu_weight and cpu_cap are lost after xend restart"

Values of cpu_weight and cpu_cap taken from managed SXP file have to
be converted from str to int.

Signed-off-by: Lutz Dube <lutz.dube@ts.fujitsu.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-11-03 17:23:42 +00:00
Juergen Gross 9180abe568 tools: change cpumaps to uint8_t
Cpumap types in tools (libxc and libxl) are changed to be based on bytes like
in the interface to the hypervisor.
To make handling easier the size of used cpumaps is always based on the
number of physical cpus supported by the hypervisor. This eliminates the need
to keep track of the cpumap size in external interfaces.
In libxl a macro for cycling through a cpumap is added (libxl_for_each_cpu).

Interfaces changed:
libxl_set_vcpuaffinity()
libxl_cpumap_alloc()
xc_vcpu_setaffinity()
xc_vcpu_getaffinity()
xc_cpupool_freeinfo()

Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-11-03 12:10:46 +00:00
Juergen Gross e57101211f avoid numa placement of cpus with active cpupools
When using cpupools don't pin vcpus to numa nodes as this might
conflict with the cpupool definition.
numa placement should be handled by cpupool configuration instead.

Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-10-28 12:22:09 +01:00
Miroslav Rezanina 0f114a5181 Do not wait for memory teardown when live migrate
When trying to live migrate guest with great memory (e.g. 20 GB),
there's delay caused by destroying source copy of domain.  To speed up
this process we can close socket before starting guest destroy, as
source guest is not running anymore.

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-10-28 11:40:32 +01:00
Ian Campbell 4fd0fc305b libxc: finalise transition to hypercall buffers.
Rename xc_set_xen_guest_handle to set_xen_guest_handle[0] and remove now
unused functions:
  - xc_memalign
  - lock_pages
  - unlock_pages
  - hcall_buf_prep
  - hcall_buf_release

[0] sed -i -e 's/xc_set_xen_guest_handle/set_xen_guest_handle/g' \
	tools/libxc/*.[ch] \
	tools/python/xen/lowlevel/xc/xc.c \
	tools/python/xen/lowlevel/acm/acm.c \
	tools/libxc/ia64/xc_ia64_stubs.c \
	tools/security/secpol_tool.c \
	tools/misc/xenpm.c

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
2010-10-22 15:14:51 +01:00
Ian Campbell 33ebf9e235 python xc: use hypercall buffer interface.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
2010-10-22 15:14:51 +01:00
Ian Campbell c3be68bfca python acm: use hypercall buffer interface.
I have a suspicion these routines should be using libxc rather than
reimplementing all the hypercalls again, but I don't have the
enthusiasm to fix it.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
2010-10-22 15:14:51 +01:00
Ian Campbell a050657a54 tools: cleanup domain save switch_qemu_logdirty callback
Move the function into struct save_callbacks with the others and add
the void *closure to the callback arguments.

Add and propagate an error return code from the callback.

Use this in libxl to pass the save context to
libxl__domain_suspend_common_switch_qemu_logdirty allowing us to reuse
the parent's xenstore handle, gc context etc.

Also add an apparently missing libxl__free_all to
libxl__domain_suspend_common.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-10-21 18:46:32 +01:00
Juergen Gross 18dd3dbdf2 tools: cpupools: Rename cpu-pool commands in xm to cpupool-*
The xm commands pool-* are renamed to cpupool-*
The old pool-* commands are defined as aliases.

Signed-off-by: juergen.gross@ts.fujitsu.com
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>

--HG--
rename : tools/python/xen/xm/pool-create.py => tools/python/xen/xm/cpupool-create.py
rename : tools/python/xen/xm/pool-new.py => tools/python/xen/xm/cpupool-new.py
rename : tools/python/xen/xm/pool.py => tools/python/xen/xm/cpupool.py
2010-10-21 18:35:18 +01:00
Juergen Gross 63c5ef9841 tools: cpupools: Support arbitrary numbers of physical cpus
To be able to support arbitrary numbers of physical cpus it was necessary to
include the size of cpumaps in the xc-interfaces for cpu pools.
These were:
  definition of xc_cpupoolinfo_t
  xc_cpupool_getinfo()
  xc_cpupool_freeinfo()
xc_cpupool_getinfo() and xc_cpupool_freeinfo() are changed to allocate the
needed buffer and return it.

Signed-off-by: juergen.gross@ts.fujitsu.com
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-10-21 18:32:56 +01:00
Ian Campbell 2674a29698 libxc: wrappers for XENMEM {increase,decrease}_reservation and populate_physmap
Currently the wrappers for these hypercalls swallow partial success
and return failure to the caller.

In order to use these functions more widely instead of open-coding
uses of XENMEM_* and xc_memory_op add variants which return the actual
hypercall result.

Therefore add the following functions:
  xc_domain_increase_reservation
  xc_domain_decrease_reservation
  xc_domain_populate_physmap
and implement the existing semantics using these new functions as
  xc_domain_increase_reservation_exact
  xc_domain_decrease_reservation_exact
  xc_domain_populate_physmap_exact
replacing the existing xc_domain_memory_* functions.

Use these new functions to replace all open coded uses of
XENMEM_increase_reservation, XENMEM_decrease_reservation and
XENMEM_populate_physmap.

Also rename xc_domain_memory_*_pod_target to xc_domain_*_pod_target
for consistency.

Temporarily add a compatibility macro for
xc_domain_memory_populate_physmap to allow time for qemu to catch up.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-10-18 16:54:42 +01:00
Ian Campbell e43181a5eb libxc: remove unnecessary double indirection from xc_readconsolering
The double indirection has been unnecessary since 9867:ec61a8c25429,
there is no possibility of the buffer being reallocated now.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-10-18 16:52:37 +01:00
Gianni Tedesco 92d4a8cf45 pyxl: fix build of python xl binding for python < 2.5
The python C API introduced Py_ssize_t in version 2.5. Prior to this
int's were used instead. Fix the build by way of a heinous preprocessor
macro.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-10-14 12:46:29 +01:00
Stephan Peijnik f5f0af18aa Replace pyxml/xmlproc-based XML validator with lxml based one
Pyxml/xmlproc is being used in tools/xen/xm/xenapi_create.py but is
unmaintained for several years now. xmlproc is used only for validating
XML documents against a DTD file.

This patch replaces the pyxml/xmlproc based XML validation with code
based on lxml, which is actively maintained.

Signed-off-by: Stephan Peijnik <spe@anexia.at>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-10-11 17:54:53 +01:00
Gianni Tedesco 6d01f35315 xl: Fix build in python binding since API change in 22229:1385b15e168f
Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-10-08 11:41:57 +01:00
Gianni Tedesco ce675adf0d tools/python: do not link against blktap except on Linux
Link to libblktapctl in python setup only for platforms which build it.
This fixes a build breakage on NetBSD introduced in 330c4d9010da.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Tested-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-09-23 19:03:52 +01:00
Ian Campbell 67e27bba02 python: xl: stub out libxl_cpuid_policy_list accessors
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-09-17 16:12:13 +01:00
Gianni Tedesco 6d4ba52d49 libxl, tools/python: Add libxl python binding
Introduce python binding for libxl. The binding is not yet complete but
serveral methods are implemented and tested. Those which are implemented
provide examples of the two or three basic patterns that most future
methods should follow.

Over 5,000 lines of boilerplate is automatically generated to wrap and
export all relevant libxl structure definitions. There are a few places
where such code cannot be fully auto-generated and special hooks are
declared and stubbed where, for example, conversion between
libxl_file_reference and a python file object is required.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-09-16 17:20:22 +01:00
Matthias Klose a502f04ad6 tools/python: Replace python string exceptions with ValueError exceptions
There are at least some syntax errors when trying to use the xen utils with
python2.6.  The attached patch changes these string exception into
ValueErrors:

   - tools/python/xen/util/bugtool.py (getBugTitle)
   - tools/python/xen/xend (class XendBase): not catched
   - tools/python/xen/xm/xenapi_create.py (sxp2xmlconvert_sxp_to_xml):
     the method already raises a ValueError for similiar condition.
   - tools/python/xen/xm/main.py (xm_network_attach): not catched.

For all but maybe the first one, the replacement of the string
exceptions into ValueErrors seems to be safe.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-09-14 17:46:21 +01:00
Brendan Cully 167c73522e remus: use plug qdisc for network buffering instead of queue
It was renamed in the pvops [kernel] tree.

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-09-07 19:13:55 +01:00
Ian Campbell 5545b07a5c libxl+xend: use correct paths for PV console when running bootloader
Makes "{xl,xm} create -c GUEST" work again with pygrub in interactive
mode which was broken by 21994:2e08ec0028e4

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-09-07 18:50:55 +01:00
Miroslav Rezanina 47e13da0a1 xend: reserve vtd_mem on guest restore
There's need for free vtd_mem more memory for guest with
xen-unstable c/s 17529.  This memory is freed when guest is
created, but is not freed when guest is restored. So restore
guest fails due  to not enough of memory for guest.

Following patch uses same calculation of memory to free in guest
restore as is in guest creation.

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-09-03 18:22:31 +01:00
Michael Young 4053efae85 tools/python: fix xm list for Python 2.7
This patch fixes
  Unexpected error: <type 'exceptions.AttributeError'>
This is due to xmlrpc changes in Python 2.7.  This patch should
fixe it for both old and new versions.

Signed-off-by: Michael Young <m.a.young@durham.ac.uk>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-19 17:09:30 +01:00
Christoph Egger d83eb7f21e xend: remove non-ASCII characters.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-08-17 15:23:36 +01:00
Lutz Dube Lutz.Dube@ts.fujitsu.com 1ecf910c9b Values of cpu_weight and cpu_cap are lost after xend restart
For managed domains in state 'halted' I always get default values
for cpu_cap / cpu_weight after xend restart.
This is because the names of parameters differ between a SXP file to
create a VM (here the parameter names are cpu_cap / cpu_weight) and
a SXP file of a managed VM (here vcpus_params (cap 0) (weight 0)).
But XendConfig.py reads only cpu_cap / cpu_weight and if not found,
default values are used.
 
The patch reads first vcpus_params (cap, weight), if not found then cpu_cap,
cpu_weight and if both parameters are missing it uses the default values.
 
Signed-off-by: Lutz Dube Lutz.Dube@ts.fujitsu.com
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-08-16 17:14:10 +01:00
eXeC001er 3484b6c6c6 Fix "Error: Device 51952 not connected" error when using pygrub
The following is the process of booting a DomU with 'mounted-blktap2' (VHD
for example) and 'pygrub' as bootloader:

1. Connect boot-device to Dom0 as '/dev/xpvd'
2. Pygrub get info for load DomU
3. Disconnect boot-device from Dom0
4. Boot DomU

During step 3 the created device is disconnected from Dom0, but
xenstore does not scrape away after the device is disconnected so you
get the following error:

    "Error: Device /dev/xvdp (51952, tap2) is already connected."

During step 3 xend calls destroyDevice always with 'tap' as argument.

Signed-off-by: eXeC001er <execooler@gmail.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-08-16 17:11:30 +01:00
Ian Campbell fa2244104b libxc: disable xc_ptrace on x86 Linux
It has been unused since 21732:eb34666befcc.

Removing the include of sys/ptrace.h and threaddb.h exposed a few
places which were using time(2) or gettimeofday(2) without including
time.h or sys/time.h respectively and were relying on an include.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-13 14:25:56 +01:00
Ian Jackson a0b0302a08 tools/python: Remove non-ASCII characters introduced by fffedd3d70e1.
fffedd3d70e1 introduced into tools/python/xen/util/vscsi_util.py
high-bit-set characters which appear to be UTF-8 for non-breaking
spaces.  Replace them with spaces to avoid getting a Python syntax
error.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-12 17:06:21 +01:00