aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* .gitignore: add autoconf-related filesIan Jackson2012-02-221-0/+6
| | | | | Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* build: add autoconf to replace custom checks in tools/checkIan Jackson2012-02-2258-511/+14525
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added autotools magic to replace custom check scripts. The previous checks have been ported to autoconf, and some additional ones have been added (plus the suggestions from running autoscan). Two files are created as a result from executing configure script, config/Tools.mk and config.h. conf/Tools.mk is included by tools/Rules.mk, and contains most of the options previously defined in .config, that can now be set passing parameters or defining environment variables when executing configure script. config.h is only used by libxl/xl to detect yajl_version.h. [ tools/config.sub and config.guess copied from autotools-dev 20100122.1 from Debian squeeze i386, which is GPLv2. tools/configure generated using the included ./autogen.sh which ran autoconf 2.67-2 from Debian squeeze i386. autoconf is GPLv3+ but has a special exception for the autoconf output; this exception applies to us and exempts us from complying with GPLv3+ for configure, which is good as Xen is GPL2 only. - Ian Jackson ] Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Tested-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl: Export libxl_event.hBamvor Jian Zhang2012-02-211-1/+1
| | | | | | | | This fixes a compile error in libvirt. Signed-off-by: Bamvor Jian Zhang <bjzhang@suse.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: cleanup: Remove pointless ERRNOVALGeorge Dunlap2012-02-211-2/+2
| | | | | | | | Just call LIBXL__LOG rather than passing a meaningless ERRNOVAL. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xenpaging: implement stack of free slots in pagefileOlaf Hering2012-02-202-0/+25
| | | | | | | | | Scanning the slot_to_gfn[] array for a free slot is expensive because evict_pages() always needs to scan the whole array. Remember the last slots freed during page-in requests and reuse them in evict_pages(). Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: move page_buffer into struct xenpagingOlaf Hering2012-02-202-6/+11
| | | | | Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: move pagefile filedescriptor into struct xenpagingOlaf Hering2012-02-202-23/+20
| | | | | Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: unify error handlingOlaf Hering2012-02-201-63/+60
| | | | | | | | | | | | | Update functions to return -1 on error, 0 on success. Simplify init_page() and make sure errno is assigned. Adjust PERROR/ERROR usage, use PERROR early because it overwrites errno. Adjust xenpaging_populate_page() to handle gfn as unsigned long. Update xenpaging exit code handling. xenpaging_teardown cant possible fail. Adjust mainloop to indicate possible errors to final exit. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: improve performance in policy_choose_victimOlaf Hering2012-02-201-16/+41
| | | | | | | | | | | | | | policy_choose_victim() is one of the bottlenecks in xenpaging. It is called alot to find free bits in the fragmented bitmaps. Reduce turnaround time by skipping longs with all bits set. Adjust wrap detection in loop. v2: - fix copy&paste error, bitmap was tested twice Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: move nominate+evict into single functionOlaf Hering2012-02-201-7/+35
| | | | | | | | | Move all code to evict a single gfn into one function. This simplifies error handling in caller. The function returns -1 on fatal error, 0 on success and 1 if the gfn cant be paged. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: reduce number of qemu cache flushesOlaf Hering2012-02-201-12/+14
| | | | | | | | | | | | | | | | | Currently the command to flush the qemu cache is called alot if there are no more pages to evict. This causes churn in the logfiles, and qemu can not release more pages anyway since the last command. Fix this by remembering the current number of paged-out gfns, if this number did not change since the last flush command then sending another new flush command will not free any more gfns. Remove return code from xenpaging_mem_paging_flush_ioemu_cache() since errors do not matter, and will be handled elsewhere. Also failure to send the flush command is not fatal. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: no poll timeout while page-out is in progressOlaf Hering2012-02-203-1/+16
| | | | | | | | | | | | | | | | | | | The main loop calls xenpaging_wait_for_event_or_timeout() unconditionally before doing any work. This function calls poll() with a timeout of 100ms. As a result the page-out process is very slow due to the delay in poll(). Call poll() without timeout so that it returns immediately until the page-out is done. Page-out is done when either the policy finds no more pages to nominate or when the requested number of pages is reached. The condition is cleared when a watch event arrives, so that processing the new target is not delayed once again by poll(). v2: - no poll timeout also when large number of evicts is pending Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: use flat index for pagefile and page-in requestsOlaf Hering2012-02-204-63/+57
| | | | | | | | | | | | | | | | | | | | | | | This change is based on an idea by <hongkaixing@huawei.com> and <bicky.shi@huawei.com>. Scanning the victims[] array is time consuming with a large number of target pages. Replace the loop to find the slot in the pagefile which holds the requested gfn with an index. Remove the victims array and replace it with a flat array. This array holds the gfn for a given slot in the pagefile. Adjust all users of the victims array. Rename variable in main() from i to slot to clearify the meaning. Update xenpaging_evict_page() to pass a pointer to xen_pfn_t to xc_map_foreign_pages(). Update policy_choose_victim() to return either a gfn or INVALID_MFN. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: add missing includesChristoph Egger2012-02-211-0/+2
| | | | | | | | | | | | include <poll.h> for struct pollfd include <sys/time.h> for struct timeval Fixes gcc complaints about implicit declaration. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/hotplug: remove 4 from default runlevel in xencommonsOlaf Hering2012-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | LSB defines runlevel 4 as "reserved for local use, default is normal/full multiuser" The current behaviour of insserv in openSuSE 11.4 and SLES11SP2 is that xencommons gets a symlink in /etc/init.d/rc4.d/ due to the 4 in the Default-Start: line. As a result insserv will print a warning: insserv: warning: current stop runlevel(s) (2 3 5) of script `xencommons' overwrites defaults (2 3 4 5). Since the local admin is responsible to create all symlinks manually in /etc/init.d/rc4.d/ the xencommons script should not automatically enable itself in runlevel 4. So, remove the 4 from Default-Start: line. Note: This change will not automatically remove old/stale xencommon symlinks in /etc/init.d/rc4.d/ during a package upgrade. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/examples: mention output_format= in examples/xl.confOlaf Hering2012-02-201-0/+3
| | | | | Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* docs/man: correct autoballoon in xl.confOlaf Hering2012-02-201-2/+2
| | | | | | | | Correct wording and default value of autoballoon= in xl.conf(5) to match code and supplied xl.conf. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* minios: Remove unused variables warningsIan Campbell2012-02-201-21/+21
| | | | | | | | | s/DEBUG/printk/ in test_xenbus and all associated do_*_test+xenbus_dbg_message and always print the IRQ and MFN used by the xenbus on init. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Tested-by: John McDermott <john.mcdermott@nrl.navy.mil> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: Set VNC password through QMPAnthony PERARD2012-02-204-12/+47
| | | | | | | | | | This patch provide the code to set the VNC password to QEMU upstream through VNC. The password is still stored in xenstore but will not be used by QEMU upstream. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Campbell <ian.campbell.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* Provide dm_vnc() as a in libxl helper.Anthony PERARD2012-02-202-4/+6
| | | | | | | | Just to use this function in more than one file.c. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Campbell <ian.campbell.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl_qmp: Use GC instead of CTX as parameter for _initialize.Anthony PERARD2012-02-203-18/+15
| | | | | | | | This make things a bit easier. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Campbell <ian.campbell.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* remus: libcheckpoint - initialize unused callback fields to NULLShriram Rajagopalan2012-02-201-0/+1
| | | | | | | | | | | Add a memset to the save_callbacks struct instance in libcheckpoint's initialization code. New additions to the callback struct will not need to add an explicit initialization (to NULL), to maintain compatibility with older xend/remus based invocation of xc_domain_save. Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* oxenstored: Fix spelling of "persistent" config variableIan Jackson2012-02-202-2/+2
| | | | | | | | | Change "persistant" to "persistent", in the code and the example/default config. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Add xlcpupool.cfg man pageJuergen Gross2012-02-201-0/+117
| | | | | | | | Add a man page describing the configuration file for creating cpupools via xl cpupool-create. Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* man/xl.cfg: mention not yet documented optionsOlaf Hering2012-02-201-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | Add dummy entries for parsed but undocumented cfg file options to xl.cfg: for i in ` grep -Ew 'xlu_cfg_get_(long|string|list|list_as_string_list)' tools/libxl/xl_cmdimpl.c | cut -f 2 -d '"' | sort -u ` do grep -wq $i docs/man/xl.cfg.pod.5 || echo $i done current output: acpi_s3 acpi_s4 cpus device_model gfx_passthru maxmem nodes sched vif2 Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xl.cfg: fix gfx_passthru stringOlaf Hering2012-02-202-2/+2
| | | | | | | Use correct string for gfx_passthru, and fix comment typo in xmexample.hvm Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xl: fix xl create/cpupool-create -f help outputOlaf Hering2012-02-201-2/+2
| | | | | | | | xl create -f domU.cfg does not need an equal sign. This applies also to xl cpupool-create. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/examples: Add the xl configuration examples to the makefileFabio Fantoni2012-02-201-0/+2
| | | | | | Signed-off-by: Fabio Fantoni <fabio.fantoni@heliman.it> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl_qmp: Handle unexpected end-of-socketAnthony PERARD2012-02-201-1/+4
| | | | | | | | | | | When read() return 0, the current code just tries again. But this leads to an infinite loop if QEMU died too soon. Also, retry select if a signal was caught. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: remove tests of alloca() return valueDavid Vrabel2012-02-201-45/+34
| | | | | | | | | alloca() does not return NULL on an allocation failure on Linux so remove the unneccessary tests from this Linux-specific code. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Cc: Santosh Jodh <santosh.jodh@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* gitignore: add more files generated in xen/arch/x86/efi to .gitignoreDavid Vrabel2012-02-201-0/+3
| | | | | | | These files were already listed in .hgignore. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc/NetBSD: return ioctl return value on errorRoger Pau Monne2012-01-191-1/+1
| | | | | | | | | | | NetBSD libxc hypercall implementation was returning -errno on error, instead of the actual error value from ioctl. Returning error is easier to understand, and the caller can always check errno. Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Acked-by: Ian Campbell <ian.campbell.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Reported-by: Olaf Hering <olaf@aepfle.de>
* libxc: add comment to why NetBSD return hypercall->retvalRoger Pau Monne2012-01-191-0/+6
| | | | | | | | | | Added a comment that explains why NetBSD return hypercall->retval on success. Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Acked-by: Ian Campbell <ian.campbell.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Reported-by: Olaf Hering <olaf@aepfle.de>
* libxl: Fix yajl-related build error due to missing error valueAllen Kay2012-02-201-1/+1
| | | | | | | | | Some versions of yajl lack yajl_gen_no_buf. Signed-off-by: Allen Kay <allen.m.kay@intel.com> Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* QEMU_TAG updateIan Jackson2012-02-201-3/+3
|
* xenpaging: mmap guest pages read-onlyOlaf Hering2012-02-201-1/+1
| | | | | | | | | xenpaging does not write to the gfn, so map the gfn to page-out in read-only mode. Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* arm: fix indentation level in startup_cpu_idle_loopIan Campbell2012-02-171-7/+7
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <Ian.Campbell@citrix.com>
* x86/mm: Make sure the event channel is released accuratelyKaixing Hong2012-02-171-0/+3
| | | | | | | | | | | | | | | | In xenpaging source code,there is an interdomain communication between dom0 and domU. In mem_event_enable(),the function alloc_unbound_xen_event_channel() allocates a free port for domU, and then it will be bound with dom0. When xenpaging tears down,it just frees dom0's event channel port by xc_evtchn_unbind(), leaves domU's port still occupied. So we add the patch to free domU's port when xenpaging exits. We need double free interdomain eventchannel. First free domainU port, and leave domain 0 port unbond, Then free domain 0 port. Signed-off-by: Kaixing Hong <hongkaixing@huawei.com>, Signed-off-by: Zhen Shi <bicky.shi@huawei.com> Acked-by: Olaf Hering <olaf@aepfle.de> Committed-by: Tim Deegan <tim@xen.org>
* x86/mm: Fix two PAE+paging bugsAndres Lagar-Cavilla2012-02-162-4/+14
| | | | | | | | | | | | In hap_paging_update_modes, we were getting the gpa of the cr3, rather than the gfn. Vmx_load_pdptrs was crashing the host if the cr3 is paged out. Now it will only crash the guest. Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
* x86/mm: Check sharing/paging/access have been enabled before processing a memopAndres Lagar-Cavilla2012-02-164-3/+11
| | | | | | Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
* x86/mm: Fix more ballooning+paging and ballooning+sharing bugsAndres Lagar-Cavilla2012-02-162-3/+21
| | | | | | | | | | | | | | | If the guest balloons away a page that has been nominated for paging but not yet paged out, we fix: - Send EVICT_FAIL flag in the event to the pager - Do not leak the underlying page If the page was shared, we were not: - properly refreshing the mfn to balloon after the unshare. - unlocking the p2m on the error exit case Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
* x86/mm: Make asserts on types and counts of shared pages more accurateTim Deegan2012-02-162-3/+9
| | | | | | Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
* replace bogus gdprintk() uses with {,d}printk()Jan Beulich2012-02-1613-113/+123
| | | | | | | | | | | When the subject domain is not the current one (e.g. during domctl or HVM save/restore handling), use of gdprintk() is questionable at best, as it won't give the intended information on what domain is affected. Use plain printk() or dprintk() instead, but keep things (mostly) as guest messages by using XENLOG_G_*. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* arm: Group remaining dummy symbols somewhat according to functionalityIan Campbell2012-02-151-28/+41
| | | | | | | | | Makes it easier to see what needs to be done. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <Ian.Campbell@citrix.com>
* arm: define max_pageIan Campbell2012-02-153-1/+4
| | | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <Ian.Campbell@citrix.com>
* arm: stub out PoD related p2m functionsIan Campbell2012-02-152-2/+14
| | | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <Ian.Campbell@citrix.com>
* xen: make need_iommu == 0 if !HAS_PASSTHROUGHIan Campbell2012-02-153-2/+7
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: keir@xen.org Committed-by: Ian Campbell <Ian.Campbell@citrix.com>
* arm: Implement arch_get_xen_capsIan Campbell2012-02-153-1/+13
| | | | | | | | | | TBD: correct arch name for this string. Should be "xen-" / "hvm-" or something else given the hybrid model we are using on ARM? Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <Ian.Campbell@citrix.com>
* arm: provide dummy version of steal_page for tmem.Ian Campbell2012-02-152-1/+6
| | | | | | | | | This is how IA64 does it. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <Ian.Campbell@citrix.com>
* PM: only include XEN_SYSCTL_{get_pmstat,pm_op} if HAVE_ACPIIan Campbell2012-02-153-2/+3
| | | | | | | | | These hypercalls are currently ACPI specific and implemented in xen/drivers/acpi which is not implemented on ARM. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: keir@xen.org Committed-by: Ian Campbell <Ian.Campbell@citrix.com>