aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* flask: move policy headers into hypervisorDaniel De Graaf2013-01-104-47/+6
| | | | | | | | | | Rather than keeping around headers that are autogenerated in order to avoid adding build dependencies from xen/ to files in tools/, move the relevant parts of the FLASK policy into the hypervisor tree and generate the headers as part of the hypervisor's build. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Allocate 3 pages for Intel GPU OpRegion passthrough.Keir Fraser2013-01-103-3/+5
| | | | | | | The 8kB region may not be page aligned, hence requiring 3 pages to be mapped through. Signed-off-by: Keir Fraser <keir@xen.org>
* HVM firmware passthrough ACPI processingRoss Philipson2013-01-101-1/+53
| | | | | | | | | ACPI table passthrough support allowing additional static tables and SSDTs (AML code) to be loaded. These additional tables are added at the end of the secondary table list in the RSDT/XSDT tables. Signed-off-by: Ross Philipson <ross.philipson@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* HVM firmware passthrough SMBIOS processingRoss Philipson2013-01-102-25/+363
| | | | | | | | | | | | Passthrough support for the SMBIOS structures including three new DMTF defined types and support for OEM defined tables. Passed in SMBIOS types override the default internal values. Default values can be enabled for the new type 22 portable battery using a xenstore flag. All other new DMTF defined and OEM structures will only be added to the SMBIOS table if passthrough values are present. Signed-off-by: Ross Philipson <ross.philipson@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* HVM firmware passthrough control tools supportRoss Philipson2013-01-104-8/+135
| | | | | | | | | | | | Xen control tools support for loading the firmware passthrough blocks during domain construction. SMBIOS and ACPI blocks are passed in using the new xc_hvm_build_args structure. Each block is read and loaded into the new domain address space behind the HVMLOADER image. The base address for the two blocks is returned as an out parameter to the caller via the args structure. Signed-off-by: Ross Philipson <ross.philipson@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* tools/tests: Restrict some tests to x86 onlyIan Campbell2012-12-211-2/+2
| | | | | | | | MCE injection and x86_emulator are clearly x86 specific. 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>
* libxl: move definition of libxl_domain_config into the IDLIan Campbell2012-12-195-209/+18
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxenstore: filter watch events in libxenstore when we unwatchJulien Grall2012-12-172-8/+97
| | | | | | | | | | | | | | | | | | | | XenStore puts in queued watch events via a thread and notifies the user. Sometimes xs_unwatch is called before all related message is read. The use case is non-threaded libevent, we have two event A and B: - Event A will destroy something and call xs_unwatch; - Event B is used to notify that a node has changed in XenStore. As the event is called one by one, event A can be handled before event B. So on next xs_watch_read the user could retrieve an unwatch token and a segfault occured if the token store the pointer of the structure (ie: "backend:0xcafe"). To avoid problem with previous application using libXenStore, this behaviour will only be enabled if XS_UNWATCH_FILTER is given to xs_open. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Julien Grall <julien.grall@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: introduce XSM relabel on buildDaniel De Graaf2012-12-137-14/+88
| | | | | | | | | | | | | | | | | | | | | | Allow a domain to be built under one security label and run using a different label. This can be used to prevent the domain builder or control domain from having the ability to access a guest domain's memory via map_foreign_range except during the build process where this is required. Example domain configuration snippet: seclabel='customer_1:vm_r:nomigrate_t' init_seclabel='customer_1:vm_r:nomigrate_t_building' Note: this does not provide complete protection from a malicious dom0; mappings created during the build process may persist after the relabel, and could be used to indirectly access the guest's memory. However, if dom0 correctly unmaps the domain upon building, a the domU is protected against dom0 becoming malicious in the future. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: qemu trad logdirty: Tolerate ENOENT on ret pathIan Jackson2012-12-131-1/+1
| | | | | | | | | | | It can happen in error conditions that lds->ret_path doesn't exist, and libxl__xs_read_checked signals this by setting got_ret=NULL. If this happens, fail without crashing. Reported-by: Alex Bligh <alex@alex.org.uk>, Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools/gdbsx: fix build failure with glibc-2.17Olaf Hering2012-12-061-0/+1
| | | | | Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Keir Fraser <keir@xen.org>
* X86/vMCE: handle broken page with regard to migrationLiu Jinsong2012-12-064-3/+58
| | | | | | | | | | | | | | | | | | | | | | | At the sender xc_domain_save has a key point: 'to query the types of all the pages with xc_get_pfn_type_batch' 1) if broken page occur before the key point, migration will be fine since proper pfn_type and pfn number will be transferred to the target and then take appropriate action; 2) if broken page occur after the key point, whole system will crash and no need care migration any more; At the target Target will populates pages for guest. As for the case of broken page, we prefer to keep the type of the page for the sake of seamless migration. Target will set p2m as p2m_ram_broken for broken page. If guest access the broken page again it will kill itself as expected. Suggested-by: George Dunlap <george.dunlap@eu.citrix.com> Signed-off-by: Liu Jinsong <jinsong.liu@intel.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: Make an internal function explicitly check existence of expected pathsGeorge Dunlap2012-12-061-20/+47
| | | | | | | | | | | | | | | | | | | | | | | libxl__device_disk_from_xs_be() was failing without error for some missing xenstore nodes in a backend, while assuming (without checking) that other nodes were valid, causing a crash when another internal error wrote these nodes in the wrong place. Make this function consistent by: * Checking the existence of all nodes before using * Choosing a default only when the node is not written in device_disk_add() * Failing with log msg if any node written by device_disk_add() is not present * Returning an error on failure * Disposing of the structure before returning using libxl_device_disk_displose() Also make the callers of the function pay attention to the error and behave appropriately. In the case of libxl__append_disk_list_of_type(), this means only incrementing *ndisks as the disk structures are successfully initialized. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xl: Check for duplicate vncdisplay options, and return an errorGeorge Dunlap2012-12-041-0/+11
| | | | | | | | | | | If the user has set a vnc display number both in vnclisten (with "xxxx:yy"), and with vncdisplay, throw an error. Update man pages to match. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: fix wrong commentRoger Pau Monne2012-12-041-1/+1
| | | | | | | | | The comment in function libxl__try_phy_backend is wrong, 1 is returned if the backend should be handled as "phy", while 0 is returned if not. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: Fix bug in libxl_cdrom_insert, make more robust against bad xenstore dataGeorge Dunlap2012-11-271-1/+16
| | | | | | | | | | | | | | | | | libxl_cdrom_insert was failing to initialize the backend type, resulting in the wrong default backend. The result was not only that the CD was not inserted properly, but also that some improper xenstore entries were created, causing further block commands to fail. This patch fixes the bug by setting the disk backend type based on the type of the existing device. It also makes the system more robust by checking to see that it has got a valid path before proceeding to write a partial xenstore entry. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: fix a variable underflow in libxl_wait_for_free_memoryRonny Hegewald2012-11-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | When xl is called to create a domU and there is not enough memory available, then the autoballooning is called to extract memory from dom0. During the ballooning a loop in libxl_wait_for_free_memory() waits unless enough memory is available to create the domU. But because of a variable-underflow the loop can finish too soon and xl finally aborts with the message: xc: error: panic: xc_dom_boot.c:161: xc_dom_boot_mem_init: can't allocate low memory for domain: Out of memory libxl: error: libxl_dom.c:430:libxl__build_pv: xc_dom_boot_mem_init failed: Device or resource busy libxl: error: libxl_create.c:901:domcreate_rebuild_done: cannot (re-)build domain: -3 The variable-underflow happens when freemem_slack is larger then info.free_pages*4, because the solution of this operation is converted implicit to a unsigned int to match the type of memory_kb. Add a extra check for this condition to solve the problem. Signed-off-by: Ronny Hegewald <Ronny.Hegewald@online.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xenstore-chmod: handle arbitrary number of perms rather than MAX_PERMS constantChunyan Liu2012-11-271-21/+17
| | | | | | | | | | | Constant MAX_PERMS 16 is too small to use in some occasions, e.g. if there are more than 16 domU(s) on one hypervisor (it's easy to achieve) and one wants to do xenstore-chmod PATH to all domU(s). So, remove MAX_PERMS limitation and make it as arbitrary number of perms. Signed-off-by: Chunyan Liu <cyliu@suse.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xend: enable environment passing in xPopen3Olaf Hering2012-11-231-3/+2
| | | | | | | | | | In changeset 19990:38dd208e1d95 a new parameter 'env' was added to xPopen3, but no code was added to actually pass the environment down to execvpe. Also, the new code was unreachable. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xl: Suppress spurious warning message for cpupool-listGeorge Dunlap2012-11-231-1/+2
| | | | | | | | | | | | | | | | libxl_cpupool_list() enumerates the cpupools by "probing": calling cpupool_info, starting at 0 and stopping when it gets an error. However, cpupool_info will print an error when the call to xc_cpupool_getinfo() fails, resulting in every xl command that uses libxl_list_cpupool (such as cpupool-list) printing that error message spuriously. Since at the moment the times we want to print the message correspond with the use of the existing "exact" parameter, use it to decide whether to print the message or not. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xend: reinstate XendOptionsFile.get_external_migration_toolIan Campbell2012-11-202-0/+6
| | | | | | | | | | | This was removed by 26167:31dcc0e08754 "xend: Remove old vtpm support from xm" but at least one caller was left. Reinstate with s/TPM/device/ since it appears that this functionality could apply elsewhere. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* docs: document/mark-up SCHEDOP_*Ian Campbell2012-11-192-3/+16
| | | | | | | | | | | | | The biggest subtlety here is there additional argument when op == SCHEDOP_shutdown and reason == SHUTDOWN_suspend and its interpretation by xc_domain_{save,restore}. Add some clarifying comments to libxc as well. This patch moves some structs around but there is no functional change other than improved documentation. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools: Remove old vtpm stuff from tools/libxenMatthew Fioravante2012-11-196-516/+0
| | | | | | Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xend: Remove old vtpm support from xmMatthew Fioravante2012-11-1916-507/+4
| | | | | | Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: Fix passing of application data to timeout_deregister hookJim Fehlig2012-11-151-1/+1
| | | | | | | | | | When deregistering a timeout, the address of application data was being passed to the timeout_deregister hook instead of the data itself. Signed-off-by: Jim Fehlig <jfehlig@suse.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools: rerun autoconf after 26144:170d45f7a2ebIan Campbell2012-11-141-27/+0
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xen-tmem-list-parse: fix ugly parse outputDan Magenheimer2012-11-141-0/+2
| | | | | | | | | | | The program xen-tmem-list-parse parses the output of xm/xl tmem-list into human-readable format. A missing NULL terminator sometimes causes garbage to be spewed where the two-letter pool type should be output. Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* hotplug/Linux: Fix locking in tools/hotplug/Linux/locking.shJacek Konieczny2012-11-141-1/+1
| | | | | | | | | | | | | | The claim_lock() function would fail in the perl code with: Invalid argument at -e line 2. because the Perl snippet opens for reading the file descriptor, which was earlier opened for write (append). Signed-off-by: Jacek Konieczny <jajcus@jajcus.net> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: fix vfb related assertion problem when starting pv-domURonny Hegewald2012-11-131-0/+2
| | | | | | | | | | | | | | | | | | | When a config-file for a pv-domU has a vfb section with a vnc=0 option then a "xl create" for that domU crashes with the message xl: libxl.c:252: libxl_defbool_val: Assertion `!libxl_defbool_is_default(db)' failed. and the domU hangs early in the start. This patch fixes the cause of the assertion and let the domU start normally. This problem exists since xen 4.2. Signed-off-by: Ronny Hegewald <Ronny.Hegewald@online.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools: Remove the vtpm process modelMatthew Fioravante2012-11-13101-17106/+2
| | | | | | | | | Remove the old vtpm process model. It doesn't work very well and is no longer supported. Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: add vtpm supportMatthew Fioravante2012-11-1312-7/+586
| | | | | | | | | | | | This patch adds vtpm support to libxl. It adds vtpm parsing to config files and 3 new xl commands: vtpm-attach vtpm-detach vtpm-list Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* pygrub: Fix command line argument error handlingMatthew Daley2012-11-123-4/+4
| | | | | | | | | | | | | pygrub's individual config file parsers do not correctly check the amount of command line arguments given to them. In addition, the LILO config parser would report an incorrect message. Use len() to correctly check the amount of arguments, and fix the LILO error message. Signed-off-by: Matthew Daley <mattjd@gmail.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: fix reboot failure of migrated domainKouya Shimura2012-11-121-1/+1
| | | | | | | | | The same problem was once fixed by c/s 23878:59c7213b5949 but c/s 25344:0f3b1e13d6af broke it. Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools: Synchronize privcmd header constantsAndres Lagar-Cavilla2012-11-122-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Since Linux's git commit ceb90fa0a8008059ecbbf9114cb89dc71a730bb6, the privcmd.h interface between Linux and libxc specifies two new constants, PRIVCMD_MMAPBATCH_MFN_ERROR and PRIVCMD_MMAPBATCH_PAGED_ERROR. These constants represent the error codes encoded in the top nibble of an mfn slot passed to the legacy MMAPBATCH ioctl. In particular, libxenctrl checks for the equivalent of the latter constant when dealing with paged out frames that might be the target of a foreign map. Previously, the relevant constant was defined in the domctl hypervisor interface header (XEN_DOMCTL_PFINFO_PAGEDTAB). Because this top-nibble encoding is a contract between the dom0 kernel and libxc, a domctl.h definition is misplaced. - Sync the privcmd.h header to that now available in upstream Linux - Update libxc appropriately - Remove the unnecessary constant in domctl.h Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Ian Campbell <ian.campbelL@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools: Make restore work properly with PV superpage flagDave McCracken2012-11-121-29/+101
| | | | | | | | | | | | | | For PV guests, the superpage flag means to unconditionally allocate all pages as superpages, which is required for Linux hugepages to work. Support for this on restore was not supported. This patch adds proper support for the superpage flag on restore. For HVM guests, the superpage flag has been used to mean attempt to allocate superpages if possible on restore. This functionality has been preserved. Signed-off-by: Dave McCracken <dave.mccracken@oracle.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* autoconf: add file missing from 26123:f6d5b3bf74a8Ian Jackson2012-10-301-0/+14
| | | | | | This file was in 26123:f6d5b3bf74a8 as submitted but I failed to add it. Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* autoconf: check for wget and ftpRoger Pau Monne2012-10-303-1/+110
| | | | | | | | | | | | | Some OSes don't come with wget by default, so ftp should be choosen on those. Add an autoconf check to check for wget and ftp, and replace the usage of hardcoded wget in tools. [ Stubdom builds still use wget unconditionally. -iwj ] Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* x86: save/restore only partial register state where possibleJan Beulich2012-10-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | ... and make restore conditional not only upon having saved the state, but also upon whether saved state was actually modified (and register values are known to have been preserved). Note that RBP is unconditionally considered a volatile register (i.e. irrespective of CONFIG_FRAME_POINTER), since the RBP handling would become overly complicated due to the need to save/restore it on the compat mode hypercall path [6th argument]. Note further that for compat mode code paths, saving/restoring R8...R15 is entirely unnecessary - we don't allow those guests to enter 64-bit mode, and hence they have no way of seeing these registers' contents (and there consequently also is no information leak, except if the context saving domctl would be considered such). Finally, note that this may not properly deal with gdbstub's needs, yet (but if so, I can't really suggest adjustments, as I don't know that code). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* libxc: builder: limit maximum size of kernel/ramdisk.Ian Jackson2012-10-263-9/+150
| | | | | | | | | | | | | | | | | | | | | | Allowing user supplied kernels of arbitrary sizes, especially during decompression, can swallow up dom0 memory leading to either virtual address space exhaustion in the builder process or allocation failures/OOM killing of both toolstack and unrelated processes. We disable these checks when building in a stub domain for pvgrub since this uses the guest's own memory and is isolated. Decompression of gzip compressed kernels and ramdisks has been safe since 14954:58205257517d (Xen 3.1.0 onwards). This is XSA-25 / CVE-2012-4544. Also make explicit checks for buffer overflows in various decompression routines. These were already ruled out due to other properties of the code but check them as a belt-and-braces measure. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* pygrub: Add option to list grub entriesCharles Arnold2012-10-261-4/+20
| | | | | | | | | | | | | | | | The argument to "--entry" allows 2 syntaxes, either directly the entry number in menu.lst, or the whole string behind the "title" key word. This poses the following issue: From Dom0 there is no way to guess the number and, or the complete title string because this string contains the kernel version, which will change with a kernel update. This patch adds [-l|--list-entries] as an argument to pygrub. Signed-off-by: Charles Arnold <carnold@suse.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xl: Do not leak events when a domain exits.Ian Campbell2012-10-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | The goto in both of these places misses the event free which would normally clean up. ==8655== 80 bytes in 1 blocks are definitely lost in loss record 1 of 1 ==8655== at 0x4024370: calloc (vg_replace_malloc.c:593) ==8655== by 0x406EAAE: libxl__zalloc (libxl_internal.c:83) ==8655== by 0x4078173: libxl__event_new (libxl_event.c:1167) ==8655== by 0x4056373: domain_death_occurred (libxl.c:958) ==8655== by 0x4058D06: domain_death_xswatch_callback (libxl.c:1038) ==8655== by 0x4078EB5: watchfd_callback (libxl_event.c:458) ==8655== by 0x407839E: afterpoll_internal (libxl_event.c:949) ==8655== by 0x4079142: eventloop_iteration (libxl_event.c:1371) ==8655== by 0x40799BB: libxl_event_wait (libxl_event.c:1396) ==8655== by 0x805CC67: create_domain (xl_cmdimpl.c:1698) ==8655== by 0x805E001: main_create (xl_cmdimpl.c:3986) ==8655== by 0x804D43D: main (xl.c:285) 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>
* Revert 26109:6ccfe4d29f95Ian Jackson2012-10-264-130/+9
| | | | | | | This changeset was contaminated by changes hanging around in my working tree. Sorry :-(. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: NetBSD PCI passthrough supportChristoph Egger2012-10-252-3/+14
| | | | | | | Add PCI passthrough support for HVM guests. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: Use libxl__realloc in a couple of places in libxl_events.cIan Campbell2012-10-251-2/+3
| | | | | | | | This avoids us having to think about the error handling on failure. 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>
* xl: Do not leak events when a domain exits.Ian Campbell2012-10-254-9/+130
| | | | | | | | | | | | | | | | | | | | | | | | The goto in both of these places misses the event free which would normally clean up. ==8655== 80 bytes in 1 blocks are definitely lost in loss record 1 of 1 ==8655== at 0x4024370: calloc (vg_replace_malloc.c:593) ==8655== by 0x406EAAE: libxl__zalloc (libxl_internal.c:83) ==8655== by 0x4078173: libxl__event_new (libxl_event.c:1167) ==8655== by 0x4056373: domain_death_occurred (libxl.c:958) ==8655== by 0x4058D06: domain_death_xswatch_callback (libxl.c:1038) ==8655== by 0x4078EB5: watchfd_callback (libxl_event.c:458) ==8655== by 0x407839E: afterpoll_internal (libxl_event.c:949) ==8655== by 0x4079142: eventloop_iteration (libxl_event.c:1371) ==8655== by 0x40799BB: libxl_event_wait (libxl_event.c:1396) ==8655== by 0x805CC67: create_domain (xl_cmdimpl.c:1698) ==8655== by 0x805E001: main_create (xl_cmdimpl.c:3986) ==8655== by 0x804D43D: main (xl.c:285) 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: Reserve FE700000-FE800000 in physical memory map for guest use.Keir Fraser2012-10-252-11/+22
| | | | | | | | | | | Xen platform promises never to use this physical address region, and will always mark it as reserved in the physical memory map presented to the OS (preventing its use by generic OS services such as BAR remapping). Linux will use this region for mapping the shared-info page. Signed-off-by: Keir Fraser <keir@xen.org>
* xl: Fix accidently waiting for domains to shutdown without --wait optionSander Eikelenboom2012-10-251-1/+3
| | | | | | | | Introduced by changeset 26091: "xl: Add --wait and --all to xl reboot." Signed-off-by: Sander Eikelenboom <linux@eikelenboom> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xl: avoid shadowing reboot(2)Christoph Egger2012-10-251-2/+2
| | | | | | | | | On NetBSD <unistd.h> mistakenly exposes reboot(2). Work around this. 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>
* xl: Add --wait and --all to xl reboot.Ian Campbell2012-10-182-26/+29
| | | | | | | | Inspired by a patch by Sander Eikelenboom. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xl: Introduce xl shutdown --all support for xm compatibilityIan Campbell2012-10-182-38/+88
| | | | | | | | | | Based on a patch by Sander Eikelenboom Signed-off-by: Sander Eikelenboom <linux@eikelenboom.it> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> [ ijc -- fixed sizeof(foo) vs sizeof(*foo) issue pointed out by Ian J ] Committed-by: Ian Campbell <ian.campbell@citrix.com>