aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc
Commit message (Collapse)AuthorAgeFilesLines
...
| * Fix a typo in xc_ptrace() and fix single-stepping when attachedkaf24@firebug.cl.cam.ac.uk2006-05-111-6/+6
| | | | | | | | | | | | to a live guest. Signed-off-by: Keir Fraser <keir@xensource.com>
* | [IA64] Strengthen dom0_getmemlistawilliam@xenbuild.aw2006-05-151-1/+3
| | | | | | | | | | | | | | | | reset num_pfns before hypercalling, more checks in hypercall, cleanup Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
* | [IA64] move evtchn_vector to shared_infoawilliam@xenbuild.aw2006-05-152-2/+2
|/ | | | | | | | Move evtchn_vector from vcpu_info to shared_info. Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
* Move Linux-specific privcmd code into private libxc implementations.kaf24@firebug.cl.cam.ac.uk2006-05-0210-111/+243
| | | | | | | | | 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>
* Define new event-channel and physdev hypercalls with a more extensiblekaf24@firebug.cl.cam.ac.uk2006-04-301-21/+16
| | | | | | | | | | | | interface (the legacy hypercalls would break if subcommands with large argument structures were added, as it would grow the size of the union of all argument structures). Also, based on a patch from Kevin Tian, add a new physdev op to signal EOI for a particular irq. Signed-off-by: Keir Fraser <keir@xensource.com>
* Recent GUEST_HANDLE related cset broke ia64 compilation.kaf24@firebug.cl.cam.ac.uk2006-04-281-2/+2
| | | | | Signed-off-by Kevin Tian <kevin.tian@intel.com>
* Rename {SG}ET_XEN_GUEST_HANDLE to {sg}et_Xen_guest_handle, as theykaf24@firebug.cl.cam.ac.uk2006-04-287-26/+26
| | | | | | | are function macros rather than define/declare macros. Signed-off-by: Keir Fraser <keir@xensource.com>
* Fix memory_op hypercall mlock/munlock wrapping after thekaf24@firebug.cl.cam.ac.uk2006-04-271-2/+2
| | | | | | | GET/SET_XEN_GUEST_HANDLE patch. Signed-off-by: Keir Fraser <keir@xensource.com>
* Wrap all GUEST_HANDLEs in structures, and define SET/GET macros to access themkaf24@firebug.cl.cam.ac.uk2006-04-277-34/+47
| | | | | | | in Linux and libxc. Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
* merge with xen-unstable.hgawilliam@xenbuild.aw2006-04-251-3/+3
|\
| * Fix swapped calloc() arguments.kaf24@firebug.cl.cam.ac.uk2006-04-191-3/+3
| | | | | | | | | | Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
* | merge with xen-unstable.hgawilliam@xenbuild.aw2006-04-1826-852/+852
|\|
| * Fix whitespace in libxc. Tabs are manually fixed.kaf24@firebug.cl.cam.ac.uk2006-04-1526-846/+846
| | | | | | | | | | | | | | | | Trailing whitespace removed with: perl -p -i -e 's/\s+$/\n/g' tools/libxc/*.[ch] Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
* | merge with xen-unstable.hgawilliam@xenbuild.aw2006-04-118-109/+245
|\|
| * build: Clean up use of .PHONYkaf24@firebug.cl.cam.ac.uk2006-04-101-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | * Move .PHONY directives next to targets, this makes them a lot harder to miss * Add missing .PHONY directives * Remove nonexistent .PHONY directives * Hopefully I didn'T miss anything... Signed-Off-By: Horms <horms@verge.net.au>
| * Additional sanity / compatability checks during guest build. smh22@firebug.cl.cam.ac.uk2006-04-072-5/+48
| | | | | | | | | | Signed-off-by: Steven Hand <steven@xensource.com>
| * Make root page table sanity check on restore more generic. smh22@firebug.cl.cam.ac.uk2006-04-061-8/+4
| | | | | | | | | | Signed-off-by: Steven Hand <steven@xensource.com>
| * Add code to make handling domain poweroff/reboot symmetrical betweenkaf24@firebug.cl.cam.ac.uk2006-04-062-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | paravirtualized and fully virtualized. This approach uses the new sched_op to handle other domains than the current domain. The new code, SCHEDOP_remote_shutdown, is very much like SCHEDOP_shutdown, but is called with the id of the domain which is to be shut down. This allows fully virtualized shutdown and para-virtualized shutdown to be identical from that point forward. A paravirtualized domain uses sched_op to shut down and set the reason code. This will send a VIRQ_DOM_EXC, which can be handled in dom0 by control software. In some ways, this resembles SIGCHILD/waitpid, and is a reasonable model. The fully virtualized case has qemu invoke xm directly. This is a different path than paravirtualized. It also removes decision and policy making choices from the rest of the control software and places it within qemu. When any dom0 logic eventually gets a VIRQ_DOM_EXC, the information about the domain is gone having been destroyed by xm. A libxenctrl wrapper, xc_shutdown_domain has been added and qemu now calls it. As a freebie, #if 0 some very verbose logging code in qemu. Totally unrelated, but as long as I was there... Signed-off-by: Ben Thomas <ben@virtualiron.com>
| * Enable the setting and trapping of breakpoints for hvm guest.kaf24@firebug.cl.cam.ac.uk2006-03-311-2/+8
| | | | | | | | | | | | | | | | Catch Ctrl-C for gdbserver and let gdb break from continue command. Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
| * More fixes to gdbserver for HVM guest debugging. Also fixkaf24@firebug.cl.cam.ac.uk2006-03-302-93/+134
| | | | | | | | | | | | | | | | | | | | writing back of register state for HVM guests. From: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* | [IA64] get_pfn_list workaroundawilliam@xenbuild.aw2006-04-101-20/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we know, the mechanism for hypervisor to pass parameter through pointer is not complete. Hypervisor use copy_from/to_user functions to copy parameter to hypervisor and copy result to user, if there is a tlb miss happening and hypervisor can't handled this. This hypercall fails, there is no mechanism to handle this failure, that may cause domain crash. Get_pfn_list hypercall copy large data from hypervisor to user, it is easy to trigger this issue when creating VTI-domain. If fails, Get_pfn_list returns the number of pfn entries, and this patch will Dummy access parameter memory block to cause this tlb mapping tracked by Hypervisor, then continue to do get_pfn_list. It's a workaround before we design a new mechanism of passing parameter thr pointer. Signed-off-by: Anthony Xu <anthony.xu@intel.com>
* | [IA64] Add memory operations for xen/ia64awilliam@xenbuild.aw2006-04-041-19/+25
|/ | | | | | | | | | | | | | | | | | | | This patch removes ugly hack upon memory operation and thus allow inc/decrease_reservation op available for xen/ia64 now. As a result: * Now we conform to common sequence where all domain pages are allocated together by increase_reservation before image builder * physmap table is now built at point of arch_set_info_guest * DOM0_GETMEMLIST can only query without allocation now After this patch, some long-existing hacks due to mismatched memory interface are cleaned this time. Also this is a base step toward introducing balloon feature into xen/ia64. Signed-off-by Kevin Tian <kevin.tian@intel.com>
* Fix 64-bit HVM guest debug via gdbserver:kaf24@firebug.cl.cam.ac.uk2006-03-263-13/+155
| | | | | | | | | | | | | 1. gdb_regs for 64bit, and macros to transfer regisers between ptrace registers to gdb registers 2. xc_ptrace code building for 64bit 3. Implementation of new map_domain_va for 64bit 4. gdbserver-xen build configuration fixes for 64bit From: Nitin Kamble Signed-off-by: Keir Fraser <keir@xensource.com>
* Remove unnecessary zlib includes.kaf24@firebug.cl.cam.ac.uk2006-03-232-2/+0
| | | | | | Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
* The current ptrace code is traversing the page table structures tokaf24@firebug.cl.cam.ac.uk2006-03-211-26/+30
| | | | | | | | | | | | | guest guest physical address, even when the guest paging is disabled. The gdbserver-xen tries to access guest pdes & ptes to map memory of hvm guest being debugged; and it gets a seg-fault because guest has not setup it's paging yet. The attached patch adds guest paging state check, so that the map_domain_va() can get the correct guest physical address from guest va. Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
* Fix VMX guest can not be created on PAE xen with more than 4G RAM.kaf24@firebug.cl.cam.ac.uk2006-03-191-44/+42
| | | | | | | | | Also change v_end type from unsigned long to unsigned long long, for we will have PAE VMX guest with more than 4G memory on PAE xen. Signed-off-by: Xin Li <xin.b.li@intel.com>
* mergeawilliam@xenbuild.aw2006-03-171-4/+5
|\
| * Fix the gzip size extraction in xc_inflate_buffer(). Extractkaf24@firebug.cl.cam.ac.uk2006-03-171-4/+5
| | | | | | | | | | | | | | | | bytes as unsigned quantities. Signed-off-by: David Lively <dlively@virtualiron.com>
* | mergeawilliam@xenbuild.aw2006-03-1415-310/+737
|\|
| * Trivial ia64 tools build fix.kaf24@firebug.cl.cam.ac.uk2006-03-141-1/+0
| | | | | | | | | | | | Signed-off-by: Alex Williamson <alex.williamson@hp.com>
| * Fix memory leak in xc_domain_dumpcore and simplify copy_from_domain_page.kaf24@firebug.cl.cam.ac.uk2006-03-141-9/+10
| | | | | | | | | | | | Signed-off-by: Keir Fraser <keir@xensource.com>
| * Fix a typo in a comment -- vmxloader is now hvmloader.kaf24@firebug.cl.cam.ac.uk2006-03-141-1/+1
| | | | | | | | | | | | Signed-off-by: Andrew D. Ball <aball@us.ibm.com>
| * The existing xc_domain_dumpcore is very specific to disk/file basedkaf24@firebug.cl.cam.ac.uk2006-03-132-48/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | output. Refactor the code slightly to allow more user-specified control. This is done by adding a parallel xc_domain_dumpcore_via_callback, which allows the specification of a callback routine and an opaque argument block. The existing dumpcore routine is modified to use the callback for all write operations and to turn the single seek into a small write (it's for page alignment). Signed-off-by: Ben Thomas <bthomas@virtualiron.com>
| * Replace memory_op subcommands reserved_phys_area and map_shared_infokaf24@firebug.cl.cam.ac.uk2006-03-102-19/+28
| | | | | | | | | | | | | | | | | | | | | | 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>
| * Fix a few small issues in xc_domain_dumpcore:kaf24@firebug.cl.cam.ac.uk2006-03-091-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | xc_domain_getinfo returns information about a domain, but not necessarily the one you asked about. Add check for this. max_vcpu_id in xc_domain_getinfo is really an ID, not a count, so make the loop include the last VCPU Signed-off-by: Ben Thomas <ben@virtualiron.com>
| * Move 'debug' build option into the outermost Config.mk file.kaf24@firebug.cl.cam.ac.uk2006-03-091-3/+0
| | | | | | | | | | | | Signed-off-by: Keir Fraser <keir@xensource.com>
| * Clean up the usage of CFLAGS. This is nice for packagers, who wouldkaf24@firebug.cl.cam.ac.uk2006-03-091-1/+0
| | | | | | | | | | | | | | | | like to control the base compilation flags from a central place. Signed-off-by: Charles Coffing <ccoffing@novell.com>
| * Change the location of the shared_info page for auto_translated_physmap guests.cl349@firebug.cl.cam.ac.uk2006-03-091-67/+72
| | | | | | | | | | | | | | | | | | | | Instead of putting the page outside of the guests pseudo-physical address space, we put it next to the other pages filled by the domain builder, such that the page is already mapped in the initial pagetables and/or a lowmem-type memory mapping. Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
| * Make xc_linux_build() load the initrd page-by-page ratherkaf24@firebug.cl.cam.ac.uk2006-03-092-60/+104
| | | | | | | | | | | | | | | | | | than all in one go, to conserve memory. This always has been the behaviour, but it was changed by a changeset earlier today. Signed-off-by: Keir Fraser <keir@xensource.com>
| * Clean up internal libxc functions to take 'const char *'kaf24@firebug.cl.cam.ac.uk2006-03-0910-65/+65
| | | | | | | | | | | | | | | | parameters where possible, to avoid unnecessary casts. Signed-off-by: Keir Fraser <keir@xensource.com>
| * Add a parallel set of APIs to the domain builders to allow images andkaf24@firebug.cl.cam.ac.uk2006-03-096-112/+383
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ramdisks to be passed via buffer, rather than via file. This allows usage of the underlying domain building routines in "file-challenged" enviroments. Specifically, xc_linux_build_mem is the buffer oriented version of the file-oriented xc_linux_build. Likewise, xc_hvm_build_mem is the buffer oriented analog of the file based xc_hvm_build. Signed-off-by: Ben Thomas (bthomas@virtualiron.com)
| * Fix order-of-evaluation issue in xc_domain_dumpcore. The intent iskaf24@firebug.cl.cam.ac.uk2006-03-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | to move blocks of memory 4096 pages at a time, and a buffer is allocated for this. Unfortunately, the #define is without parentheses and %/* are the same order and evaluated left to right. Result: very big buffer being used 4 pages at a time. Signed-off-by: Ben Thomas (bthomas@virtualiron.com)
| * Simplify ptrace_names array declaration.kaf24@firebug.cl.cam.ac.uk2006-03-061-1/+1
| | | | | | | | | | | | Signed-off-by: Keir Fraser <keir@xensource.com>
| * Fix build with some gcc versions.kaf24@firebug.cl.cam.ac.uk2006-03-062-3/+30
| | | | | | | | | | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* | [IA64] fix print out in ia64 setup_guest()awilliam@xenbuild.aw2006-03-101-2/+6
|/ | | | | | Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* libxc: Verify Magic number when reading dumpkaf24@firebug.cl.cam.ac.uk2006-03-063-1/+9
| | | | | | | | | | The xen core files record a magic number, but when they are loaded it isn't checked. This patch resolves this. Signed-Off-By: Horms <horms@verge.net.au>
* Consolidate xc_ptrace and xc_ptrace_corekaf24@firebug.cl.cam.ac.uk2006-03-063-131/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * xc_ptrace - Merge xc_ptrace_core into xc_ptrace - ATTACH now reads the data argument. If non-zero then a corefile is being debuged. Otherwise a thread has been attached to. This allows xc_waitdomain_core() or xc_waitdomain() to be called as appropriate in subsequent xc_ptrace() calls. * xc_waitdomain - Rename xc_waitdomain (xc_ptrace.c version) __xc_waitdomain - Rename xc_waitdomain (xc_ptrace_core.c version) xc_waitdomain_core - Create xc_waitdomain (in xc_ptrace.c), a wrapper for __xc_waitdomain and xc_waitdomain_core. Consolidation seemed difficult but ctxt needs to be passed into xc_waitdomain_core or made global. Alternatively, xc_waitdomain_core could be moved into xc_ptrace.c, but this seems messy. * map_domain_va - Rename map_domain_va (xc_ptrace_core.c version) map_domain_va_core - Have it accept ctxt, like xc_waitdomain_core * myptrace and myxcwait (linux-xen-low.c) Removed, call the now generic xc_ptrace() and xc_waitdomain() instead When calling xc_ptrace ATTACH, if a corefile is in use, a fd will be passed, otherwise a pid. The fd part is important, as this is saved internally in xc_ptrace_core.c, and passed to xc_waitdomain_core() as neccessary. Pereviously xc_waitdomain_core() received a pid and thus could not open the corefile. Signed-Off-By: Horms <horms@verge.net.au>
* libxc: xc_ptrace cleanupskaf24@firebug.cl.cam.ac.uk2006-03-063-207/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | General Cleanups * Use { after if consistently in xc_ptrace.c and xc_ptrace_core.c (But not in xc_ptrace_core() which should be removed shortly) * Remove duplicate code and centralise around xc_ptrace.h * Avoid ifing values covered by case in xc_ptrace() - PTRACE_GETREGS, PTRACE_GETFPREGS and PTRACE_GETFPXREGS are grouped into a single case, and then with the exception of a call to FETCH_REGS(), different code is executed based on ifing the values covered by the case. The PTRACE_GETFPREGS and PTRACE_GETFPXREGS code is actually a duplicate. This patch breaks the code out to two different cases. Error Handling * Eliminate FETCH_REGS macro as it forces several functions to have an otherwise uneeded error_out label, mittigating any code savins. * Rework error handling in xc_ptrace(). - Remove FETCH_REGS as above - Make sure that all dom0 errors are caught - Make sure errno is always set on error * Eliminate gotos in xc_ptrace_core.c that do nothing but return Signed-Off-By: Horms <horms@verge.net.au>
* Fix libxc warnings with gcc-4.1 and glibc-2.3.90.kaf24@firebug.cl.cam.ac.uk2006-03-021-3/+11
| | | | | | Signed-off-by: Charles Coffing <ccoffing@novell.com>
* Add support for configuring feature flags when starting guests.Ian.Campbell@xensource.com2006-02-272-6/+120
| | | | | | | | | Guest configuration files may now contain a features= declaration listing the features which should be enabled in a | separated list. Signed-off-by: Ian Campbell <ian.campbell@xensource.com>