aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc
Commit message (Collapse)AuthorAgeFilesLines
* Domain core-dumping fixesKeir Fraser2009-03-122-1/+11
| | | | | | | | | | | | | | The code was attempting to use the domain's current number of pages (info.nr_pages) as a maximum index. We then walk the memory map and can easily over-write past the end of the nr_pages-sized array, if the domain has more pages mapped in than earlier (live dump). Restrict ourselves to the current number of pages. Also fix the dump core method in xend to actually implement the crash and live options. In particular this means that xend clients other than xm now get non-live dumps by default. Signed-off-by: John Levon <john.levon@sun.com>
* Fix solaris xc_map_foreign_ranges()Keir Fraser2009-03-121-0/+2
| | | | Signed-off-by: John Levon <john.levon@sun.com>
* libxc: Replace bzero() usage with memset().Keir Fraser2009-03-122-2/+2
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: Mask X86_FEATURE_XSAVE in cpuid leaf 1, ecx, as we don't allowKeir Fraser2009-03-092-0/+2
| | | | | | | | | | guests to use it (by setting cr4.OSXSAVE). This prevents crashes in pvops kernels, as new versions of Linux try to use this feature. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* hvm: passthrough MSI-X mask bit accelerationKeir Fraser2009-03-022-2/+5
| | | | | | | | | | Add a new parameter to DOMCTL_bind_pt_irq to allow Xen to know the guest physical address of MSI-X table. Also add a new MMIO intercept handler to intercept that gpa in order to handle MSI-X vector mask bit operation in the hypervisor. This reduces the load of device model considerably if the guest does mask and unmask frequently Signed-off-by: Qing He <qing.he@intel.com>
* libxc: xc_ptrace cleanupKeir Fraser2009-02-201-220/+19
| | | | | | | | There are some bugs in PTRACE_PEEK/POKE. - can't track 2MB pages in 32bit pae mode. - leakage of mmap/munmap. Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* libxenctrl: adds xc_domain_unbind_msi_irq to libxc.Keir Fraser2009-02-052-0/+32
| | | | | | | The function is needed to unbind MSI/MSI-X on transition from D3hot state to D0 state. Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
* libxc support for the new partial-HVM-save domctl.Keir Fraser2009-02-053-22/+65
| | | | | | | This includes making the pagetable walker in xc_pagetab.c behave correctly for 32-bit and 64-bit HVM guests. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* bump libxenctrl and libxenguest versionsKeir Fraser2009-01-231-1/+1
| | | | | | | | | | | | | In c/s 19009 an incompatible change was made to the ABI of libelf-*, which are included in libxenctrl and libxenguest. To avoid client programs (such as python/lowlevel/xc/xc.so) picking up a wrong version and perhaps crashing, the soname should be changed. I have chosen the version number 3.4 as xen-unstable is currently the pre-3.4 branch. I assume we don't care about API/ABI stability within an unstable branch. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* [IA64] fix compilation error caused by 19046:ecf603780f56Keir Fraser2009-01-161-7/+8
| | | | | | | | | | | | | | | | This patch fixes the following compilation error adjusting function prototypes. > xc_core_ia64.c:176: error: conflicting types for 'xc_core_arch_memory_map_get' > xc_core.h:141: error: previous declaration of 'xc_core_arch_memory_map_get' was here > xc_core_ia64.c:241: error: conflicting types for 'xc_core_arch_map_p2m' > xc_core.h:144: error: previous declaration of 'xc_core_arch_map_p2m' was here Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* ptrace_core: Handle FV cross-bitness.Keir Fraser2009-01-161-1/+3
| | | | Signed-off-by: Bruce Rogers <brogers@novell.com>
* libxc: Support cross-bitness guest when core-dumpingKeir Fraser2009-01-155-35/+135
| | | | | | | | | | | This patch allows core-dumping to work on a cross-bit host/guest configuration, whereas previously that was not supported. It supports both PV and FV guests. The core file format generated by the host, needs to match that of the guest, so an alignment issue is addressed, along with the p2m frame list handling being done according to the guest size. Signed-off-by: Bruce Rogers <brogers@novell.com>
* Remove unused XENMEM_remove_from_physmap.Keir Fraser2009-01-141-10/+0
| | | | | | | Never present in any stable release of Xen. Introduced for use by qemu-dm but now not needed. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Remove unused XENMEM_translate_pfn_list.Keir Fraser2009-01-142-33/+0
| | | | | | | | Never used by a guest OS (except in IA64 hcall translation layer) and obsoleted in the tools for ages. Recent usage by qemu-dm is now removed. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86, hvm: stdvga improvementsKeir Fraser2009-01-141-1/+1
| | | | | | | | | | | | | | * enables linear framebuffer and VBE 3.0 extensions. * add a number of new resolutions, up to 2560x1600, and including * widescreen modes common to modern displays. * Introduce configurable video ram size through the "videoram" config * file option, shrinking default video ram used to 4 Megs (thus * eliminating 4 wasted megs/VM that have been the case until now), but * allowing users to specify up to 16 Megs of vram, to support the * extreme high resolutions such as 2560x1600x32. Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* Use -MMD -MF in tools/* rather than -Wp,-M...Keir Fraser2009-01-121-3/+0
| | | | | | | | | | | | | | | | | | | | | | If you use -MMD -MF then the correct .o filename is written to the .*.d file as the compiler driver arranges everything. This was done in 19010:275abe1c5d24 for the hypervisor. In this patch we do the same elsewhere in the xen-unstable tree, particularly tools/. Specifically: * Change tools/Rules.mk to add -MMD -MF ... to CFLAGS and set DEPS. * Remove -Wp,-MD... from every other Makefile * Remove setting of DEPS from every other Makefile * Ensure that every Makefile says -include $(DEPS) * Ensure that every Makefile's clean target removes $(DEPS) Some Makefiles were already halfway there, but often for a different variable name eg PROG_DEP. The variable name is now standardised in Rules.mk as DEPS. I have done a test build with this change, on Debian etch. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* x86, hvm: Move E820 table creation into hvmloader, extendKeir Fraser2009-01-081-106/+57
| | | | | | | | | | hvm_info_table to describe memory parameters in a simpler form from domain builder to hvmloader. Also move reserved special page mappings immediately below the 4GB boundary. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Move libelf headers out of xen public header dir.Keir Fraser2009-01-084-4/+4
| | | | Signed-off-by: Jan Beulich <jbeulich@novell.com>
* passthrough: MSI-INTx translation for HVMKeir Fraser2009-01-081-1/+2
| | | | | | | | The patch adds a new type of pt_irq: PT_IRQ_TYPE_MSI_TRANSLATE. With it, guest dpci irq can now use msi as the underlying pirq while injected as INTx irq. Signed-off-by: Qing He <qing.he@intel.com>
* [IA64] ia64 counter part of 5b44cfde9666.Isaku Yamahata2009-01-071-0/+16
| | | | | | | | | This patch defines ia64 xc_hvm_build_target_mem() which is referenced by xc.c. Without this patch, xend doesn't boot complaining that symbol, xc_hvm_build_target_mem, is missing. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* merge with xen-unstable.hgIsaku Yamahata2009-01-079-171/+268
|\
| * libxc: Define xc_ffs{8,16,32,64} functions. Use them.Keir Fraser2009-01-065-6/+35
| | | | | | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
| * Make xc_translate_foreign_address aware of compat-mode guests andKeir Fraser2009-01-052-162/+77
| | | | | | | | | | | | | | (32-bit) HVM guests. 64-bit HVM guests are still not supported for now, pending a sensible way of getting at the guest's EFER.LMA. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
| * PoD memory 8/9: libxc interfaceKeir Fraser2009-01-055-5/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | Implement libxc interface to PoD functionality: * Add xc_hvm_build_target_mem(), which takes both memsize and target. Memsize is the total memory, allocated in PoD pages and reported in the e820; target is the size of the cache. If these are the same, the normal funcitonality is called. (So you can use the same function to build always, and it will decide whether to use PoD or not.) * Add xc_domain_memory_[gs]et_pod_target(), which sets and/or returns information about the PoD cache and p2m entries. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
* | [IA64] paravirtualize itc and support save/restore.Isaku Yamahata2009-01-051-1/+2
|/ | | | | | | | | | | | ia64 linux 2.6.18 only use ar.itc for local ticks so that ar.itc didn't need paravirtualization and it can be work arounded when save/restore. However recent ia64 linux uses ar.itc for sched_clock() and CONFIG_VIRT_CPU_ACCOUNTING and other issues. So ar.itc needs paravirtualization. Although Most part is done in guest OS, save/restore needs hypervisor support. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* x86: Enable MTF for HVM guest single step in gdbKeir Fraser2008-12-163-12/+49
| | | | | Signed-off-by: Edwin Zhai <edwin.zhai@intel.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xc_pm: Fix off-by-one error in string array access.Keir Fraser2008-12-131-1/+1
| | | | Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* libxc: Fix xc_pm.c build by avoiding bogus header includes.Keir Fraser2008-12-112-5/+6
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Add user PM control interfaceKeir Fraser2008-12-102-0/+182
| | | | Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
* libxc: Fix memory leak in zlib usageKeir Fraser2008-12-102-0/+2
| | | | | | | Any call to inflate() must be followed by inflateEnd(), otherwise the internal zlib state is leaked. Signed-off-by: Kevin Wolf <kwolf@suse.de>
* Use virtual 8086 mode for VMX guests with CR0.PE == 0Keir Fraser2008-12-092-5/+33
| | | | | | | | | | | | | When a VMX guest tries to enter real mode, put it in virtual 8086 mode instead, if that's possible. Handle all errors and corner cases by falling back to the real-mode emulator. This is similar to the old VMXASSIST system except it uses Xen's x86_emulate emulator instead of having a partial emulator in the guest firmware. It more than doubles the speed of real-mode operation on VMX. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* libxc: Fix gcc 4.3 build failureKeir Fraser2008-12-091-2/+4
| | | | Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* x86: support CPUID hypervisor feature bitKeir Fraser2008-11-192-0/+4
| | | | | Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: make injection of spurious page faults configurable per domainKeir Fraser2008-10-152-0/+15
| | | | | | | Some distro kernels do not handle spurious page faults so allow these to be supressed on a per VM basis. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* [IA64] libxc: make xc_ia64_copy_memmap use DOM0VP_get_memmap.Isaku Yamahata2008-10-031-22/+65
| | | | | | | | | Guest domain's memory map may be updated concurrently so that it is protected sequence lock. This patch makes xc_ia64_copy_memmap() use DOM0VP_get_memmap hypercall to avoid the race. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* merge with xen-unstable.hgIsaku Yamahata2008-10-031-5/+4
|\
| * xc_ptrace: Allow gdbserver to connect to a guest before APs areKeir Fraser2008-10-021-5/+4
| | | | | | | | | | | | | | brought online. Signed-off-by: Kip Macy <kmacy@freebsd.org> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* | [IA64] libxc clean up.Isaku Yamahata2008-10-024-59/+73
| | | | | | | | | | | | | | | | remove code duplication between xc_ia64_linux_save.c and xc_core_ia64.c by introducing xc_ia64_copy_memmap(). Later xc_ia64_copy_memmap() will be enhanced. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* | [IA64] xc restore: fix domain restore.Isaku Yamahata2008-10-021-1/+1
| | | | | | | | | | | | Fix domain restore of version one format. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* | [IA64] hvm builder: more precisely use of memory size.Isaku Yamahata2008-10-021-36/+41
| | | | | | | | | | | | | | | | So far, VGA io size is ignored and memory size which assigned to domain is smaller than what user specified by VGA io size. This patch take VGA io size into consideration when memory population. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* | [IA64] libxc: improve foreign p2m exposure.Isaku Yamahata2008-10-021-3/+10
| | | | | | | | | | | | make foreign p2m exposure _PAGE_IO_BIT aware for robustness. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* | merge with xen-unstable.hgIsaku Yamahata2008-10-026-13/+114
|\|
| * x86, hvm: Expose host core/HT topology to HVM guests.Keir Fraser2008-09-301-4/+30
| | | | | | | | | | Based on an initial patch by Nitin Kamble <nitin.a.kamble@intel.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
| * xc_save: use correct size when unmapping live p2m.Keir Fraser2008-09-291-2/+2
| | | | | | | | | | | | | | | | | | | | Otherwise we unmap a larger region than was mapped when saving 32 bit guest from 64 bit tools, leading to badness. The equivalent change was made to the restore code in 18329:ca7dd77d5365 Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
| * X86 and IA64: Update cpufreq statistic logic for supporting both x86Keir Fraser2008-09-261-0/+1
| | | | | | | | | | | | | | and ia64 Signed-off-by: Yu, Ke <ke.yu@intel.com> Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
| * hvm, save/restore: Skip page batches which contain no valid pages.Keir Fraser2008-09-231-1/+14
| | | | | | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
| * libxc: Wrapper functions for cpu online/offlineKeir Fraser2008-09-223-0/+56
| | | | | | | | Signed-off-by: Shan Haitao <haitao.shan@intel.com>
| * x86, amd, hvm: pass through one more cpuid cache description leafKeir Fraser2008-09-181-6/+11
| | | | | | | | | | | | | | | | | | Add a missing CPUID leaf that contains AMD-specific cache info. Without this, Windows can spin trying to prefetch memory buffers using a stride length of zero. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* | [IA64] xc_domain_save: Do not poll-wait for guest to shutdown.Isaku Yamahata2008-09-251-28/+3
|/ | | | | | This patch is ia64 counter part of 18452:59904b180078. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* xc_domain_save: Do not poll-wait for guest to shutdown -- it shouldKeir Fraser2008-09-091-53/+4
| | | | | | already be suspended when the (*suspend)() function returns. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>