Commit Graph
23 Commits
Author SHA1 Message Date
Gianni Tedesco 785684b4fd xl: randomly generate UUIDs
This patch converts xl to randomly generate UUID's rather than using a
dodgy time-seeded PRNG. I have ignored various suggestions so far on
auto-generation of MAC addresses and left it as a topic for a future
patch to solve. In other words the behaviour stays the same it's just
using a true random source. This patch also implements the "uuid" config
file parameter in xl.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Acked-By: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-09-02 18:12:14 +01:00
Stefano Stabellini ce8ffdb551 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>
2010-08-16 13:32:04 +01:00
Stefano Stabellini 2386f0ac18 always drop the caml lock during any xl operations
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-08-10 15:32:12 +01:00
Stefano Stabellini 52be445541 use new gc functions to deep copy structure and only free once the gc
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-08-10 15:31:55 +01:00
Stefano Stabellini 4456c54026 use new functions to get elements out of ocaml values
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-08-10 15:31:37 +01:00
Stefano Stabellini 6a1a729da6 Wrap init context procedure into a macro. Introduce a gc structure.
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-08-10 15:31:03 +01:00
Ian Campbell 528ad3b6e2 libxl: consistently use typedef struct {} libxl_$type
typedef struct seems to be the dominant idiom in the mixture currently
in use.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-07-28 16:18:44 +01:00
Ian Jackson 108be15853 libxl: support mapping files rather than carrying paths around
This will allow us to map and then unlink the file and therefore
delete the process on process exit or explicit unmap.

Using the mmaped versions of these files required rewriting build_pv
to use the xc_dom builder functionality directly rather than through
the xc_linux_build "compatibility layer". (The status of the
xc_linux_build interface as a compatibility layer seems a bit dubious
since all existing callers use it but if anything is going to replace
it then libxl seems like the likely candidate).

I'm not thrilled with the definition of the maps lifecycle. This could
be solved by adding a helper function to explicitly free the toplevel
structure.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2010-07-14 16:43:49 +01:00
Ian Jackson d524f866ca tools/ocaml: Properly adjust fields in ocaml structure to match the C layer.
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-07-13 19:28:13 +01:00
Ian Jackson e94b5fc097 tools/ocaml: add a simple logger to the ocaml bindings
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-07-13 19:27:50 +01:00
Ian Jackson e4f42ed7ec tools/ocaml: register the ocaml exception so it can be used at the C level.
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-07-13 19:27:33 +01:00
Ian Jackson 62996c01c1 tools/ocaml: Fix up ocaml build for timer_mode, hpet and vpt_align
c/s da46b25cf17d broke the ocaml build.  This fixes it.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-07-06 17:31:04 +01:00
Ian Jackson 2157eba42a tools/xenstore: add XS_RESTRICT operation to C xenstore client libs.
The OCaml xenstored supports the XS_RESTRICT operation, which
deprivileges a dom0 xenstore connection so it can only affect one
domain's entries.   Add the relevant definitions to the C libraries
so that callers can use it.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-06 11:57:20 +01:00
Ian Jackson ce9f534104 tools/ocaml: libxl ocaml bindings
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-06-29 15:15:57 +01:00
Ian Jackson d5da15306f ocaml: remove bogus /dev/xen/ev[en]tchn
Oxenstored should not try to create the evtchn device, as it:

    * creates the wrong name (/dev/xen/eventchn rather than evtchn)
    * uses a hard-coded minor number, even though this dynamically
      depends on what other misc devices are in the kernel

Remove all this code and just rely on the system to create the device.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2010-06-24 12:45:32 +01:00
Keir Fraser ceba28edd5 ocaml: fix ocaml xc compilation on 32 bit
cc1: warnings being treated as errors
  xc_lib.c: In function 'xc_domain_get_pfn_list':
  xc_lib.c:1217: error: assignment from incompatible pointer type

The XEN_DOMCTL_getmemlist interface has been 32/64 invariante since
13594:30af6cfdb05c and uint64_t is now the correct type for the PFN
list on all word sizes.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2010-05-20 14:12:14 +01:00
Keir Fraser eb8d759136 ocaml: NetBSD support and general CFLAGS cleanup
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-07 19:08:55 +01:00
Keir Fraser 80e279223b ocaml: Add -Werror to CFLAGS and fix resulting errors.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-07 09:13:59 +01:00
Keir Fraser ea8ddf27e5 ocaml: add logging bindings.
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-05-06 11:04:02 +01:00
Keir Fraser dc9a6e6274 ocaml: add uuid bindings.
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-05-06 11:03:28 +01:00
Keir Fraser c3afd398ba ocaml: Add XS bindings.
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-05-06 11:02:54 +01:00
Keir Fraser 8b7ce06a2d ocaml: Add XC bindings.
This include a small and simpler reimplementation of libxc.

Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-05-06 11:02:18 +01:00
Keir Fraser d3e649277a ocaml: add mmap bindings implementation.
This is quite similar to the mmap functionality available in bigarray
but it's less complicated.

Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-05-06 11:01:31 +01:00