]> xenbits.xensource.com Git - xen.git/log
xen.git
14 years agolibxc: remus: unbreak after 21488:dd6bbdc42033
Brendan Cully [Thu, 19 Aug 2010 17:24:12 +0000 (18:24 +0100)]
libxc: remus: unbreak after 21488:dd6bbdc42033

The aforementioned patch missed several calls to read_exact, causing spurious
timeouts under Remus.

Also add a couple of additional error reports to rdexact.

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
Reviewed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agolibxl: Disable opengl if info->opengl == 0 (correct sense of test)
Stefano Stabellini [Thu, 19 Aug 2010 17:15:44 +0000 (18:15 +0100)]
libxl: Disable opengl if info->opengl == 0 (correct sense of test)

Disable opengl if info->opengl == 0

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agoQEMU_TAG update
Ian Jackson [Thu, 19 Aug 2010 17:13:01 +0000 (18:13 +0100)]
QEMU_TAG update

14 years agoQEMU_TAG update
Ian Jackson [Thu, 19 Aug 2010 16:51:39 +0000 (17:51 +0100)]
QEMU_TAG update

14 years agotools/python: fix xm list for Python 2.7
Michael Young [Thu, 19 Aug 2010 16:09:30 +0000 (17:09 +0100)]
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>
14 years agotimers: Fix printk format specifier
Keir Fraser [Thu, 19 Aug 2010 15:24:13 +0000 (16:24 +0100)]
timers: Fix printk format specifier

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agoxl: use libxl_device_pci_destroy
Ian Campbell [Thu, 19 Aug 2010 14:33:43 +0000 (15:33 +0100)]
xl: use libxl_device_pci_destroy

[PATCH 16 of 16 of
 libxl: autogenerate type definitions and destructor functions]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agolibxl/xl: Use libxl_vcpuinfo_destroy
Ian Campbell [Thu, 19 Aug 2010 14:32:56 +0000 (15:32 +0100)]
libxl/xl: Use libxl_vcpuinfo_destroy

Replaces libxl_free_vcpu_list.

The ->cpumap field is now always a unique allocation rather than each
being an offset into the cpumap allocated in the first
libxl_device_pci in the list.

Refactor vcpulist so that the two cases can share more code.

[PATCH 15 of 16 of
 libxl: autogenerate type definitions and destructor functions]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agolibxl/xl: Use libxl_device_nic_destroy and libxl_nicinfo_destroy
Ian Campbell [Thu, 19 Aug 2010 14:32:28 +0000 (15:32 +0100)]
libxl/xl: Use libxl_device_nic_destroy and libxl_nicinfo_destroy

Replaces libxl_free_nics_list

[PATCH 14 of 16 of
 libxl: autogenerate type definitions and destructor functions]

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agolibxl/xl: use libxl_diskinfo_destroy and libxl_device_disk_destroy
Ian Campbell [Thu, 19 Aug 2010 14:31:46 +0000 (15:31 +0100)]
libxl/xl: use libxl_diskinfo_destroy and libxl_device_disk_destroy

[PATCH 13 of 16 of
 libxl: autogenerate type definitions and destructor functions]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agoxl: destroy device model info after creation
Ian Campbell [Thu, 19 Aug 2010 14:31:14 +0000 (15:31 +0100)]
xl: destroy device model info after creation

[PATCH 12 of 16 of
 libxl: autogenerate type definitions and destructor functions]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agolibxl: use libxl_version_info_destroy, not hand-coded do_free_version_info
Ian Campbell [Thu, 19 Aug 2010 14:30:48 +0000 (15:30 +0100)]
libxl: use libxl_version_info_destroy, not hand-coded do_free_version_info

[PATCH 11 of 16 of
 libxl: autogenerate type definitions and destructor functions]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agoxl: free the libxl types contained in struct domain_config
Ian Campbell [Thu, 19 Aug 2010 14:29:57 +0000 (15:29 +0100)]
xl: free the libxl types contained in struct domain_config

Resolves the following leaks found using "valgrind xl create -n ..."
(plus presumably others which didn't trigger because I have no devices
of that type)

[PATCH 10 of 16 of
 libxl: autogenerate type definitions and destructor functions]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
==21241== 5 bytes in 1 blocks are definitely lost in loss record 1 of 6
==21241==    at 0x4022F0A: malloc (vg_replace_malloc.c:236)
==21241==    by 0x411B22F: strdup (in /lib/i686/cmov/libc-2.7.so)
==21241==    by 0x804E56B: parse_config_data (xl_cmdimpl.c:760)
==21241==    by 0x8056B04: create_domain (xl_cmdimpl.c:1357)
==21241==    by 0x8057ECE: main_create (xl_cmdimpl.c:3154)
==21241==    by 0x804B2FB: main (xl.c:76)
==21241==
==21241== 6 bytes in 1 blocks are definitely lost in loss record 2 of 6
==21241==    at 0x4022F0A: malloc (vg_replace_malloc.c:236)
==21241==    by 0x411B22F: strdup (in /lib/i686/cmov/libc-2.7.so)
==21241==    by 0x804DAAA: parse_config_data (xl_cmdimpl.c:586)
==21241==    by 0x8056B04: create_domain (xl_cmdimpl.c:1357)
==21241==    by 0x8057ECE: main_create (xl_cmdimpl.c:3154)
==21241==    by 0x804B2FB: main (xl.c:76)
==21241==
==21241== 24 bytes in 1 blocks are definitely lost in loss record 3 of 6
==21241==    at 0x4022F0A: malloc (vg_replace_malloc.c:236)
==21241==    by 0x411B22F: strdup (in /lib/i686/cmov/libc-2.7.so)
==21241==    by 0x804E51F: parse_config_data (xl_cmdimpl.c:754)
==21241==    by 0x8056B04: create_domain (xl_cmdimpl.c:1357)
==21241==    by 0x8057ECE: main_create (xl_cmdimpl.c:3154)
==21241==    by 0x804B2FB: main (xl.c:76)
==21241==
==21241== 27 bytes in 1 blocks are definitely lost in loss record 4 of 6
==21241==    at 0x4022F0A: malloc (vg_replace_malloc.c:236)
==21241==    by 0x411B22F: strdup (in /lib/i686/cmov/libc-2.7.so)
==21241==    by 0x804DF4A: parse_config_data (xl_cmdimpl.c:664)
==21241==    by 0x8056B04: create_domain (xl_cmdimpl.c:1357)
==21241==    by 0x8057ECE: main_create (xl_cmdimpl.c:3154)
==21241==    by 0x804B2FB: main (xl.c:76)
==21241==
==21241== 28 bytes in 1 blocks are definitely lost in loss record 5 of 6
==21241==    at 0x4022F0A: malloc (vg_replace_malloc.c:236)
==21241==    by 0x410C1A7: vasprintf (in /lib/i686/cmov/libc-2.7.so)
==21241==    by 0x40EE59A: asprintf (in /lib/i686/cmov/libc-2.7.so)
==21241==    by 0x804CA8B: init_nic_info (xl_cmdimpl.c:322)
==21241==    by 0x804E6FF: parse_config_data (xl_cmdimpl.c:791)
==21241==    by 0x8056B04: create_domain (xl_cmdimpl.c:1357)
==21241==    by 0x8057ECE: main_create (xl_cmdimpl.c:3154)
==21241==    by 0x804B2FB: main (xl.c:76)
==21241==
==21241== 44 bytes in 1 blocks are definitely lost in loss record 6 of 6
==21241==    at 0x4022F0A: malloc (vg_replace_malloc.c:236)
==21241==    by 0x411B22F: strdup (in /lib/i686/cmov/libc-2.7.so)
==21241==    by 0x804E168: parse_config_data (xl_cmdimpl.c:694)
==21241==    by 0x8056B04: create_domain (xl_cmdimpl.c:1357)
==21241==    by 0x8057ECE: main_create (xl_cmdimpl.c:3154)
==21241==    by 0x804B2FB: main (xl.c:76)

14 years agolibxl: implement destroy for libxl_file_reference builtin type
Ian Campbell [Thu, 19 Aug 2010 14:25:15 +0000 (15:25 +0100)]
libxl: implement destroy for libxl_file_reference builtin type

As well as freeing data any file mappings need to be torn down so
implement an explicit destroy function.

Also the map and unmap function are internal to libxl so make that so.

[PATCH 09 of 16 of
 libxl: autogenerate type definitions and destructor functions]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agolibxl: do not generate a destructor for data types which do not require one
Ian Campbell [Thu, 19 Aug 2010 14:24:41 +0000 (15:24 +0100)]
libxl: do not generate a destructor for data types which do not require one

libxl_dominfo, libxl_poolinfo, libxl_vminfo, libxl_domain_build_state,
libxl_physinfo and libxl_sched_credit contain no members which require
destruction so omit the auto generated destructor.

As an exception continue to generate destructors for libxl_device_*
and libxl_{devtype}* even if they have no interesting members so that
all device types can be treated the same without special knowledge
about the type contents being required.

[PATCH 08 of 16 of
 libxl: autogenerate type definitions and destructor functions]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agolibxl: build info bootloader{,_args} are not const.
Ian Campbell [Thu, 19 Aug 2010 14:21:29 +0000 (15:21 +0100)]
libxl: build info bootloader{,_args} are not const.

[PATCH 07 of 16 of
 libxl: autogenerate type definitions and destructor functions]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agolibxl: libxl_device_console.build_state is const
Ian Campbell [Thu, 19 Aug 2010 14:21:01 +0000 (15:21 +0100)]
libxl: libxl_device_console.build_state is const

This field always refers to a libxl_domain_build_state structure which
is managed already by the caller, therefore it is incorrect to free it
as part of libxl_device_console_destroy.

(arguably this field should be a copy of, not a reference too, the original)

[PATCH 06 of 16 of
 libxl: autogenerate type definitions and destructor functions]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agolibxl: generate destructors for each libxl defined type
Ian Campbell [Thu, 19 Aug 2010 14:20:22 +0000 (15:20 +0100)]
libxl: generate destructors for each libxl defined type

I chose the name "_destroy" rather than "_free" because the destructor
functions will free only the members of a type recursively but will
not free the actual type structure itself. The allocation of the type
is typically done by the caller and may not be a single allocation,
e.g. lists/arrays of types or embedded in other structures etc.

The exceptions to this rule are libxl_string_list_destroy and
libxl_key_value_list_destroy but I'm not 100% convinced they are
exceptions (since they are kind-of opaque) and I couldn't see a
cleanerway to express this concept. I have made a best effort attempt
to implement these functions sanely but since as far as I can tell
nothing in the current code base ever sets
libxl_domain_create_info.{xsdata,platformdata} I'm flying somewhat
blind.

[PATCH 05 of 16 of
 libxl: autogenerate type definitions and destructor functions]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agolibxl: autogenerate _libxl_types.h
Ian Campbell [Thu, 19 Aug 2010 14:15:55 +0000 (15:15 +0100)]
libxl: autogenerate _libxl_types.h

The libxl interface types are represented by a simple python data
structure (which could be parsed from a bespoke language in the
future).

This will allow the autogeneration of functions to free the component
members of the libxl types. In the future it may also enable auto
generation of type marshalling code for language bindings.

The generated file should be identical to before with the exception of
the "DO NOT EDIT" header.

It was unfortunately necessary to add explcit an dependency on
_libxl_types.h (indirectly via libxl.h) to all C files since the
autogenerated dependencies are not available in time.

[PATCH 04 of 16 of
 libxl: autogenerate type definitions and destructor functions]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agolibxl: tweak formatting of _libxl_types.h to better suit autogeneration
Ian Campbell [Thu, 19 Aug 2010 13:46:32 +0000 (14:46 +0100)]
libxl: tweak formatting of _libxl_types.h to better suit autogeneration

This makes it easier to do a before/after comparison when the file
becomes autogenerated.

[PATCH 03 of 16 of
 libxl: autogenerate type definitions and destructor functions]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agolibxl: move type definitions into _libxl_types.h
Ian Campbell [Thu, 19 Aug 2010 13:45:36 +0000 (14:45 +0100)]
libxl: move type definitions into _libxl_types.h

The intention is to autogenerate this file in a future patch. This
pure code motion patch allows for easier before and after comparison
of that patch.

[PATCH 02 of 16 of
 libxl: autogenerate type definitions and destructor functions]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agoxl: free all data on exit from the domain monitor daemon.
Ian Campbell [Thu, 19 Aug 2010 13:40:24 +0000 (14:40 +0100)]
xl: free all data on exit from the domain monitor daemon.

[PATCH 01 of 16
 libxl: autogenerate type definitions and destructor functions]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agoUpdate MAINTAINERS file.
Keir Fraser [Wed, 18 Aug 2010 17:06:10 +0000 (18:06 +0100)]
Update MAINTAINERS file.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agoMerge
Ian Jackson [Wed, 18 Aug 2010 16:11:13 +0000 (17:11 +0100)]
Merge

14 years agotools/libxl: fix "xl console" for primary console
Ian Campbell [Wed, 18 Aug 2010 16:09:59 +0000 (17:09 +0100)]
tools/libxl: fix "xl console" for primary console

libxl_console_constype is an enum and can therefore be unsigned so
using -1 as a sentinel for unset in main_console fails to work as
expected.

Arrange for all valid enum values to be > 0 and use 0 as the sentinal
instead.

If the user does not request a specific type then always use the
primary console since using "-n" but not "-t" is not meaningful as we
do not know which type to request.

Also make libxl_console_exec reject invalid values of type.

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>
14 years agotools/libxc: free thread specific hypercall buffer on xc_interface_close
Ian Campbell [Wed, 18 Aug 2010 16:09:25 +0000 (17:09 +0100)]
tools/libxc: free thread specific hypercall buffer on xc_interface_close

The per-thread hypercall buffer is usually cleaned up on pthread_exit
by the destructor passed to pthread_key_create. However if the calling
application is not threaded then the destructor is never called.

This frees the data for the current thread only but that is OK since
any other threads will be cleaned up by the destructor.

Changed since v1:
 * Ensure hcall_buf_pkey is initialised before use. Thanks to
   Christoph Egger for his help diagnosing this issue on NetBSD.
 * Remove redundant if (hcall_buf) from xc_clean_hcall_buf since
   _xc_clean_hcall_buf includes the same check.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agotools/xenpaging: Add _XOPEN_SOURCE to fix build problems with recent gcc
Daniel Kiper [Wed, 18 Aug 2010 15:48:25 +0000 (16:48 +0100)]
tools/xenpaging: Add _XOPEN_SOURCE to fix build problems with recent gcc

This patch fixes compilation issues with
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21).

Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agotimers: Simplify implementation logic.
Keir Fraser [Wed, 18 Aug 2010 13:56:01 +0000 (14:56 +0100)]
timers: Simplify implementation logic.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agotools/hotplug: 21549:8bcaec29574e breaks vif-script with arguments.
Brendan Cully [Wed, 18 Aug 2010 13:50:51 +0000 (14:50 +0100)]
tools/hotplug: 21549:8bcaec29574e breaks vif-script with arguments.

For example, (vif-script 'vif-bridge bridge=eth1') in xend-config.sxp will
cause vif-setup to attempt to execute 'vif-bridge bridge=eth1' due to a
quoting mismatch. The fix appears to be to remove the extra quotes around
"$script" in vif-setup.

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agotimers: Improve debug-key printing.
Keir Fraser [Wed, 18 Aug 2010 13:22:48 +0000 (14:22 +0100)]
timers: Improve debug-key printing.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agox86 cpuidle: check whether cpu is online in cpu idle control
Keir Fraser [Tue, 17 Aug 2010 18:32:37 +0000 (19:32 +0100)]
x86 cpuidle: check whether cpu is online in cpu idle control

We observed a 2.6.18.8 dom0 kernel crash when Xen has maxcpus < num
of physical cores (maxcpus=3D4 for a 12-core system). It appeared that
hypervisor doesn't check whether CPU is online or not. This small
patch fixed the issue.

Signed-off-by: Uwe Dannowski <uwe.dannowski@amd.com>
Acked-by: Wei Huang <wei.huang2@amd.com>
14 years agoxentrace: Fix buffer allocation to properly depend on T_INFO_PAGES
Keir Fraser [Tue, 17 Aug 2010 18:30:35 +0000 (19:30 +0100)]
xentrace: Fix buffer allocation to properly depend on T_INFO_PAGES

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
14 years agotools/libxl: fix leak in libxl_wait_for_backend()
Gianni Tedesco [Tue, 17 Aug 2010 16:23:25 +0000 (17:23 +0100)]
tools/libxl: fix leak in libxl_wait_for_backend()

Another leak was been introduced since the gc patch-set.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agotools/libxl: compile with -Wmissing-declarations
Ian Jackson [Tue, 17 Aug 2010 16:20:53 +0000 (17:20 +0100)]
tools/libxl: compile with -Wmissing-declarations

Since the recent build error caused by mismatch of symbol types due to
missing declarations, build libxl with -Wmissing-declarations.

The patch is mostly straightforward, a one liner in the makefile enables
the flag, a lot of functions in xl_cmdimpl.c needed to be made static
and libxl_paths.c needed to include libxl.h.

The one wart on the patch-set is that flex has a bug where it emits code
with missing declarations for yy(set|get)_column.  This can be worked
around by providing the declarations ourselves regardless.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agoxend: remove non-ASCII characters.
Christoph Egger [Tue, 17 Aug 2010 14:23:36 +0000 (15:23 +0100)]
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>

14 years agolibxl: xs_read accepts NULL for *len parameter
Ian Campbell [Mon, 16 Aug 2010 14:31:05 +0000 (15:31 +0100)]
libxl: xs_read accepts NULL for *len parameter

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

14 years agolibxl: do not GC data returned to the caller by libxl_device_disk_getinfo.
Ian Campbell [Mon, 16 Aug 2010 14:31:05 +0000 (15:31 +0100)]
libxl: do not GC data returned to the caller by libxl_device_disk_getinfo.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

14 years agolibxl: ensure result of libxl_poolid_to_name is always dynamically allocated
Ian Campbell [Mon, 16 Aug 2010 14:31:05 +0000 (15:31 +0100)]
libxl: ensure result of libxl_poolid_to_name is always dynamically allocated

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

14 years agolbixl: make libxl_device_model_starting type opaque to users of libxl
Ian Campbell [Mon, 16 Aug 2010 14:31:05 +0000 (15:31 +0100)]
lbixl: make libxl_device_model_starting type opaque to users of libxl

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

14 years agolibxl: make libxl_console_reader type opaque to users of libxl
Ian Campbell [Mon, 16 Aug 2010 14:31:05 +0000 (15:31 +0100)]
libxl: make libxl_console_reader type opaque to users of libxl

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

14 years agolibxl: add specific type for hwcaps
Ian Campbell [Mon, 16 Aug 2010 14:31:04 +0000 (15:31 +0100)]
libxl: add specific type for hwcaps

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

14 years agolibxl: add specific type for cpumap.
Ian Campbell [Mon, 16 Aug 2010 14:31:04 +0000 (15:31 +0100)]
libxl: add specific type for cpumap.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

14 years agolibxl: move various enum and #defines above datastructure definitions.
Ian Campbell [Mon, 16 Aug 2010 14:31:04 +0000 (15:31 +0100)]
libxl: move various enum and #defines above datastructure definitions.

These are left behind when the datastructures move to _lixl_types.hg
in a following patch and moving them first makes that pure code motion
patch more obviously correct.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

14 years agolibxl: define specific types for string list and key,value list
Ian Campbell [Mon, 16 Aug 2010 14:31:04 +0000 (15:31 +0100)]
libxl: define specific types for string list and key,value list

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

14 years agoxl: use the regular implicit rules to build the xl .o files
Ian Campbell [Mon, 16 Aug 2010 14:31:04 +0000 (15:31 +0100)]
xl: use the regular implicit rules to build the xl .o files

Having $(XL_OBJS) makes part of a subsequent patch a little cleaner.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

14 years agofix libxl build failure
"Jiang, Yunhong" [Tue, 17 Aug 2010 11:45:44 +0000 (12:45 +0100)]
fix libxl build failure
Fix libxl build issue caused by 21966, which adds the hidden attribute,
but didn't update the tools/libxl/xenguest.c.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

14 years agoAdd Intel maintainers for VT-d and TXT.
Keir Fraser [Tue, 17 Aug 2010 07:03:47 +0000 (08:03 +0100)]
Add Intel maintainers for VT-d and TXT.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agolibxl_blktap_devpath: initialize devname to NULL
Stefano Stabellini [Mon, 16 Aug 2010 17:05:07 +0000 (18:05 +0100)]
libxl_blktap_devpath: initialize devname to NULL

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
14 years agoxl: make libxl_uuid2string internal to libxenlight
Gianni Tedesco [Mon, 16 Aug 2010 16:15:04 +0000 (17:15 +0100)]
xl: make libxl_uuid2string internal to libxenlight

libxenlight exports a function libxl_uuid2string which is used
internally in several places but has one external caller in xl.
This means that libxl internal callers leak since they were not
expecting to have to free() the UUID since the per-api-call-gc-lifetime
patch.

Convert libxl_uuid2string to be an internal function which participates
in the callers garbage collection. Eliminate string_of_uuid() macro in
favour of "format" and "arguments" macros suitable for printf()-like
functions which are made part of the libxl API and fix-up xl callers to
use that to avoid code duplication and enhance readability.

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>

14 years agoValues of cpu_weight and cpu_cap are lost after xend restart
Lutz Dube Lutz.Dube@ts.fujitsu.com [Mon, 16 Aug 2010 16:14:10 +0000 (17:14 +0100)]
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>

14 years agoFix "Error: Device 51952 not connected" error when using pygrub
eXeC001er [Mon, 16 Aug 2010 16:11:30 +0000 (17:11 +0100)]
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>

14 years agoMake blktap support optional.
Christoph Egger [Mon, 16 Aug 2010 16:04:31 +0000 (17:04 +0100)]
Make blktap support optional.
Enable it by default on Linux, disable it on non-Linux.

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>

14 years agotools/libxl: remove libxl_free() since there are no more callers
Gianni Tedesco [Mon, 16 Aug 2010 12:39:19 +0000 (13:39 +0100)]
tools/libxl: remove libxl_free() since there are no more callers

libxl_free() allows allocated memory to be explicitly free'd from a
libxl_gc. Every previous use of this function has now been made
redundant and therefore has been removed. We can safely kill it and
amend the policy accordingly.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agotools/libxl: fix memory management bugs in libxl_device_disk_list()
Gianni Tedesco [Mon, 16 Aug 2010 12:37:58 +0000 (13:37 +0100)]
tools/libxl: fix memory management bugs in libxl_device_disk_list()

fix invalid free segfault and use-after-free in libxl_device_disk_list()

Gah, libxl_device_disk_list() is returning a lot of pointers to free'd
data. Fix that by replacing libxl_xs_read() with xs_read() in line with
the policy.

Also fix a segfault caused by an erroneous free of the last disk-list
array element rather than the first one. This was causing xl create to
segfault when using the new qemu-dm code-base. Fix that and add a
comment about the fact that this libxl API requires a corresponding
libxl_device_disk_free() function.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agotools/libxl: Support pv qemu without any vfbs
Stefano Stabellini [Mon, 16 Aug 2010 12:33:54 +0000 (13:33 +0100)]
tools/libxl: Support pv qemu without any vfbs

Pv qemu provides backends for vfbs and consoles; even if no vfbs are
given can still be useful for the console backends.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agotools: xenconsole[d] and libxl: multiple console support
Stefano Stabellini [Mon, 16 Aug 2010 12:32:04 +0000 (13:32 +0100)]
tools: xenconsole[d] and libxl: multiple console support

This patch implements the new protocol for handling pv consoles and
emulated serials as described in the document docs/misc/console.txt.

The changes are:

- xenconsoled: do not write the pty under serial in xenstore if
xenconsoled is handling a consolepath;

- xenconsole: implement support for an explicit console type parameter;
the parameter can be "pv", to specify that the user wants to
connect to a pv console, or "serial", to specify that the user wants to
connect to an emulated serial. If the type parameter hasn't been
specified be the user, xenconsole tries to guess which type of console
it has to connect to, defaulting to pv console for pv guests and
emulated serial for hvm guests.

- xenconsole: use the new xenstore paths;

- libxl: rename libxl_console_constype to libxl_console_consback:
constype is used to to specify whether qemu or xenconsoled provides the
backend, so I renamed it to libxl_console_consback to make it more
obvious that we are talking about backends;

- libxl: add a new libxl_console_constype to specify if the console is
an emulated serial or a pv console;

- libxl: support the new xenconsole "type" command line parameter;

- libxl: use the "output" node under console in xenstore to tell qemu
where do we want the output of this pv console to go;

- remove the legacy "serialpath" from xenconsoled altogether

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Also: update the QEMU_TAG to pull in the qemu part of these changes.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agoNew MAINTAINERS file to track maintainership of Xen subsystems.
Keir Fraser [Mon, 16 Aug 2010 08:54:02 +0000 (09:54 +0100)]
New MAINTAINERS file to track maintainership of Xen subsystems.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agotools/libxl: libxl_device_generic_add: handle NULL fents or bents
Stefano Stabellini [Fri, 13 Aug 2010 19:34:09 +0000 (20:34 +0100)]
tools/libxl: libxl_device_generic_add: handle NULL fents or bents

This is going to be used by libxl_console_add in the next patch to
avoid creating the device/console path on xenstore for console 0.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agotools/libxl: document libxl memory management policy
Gianni Tedesco [Fri, 13 Aug 2010 15:56:42 +0000 (16:56 +0100)]
tools/libxl: document libxl memory management policy

After animated discussion with several libxl developers we seem to have
agreed on a policy for memory management within libxenlight. These
comments document the policy which is mostly implemented since
21977:51147d5b17c3 but some aspects (comments, function naming) are
guidelines to be followed in future functionality and perhaps to be
implemented by search/replace in future patches.

The document is mostly authored by Ian Jackson but with modifications to
reflect the slightly different functionality that has been implemented
since this was proposed.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agox86: eliminate bogus IRQ restrictions
Keir Fraser [Fri, 13 Aug 2010 13:59:03 +0000 (14:59 +0100)]
x86: eliminate bogus IRQ restrictions

As pointed out in
http://lists.xensource.com/archives/html/xen-devel/2010-07/msg00077.html
the limits introduced in c/s 20072 are at least
questionable. Eliminate them in favor of a more dynamic approach:
There's no real need for an upper limit on nr_irqs (as anything beyond
nr_irqs_gsi isn't visible to domains anyway), and the split point (and
hence ratio) between GSI and MSI/MSI-X IRQs doesn't need to be hard
coded, but can instead be controlled on the command line in case there
are *very* many GSIs.

The default used for nr_irqs will be rather large with this patch, so
it may not be acceptable without also switching to a sparse irq_desc[]
as was done not so lomg ago in Linux.

The added capping of any domain's nr_pirqs is based on the observation
that no domain can possibly have more than the system wide number of
IRQs. The opposite case may in fact also require some adjustment:
Defaulting the number of non-GSI IRQs available (namely to Dom0) to a
fixed value may not be the best choice going forward, since if there
indeed are very many non-GSI interrupt sources, it won't be possible
for the kernel to make use of them without giving
"extra_guest_irqs=" on the command line (but the goal should be to
allow things to work right by default even on large systems).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
14 years agox2APIC: Improve x2APIC suspend/resume
Keir Fraser [Fri, 13 Aug 2010 13:58:06 +0000 (14:58 +0100)]
x2APIC: Improve x2APIC suspend/resume

x2apic depends on interrupt remapping, so it should disable interrupt
remapping behind x2apic disabling. And also this patch wraps
__enable_x2apic to get rid of duplicated code.

Signed-off-by: Weidong Han <weidong.han@intel.com>
14 years agoFix IOAPIC S3 with interrupt remapping enabled
Keir Fraser [Fri, 13 Aug 2010 13:57:35 +0000 (14:57 +0100)]
Fix IOAPIC S3 with interrupt remapping enabled

In ioapic_suspend, it reads and saves ioapic RTEs. But when interrupt
remapping is enabled, io_apic_read will call io_apic_read_remap_rte to
convert remapped format interrupt to compatible format, this results
in 'dest' field may be changed in remap_entry_to_ioapic_rte. When in
ioapic_resume, it will write the saved RTEs with incorrect 'dest' to
interrupt remapping table.

Actually it needn't to convert RTEs regardless interrupt remapping is
enabled or not. It just needs to save and restore RTE values
directly. This patch just uses __io_apic_read and __io_apic_write,
which won't call Interrupt remapping functions to convert, to save and
restore RTEs in ioapic_suspend and ioapic_resume. Thus fix this issue.

Signed-off-by: Weidong Han <weidong.han@intel.com>
14 years agosysctl: Return physinfo.max_{cpu,node}_id as maximum *possible* IDs.
Keir Fraser [Fri, 13 Aug 2010 13:56:15 +0000 (14:56 +0100)]
sysctl: Return physinfo.max_{cpu,node}_id as maximum *possible* IDs.

In particular, this fixes setting vcpu affinities via
libxl. Previously, the affinity mask would be narrowed to the maximum
currently-online CPU. So future hotplugged CPUs could not be
expressed.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agolibxc: disable xc_ptrace on x86 Linux
Ian Campbell [Fri, 13 Aug 2010 13:25:56 +0000 (14:25 +0100)]
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>
14 years agoMerge
Ian Jackson [Fri, 13 Aug 2010 12:55:51 +0000 (13:55 +0100)]
Merge

14 years agolinux buildconfig: Fix quoting error
Keir Fraser [Fri, 13 Aug 2010 07:46:45 +0000 (08:46 +0100)]
linux buildconfig: Fix quoting error

Prevent shell syntax error if $(XEN_LINUX_CONFIG) is empty.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
14 years agoMerge
Keir Fraser [Fri, 13 Aug 2010 07:40:21 +0000 (08:40 +0100)]
Merge

14 years agoClean up event-channel debug-key output, and use spin_lock().
Keir Fraser [Fri, 13 Aug 2010 07:39:11 +0000 (08:39 +0100)]
Clean up event-channel debug-key output, and use spin_lock().

Signed-off-by: Jan Beulich <jbeulich@novell.com>
14 years agox86: Allow dom0 pstate control to access APERF/MPERF/HWCR MSRs
Keir Fraser [Fri, 13 Aug 2010 07:38:35 +0000 (08:38 +0100)]
x86: Allow dom0 pstate control to access APERF/MPERF/HWCR MSRs

The current version of the powernow driver uses the APERF/MPEF
and the HWCR MSRs.  Add cases in traps.c to let dom0 access
those MSRs.

Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
14 years agocredit1: Make weight per-vcpu
Keir Fraser [Fri, 13 Aug 2010 07:33:19 +0000 (08:33 +0100)]
credit1: Make weight per-vcpu

Change the meaning of credit1's "weight" parameter to be per-vcpu,
rather than per-VM.

At the moment, the "weight" parameter for a VM is set on a per-VM
basis.  This means that when cpu time is scarce, two VMs with the same
weight will be given the same amount of total cpu time, no matter how
many vcpus it has.  I.e., if a VM has 1 vcpu, that vcpu will get x% of
cpu time; if a VM has 2 vcpus, each vcpu will get (x/2)% of the cpu
time.

I believe this is a counter-intuitive interface.  Users often choose
to add vcpus; when they do so, it's with the expectation that a VM
will need and use more cpu time.  In my experience, however, users
rarely change the weight parameter.  So the normal course of events is
for a user to decide a VM needs more processing power, add more cpus,
but doesn't change the weight.  The VM still gets the same amount of
cpu time, but less efficiently allocated (because it's divided).

The attached patch changes the meaning of the "weight" parameter, to
be per-vcpu.  Each vcpu is given the weight.  So if you add an extra
vcpu, your VM will get more cpu time as well.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
14 years agosvm: increment RIP over PAUSE instruction when emulating it
Keir Fraser [Fri, 13 Aug 2010 07:31:49 +0000 (08:31 +0100)]
svm: increment RIP over PAUSE instruction when emulating it

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
14 years agomerge
Stefano Stabellini [Thu, 12 Aug 2010 17:56:20 +0000 (18:56 +0100)]
merge

14 years agoxl: Implement per-API-call garbage-collection lifetime
Gianni Tedesco [Thu, 12 Aug 2010 17:55:16 +0000 (18:55 +0100)]
xl: Implement per-API-call garbage-collection lifetime

Currently scratch variables allocated by libxl have the same lifetime as
the context. While this is suitable for one off invocations of xl. It is
not so great for a daemon process linking to libxl. In that case there
will be prolific leakage of heap memory.

My proposed solution involves create a new libxl_gc structure, which
contains a pointer to an owning context as well as the garbage
collection data. Top-level library functions which expect to do a lot of
scratch allocations put gc struct on the stack and initialize it with a
macro. Before returning they then call libxl_free_all on this struct.
This means that static helper functions called by such functions will
usually take a gc instead of a ctx as a first parameter.

The patch touches almost every code-path so a close review and testing
would be much appreciated. I have tested with valgrind all of the parts
I could which looked non-straightforward. Suffice to say that it seems
crash-free even if we have exposed a few real memory leaks. These are
for cases where we return eg. block list to an xl caller but there is no
appropriate block_list_free() function to call. Ian Campbells work in
this area should sew up all these loose ends.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

14 years agotools/python: Remove non-ASCII characters introduced by fffedd3d70e1.
Ian Jackson [Thu, 12 Aug 2010 16:06:21 +0000 (17:06 +0100)]
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>
14 years agoMerge
Ian Jackson [Thu, 12 Aug 2010 14:53:11 +0000 (15:53 +0100)]
Merge

14 years agoadd SONAME to libblktapctl.so
Olaf Hering [Thu, 12 Aug 2010 14:13:53 +0000 (15:13 +0100)]
add SONAME to libblktapctl.so

Add an SONAME to libblktapctl.so.
Install static library as data to avoid executable permissions in the .a file.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
 tools/blktap2/control/Makefile |   35 +++++++++++++++++++++++++----------
 1 file changed, 25 insertions(+), 10 deletions(-)

14 years agoMerge
Keir Fraser [Wed, 11 Aug 2010 17:26:47 +0000 (18:26 +0100)]
Merge

14 years agosplit LDLIBS from LDFLAGS to fix link errors in recent toolchains
Stefano Stabellini [Wed, 11 Aug 2010 17:02:32 +0000 (18:02 +0100)]
split LDLIBS from LDFLAGS to fix link errors in recent toolchains

Linker command lines are order-sensitive.
Move linker options -Lfoo -lfoo from LDFLAGS to LDLIBS and place this new
variable after the objects to link. This resolves build errors in xenpagin
and blktap with recent toolchains.

rename SHLIB_CFLAGS to SHLIB_LDFLAGS
rename LDFLAGS_* to LDLIBS_*
move LDFLAGS usage after CFLAGS in CC calls
remove stale comments in xenpaging Makefile

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agomsi: Avoid uninitialized msi descriptors
Keir Fraser [Wed, 11 Aug 2010 16:01:02 +0000 (17:01 +0100)]
msi: Avoid uninitialized msi descriptors

When __pci_enable_msix() returns early, output parameter (struct
msi_desc **desc) will not be initialized.  On my machine, a Broadcom
BCM5709 nic has both MSI and MSIX capability blocks and when guest
tries to enable msix interrupts but __pci_enable_msix() returns early
for encountering a msi block, the whole system will crash for fatal
page fault immediately.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
14 years ago[Xen-devel] [PATCH] PoD: Fix domain build populate-on-demand cache allocation
George Dunlap [Wed, 11 Aug 2010 14:56:21 +0000 (15:56 +0100)]
[Xen-devel] [PATCH] PoD: Fix domain build populate-on-demand cache allocation
Rather than trying to count the number of PoD entries we're putting in, we
simply pass the target # of pages - the vga hole, and let the hypervisor
do the calculation.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
14 years agomerge
Stefano Stabellini [Wed, 11 Aug 2010 14:56:01 +0000 (15:56 +0100)]
merge

14 years agoxl: don't use libxl allocator for vcpu_list
"Gianni Tedesco (3P)" [Wed, 11 Aug 2010 14:51:04 +0000 (15:51 +0100)]
xl: don't use libxl allocator for vcpu_list
This also fixes a bug with an erroneous call to libxl_free().
A destructor for the vcpu list is also implemented which is called from
xl.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
14 years agoMerge
Ian Jackson [Wed, 11 Aug 2010 13:57:58 +0000 (14:57 +0100)]
Merge

14 years agoException in xen/util/vscsi_util.py while starting xend
"Dube, Lutz" [Wed, 11 Aug 2010 12:18:05 +0000 (13:18 +0100)]
Exception in xen/util/vscsi_util.py while starting xend
 
We have pscsi device with long scsi ids like 15:0:11:101.
In this case lsscsi prints no "blank" between id and type,
so the following split of the string returns wrong output.
The field physical_HCTL is set to 15:0:11:101]dis.
The patch replaces char "]" by "] ", so split() will return the right
physical_HTCL.

Signed-off-by: Lutz Dube Lutz.Dube@ts.fujitsu.com
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
14 years agoxl: Use gcc hidden visibility attribute
"Gianni Tedesco (3P)" [Wed, 11 Aug 2010 12:09:22 +0000 (13:09 +0100)]
xl: Use gcc hidden visibility attribute
This kills off about 1,000 PLT entries speeding up link time and shaving about
1-2KB off of binary size. It also prevents users of the library erroneously
calling libxl internal functions.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
14 years agoxl: Fix invalid return of internal ptrs via libxl_poolid_to_name
"Gianni Tedesco (3P)" [Wed, 11 Aug 2010 12:09:03 +0000 (13:09 +0100)]
xl: Fix invalid return of internal ptrs via libxl_poolid_to_name
libxl_poolid_to_name has in-and-out-of-library callers. In library callers now use
_libxl_poolid_to_name() which participates in garbage collection and
out-of-library callers are fixed up to free() the domain name.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
14 years agoxl: Fix invalid return of libxl-internal pointers via libxl_domid_to_name()
"Gianni Tedesco (3P)" [Wed, 11 Aug 2010 12:08:14 +0000 (13:08 +0100)]
xl: Fix invalid return of libxl-internal pointers via libxl_domid_to_name()
libxl_domid_to_name has numerous in-and-out-of-library callers. In
library callers now use _libxl_domid_to_name() which participates in
garbage collection and out-of-library callers are fixed up to free() the
domain name.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
14 years agoxl: don't use libxl allocator for nic_list
"Gianni Tedesco (3P)" [Wed, 11 Aug 2010 12:07:21 +0000 (13:07 +0100)]
xl: don't use libxl allocator for nic_list
This also fixes a bug with an erroneous call to libxl_free().
A destructor for the nic list is also implemented which is called from
xl.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
14 years agoxl: allocate version info strings with strdup()
"Gianni Tedesco (3P)" [Wed, 11 Aug 2010 12:02:14 +0000 (13:02 +0100)]
xl: allocate version info strings with strdup()
libxl_strdup() will soon have a per-call rather than per-context lifetime so
use strdup() to allocate version info and manually free in context destructor

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
14 years agoxl: Return void from libxl_free() and libxl_free_all()
"Gianni Tedesco (3P)" [Wed, 11 Aug 2010 12:01:47 +0000 (13:01 +0100)]
xl: Return void from libxl_free() and libxl_free_all()
Also abort() if a pointer passed in to libxl_free() cannot be found in the
mini-gc structures. This exposes several real bugs (ie. not just the
libxl_free() something that was allocated via malloc variety).

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
14 years agoxl: Fix xl vcpu-list output on machines with more than 16 cores
Andre Przywara [Tue, 10 Aug 2010 14:35:13 +0000 (15:35 +0100)]
xl: Fix xl vcpu-list output on machines with more than 16 cores
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
14 years agoalways drop the caml lock during any xl operations
Stefano Stabellini [Tue, 10 Aug 2010 14:32:12 +0000 (15:32 +0100)]
always drop the caml lock during any xl operations

Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
14 years agouse new gc functions to deep copy structure and only free once the gc
Stefano Stabellini [Tue, 10 Aug 2010 14:31:55 +0000 (15:31 +0100)]
use new gc functions to deep copy structure and only free once the gc

Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
14 years agouse new functions to get elements out of ocaml values
Stefano Stabellini [Tue, 10 Aug 2010 14:31:37 +0000 (15:31 +0100)]
use new functions to get elements out of ocaml values

Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
14 years agoWrap init context procedure into a macro. Introduce a gc structure.
Stefano Stabellini [Tue, 10 Aug 2010 14:31:03 +0000 (15:31 +0100)]
Wrap init context procedure into a macro. Introduce a gc structure.

Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
14 years agoPut a valid version number in the META files
Stefano Stabellini [Tue, 10 Aug 2010 14:30:36 +0000 (15:30 +0100)]
Put a valid version number in the META files

Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
14 years agoFix glibc crash dump in xl vcpu-{list,set}
Stefano Stabellini [Tue, 10 Aug 2010 14:24:01 +0000 (15:24 +0100)]
Fix glibc crash dump in xl vcpu-{list,set}

xc_vcpu_[sg]etaffinity require the number of _bytes_ needed for
holding a CPU map, not the number of bits. Fix this when
calling the function from libxl and rename the misleading variable
name to avoid future confusion.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
14 years agoMerge
Keir Fraser [Mon, 9 Aug 2010 17:29:50 +0000 (18:29 +0100)]
Merge

14 years agox86: Reorder CPUs at boot time to reflect system topology.
Keir Fraser [Mon, 9 Aug 2010 17:28:04 +0000 (18:28 +0100)]
x86: Reorder CPUs at boot time to reflect system topology.

This is an attempt to impose some sensible coherent ordering on the
cpu namespace, where previously there was none (we were at the mercy
of BIOS ordering, which varies wildly across systems).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
14 years agoxl: pci multi-function passthrough v2
Stefano Stabellini [Mon, 9 Aug 2010 16:46:39 +0000 (17:46 +0100)]
xl: pci multi-function passthrough v2

Implement PCI pass-through for multi-function devices. The supported BDF
notation is: BB:DD.* - therefore passing-through a subset of functions or
remapping the function numbers is not supported except for when passing
through a single function which will be a virtual function 0.

Letting qemu automatically select the virtual slot is not supported in
multi-function passthrough since the qemu-dm protocol can not actually
handle that case.

Also fix format error in xl pci-list-assignable.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>