tools: various things just to build test

- Remove python prefix
- Add spice build on qemu-xen
- Add usbredir build on qemu-xen

NOTE:
This patch is only for do fast test build with make debball
and upstream qemu build with spice full features.

Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
tools: Improve make debball

- Remove version from installed package name for correct update
- Add conffiles to manage main config files on package update
- Add/remove/stop of main services (xencommons, xendomains)
- Added on description that this make a build for testing only.

Changes from v3:
- Removed xend config file to avoid error if xend is disabled.

Changes from v2:
- Improved description.
- Improved add/remove of main service and added the stop.

NOTE:
This patch was rejected from upstream. I posted it if someone
want do fast and working test builds with deb.

Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
libxl: usb2 and usb3 controller support for upstream qemu

Usage: usbversion=1|2|3 (default=0, no usb controller defined)
Specifies the type of an emulated USB bus in the guest. 1 for usb1,
2 for usb2 and 3 for usb3, it is available only with upstream qemu.
The old usb and usbdevice parameters cannot be used with this.

Changes from v6:
- now usbversion cannot be used with usb and usbdevice parameters
- now default is 0 (no usb controller defined)
Will be used only with usb redirection (from spice client) and
new usb passthrough (from dom0) with hotplug.

Changes from v5:
changed usb2 controller qemu parameters:
- removed bus
- added multifunction on all devices

Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
libxl: spice usbredirection support for upstream qemu

Usage: spiceusbredirection=NUMBER (default=0)

Enables spice usbredirection. Creates NUMBER usbredirection channels
for redirection of up to 4 usb devices from spice client to domU's qemu.
It requires an usb controller and if not defined will automatically adds
an usb2 controller.

Changes from v3:
- fixed condition that enable usbversion if it isn't defined in presence
  of usbredirection enabled

Changes from v2:
- updated for usbversion patch v7
- now usbredirection cannot be used with usb and usbdevice parameters
- if usbversion is undefined it will creates an usb2 controller

Changes from v1:
- Now can be setted the number of redirection channels.
- Various code improvements.

Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
libxl: Introduce functions to add and remove USB devices to an HVM guest

This patch exposes a generic interface which can be expanded in the
future to implement USB for PVUSB, qemu, and stubdoms.  It can also be
extended to include other types of USB other than host USB (for example,
tablets, mice, or keyboards).

For each device removed or added, one of two protocols is available:
* PVUSB
* qemu (DEVICEMODEL)

The caller can additionally specify "AUTO", in which case the library will
try to determine the best protocol automatically.

At the moment, the only protocol implemented is DEVICEMODEL, and the only
device type impelmented is HOSTDEV.

This uses the qmp functionality, and is thus only available for
qemu-xen, not qemu-traditional.

History:
v7:
 - Refresh
 - libxl.h: added missing comment opening and removed some
   useless trailing spaces
v6:
 - Return a proper error code if libxl__xs_mkdir fails
 - Make casts cuddly
 - Add a space after switch statements
v5:
 - fix erroneous use of NOGC in qmp functions
 - Don't check return of libxl__sprintf in libxl_create.c
 - Check return values of new xs actions in libxl_create.c
 - Use updated template for xenstore transactions, do checks
 - use xs_read_checked
 - Fixed if (x) spacing to match coding style
 - use GCSFPRINTF
 - use libxl__calloc
 - Fix comment for LIBXL_HAVE_USB
 - use idl-generated *_from_string() and *_to_string() functions

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
CC: Ian Jackson <ian.jackson@citrix.com>
CC: Roger Pau Monne <roger.pau@citrix.com>
CC: sstanisi@cbnco.com
xl: Add commands for usb hot-plug

v7:
 - Refresh
v6:
 - Rename to usb-attach and usb-detach to fit better w/ other device
   add/remove commands
 - Use positional arguments, to fit better w/ other device add/remove
   commands
 - Change specifier to "hostdev:xx.yy", looking forward to a day when
   we may be able to accept something like "tablet"
 - Style fix-ups
v5:
 - Remove extraneous is_hex
 - Replace is_dec with ctype.h isdigit()
 - Replace domid -1 with INVALID_DOMID
 - Fix up a couple of mistaken function names in strings
 - Copy CTYPE macro from libxl_internal.h
 - Fix to usb-list manpage (use -d domid)

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
CC: Ian Jackson <ian.jackson@citrix.com>
CC: Roger Pau Monne <roger.pau@citrix.com>
CC: sstanisi@cbnco.com
libxl: bump LIBXL_MAXMEM_CONSTANT to 2048

When using OVMF we need to have 1MiB of memory in place for firmware. Without this change we have:

(XEN) HVM128: Loading OVMF ...
(XEN) page_alloc.c:1460:d128 Over-allocation for domain 128: 33025 > 33024
(XEN) memory.c:132:d128 Could not allocate order=0 extent: id=128 memflags=0 (0 of 1)

This is not a fatal error as hvmloader will instead use low memory to
load OVMF, but it's better to eliminate such error.

Changing this constant doesn't necessary increase the total amount of
memory a guest uses because it's just a limit.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Config.mk: update OVMF changeset

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
tools: Enable OVMF build by default

The issues with non-GCC4.4 builds seem to have been resolved.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
tools: ovmf debug build only if tools debug is enabled

Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
libxl: Add none to vga parameter

Usage:
  vga="none"

With upstream qemu it was impossible to disable emulated vga,
even with -nographic qemu parameter setted with nographic xl
paramter.

Changes from v1:
- libxl_dm.c:
 if vga is none:
  - add -vga none paramter
  - do not add -videoram parameter.

Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
libxl: Fix nographic with upstream qemu

Fix xl nographic parameter with upstream qemu using vga none
instead of -nographic qemu parameter not working anymore and
deprecated.

Changes from v1:
- libxl_create.c:
 - add vga=none if nographic=1 only with upstream qemu
 - move setdefault of nographic up, otherwise xl create will
   fail if nographic xl paramter is not set

Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
libxl: Add qxl vga interface support for upstream qemu

Usage:
  vga="qxl"

Changes from v15:
- refresh

Changes from v14:
- refresh
- small code impromevents on libxl_dm.c

Changes from v13:
- refresh
- update qemu parameters (from -vga to -device)

NOTE:
Seems needed other changes/fixes on xen side before
have it full working.
After latest Jan Beulich patches doesn't show any other
visible xen errors (at least I can't see them).

Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
Signed-off-by: Zhou Peng <zpengxen@gmail.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>