aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* docs: xlexample.hvm: mention the viridian setting.Ian Campbell2011-11-291-0/+5
| | | | | | | | Turning this on for Windows guests is recommended. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com>
* xl: make bootloader_args a listIan Campbell2011-11-293-14/+77
| | | | | | | | | | This is much more natural. Continue to support the old syntax in xl but deprecate it. [ Fixed up a long line in xl_cmdimpl.c. -iwj ] Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxlu: add xlu_cfg_get_list_as_string_listIan Campbell2011-11-293-20/+33
| | | | | | | | | | Returns a cfg list as a libxl_string_list. Use this to simplify the parsing of device model extra args. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: use named options for tsc_mode.Ian Campbell2011-11-293-4/+48
| | | | | | | | | Add an enum at the libxl level with a hopefully descriptive set of names. Deprecate the use of an integer in xl cfg files. Signed-off-by: Ian Campbell Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com>
* xlu: add "dont_warn" to xlu_cfg_*Ian Campbell2011-11-294-99/+108
| | | | | | | | I want it for get_long but we might as well have it everywhere. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com>
* xl: the name field in a guest config file is mandatoryIan Campbell2011-11-291-2/+4
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com>
* docs: add a document describing the xl cfg file syntaxIan Campbell2011-11-292-2/+2
| | | | | | | | | | | | | | | | | | Based on an initial version by Ian Jackson. I believe that all keys are now present in the document although there are are various omissions in the actual documentation of them. Hopefully however this covers the majority of the most interesting keys. Spice section: Signed-off-by: Zhou Peng <zhoupeng@nfs.iscas.ac.cn> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> The rest: Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com>
* docs: xlexample.hvm is missing "builder = 'hvm'"Ian Campbell2011-11-291-0/+3
| | | | | | | | This is rather critical... Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com>
* Replace references to old wiki with ones to new.Ian Campbell2011-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | I have confirmed that the relevant pages have been transitioned. What remains is pages which have not yet been moved over: $ rgrep xenwiki * tools/libxen/README:http://wiki.xensource.com/xenwiki/XenApi tools/xenballoon/xenballoond.README:http://wiki.xensource.com/xenwiki/Open_Topics_For_Discussion?action=AttachFile&do=get&target=Memory+Overcommit.pdf Note that "PythonInXlConfig" never existed in the old wiki and does not exist in the new. This reference was introduced by 22735:cb94dbe20f97 and was supposed to have been written prior to the 4.1 release. I have transitioned it anyway but it's not clear how valuable the message actually is. Perhaps we should just remove that aspect of it? Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: propagate error from tap_ctl_spawn.Ian Campbell2011-11-281-1/+3
| | | | | | | | | Failure here means that a disk will not be correctly setup. I briefly scanned tools/blktap2/control.c for other goto constructs which did not set their err variable but didn't see any others. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: open logs with O_APPENDIan Jackson2011-11-282-2/+3
| | | | | | | | Logfiles should always be opened for append. 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>
* Fix save/restore for HVM domains with viridian=1Paul Durrant2011-11-253-0/+27
| | | | | | | | | | | | | xc_domain_save/restore currently pay no attention to HVM_PARAM_VIRIDIAN which results in an HVM domain running a recent version on Windows (post-Vista) locking up on a domain restore due to EOIs (done via a viridian MSR write) being silently dropped. This patch adds an extra save entry for the viridian parameter and also adds code in the viridian kernel module to catch attempted use of viridian functionality when the HVM parameter has not been set. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* xenpaging: restrict pagefile permissionsOlaf Hering2011-11-201-1/+1
| | | | | Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: add debug to show received watch event.Olaf Hering2011-11-201-0/+1
| | | | | Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: improve policy mru list handlingOlaf Hering2011-11-203-5/+35
| | | | | | | | | | | | | | | | | | | Without this change it is not possible to page-out all guest pages, then trigger a page-in for all pages, and then page-out everything once again. All pages in the mru list can not be paged out because they remain active in the internal bitmap of paged pages. Use the mru list only if the number of paged-out pages is larger than the mru list. If the number is smaller, start to clear the mru list. In case the number of paged-out pages drops to zero the mru list and the internal bitmap will be empty as well. Also add a new interface for dropped pages. If a gfn was dropped there is no need to adjust the mru list because dropping a page is not usage of a page. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: add cmdline interface for pagerOlaf Hering2011-11-202-37/+103
| | | | | | | | | | | | | | | | | | | Introduce a cmdline handling for the pager. This simplifies libxl support, debug and mru_size are not passed via the environment anymore. The new interface looks like this: xenpaging [options] -f <pagefile> -d <domain_id> options: -d <domid> --domain=<domid> numerical domain_id of guest. This option is required. -f <file> --pagefile=<file> pagefile to use. This option is required. -m <max_memkb> --max_memkb=<max_memkb> maximum amount of memory to handle. -r <num> --mru_size=<num> number of paged-in pages to keep in memory. -d --debug enable debug output. -h --help this output. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: watch the guests memory/target-tot_pages xenstore valueOlaf Hering2011-11-201-1/+50
| | | | | | | | | Subsequent patches will use xenstored to store the numbers of pages xenpaging is suppose to page-out. Remove num_pages and use target_pages instead. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: use guests tot_pages as working targetOlaf Hering2011-11-203-20/+61
| | | | | | | | | This change reverses the task of xenpaging. Before this change a fixed number of pages was paged out. With this change the guest will not have access to more than the given number of pages at the same time. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: add XEN_PAGING_DIR / libxl_xenpaging_dir_path()Olaf Hering2011-11-203-1/+7
| | | | | Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: install into LIBEXEC dirOlaf Hering2011-11-201-2/+2
| | | | | | | | In preparation of upcoming libxl integration, move xenpaging binary from /usr/sbin/ to /usr/lib/xen/bin/ Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: retry unpageable gfnsOlaf Hering2011-11-201-0/+14
| | | | | | | | | | | Nomination of gfns can fail, but may succeed later. Thats the case for a guest that starts ballooned. v2: - print debug when clearing uncosumed happens Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: add bitmap_clear functionOlaf Hering2011-11-201-0/+6
| | | | | Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: improve mainloop exit handlingOlaf Hering2011-11-201-7/+9
| | | | | | | | Remove the if/else logic to exit from the in case a signal arrives. Update comments. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: move page add/resume loops into its own function.Olaf Hering2011-11-201-33/+61
| | | | | | | | | | | | | | | | Move page resume loop into its own function. Move page eviction loop into its own function. Allocate all possible slots in a paging file to allow growing and shrinking of the number of paged-out pages. Adjust other places to iterate over all slots. This change is required by subsequent patches. v2: - check if victims allocation succeeded Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: track the number of paged-out pagesOlaf Hering2011-11-202-0/+9
| | | | | | | This change is required by subsequent changes. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: remove xc_dominfo_t from paging_tOlaf Hering2011-11-203-22/+17
| | | | | | | | Remove xc_dominfo_t from paging_t, record only max_pages. This value is used to setup internal data structures. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: update xenpaging_initOlaf Hering2011-11-201-11/+11
| | | | | | | | Move comment about xc_handle to the right place. Allocate paging early and use calloc. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: print gfn in failure caseOlaf Hering2011-11-201-9/+9
| | | | | Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: simplify file_opOlaf Hering2011-11-201-20/+9
| | | | | | | | | | | | Catch lseek() errors. Use -1 as return value and let caller read errno. Remove const casts from buffer pointers, the page is writeable. Use wrapper for write() which matches the read() prototype. Remove unused stdarg.h inclusion. Remove unused macro. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: use PERROR to print errnoOlaf Hering2011-11-201-29/+29
| | | | | | | | | | v3: - adjust arguments for xc_mem_paging_enable() failures v2: - move changes to file_op() to different patch Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: remove obsolete comment in resume pathOlaf Hering2011-11-201-1/+0
| | | | | | | | | Remove stale comment. If a page was populated several times the vcpu is paused and xenpaging has to unpause it again. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: remove filename from commentOlaf Hering2011-11-203-3/+0
| | | | | Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libvchan: fix segfault in client error pathAnil Madhavapeddy2011-11-241-1/+1
| | | | | | | | | In libvchan_client_init, go to the error path if the gntdev device is not available. Otherwise, a segfault happens later as the vchan context is invalid. Signed-off-by: Anil Madhavapeddy <anil@recoil.org> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/check: Add files missing from 24205:5c88358164ccIan Jackson2011-11-242-0/+20
| | | | Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: check for libaio unless user has configured CONFIG_SYSTEM_LIBAIO=nIan Campbell2011-11-241-0/+1
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libvchan: clean *.opicIan Campbell2011-11-241-1/+1
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* hvmloader: Intel GPU passthrough, reverse OpRegionJean Guyader2011-11-244-4/+45
| | | | | | | | | | | | | | The Intel GPU uses a two pages NVS region called OpRegion. In order to get full support for the driver in the guest we need to map this region. This patch reserves 2 pages on the top of the memory in the reserved area and mark this region as NVS in the e820. Then we write the address to the config space (offset 0xfc) so the device model can map the OpRegion at this address in the guest. Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* libxl: Prevent xl save from segfaulting when control/shutdown key is removedPaul Durrant2011-11-231-0/+2
| | | | | | | | | | | To acknowledge the tools' setting of control/shutdown it is normal for PV drivers to rm the key. This leads to libxl__xs_read() returning NULL and thus a subsequent strcmp on the return value will cause a segfault. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: use system libaio for blktap1 as well.Ian Campbell2011-11-231-3/+9
| | | | | | | | | 24184:4ecd3615e726 missed this because I was accidentally testing with a .config containing CONFIG_SYSTEM_LIBAIO=n. Tools tree now fully rebuilt without this. There were no other issues. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: use system installed libaio by default.Ian Campbell2011-11-222-6/+14
| | | | | | | | | | | | | | | | | | | | I could have sworn I did this years ago. IIRC the need for our own copy was due to the use of io_set_eventfd which is not present in version 0.3.106. However it is in 0.3.107 the first version of which was uploaded to Debian in June 2008 (I can't find a better reference for the release date). The necessary version is available in Debian Lenny onwards and is in at least RHEL 6, Fedora 13 and OpenSuSE 11.3. The necessary version appears to not be available in RHEL 5 or SLES 11 which is why I haven't simply nuked the in tree version. This is based on tools-system-libaio.diff from the Debian packaging although I have made it optional (but default on). Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xenstore: xenbus cannot be opened read-onlyDaniel De Graaf2011-11-221-10/+8
| | | | | | | | | In order to read keys from xenstore, the xenstore libraries need to write the request to the xenbus socket. This means that the socket cannot be opened read-only. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: Add a vkbd frontend/backend pair for HVM guestsStefano Stabellini2011-11-221-0/+7
| | | | | | | | | Linux PV on HVM guests can use vkbd, so add a vkbd frontend/backend pair for HVM guests by default. It is useful because it doesn't require frequent qemu wakeups as the usb keyboard/mouse does. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* hvmloader: Fix memory relocation loop.Keir Fraser2011-11-212-13/+18
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* hvmloader: Change memory relocation loop when overlap with PCI holeJean Guyader2011-11-181-6/+14
| | | | | | | | | | | | | | | | Change the way we relocate the memory page if they overlap with pci hole. Use new map space (XENMAPSPACE_gmfn_range) to move the loop into xen. This code usually get triggered when a device is pass through to a guest and the PCI hole has to be extended to have enough room to map the device BARs. The PCI hole will starts lower and it might overlap with some RAM that has been alocated for the guest. That usually happen if the guest has more than 4G of RAM. We have to relocate those pages in high mem otherwise they won't be accessible. Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Add configuration options to selectively disable S3 and S4 ACPI ↵Paul Durrant2011-11-188-21/+102
| | | | | | | | | | | power states. Introduce acpi_s3 and acpi_s4 configuration options (default=1). The S3 and S4 packages are moved into separate SSDTs and their inclusion is controlled by the new configuration options. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Move acpi_enabled out of hvm_info_table into xenstorePaul Durrant2011-11-185-4/+9
| | | | | | | | | Since hvmloader has a xentore client, use a platform key in xenstore to indicate whether ACPI is enabled or not rather than the shared hvm_info_table structure. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* elf: Fix Elf64 types and structs to match the specification.Keir Fraser2011-11-161-1/+1
| | | | | | | | The layouts were actually correct, but the type names were a bit messed up. Original patch by Volker Eckert <volker.eckert@citrix.com> Signed-off-by: Keir Fraser <keir@xen.org>
* test_x86_emulator: add a "run" target to the test code makefileJan Beulich2011-11-161-0/+4
| | | | | Signed-off-by: Jan Beulich <jbeulich@suse.com> Committed-by: Keir Fraser <keir@xen.org>
* x86_emulate: Define and use BUG() and bool_t.Keir Fraser2011-11-161-0/+6
| | | | | Original patch by Jan Beulich <jbeulich@suse.com> Signed-off-by: Keir Fraser <keir@xen.org>
* test_x86_emulate: Get public Xen headers via tools/include.Keir Fraser2011-11-163-4/+6
| | | | Signed-off-by: Keir Fraser <keir@xen.org>