xen.git
18 years agoAdded a VBD.bootable flag.
Ewan Mellor [Sun, 28 Jan 2007 17:11:40 +0000 (17:11 +0000)]
Added a VBD.bootable flag.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
18 years agoFix interface_name() after change of definition for the vlan field.
Ewan Mellor [Sun, 28 Jan 2007 15:55:55 +0000 (15:55 +0000)]
Fix interface_name() after change of definition for the vlan field.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
18 years agoDocument new error codes VLAN_TAG_INVALID and PIF_IS_PHYSICAL.
Ewan Mellor [Sun, 28 Jan 2007 13:50:56 +0000 (13:50 +0000)]
Document new error codes VLAN_TAG_INVALID and PIF_IS_PHYSICAL.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
18 years agoDocument existing PIF.create_VLAN, and remove PIF.create (PIFs are implicitly
Ewan Mellor [Sun, 28 Jan 2007 13:40:07 +0000 (13:40 +0000)]
Document existing PIF.create_VLAN, and remove PIF.create (PIFs are implicitly
created from the physical host configuration).

Change PIF.name to PIF.device, for consistency with other uses, and make
PIF.VLAN an int.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
18 years agoIntegrate the Xen-API doc into the build.
Ewan Mellor [Sat, 27 Jan 2007 18:26:41 +0000 (18:26 +0000)]
Integrate the Xen-API doc into the build.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
18 years agoMinor tidy-up.
Ewan Mellor [Sat, 27 Jan 2007 15:02:00 +0000 (15:02 +0000)]
Minor tidy-up.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
18 years ago[HVM] When guest explicitly modifies the TSC, update platform timers
shand@cosworth.eng.hq.xensource.com [Tue, 30 Jan 2007 00:52:51 +0000 (00:52 +0000)]
[HVM] When guest explicitly modifies the TSC, update platform timers
_after_ updating guest time (since otherwise pt_reset() will get the
old hvm_get_guest_time() and subsequently pt_intr_post() will warp
the TSC back again).

This is the smallest fix for the HVM SMP TSC issues seen on recent
(viz. 2.6.18+) linux HVM kernels, but probably not the best. Cleaner
fix needs more thought.

Signed-off-by: Steven Hand <steven@xensource.com>
18 years ago[linux] Delay making the VCPUOP_initialise calls until the cpu is brought up
Christian Limpach [Mon, 29 Jan 2007 22:43:51 +0000 (22:43 +0000)]
[linux] Delay making the VCPUOP_initialise calls until the cpu is brought up
the first time.

Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
18 years agoRemove unused implementation of vsprintf().
kfraser@localhost.localdomain [Mon, 29 Jan 2007 21:16:02 +0000 (21:16 +0000)]
Remove unused implementation of vsprintf().
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoRemove little-endian assumption from library code.
kfraser@localhost.localdomain [Mon, 29 Jan 2007 17:01:53 +0000 (17:01 +0000)]
Remove little-endian assumption from library code.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoMerge
Tim Deegan [Mon, 29 Jan 2007 16:50:22 +0000 (16:50 +0000)]
Merge

18 years ago[HVM] Save/restore cleanups: don't save state for downed vcpus.
Tim Deegan [Mon, 29 Jan 2007 16:49:29 +0000 (16:49 +0000)]
[HVM] Save/restore cleanups: don't save state for downed vcpus.
(Since we wouldn't load it anyway)
Also tidy up the plumbing around the hypercalls.

Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
18 years agoRemove unused noth/hton endian conversion macros.
kfraser@localhost.localdomain [Mon, 29 Jan 2007 16:48:42 +0000 (16:48 +0000)]
Remove unused noth/hton endian conversion macros.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoPort ACM code to new Xen byteorder macros.
kfraser@localhost.localdomain [Mon, 29 Jan 2007 16:46:52 +0000 (16:46 +0000)]
Port ACM code to new Xen byteorder macros.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoRemove strcat/strncat/strcmp/strncmp. Replaced with safer
kfraser@localhost.localdomain [Mon, 29 Jan 2007 16:04:43 +0000 (16:04 +0000)]
Remove strcat/strncat/strcmp/strncmp. Replaced with safer
alternatives (including a new implementation of strlcat).
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoia64 and ppc: Remove uses of strcpy and strncpy.
kfraser@localhost.localdomain [Mon, 29 Jan 2007 15:01:33 +0000 (15:01 +0000)]
ia64 and ppc: Remove uses of strcpy and strncpy.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
18 years agoRemove uses of strcpy and strncpy from common and x86 code.
kfraser@localhost.localdomain [Mon, 29 Jan 2007 14:59:42 +0000 (14:59 +0000)]
Remove uses of strcpy and strncpy from common and x86 code.

Retain safe_strcpy(). It can hide the third argument to strlcpy() in
most cases.

Based on patches from Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[LINUX] Force .data segment to be 4k aligned on i386.
Ian Campbell [Mon, 29 Jan 2007 13:22:21 +0000 (13:22 +0000)]
[LINUX] Force .data segment to be 4k aligned on i386.

Changeset 4e878f596c16 applied this change to the patches directory
but we also need to patch the sparse tree.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
18 years agolibelf cannot rely on the strlcpy() BSD-ism.
kfraser@localhost.localdomain [Mon, 29 Jan 2007 11:47:00 +0000 (11:47 +0000)]
libelf cannot rely on the strlcpy() BSD-ism.
Make a private definition based on strncpy and strlen.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoFix 'xm create' and 'xm start' when SEDF scheduler is used.
kfraser@localhost.localdomain [Mon, 29 Jan 2007 10:55:20 +0000 (10:55 +0000)]
Fix 'xm create' and 'xm start' when SEDF scheduler is used.

If the Xen is running with the sedf scheduler, the following functions
do not call the domain_sched_credit_set().
 - domain_create()
 - domain_create_from_dict()
 - domain_start()

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
18 years agoReplace sprintf with snprintf and strncpy with strlcpy.
kfraser@localhost.localdomain [Mon, 29 Jan 2007 10:52:17 +0000 (10:52 +0000)]
Replace sprintf with snprintf and strncpy with strlcpy.

There are various cases where no NULL-terminated strings are
guaranteed and eventual possible overflows. This patch fixes them.

From: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoClean up libelf endian macros and includes.
kaf24@localhost.localdomain [Sun, 28 Jan 2007 19:02:00 +0000 (19:02 +0000)]
Clean up libelf endian macros and includes.
Based on a patch from John Levon <john.levon@sun.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoFix firmware compile on Solaris.
kaf24@localhost.localdomain [Sun, 28 Jan 2007 18:45:04 +0000 (18:45 +0000)]
Fix firmware compile on Solaris.

Use $(LD) not ld. Include right headers for x86 ELF bits.

Signed-off-by: John Levon <john.levon@sun.com>
18 years agoFix compat build for weird solaris gcc target.
kaf24@localhost.localdomain [Sun, 28 Jan 2007 16:05:07 +0000 (16:05 +0000)]
Fix compat build for weird solaris gcc target.
Signed-off-by: John Levon <john.levon@sun.com>
18 years agoTo avoid problems (hang) when doing migration, the Console Controller
kaf24@localhost.localdomain [Sun, 28 Jan 2007 09:47:22 +0000 (09:47 +0000)]
To avoid problems (hang) when doing migration, the Console Controller
needs to implement a (dummy) migrate method.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years ago[HVM] save/restore fix
kaf24@localhost.localdomain [Sun, 28 Jan 2007 09:46:09 +0000 (09:46 +0000)]
[HVM] save/restore fix

* do not save "down" vcpu's vmcs to avoid system crash
* make hvm_ctxt buffer bigger as all vmcs sit here, otherwise >=4
* vcpus cause overflow

Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
18 years agoAllow 'xm create' to set scheduling parameters.
kaf24@localhost.localdomain [Sun, 28 Jan 2007 09:37:18 +0000 (09:37 +0000)]
Allow 'xm create' to set scheduling parameters.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
18 years agoReject xm sched-* comands for other than the in-use scheduler.
kaf24@localhost.localdomain [Sun, 28 Jan 2007 09:35:00 +0000 (09:35 +0000)]
Reject xm sched-* comands for other than the in-use scheduler.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
18 years agoFix xentop error return code if passed unrecognised options.
kaf24@localhost.localdomain [Sun, 28 Jan 2007 09:33:47 +0000 (09:33 +0000)]
Fix xentop error return code if passed unrecognised options.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
18 years ago[HVM] Allow HVM guest to request invalidation of foreign mappings via
kaf24@localhost.localdomain [Sat, 27 Jan 2007 13:32:27 +0000 (13:32 +0000)]
[HVM] Allow HVM guest to request invalidation of foreign mappings via
an I/O port write.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
18 years agoRename find_domain_by_id() to get_domain_by_id().
kaf24@localhost.localdomain [Fri, 26 Jan 2007 18:38:40 +0000 (18:38 +0000)]
Rename find_domain_by_id() to get_domain_by_id().
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoAdd RCU support to Xen.
kaf24@localhost.localdomain [Fri, 26 Jan 2007 18:34:36 +0000 (18:34 +0000)]
Add RCU support to Xen.
Signed-off-by: Jose Renato Santos <jsantos@hpl.hp.com>
18 years agoDon't clobber vcpu flags when getting vcpu context.
kaf24@localhost.localdomain [Fri, 26 Jan 2007 17:33:58 +0000 (17:33 +0000)]
Don't clobber vcpu flags when getting vcpu context.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[HVM] Fix some BIOS build warnings.
kaf24@localhost.localdomain [Fri, 26 Jan 2007 16:56:26 +0000 (16:56 +0000)]
[HVM] Fix some BIOS build warnings.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[TCGBIOS] Fix some makefile issues.
kaf24@localhost.localdomain [Fri, 26 Jan 2007 16:46:00 +0000 (16:46 +0000)]
[TCGBIOS] Fix some makefile issues.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years agoRemove the test functions from HVM highmem 32-bit BIOS.
kaf24@localhost.localdomain [Fri, 26 Jan 2007 16:39:38 +0000 (16:39 +0000)]
Remove the test functions from HVM highmem 32-bit BIOS.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years ago[HVM] Add TCG BIOS extensions to the high memory area along with
kaf24@localhost.localdomain [Fri, 26 Jan 2007 16:38:32 +0000 (16:38 +0000)]
[HVM] Add TCG BIOS extensions to the high memory area along with
some often-used libc utility functions. The TCG extensions are
described here:

https://www.trustedcomputinggroup.org/specs/PCClient/TCG_PCClientImplementationforBIOS_1-20_1-00.pdf

I have tried to keep the patching with rombios.c to a minimum, but
some amount of code needs to be inserted at various locations.

The code is currently deactivated, but can be activated by setting
BX_TCGBIOS to '1'.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years agoThis patch adds a 32bit gateway to the Bochs BIOS. The 32 bit code is
kaf24@localhost.localdomain [Fri, 26 Jan 2007 16:30:48 +0000 (16:30 +0000)]
This patch adds a 32bit gateway to the Bochs BIOS. The 32 bit code is
compiled with gcc and linked into the hvmloader as a byte-array.
Hvmloader allocates memory (rounded up to next 64kb) from the e820
table
below 4GB, copies and relocates the 32bit code in the allocated area
and
copies a jumptable (located in a section '.biosjumptable') pointing to
the 'exported' functions into the Bochs BIOS's memory area to link the
two code sections. The memory area has been reserved and can be
identified with the signature '___JMPT'.

In the Bochs BIOS only stub functions are provided. These load the
index
of a particular function in the jump table, switch to protected mode
and
call the function in the high memory area.  The stack is prepared such
that functions compiled by gcc can just pick the parameters from the
stack as usual - this means that the 16bit real-mode return address is
taken off the stack. The stub functions should have the same signature
as those in 32bit space. For ABI compatibility reasons parameters
inside
the Bochs BIOS stubs should all be 32bit wide.

This patch includes a test function that calls three gcc-compiled
functions in the high memory area and displays their success status.
Simple tests are done doing multiplication and addition of 32-bit
numbers and reading and modification of a static variable. These
functions test the interface and the relocation code. The test code is
removed in patch part 3.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years ago[XEND] Hook in utilisation statistics into Xen API calls.
Alastair Tse [Fri, 26 Jan 2007 15:45:51 +0000 (15:45 +0000)]
[XEND] Hook in utilisation statistics into Xen API calls.

Change PIF to be indexed by device name rather than the interface
number.

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years ago[XEND] Floats for not need to be stringified in Xen API.
Alastair Tse [Fri, 26 Jan 2007 15:44:41 +0000 (15:44 +0000)]
[XEND] Floats for not need to be stringified in Xen API.

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years ago[XENAPI] Add an example to start HVM guests via the Xen API.
Alastair Tse [Fri, 26 Jan 2007 15:42:21 +0000 (15:42 +0000)]
[XENAPI] Add an example to start HVM guests via the Xen API.

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years ago[XENAPI] Make server uri easily configurable via ENV or CLI opts.
Alastair Tse [Fri, 26 Jan 2007 15:41:16 +0000 (15:41 +0000)]
[XENAPI] Make server uri easily configurable via ENV or CLI opts.

Add a vm-stat command that just polls a vm for instantaneous statistics.

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years agoFix 32-bit build.
kaf24@localhost.localdomain [Fri, 26 Jan 2007 15:08:28 +0000 (15:08 +0000)]
Fix 32-bit build.

18 years agoUpdate hgignore list
kaf24@localhost.localdomain [Fri, 26 Jan 2007 14:11:34 +0000 (14:11 +0000)]
Update hgignore list

18 years agominios : netfront driver fixes.
kaf24@localhost.localdomain [Fri, 26 Jan 2007 13:51:00 +0000 (13:51 +0000)]
minios : netfront driver fixes.

- Handle returned backend==NULL || mac==NULL, this leads sometimes to a crash.
- Remove unnecessary (and bogus) initialisation of np->rx.req_prod_pvt

Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoxen: Remove unused elf32.c.
kaf24@localhost.localdomain [Fri, 26 Jan 2007 13:46:29 +0000 (13:46 +0000)]
xen: Remove unused elf32.c.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago32-on-64: Fix an one-off error in compat_addr_ok().
kaf24@localhost.localdomain [Fri, 26 Jan 2007 13:36:52 +0000 (13:36 +0000)]
32-on-64: Fix an one-off error in compat_addr_ok().
Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agoCleanups for unmodified (pv-on-hvm) driver building.
kaf24@localhost.localdomain [Fri, 26 Jan 2007 13:34:02 +0000 (13:34 +0000)]
Cleanups for unmodified (pv-on-hvm) driver building.

- some cleanup to mkbuildtree
- adjustment to the fake __supported_pte_mask definition (removing the
  export for x86-64 in native Linux is being discussed, so this shouldn't be
  i386 specific)
- remove odd/unused defines (mostly CONFIG_*) in overrides.mk

Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agoReplace mlock() calls with lock_pages().
kaf24@localhost.localdomain [Fri, 26 Jan 2007 13:31:59 +0000 (13:31 +0000)]
Replace mlock() calls with lock_pages().
Signed-off-by: Russell Blaine <russell.blaine@sun.com>
18 years ago32-on-64: New set_address_size domctl for switching to compat mode.
kaf24@localhost.localdomain [Fri, 26 Jan 2007 13:27:01 +0000 (13:27 +0000)]
32-on-64: New set_address_size domctl for switching to compat mode.
From: Gerd Hoffmann <kraxel@suse.de>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago32-on-64: Fix register-argument rearrangement to avoid clobbering the
kaf24@localhost.localdomain [Fri, 26 Jan 2007 10:10:12 +0000 (10:10 +0000)]
32-on-64: Fix register-argument rearrangement to avoid clobbering the
fifth hypercall argument.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[XEND] Add missing ConsoleController.py
Alastair Tse [Fri, 26 Jan 2007 02:44:35 +0000 (02:44 +0000)]
[XEND] Add missing ConsoleController.py

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years agoSupport transparant gunzipping in the readnotes utility.
Emmanuel Ackaouy [Thu, 25 Jan 2007 22:16:52 +0000 (22:16 +0000)]
Support transparant gunzipping in the readnotes utility.

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
---
 tools/xcutils/readnotes.c |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

18 years agolibxc domain builder rewrite, linux builder
Emmanuel Ackaouy [Thu, 25 Jan 2007 22:16:52 +0000 (22:16 +0000)]
libxc domain builder rewrite, linux builder

use new domain builder for the linux (aka generic elf) loader.

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
---
 tools/libxc/Makefile              |    7 +-
 tools/libxc/xc_dom_compat_linux.c |  124 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 129 insertions(+), 2 deletions(-)

18 years agolibxc domain builder rewrite, core bits.
Emmanuel Ackaouy [Thu, 25 Jan 2007 22:16:52 +0000 (22:16 +0000)]
libxc domain builder rewrite, core bits.

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
---
 tools/libxc/Makefile           |   14
 tools/libxc/xc_dom.h           |  261 +++++++++++++
 tools/libxc/xc_dom_binloader.c |  294 +++++++++++++++
 tools/libxc/xc_dom_boot.c      |  515 +++++++++++++++++++++++++++
 tools/libxc/xc_dom_core.c      |  773 +++++++++++++++++++++++++++++++++++++++++
 tools/libxc/xc_dom_elfloader.c |  283 +++++++++++++++
 tools/libxc/xc_dom_ia64.c      |  118 ++++++
 tools/libxc/xc_dom_powerpc64.c |  100 +++++
 tools/libxc/xc_dom_x86.c       |  559 +++++++++++++++++++++++++++++
 9 files changed, 2917 insertions(+)

18 years agolibxc header fixups.
Emmanuel Ackaouy [Thu, 25 Jan 2007 22:16:52 +0000 (22:16 +0000)]
libxc header fixups.

Make some arch-specific #defines for page table handling
available unconditionally, add a suffix to avoid name clashes.

The versions without suffix are defined depending on the
architecture like they used to, so code using them continues
to work.

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
---
 tools/libxc/xg_private.h |  114 +++++++++++++++++++++++++++--------------------
 1 file changed, 67 insertions(+), 47 deletions(-)

18 years agoAdd more xc_error_code values.
Emmanuel Ackaouy [Thu, 25 Jan 2007 22:16:52 +0000 (22:16 +0000)]
Add more xc_error_code values.

XC_INVALID_PARAM
  such as asking for features unsupported by either xen or guest kernel.
XC_OUT_OF_MEMORY
  no comment ;)

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
---
 tools/libxc/xc_private.c |    4 ++++
 tools/libxc/xenctrl.h    |    2 ++
 2 files changed, 6 insertions(+)

18 years agoGenerate headers with arch-specific structs.
Emmanuel Ackaouy [Thu, 25 Jan 2007 22:16:52 +0000 (22:16 +0000)]
Generate headers with arch-specific structs.

This patch adds a script to generate headers with arch-specific
structs which can be included on any architecture.  Can be used
to deal with structs of "foreign" architectures, needed for
32-on-64 support for example.

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
---
 Makefile                                  |   11 +-
 tools/Rules.mk                            |    2
 xen/Makefile                              |    4
 xen/include/public/foreign/Makefile       |   37 +++++++
 xen/include/public/foreign/mkchecker.py   |   58 +++++++++++
 xen/include/public/foreign/mkheader.py    |  153 ++++++++++++++++++++++++++++++
 xen/include/public/foreign/reference.size |   17 +++
 xen/include/public/foreign/structs.py     |   52 ++++++++++
 8 files changed, 331 insertions(+), 3 deletions(-)

18 years agolibelf: use for readnotes utility.
Emmanuel Ackaouy [Thu, 25 Jan 2007 22:16:52 +0000 (22:16 +0000)]
libelf: use for readnotes utility.

This patch makes the readnotes utility use libelf.

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
---
 tools/xcutils/readnotes.c |  277 +++++++---------------------------------------
 1 file changed, 45 insertions(+), 232 deletions(-)

18 years agolibelf: use for hvm builder.
Emmanuel Ackaouy [Thu, 25 Jan 2007 22:16:52 +0000 (22:16 +0000)]
libelf: use for hvm builder.

This patch switches over the hvm domain builder to libelf
(for loading hvmloader).

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
---
 tools/libxc/xc_hvm_build.c |  220 +++++++++++++--------------------------------
 1 file changed, 65 insertions(+), 155 deletions(-)

18 years agolibelf: add to libxc
Emmanuel Ackaouy [Thu, 25 Jan 2007 22:16:52 +0000 (22:16 +0000)]
libelf: add to libxc

This patch makes libelf available to the tools, by symlinking the source
files and compiling them into libxc.

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
---
 tools/libxc/Makefile |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

18 years agolibelf: use for x86 dom0 builder.
Emmanuel Ackaouy [Thu, 25 Jan 2007 22:16:52 +0000 (22:16 +0000)]
libelf: use for x86 dom0 builder.

This patch switches the x86 dom0 builder over to libelf.

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
---
 xen/arch/ia64/xen/domain.c  |   79 +++++------
 xen/arch/x86/domain_build.c |  303 +++++++++++++++-----------------------------
 xen/common/Makefile         |    4
 3 files changed, 148 insertions(+), 238 deletions(-)

18 years agoadd libelf: an ELF binary parser library.
Emmanuel Ackaouy [Thu, 25 Jan 2007 22:16:52 +0000 (22:16 +0000)]
add libelf: an ELF binary parser library.

This patch adds a library with a small collection of helper functions
to parse and load elf binaries.  The library handles endianess and
elfsize at runtime.

The patch also shuffles around the include files a bit.  Now there is
*one* include file holding all the elf structures
(xen/include/public/elfstructs.h) which is included by everyone who
needs them.

It's dead code with this patch only, putting the code into use happens
in followup patches.

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
---
 tools/libxc/xc_elf.h                |  525 -----------------------------------
 xen/arch/x86/boot/mkelf32.c         |    2
 xen/common/Makefile                 |    2
 xen/common/libelf/Makefile          |    4
 xen/common/libelf/README            |    1
 xen/common/libelf/libelf-dominfo.c  |  420 ++++++++++++++++++++++++++++
 xen/common/libelf/libelf-loader.c   |  156 ++++++++++
 xen/common/libelf/libelf-private.h  |   51 +++
 xen/common/libelf/libelf-relocate.c |  345 +++++++++++++++++++++++
 xen/common/libelf/libelf-tools.c    |  225 +++++++++++++++
 xen/include/public/elfstructs.h     |  527 ++++++++++++++++++++++++++++++++++++
 xen/include/public/libelf.h         |  238 ++++++++++++++++
 xen/include/xen/elf.h               |  490 ---------------------------------
 13 files changed, 1972 insertions(+), 1014 deletions(-)

18 years ago[XEND] Preliminary console support in Xen API
Alastair Tse [Thu, 25 Jan 2007 18:54:25 +0000 (18:54 +0000)]
[XEND] Preliminary console support in Xen API

Made serial/vnc consoles a 'fake' device so that we can take advantage
of storing state information in xenstore.

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years ago[XEND] Fix HVM guest creation via Xen API
Alastair Tse [Thu, 25 Jan 2007 18:50:08 +0000 (18:50 +0000)]
[XEND] Fix HVM guest creation via Xen API

Fixed some of the type declarations for HVM devices, add better
handling for type mismatch errors.

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years agoFix perfc=y build.
kfraser@localhost.localdomain [Thu, 25 Jan 2007 18:23:48 +0000 (18:23 +0000)]
Fix perfc=y build.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agohvm: Define a global I/O access bitmap, allowing direct access to port 0x80.
kfraser@localhost.localdomain [Thu, 25 Jan 2007 18:20:58 +0000 (18:20 +0000)]
hvm: Define a global I/O access bitmap, allowing direct access to port 0x80.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[XEND] Fix bad patch merge for XendMonitor
Alastair Tse [Thu, 25 Jan 2007 17:00:18 +0000 (17:00 +0000)]
[XEND] Fix bad patch merge for XendMonitor

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years agonetfront: Better fix for netfront_tx_slot_available().
kfraser@localhost.localdomain [Thu, 25 Jan 2007 16:58:21 +0000 (16:58 +0000)]
netfront: Better fix for netfront_tx_slot_available().
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoemulator: Emulate IN/OUT/INS/OUTS. Fix CLTS.
kfraser@localhost.localdomain [Thu, 25 Jan 2007 16:32:19 +0000 (16:32 +0000)]
emulator: Emulate IN/OUT/INS/OUTS. Fix CLTS.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoemulator: Start filling in gaps for privileged instructions.
kfraser@localhost.localdomain [Thu, 25 Jan 2007 15:25:06 +0000 (15:25 +0000)]
emulator: Start filling in gaps for privileged instructions.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[XEND] Ignore socket.shutdown() exceptions
Alastair Tse [Thu, 25 Jan 2007 14:52:36 +0000 (14:52 +0000)]
[XEND] Ignore socket.shutdown() exceptions

Add further comments about why that shutdown() exists.

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years ago32-on-64: Small fixes.
kfraser@localhost.localdomain [Thu, 25 Jan 2007 13:05:15 +0000 (13:05 +0000)]
32-on-64: Small fixes.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agoemulator: Add new hook functions for load/store privileged state.
kfraser@localhost.localdomain [Thu, 25 Jan 2007 13:02:03 +0000 (13:02 +0000)]
emulator: Add new hook functions for load/store privileged state.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoDuring suspend, return immediately with a failure if the domain will
kfraser@localhost.localdomain [Thu, 25 Jan 2007 12:30:25 +0000 (12:30 +0000)]
During suspend, return immediately with a failure if the domain will
never suspend, instead of pointlessly retrying.

Signed-off-by: John Levon <john.levon@sun.com>
18 years ago[HVM] Wake up APs immediately during restore.
kfraser@localhost.localdomain [Thu, 25 Jan 2007 12:28:47 +0000 (12:28 +0000)]
[HVM] Wake up APs immediately during restore.
From: Edwin Zhai <edwin.zhai@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agonetfront: Check availability of grant references in start_xmit().
kfraser@localhost.localdomain [Thu, 25 Jan 2007 12:24:43 +0000 (12:24 +0000)]
netfront: Check availability of grant references in start_xmit().
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
18 years ago[XEND] Allow TCP XMLRPC address:port to be configured, if enabled.
Alastair Tse [Thu, 25 Jan 2007 11:58:00 +0000 (11:58 +0000)]
[XEND] Allow TCP XMLRPC address:port to be configured, if enabled.

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years agoHave the sxp parsing cope when the cpus field is a list, which can happen
Ewan Mellor [Thu, 25 Jan 2007 10:34:17 +0000 (10:34 +0000)]
Have the sxp parsing cope when the cpus field is a list, which can happen
after a reboot.

From Daniele Palumbo <daniele@retaggio.net>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
18 years ago[XEND] Remove usage of set() in XendMonitor as it is a py2.4+ feature
Alastair Tse [Thu, 25 Jan 2007 10:29:33 +0000 (10:29 +0000)]
[XEND] Remove usage of set() in XendMonitor as it is a py2.4+ feature

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years ago[HVM][SVM] Add save/restore support.
kfraser@localhost.localdomain [Wed, 24 Jan 2007 18:30:07 +0000 (18:30 +0000)]
[HVM][SVM] Add save/restore support.
From: Mats Petersson <Mats.Petersson@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agobimodal xenfb daemon: Fixes and cleanups.
kfraser@localhost.localdomain [Wed, 24 Jan 2007 18:23:23 +0000 (18:23 +0000)]
bimodal xenfb daemon: Fixes and cleanups.
From: Gerd Hoffmann <kraxel@suse.de>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago32-on-64: All argument registers must be zero extended to 64 bits
kfraser@localhost.localdomain [Wed, 24 Jan 2007 18:20:24 +0000 (18:20 +0000)]
32-on-64: All argument registers must be zero extended to 64 bits
(%rdx was missed).
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[XEND] Fix typo in XendNode
Alastair Tse [Wed, 24 Jan 2007 18:06:14 +0000 (18:06 +0000)]
[XEND] Fix typo in XendNode

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years agoFix device reordering that occurs when the config gets read into dictionaries.
Ewan Mellor [Wed, 24 Jan 2007 16:48:41 +0000 (16:48 +0000)]
Fix device reordering that occurs when the config gets read into dictionaries.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
18 years agoMake domctl/sysctl interfaces 32-/64-bit invariant.
kfraser@localhost.localdomain [Wed, 24 Jan 2007 16:33:19 +0000 (16:33 +0000)]
Make domctl/sysctl interfaces 32-/64-bit invariant.
This kills off a fair amount of unpleasant CONFIG_COMPAT shimming and
avoids needing to keep the compat paths in sync as these interfaces
continue to develop.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[XEND] Add debug class to Xen API plus non-standard debug.wait().
Alastair Tse [Wed, 24 Jan 2007 15:59:09 +0000 (15:59 +0000)]
[XEND] Add debug class to Xen API plus non-standard debug.wait().

debug.wait(seconds) will just do a time.sleep() so the task progress
support can be tested.

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years ago[XEND] Move decorate() to XendAPI.__new__ and have a static flag to
Alastair Tse [Wed, 24 Jan 2007 15:57:10 +0000 (15:57 +0000)]
[XEND] Move decorate() to XendAPI.__new__ and have a static flag to
ensure it only runs at instantiation time, and only once per Xend
instance. Otherwise, decorate() runs on every invocation of
/usr/sbin/xend, even if it is xend stop.

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years ago[XENAPI] Make test script attempt to login with blank credentials
Alastair Tse [Wed, 24 Jan 2007 15:52:26 +0000 (15:52 +0000)]
[XENAPI] Make test script attempt to login with blank credentials
before prompting for passwords.

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years ago[XEND] Cleanup old domains in statistics monitor.
Alastair Tse [Wed, 24 Jan 2007 15:50:58 +0000 (15:50 +0000)]
[XEND] Cleanup old domains in statistics monitor.

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years ago[XENAPI] Add vif-list to xapi.py script
Alastair Tse [Wed, 24 Jan 2007 15:50:02 +0000 (15:50 +0000)]
[XENAPI] Add vif-list to xapi.py script

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years ago[XEND] Output exception to log files if XendAPI fails to instantiate.
Alastair Tse [Wed, 24 Jan 2007 15:49:32 +0000 (15:49 +0000)]
[XEND] Output exception to log files if XendAPI fails to instantiate.

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years ago[XENAPI] Update test scripts to move from VBD.image to creating VDI's
Alastair Tse [Wed, 24 Jan 2007 15:48:58 +0000 (15:48 +0000)]
[XENAPI] Update test scripts to move from VBD.image to creating VDI's
with the uri attribute.

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years ago[XEND] Add support for multiple storage repositories.
Alastair Tse [Wed, 24 Jan 2007 15:47:31 +0000 (15:47 +0000)]
[XEND] Add support for multiple storage repositories.

Splits XendStorageRepository into a helper class and
XendQCowStorageRepo as the QCoW File backed repository. This gives us
the opportunity to introduce a pseudo storage repository to represent
the old way of specifying block devices. This is the
XendLocalStorageRepo.

Note that this still introduces a non-Xen API 'uri' attribute to VDIs
in order to support querying VDIs for their actual location relative
to the Xen host.

The QCoW backed repository is now named QCoW, and the pseudo-SR is
named Local.

This removes the 'image' attribute backwards-compat hack in VBDs in
the Xen API.

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years ago[XEND] Add missing Xen API methods
Alastair Tse [Wed, 24 Jan 2007 14:25:21 +0000 (14:25 +0000)]
[XEND] Add missing Xen API methods

* Added session.get_all, task.get_by_name_label,
  host.get_by_name_label, VM.add_to_otherConfig,
  VM.remove_from_otherConfig

* Added implementations for VM.get_VCPUs_policy,
  VM.get_platform_std_vga, VM.get_vm_by_uuid,
  VM.get_platform_localtime, VM.get_platform_clock_offset,
  VM.get_platform_enable_audio, VM.get_platform_keymap,
  VM.get_otherConfig, VM.set_actions_after_shutdown,
  VM.set_actions_after_reboot, VM.set_actions_after_suspend,
  VM.set_actions_after_crash, VM.set_platform_std_VGA,
  VM.set_platform_serial, VM.set_platform_keymap,
  VM.set_platform_localtime, VM.set_platform_clock_offset,
  VM.set_platform_enable_audio, VM.set_otherConfig, VBD.destroy,
  VBD.get_io_read_kbs, VBD.get_io_write_kbs, VBD.get_all, VIF.destroy,
  VIF.get_VM, VIF.get_name, VIF.get_MTU, VIF.get_MAC, VIF.get_type,
  VIF.get_device, VIF.get_io_read_kbs, VIF.get_io_write_kbs,
  VIF.get_all, VTPM.destroy, VTPM.get_all

* Save devid of a device on creation in XendDomainInfo

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years ago[XEND] Make sure UUID in state store are not stored as unicode
Alastair Tse [Wed, 24 Jan 2007 13:58:06 +0000 (13:58 +0000)]
[XEND] Make sure UUID in state store are not stored as unicode
objects.

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years ago[XEND] Prevent invalid arguments for destroy event channels.
Alastair Tse [Wed, 24 Jan 2007 13:54:37 +0000 (13:54 +0000)]
[XEND] Prevent invalid arguments for destroy event channels.

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years agoTest scripts for Xen API updated to support Async support
Alastair Tse [Wed, 24 Jan 2007 13:49:25 +0000 (13:49 +0000)]
Test scripts for Xen API updated to support Async support

18 years ago[XEND] Add Task support in Xen API implementation.
Alastair Tse [Wed, 24 Jan 2007 13:26:26 +0000 (13:26 +0000)]
[XEND] Add Task support in Xen API implementation.

Added progress tracking to some common methods like VM.start so the
progress during async invocation.

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years ago[linux] remove gratuitous differences with plain linux.
Christian Limpach [Wed, 24 Jan 2007 14:36:03 +0000 (14:36 +0000)]
[linux] remove gratuitous differences with plain linux.

Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>