| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
exact number of bytes. The consolidated versions are more watertight
than the various versions previously distributed around the library
source code.
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
| |
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
|
|
|
|
| |
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
|
|
|
|
|
|
|
|
|
|
|
| |
- use MAP_ANON, that is what both (BSD-)Unix and Linux have
- change last_error handling to use pthreads
- round mlock() parameters to page alignment
- cleanup: No need to include <xen/sys/privcmd.h>
a second time in xg_private.h
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
| |
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
| |
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of kludging a max_gpfn estimate in shared_info, add a new
XENMEM command to discover the actual maximum gpfn value as known by
the shadow code.
This needs to be more robust when we support HVM ballooning in future
anyway. One interesting point is that max_gpfn may be close to 4GB
even for small-memory HVM guests since for example SVGA LFB is mapped
into the I/O hole. We may need to special case the I/O hole somehow,
or provide some finer-grained way to find out which parts of the GPFN
space are actually used (e.g., get Xen to fill in a bitmap with 1 bit
per 1024 pages, or similar).
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
| |
Signed-off-by: Ewan Mellor <ewan@xensource.com>
|
|
|
|
| |
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
| |
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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(+)
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
| |
for conversion of the domctl_cpumap.
Original patch from Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
the fly. We cannot rely on the length contained in the gzip trailer to determine
the length of the decompressed data because images have been observed which have
trailing junk.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
|
|
|
|
| |
Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
|
|
|
|
|
|
|
| |
On solaris mlock requires a page aligned address and mlock doesn't
ensure the pages won't minor page fault.
Signed-off-by: Mark Johnson <mark.johnson@sun.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. platform_op -- used by dom0 kernel to perform actions on the
hardware platform (e.g., MTRR access, microcode update, platform
quirks, ...)
2. domctl -- used by management tools to control a specified domain
3. sysctl -- used by management tools for system-wide actions
Benefits include more sensible factoring of actions to
hypercalls. Also allows tool compatibility to be tracked separately
from the dom0 kernel. The assumption is that it will be easier to
replace libxenctrl, libxenguest and Xen as a matched set if the
dom0 kernel does not need to be replaced too (e.g., because that
would require vendor revalidation).
From here on we hope to maintain dom0 kernel compatibility. This
promise is not extended to tool compatibility beyond the existing
guarantee that compatibility will not be broken within a three-level
stable release [3.0.2, 3.0.3, etc.].
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split and move xc_ia64_stubs.c into ia64/xc_ia64_hvm_build.c and
ia64/xc_ia64_stubs.c
Creates ia64/Makefile.
Clean up (static in const) in xc_ia64_hvm_build.c
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
[whitespace cleanups in new files]
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
|
|
|
|
|
| |
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
| |
Thus all can be disabled at compile time. It would be easy to
make enabling/disabling a run-time option too.
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
| |
('long' changes size and alignment between 32- and 64-bit ABIs.)
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
pae_pgdir_above_4gb tp guests that have enabled this vmassist.
Control tools ensure all PAE page directories are below 4GB
unless the vmassist is enabled (triggered via an extended-cr3
option in guest Elf header).
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
|
| |
**NOTE**: This obviates the need for lowmem_emergency_pool.
Unpriv guests no longer need to be able to allocate memory
below 4GB for PAE PDPTs.
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
|
|
| |
Make header path for kernel's privcmd/evtchn headers generic.
Remove pointless xi_*() interface that was using private libxc
interfaces.
Signed-off-by: John Levon <john.levon@sun.com>
|
|
|
|
|
|
|
| |
are function macros rather than define/declare macros.
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
| |
GET/SET_XEN_GUEST_HANDLE patch.
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
| |
in Linux and libxc.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Trailing whitespace removed with:
perl -p -i -e 's/\s+$/\n/g' tools/libxc/*.[ch]
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
|
|
|
|
|
|
| |
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
with new subcommand add_to_physmap.
This changes the domain0 tools interface, but only when building
shadow-translate-mode guests.
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
|
| |
parameters where possible, to avoid unnecessary casts.
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
|
|
| |
Allows translation from GPFNs to MFNs for an auto-translated
guest.
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
|
| |
uses of max_page variable to use the mfn_valid() predicate.
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
|
| |
arch-specific XENMEM_ operation.
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
move the shared info and grant table pfns into that block. This
allows us to remove the get_gnttablist dom0 op, and simplifies the
domain creation code slightly. Having the reserved block managed by
Xen may also make it slightly easier to handle the case where the
grant table needs to be extended at run time.
Suggested-by: kaf24
Signed-off-by: Steven Smith, sos22@cam.ac.uk
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is enough to get block devices to work.
Note that this involves assigning PFNs to the machine frames used for
the grant table structures. While I'm here, I also assigned a PFN to
the shared info frame.
Signed-off-by: Steven Smith, sos22@cam.ac.uk
|
|
|
|
|
|
|
|
| |
privcmd Linux ioctl and includes an implementation for x86/64.
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Valgrind cannot see when a hypercall has initialised entries in a data
structure, so appropriate memsets have been placed before using dom0_op_t,
privcmd_hypercall_t, and a couple of miscellaneous blocks passed into this
layer. This initialises the block so that valgrind considers it to be valid,
but the data therein will be immediately overwritten by the hypercall, all
being well.
These changes are semantically neutral if -DVALGRIND is not set.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
query a domain's current and maximum memory reservation. Also,
XENMEM_maximum_ram_page now returns the max_page directly,
rather than writing through a passed-in pointer.
Also, disable PAE in the default config (accidentally checked
in two changesets ago).
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
|
| |
should be able to save/restore successfully on machines with up to 16GB
and any size of guest.
Signed-off-by: Steven Hand <steven@xensource.com>
|
|
|
|
|
|
|
|
| |
XENVER_platform_parameters.
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
|
| |
now handled solely by the domain builder.
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
|
| |
7783:5aad7e145e501fbfb346954950a33b042a963633.
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
|
| |
installed.
Signed-off-by: Nivedita Singhvi <niv@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Signed-off-by Ke Yu <ke.yu@intel.com>
Signed-off-by Anthony Xu <anthony.xu@intel.com>
Signed-off-by Kevin Tian <kevin.tian@intel.com>
|