aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc
Commit message (Collapse)AuthorAgeFilesLines
...
* libxc: osdep: convert xc_evtchn_{pending,unmask}()Ian Campbell2010-12-036-23/+54
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: osdep: convert xc_evtchn_unbind()Ian Campbell2010-12-036-11/+26
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: osdep: convert xc_evtchn_bind_virq()Ian Campbell2010-12-036-14/+29
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: osdep: convert xc_evtchn_bind_interdomain()Ian Campbell2010-12-036-15/+32
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: osdep: convert xc_evtchn_bind_unbound_port()Ian Campbell2010-12-036-14/+30
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: osdep: convert xc_evtchn_notify()Ian Campbell2010-12-036-8/+32
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: osdep: convert xc_evtchn_fd()Ian Campbell2010-12-036-8/+32
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: osdep: convert xc_map_foreign_ranges()Ian Campbell2010-12-036-15/+36
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: osdep: convert xc_map_foreign_range()Ian Campbell2010-12-036-15/+44
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: osdep: convert xc_map_foreign_{batch,bulk}Ian Campbell2010-12-038-31/+96
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: osdep: convert do_xen_hypercall()Ian Campbell2010-12-036-66/+73
| | | | | | | do_privcmd() was only ever used by do_xen_hypercall() so remove it. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: osdep: add framework for abstracting access to dom0 OS hypervisor ↵Ian Campbell2010-12-038-87/+390
| | | | | | | | | | interfaces. This patch introduces the basic infrastructure and uses it for open and close operations on privcmd, evtchn and gnttab devices. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: convert gnttab interfaces to use an opaque handle typeIan Campbell2010-12-235-58/+65
| | | | | | | | | | | | | The xc_interface previously passed to xc_gnttab_* was only used for logging which can now be done via the xc_gnttab handle instead. This makes the interface consistent with the changes made to the main interface in 21483:779c0ef9682c. Also update QEMU_TAG to pull in the corresponding qemu change. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: convert evtchn interfaces to use an opaque handle typeIan Campbell2010-12-2311-138/+180
| | | | | | | | | | | | This makes the interface consistent with the changes made to the main interface in 21483:779c0ef9682c. Also fix some references to "struct xc_interface" which should have been simply "xc_interface" in tools/xenpaging, and update QEMU_TAG to pull in the corresponding qemu change. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: some xc_gnttab_* functions are not Linux specificIan Campbell2010-12-236-162/+148
| | | | | | | | | They simply make hypercalls and perform other operations via the abstract interface. Create xc_gnttab.c and move those functions there. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* x86 hvm: Move CPUID.0xd (XSAVE) configuration into libxc.Keir Fraser2010-12-171-4/+53
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* tools/libxc: fix comment typo in xc_domain_saveOlaf Hering2010-12-161-1/+1
| | | | | | evey -> every Signed-off-by: Olaf Hering <olaf@aepfle.de>
* tools, bsd: complete implementation of discard_file_cacheChristoph Egger2010-12-161-0/+25
| | | | | | | attached patch completes discard_file_cache() for NetBSD. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* x86 hvm: Expose TSC_DEADLINE CPU feature to guests via CPUID.Keir Fraser2010-12-152-0/+2
| | | | Signed-off-by: Wei Gang <gang.wei@intel.com>
* libxc: remove comment obsoleted by addition of hypercall bounce buffer.Ian Campbell2010-12-141-1/+0
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: allow caller to specify no re-entrancy protection when opening the ↵Ian Campbell2010-12-023-21/+39
| | | | | | | | | | | interface Used by language bindings which provide their own re-entrancy which conflicts with pthreads. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* libxc: rename safe_strerror to xc_strerror and pass in an XC handle for ↵Ian Campbell2010-12-024-4/+8
| | | | | | | | | | future use. Make the function public since I have future patches which depend on this. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* libxc: NetBSD: implement xc_evtchn_bind_unbound_port.Ian Campbell2010-12-021-0/+15
| | | | | | | | | | | | | | | Doesn't actually appear to be used anywhere but is defined for other OSes. The NetBSD evtchn.h contains comments "Return allocated port" for several ioctls which currently return the allocated port as a member of the argument structure and not as the ioctl return value (I think this is a cut and paste error). Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Christoph Egger <Christoph.Egger@amd.com> committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* libxc: correct bounce direction for debug-key handlingJan Beulich2010-12-101-1/+1
| | | | | | Signed-off-by: Jan Beulich <jbeulich@novell.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tmem: Use of 'new' clashes with C++ reserved namespace.Keir Fraser2010-12-101-8/+8
| | | | | | Rename to 'creat', which does not conflict. Signed-off-by: Keir Fraser <keir@xen.org>
* Fix xc_cpuid_hvm_policy to avoid guest CPUID feature missing.Keir Fraser2010-12-091-2/+2
| | | | Signed-off-by: Wei Gang <gang.wei@intel.com>
* x86 hvm: x2APIC emulationKeir Fraser2010-12-072-1/+3
| | | | | | | | | | | This patch would enable Xen to handle x2APIC MSR accessing of HVM guest, which is faster(avoid decoding of MMIO accessing). The credit comes to Gleb Natapov who complete the work for KVM. Have tested with 4 vcpus guest, with/without x2apic support. From: Sheng Yang <sheng.yang@intel.com> Signed-off-by: Keir Fraser <keir@xen.org>
* minios: reverse layering of xc vs minios fd closeKeir Fraser2010-12-031-8/+24
| | | | | | | | | | | | Having minios close() call back into the libxc core close routines is backwards and unexpected. On every other OS the libxc core close routine calls close(). Export minios specific functions from the minios libxc code to implement fd closing for each type of xc file handle and simply call close() in the core close routine. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* ARINC 653 schedulerKeir Fraser2010-12-013-0/+96
| | | | | | From: Josh Holtrop <Josh.Holtrop@dornerworks.com> Signed-off-by: Keir Fraser <keir@xen.org> Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
* libxc: fix tracing (broken with hypercall buffers)Andre Przywara2010-11-191-0/+1
| | | | | | | | | | | the attached patch makes Xen tracing work again, after the introduction of the hypercall buffers broke it. Just a missing line. Thanks to Uwe Dannowski for reporting this. Signed-off-by: Andre Przywara <andre.przywara@amd.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* x86 xsave: Adding back CPUID support for Xsave (version 2)Keir Fraser2010-11-151-4/+26
| | | | | | XSave support via CPUID virtualization for both PV and HVM guests. Signed-off-by: Shan Haitao <haitao.shan@intel.com>
* libxc: correct dirty_bitmap bounce size in xc_hvm_track_dirty_vramIan Campbell2010-11-101-1/+1
| | | | | | | | | | | The size should be in bytes not 32-bit words. Fixes graphics corruption issues for HVM guests due to bouncing too little data. Also the dirty_bitmap buffer is output only and therefore only needs bouncing in one direction. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: Save the HVM_PARAM_ACPI_IOPORTS_LOCATIONAnthony Perard2010-11-083-0/+31
| | | | | | | | | This will save the acpi_ioport_location hvm_param in the checkpoint file and set the parameter in Xen at restore. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* x86: xsave save/restore support for both PV and HVM guests (version 2)Keir Fraser2010-11-082-12/+142
| | | | | | | | | | | | | | I have tested the patch in the following senarios: 1> Non-xsave platform 2> Xsave-capable platform, guest does not support xsave, xen support xsave 3> Xsave-capable platform, guest does support xsave, xen supports xsave 4> Guest (non-xsave) saved on platform without xsave, restored on a Xsave-capable system. All passed. Signed-off-by: Shan Haitao <haitao.shan@intel.com> Signed-off-by: Han Weidong <weidong.han@intel.com>
* x86: Do not expose XSAVE/AVX to guests.Keir Fraser2010-11-041-2/+2
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* Revert 22347:16093532f384 "x86: xsave save/restore support"Keir Fraser2010-11-042-141/+12
| | | | | | Completely broken when xsave is not enabled or supported on the host. Signed-off-by: Keir Fraser <keir@xen.org>
* libxc: fix bounce buffers in xc_pm_get_cx_stat and xc_pm_get_pxstatIan Campbell2010-11-031-4/+4
| | | | | | | | | We should bounce the buffers themselves, not the pointers to them! Error introduced by 22292:a1b39d2b9001 and reported by Yang Z Zhang. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc, ia64: ia64 counterpart of 22275:e95dc0eb152d and 22285:36a317494429KUWAMURA Shin'ya2010-11-031-2/+3
| | | | | | | | | This patch fixes compilation errors by 22275:e95dc0eb152d: ia64/xc_ia64_linux_save.c:797: error: too few arguments to function 'callbacks->switch_qemu_logdirty' and applies 22285:36a317494429 to ia64. Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: change cpumaps to uint8_tJuergen Gross2010-11-034-44/+87
| | | | | | | | | | | | | | | | | | | | Cpumap types in tools (libxc and libxl) are changed to be based on bytes like in the interface to the hypervisor. To make handling easier the size of used cpumaps is always based on the number of physical cpus supported by the hypervisor. This eliminates the need to keep track of the cpumap size in external interfaces. In libxl a macro for cycling through a cpumap is added (libxl_for_each_cpu). Interfaces changed: libxl_set_vcpuaffinity() libxl_cpumap_alloc() xc_vcpu_setaffinity() xc_vcpu_getaffinity() xc_cpupool_freeinfo() Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* x86: xsave save/restore support for both PV and HVM guests.Keir Fraser2010-11-032-12/+141
| | | | | Signed-off-by: Shan Haitao <haitao.shan@intel.com> Signed-off-by: Han Weidong <weidong.han@intel.com>
* x86 hvm: exposes AVX to guest.Keir Fraser2010-11-032-1/+3
| | | | | Signed-off-by: Shan Haitao <haitao.shan@intel.com> Signed-off-by: Han Weidong <weidong.han@intel.com>
* x86: Xsave support for PV guests.Keir Fraser2010-11-031-1/+0
| | | | | Signed-off-by: Shan Haitao <haitao.shan@intel.com> Signed-off-by: Han Weidong <weidong.han@intel.com>
* Fix ia64 tools buildKeir Fraser2010-11-021-0/+46
| | | | | | | | | | | 22066:eccfdeb41b80 replaced tools/libxc/ia64/aclinux.h with xen/include/acpi/platform/aclinux.h. Because both are incompatible, tools cannot be built on ia64. This patch fixes compilation errors by defining identifiers at ac_ia64_tools.h. Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
* libxl: Fix migration of HVM guestsIan Campbell2010-10-282-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | In the default "QemuDeviceModelRecord"-style HVM tail of the migration protocol the size of the qemu save record is unknown at the receiver and therefore it must read until EOF. This is not compatible with the xl migration protocol which contains a post-migration handshake and therefore cannot close the socket on the sending end. What is required is an explicit length field for the save record, which the "RemusDeviceModelState"-style HVM tail includes. Rather than overload the "RemusDeviceModelState" name for a non-Remus use case (on off chance that they need to diverge for some reason in the future) introduce a third style called "DeviceModelRecord0002" which is identical to current "RemusDeviceModelState"-style. Hopefully the inclusion of a number here will allow easier extension in the future without needing to come up with increasingly less helpful names! Also propagate errors from xc_domain_save and libxl__domain_suspend_common to callers. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: fix xc_version by handling all known command types.Ian Campbell2010-10-271-1/+19
| | | | | | | xend was crashing since 22289:ca4a781c8ae8 due to missing handling of XENVER_commandline. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* libxc: finalise transition to hypercall buffers.Ian Campbell2010-10-2213-208/+54
| | | | | | | | | | | | | | | | | | | | | Rename xc_set_xen_guest_handle to set_xen_guest_handle[0] and remove now unused functions: - xc_memalign - lock_pages - unlock_pages - hcall_buf_prep - hcall_buf_release [0] sed -i -e 's/xc_set_xen_guest_handle/set_xen_guest_handle/g' \ tools/libxc/*.[ch] \ tools/python/xen/lowlevel/xc/xc.c \ tools/python/xen/lowlevel/acm/acm.c \ tools/libxc/ia64/xc_ia64_stubs.c \ tools/security/secpol_tool.c \ tools/misc/xenpm.c Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: do not align/lock buffers which do not need itIan Campbell2010-10-222-24/+3
| | | | | | | | | | | | | | | | | | | | | On restore: region_mfn is passed to xc_map_foreign_range and xc_map_foreign_bulk. In both cases the buffer is accessed from the ioctl handler in the kernel and not from any hypercall. Therefore normal copy_{to,from}_user handling in the kernel will cope with any faulting access. p2m_batch is passed to xc_domain_memory_populate_physmap which takes care of bouncing the buffer already. On save: pfn_type is passed to xc_map_foreign_bulk which does not need locking as per region_mfn above. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: convert ia64 dom0vp interface to hypercall buffersIan Campbell2010-10-222-21/+27
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: switch page offlining interfaces to hypercall buffersIan Campbell2010-10-221-9/+1
| | | | | | | | There is no need to lock/bounce minfo->pfn_type in init_mem_info since xc_get_pfn_type_batch() will take care of that for us. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: convert mmuext op interface over to hypercall buffersIan Campbell2010-10-221-13/+15
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>