Commit Graph
707 Commits
Author SHA1 Message Date
kfraser@localhost.localdomain 481f5a7ac0 Fix xc_ptrace() for PAE.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-01-12 14:33:36 +00:00
john.levon@sun.com 5c8a39cf80 Use strstr() to look for "bimodal" string in ELF notes, to allow guests to use
"yes,bimodal", so they are correctly identified as PAE on older hypervisors.

Signed-off-by: John Levon <john.levon@sun.com>
2007-01-08 12:54:41 -08:00
kfraser@localhost.localdomain 9bec2359e6 [HVM] Ignore evtchn_upcall_mask and initialise to zero.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-09 17:43:13 +00:00
Emmanuel Ackaouy b1cf3deb81 Support for save and restore of compatibility guests
Signed-off-by: Emmanuel Ackaouy <ack@xensource.com>
2007-01-05 17:34:43 +00:00
Emmanuel Ackaouy 8f2348c03c Introduce _DOMF_compat and infrastructure as well as several conditionals
dealing with operations that need to distinguish between native and
compatibility mode guests.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-01-05 17:32:00 +00:00
Steven Hand bcef756eb4 Remove unused #defines.
Signed-off-by: Steven Hand <steven@xensource.com>
2006-12-29 13:02:19 +00:00
Steven Hand c2bb666e08 Remove 'netbuf race' debug output - we get tons of these for ballooned
down domains, and there's no way for us to distinguish that from the
(transient) case of network buffers.

Also tidy up comment.

Signed-off-by: Steven Hand <steven@xensource.com>
2006-12-29 13:00:08 +00:00
kfraser@localhost.localdomain f9396bbfe8 Improve consistency of type-attribute usage (volatile/const).
From: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-21 13:58:51 +00:00
kfraser@localhost.localdomain a6c89ee595 [LIBXC] Fix iteration over GDT in save/restore code.
Bug spotted by Tim Wood.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-20 10:06:33 +00:00
awilliam@xenbuild2.aw a3e94225c7 [IA64][HVM] Use vcpu info from getdomaininfo
This replaces the get/set_param using HVM_PARAM_VCPUS

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-12-14 09:56:41 -07:00
kfraser@localhost.localdomain e6be7d74b9 Allow loading of ELF kernel images that support both PAE and non-PAE.
Also change the elf loader to not look for a strings section unless it
is needed.
Signed-off-by: Bruce Rogers <brogers@novell.com>
2006-12-14 10:29:44 +00:00
kfraser@localhost.localdomain 15e8ea54ac [TOOLS] Fix the build. Clearly demarcate PPC-specific stuff.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-13 10:23:53 +00:00
Hollis Blanchard 8cadd348b3 [POWERPC] Merge with xen-unstable.hg.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-12-12 09:58:42 -06:00
Hollis Blanchard bdd61e7052 [POWERPC] Merge in outstanding changes from xenppc-unstable.hg.
It's a long story, but basically a small divergence in xenppc-unstable meant a
large number of changesets couldn't be directly imported to xen-unstable, so
this changeset includes all of them.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-12-12 09:56:06 -06:00
Ian Campbell c4644b811d [BUILDER] Enable shadow mode for shadow translate guests much earlier.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-12-11 11:57:36 +00:00
kaf24@localhost.localdomain 74d9fdb147 Merge with xen-ia64-unstable.hg 2006-12-09 14:34:53 +00:00
kfraser@localhost.localdomain 9eafa32f48 [LIBXC] Make strerror() thread-safe by protecting it with a mutex.
Using strerror_r() is made difficult by the different GNU definition,
and different distros variously choose the POSIX or GNU prototype.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-08 15:59:30 +00:00
kfraser@localhost.localdomain b65f717688 [LIBXC] Clean up use of sterror(). Define a thread-safe
version which uses strerror_r(), and tries to cope with
the POSIX and GNU versions of that function.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-08 11:57:06 +00:00
kfraser@localhost.localdomain 43ff8f0aef [XEN] Implement XENMEM_set_memory_map, which specifies memory map to
be returned by XENMEM_memory_map. Hook this into the domain builder.

Based on a patch by Glauber de Oliveira Costa <gcosta@redhat.com>

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-08 11:30:30 +00:00
awilliam@xenbuild2.aw a3c1e7b15f [IA64] xc_ia64_linux_restore fix for new foreign domain page mapping semantics
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-12-07 15:00:49 -07:00
awilliam@xenbuild2.aw ab41734c62 [IA64] Domain save fix for foreign domain page mapping semantics change
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-12-07 14:56:01 -07:00
awilliam@xenbuild2.aw 2f96a266fe [IA64] Map shared_info into guest pseudo physical address space
Allows libxc to map from dom0. This is used by domain builder.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-12-07 14:49:00 -07:00
awilliam@xenbuild2.aw 0741834153 merge with xen-unstable.hg 2006-12-08 09:09:18 -07:00
Ewan Mellor ff3ba258ad Fix PERROR.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-07 17:48:35 +00:00
kfraser@localhost.localdomain b07ced9c1f [LIBXC] Add an error reporting API to the libxc library.
- An 'xc_error' struct is used to pass around error
   details. Currently contains two members 'code' an enumeration of
   error types, and 'message' a free text description of the specific
   problem.

 - The xc_get_last_error() method returns a const pointer to the
   internal instance of this struct manged by libxc. By returning a
   const pointer we can add extra members to the end of the struct at
   any time without worrying about ABI of callers. This will let us
   provide more fine-grained info if needed in the future.

 - The xc_error instance is statically defined inside libxc and marked
   __thread. This ensures that errors are recorded per-thread, and
   that when dealing with errors we never need to call malloc - all
   storage needed is statically allocated.

 - The xc_clear_last_error() method resets any currently recorded
   error details

 - The xc_error_code_to_desc() method converts the integer error code
   into a generic user facing messsage. eg "Invalid kernel". Together
   with the 'message' field from xc_error, this provides the user
   visible feedback. eg "Invalid kernel: Non PAE-kernel on PAE host."

 - A callback can be registered with xc_set_error_handler to receive
   notification whenever an error is recorded, rather than querying
   for error details after the fact with xc_get_last_error

 - If built with -DDEBUG set, a default error handler will be
   registered which calls fprintf(stderr), thus maintaining current
   behaviour of logging errors to stderr during developer builds.

 - The python binding for libxc is updated to use xc_get_last_error
   to pull out error details whenever appropriate, instead of
   returning info based on 'errno'

 - The xc_set_error method is private to libxc internals, and is used
   for setting error details

 - The ERROR and PERROR macros have been updated to call xc_set_error
   automatically specifying XC_INTERNAL_ERROR as the error code. This
   gives a generic error report for all current failure points

 - Some uses of the ERROR macro have been replaced with explicit
   calls to xc_set_error to enable finer grained error reporting. In
   particular the code dealing with invalid kernel types uses this
   to report about PAE/architecture/wordsize mismatches

The patch has been tested by calling xm create against a varietry of
config files defining invalid kernels of various kinds. It has also
been tested with libvirt talking to xend. In both cases the error
messages were propagated all the way back up the stack.

There is only one place where I need to do further work. The suspend
& restore APIs in Xend invoke external helper programs rather than
calling libxc directly. This means that error details are essentially
lost. Since there is already code in XenD which scans STDERR from
these programs I will investigate adapting this to extract actual
error messages from these helpers.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2006-12-07 11:36:26 +00:00
awilliam@xenbuild2.aw 75890339a9 [IA64] Fix Vti
Use new foreign page mapping interface

Signed-off-by: Xu Anthony <Anthony.xu@intel.com>
Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
2006-12-06 02:34:46 -07:00
awilliam@xenbuild.aw 0013d074cd [IA64] changed foreign domain page mapping semantic.
x86 foreign HVM domain page mapping semantic was changed to use gmfn
instead mfn.  It applies to domains with auto_translated_mode enabled,
and all ia64 domains enable auto_translated_mode.  This patch changes
ia64 foreign domain page mapping to use gmfn and fixes ia64 domU buidler.
However this patch breaks domain save/restore/dump-core.
They should also be fixed-up

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-12-05 10:59:32 -07:00
awilliam@xenbuild.aw 04d0fece67 [IA64] Fix VTi domain creation
Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
2006-12-05 09:44:24 -07:00
awilliam@xenbuild.aw f77ef48c1d [IA64][LIBXC] prep for fixes
Groundwork for real fixes to follow

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-12-05 09:09:44 -07:00
awilliam@xenbuild.aw 793cb77839 merge with xen-unstable.hg 2006-12-04 08:24:41 -07:00
awilliam@xenbuild.aw c293efbc16 [IA64] update xc_set_hvm_param(), add xc_get_hvm_param()
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-12-02 15:19:50 -07:00
kfraser@localhost.localdomain fcad36eb80 [LIBXC] Add new AP{I function xc_evtchn_bind_unbound_port().
Add a comment clarifying how this function differs from
xc_evtchn_alloc_unbound().
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-01 14:25:36 +00:00
awilliam@xenbuild.aw ec489b8435 merge with xen-unstable.hg 2006-11-28 10:37:36 -07:00
kfraser@localhost.localdomain da38d1f64b [HVM] Re-introduce the 'apic' configuration option, default to 1.
Also simplify the HVM builder interface by doing more work in
the python wrapper, and fix mapping of shared_info page after the
change to map foreign pages by GMFN rather than MFN.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-27 17:49:41 +00:00
kfraser@localhost.localdomain b63e5446b8 [XEN] Cleanups to phys/mach address handling.
1. Balloon driver does not need to set M2P entry.
    This is done by the populate_physmap hypercall.

 2. Xen now translates foreign mappings from GMFN->MFN.
    Tools are simplified because of this.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-27 14:20:44 +00:00
awilliam@xenbuild.aw 53df32c974 [IA64] New initial memory interface for HVM on ia64
Use xc_domain_memory_populate_physmap() to allocate memory and 
build P2M/M2P table in setup_guest(). vmx_build_physmap_table()
is only used to mark IO space now.

Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
2006-11-22 09:30:27 -07:00
kfraser@localhost.localdomain d46c9ce0d7 [HVM] Reworked interrupt distribution logic.
TODO:
 1. Fix IO-APIC ID to not conflict with LAPIC IDS.
 2. Fix i8259 device model (seems to work already though!).
 3. Add INTSRC overrides in MPBIOS and ACPI tables so
    that PCI legacy IRQ routing always ends up at an
    IO-APIC input with level trigger. Restricting link
    routing to {5,6,10,11} and setting overrides for all
    four of those would work.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-21 19:22:25 +00:00
kfraser@localhost.localdomain cc60b785f6 [LIBXC] Replace API uses of size_t with ulong.
Avoids possibility of different FILE_OFFSET_BITS defn.
across the interface.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-17 14:00:45 +00:00
kaf24@firebug.cl.cam.ac.uk f8e7741960 [IA64] Fix build breakage.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-11-16 07:48:37 +00:00
kfraser@localhost.localdomain 6c483f95f8 [XEN] Various selector and callback cleanups to simplify the tools
and assumptions about callback selector values on x86/32.
Original patch from Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-15 18:41:06 +00:00
kfraser@localhost.localdomain ede52a632e [BUILDER] Simplify vcpu context initialisation by pre-zeroing
the context structure.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-11-15 16:53:43 +00:00
kfraser@localhost.localdomain a4be7b6267 [LIBXC] Clarify error messages to talk about allocation 'extents'
rather than 'pages'.
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
2006-11-15 09:30:44 +00:00
Jimi Xenidis ee8ceaa600 [TOOLS][POWERPC] Add missing prototype
This gets rid of a warning on some GCC versions
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>

--HG--
extra : transplant_source : j%9A%E4%9A%3B%FE%5E%2B%F2%FC%FF%3A%17%9A%1CU%83%86%3D%F1
2006-11-10 18:41:25 -05:00
awilliam@xenbuild.aw b693fe2311 [IA64] fix VTI boot
workaroud patch for memory initial interface

Signed-off-by: zhang xiantao <xiantao.zhang@intel.com>
Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
2006-11-10 11:14:51 -07:00
awilliam@xenbuild.aw c1d815ef9b [IA64] IA64 counter part of the change 12204:e6fdb32b786c of xen-unstable.hg
Remove xc_ia64_get_pfn_list() from setup_guest() in xc_linux_build.c,
use xc_domain_populate_physmap() and xc_domain_translate_gpfn_list().

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-11-10 11:14:32 -07:00
awilliam@xenbuild.aw 07a795b0f8 [IA64] fix ia64 linux domain builder broken by 12009:4a320d26fc24 of xen-unstable.hg.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-11-10 11:14:26 -07:00
kfraser@localhost.localdomain f340a1cd64 [HVM] Clarify the HVM e820 map. Also make it rather more
conservative wrt the ACPI region. hvmloader should fix up
by freeing unused memory in the range 0xE0000-0x100000.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-09 15:38:15 +00:00
kaf24@firebug.cl.cam.ac.uk 668c718e3f [HVM] Reserve 2 pages for ACPI tables in e820.
This is required when appending SSDTs to the core
ACPI data.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-08 19:48:46 +00:00
kfraser@localhost.localdomain 25f5b0ff15 [HVM] Replace shared-memory PIC state with a set-irq-level hypercall.
This simplifies the IRQ logic significantly and avoids the bogus
hvm_pic_assist() on domain resume path.

There is more work to be done here. At least:
 1. set-irq-level should really be set-interrupt-wire-level. Wire
    state needs to be distinguished from PIC (in particular, PIC IRR)
    state.
 2. Hypercalls can be batched in qemu and pushed down in one
    multicall.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-07 13:13:52 +00:00
kfraser@localhost.localdomain 428e6e4900 [LIBXC] Fix memory alloc/dealloc routines to return error properly.
Remove unnecessary decrease_reservation() from hvm builder.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-07 11:54:52 +00:00