aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* gcov: Add small utility to deal with test coverage information from XenFrediano Ziglio2013-02-212-2/+158
| | | | | | Currently the utility can read and reset coverage informations. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
* Fix emacs local variable block to use correct C style variable.David Vrabel2013-02-2181-81/+81
| | | | | | | The emacs variable to set the C style from a local variable block is c-file-style, not c-set-style. Signed-off-by: David Vrabel <david.vrabel@citrix.com
* libxl: fix build on 32-bitIan Campbell2013-02-211-2/+2
| | | | | | | | | | | | | | aab4d1b266ce "libxl: Add qxl vga interface support for upstream qemu" introduced: libxl_dm.c: In function ‘libxl__build_device_model_args_new’: libxl_dm.c:449: error: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘long long unsigned int’ libxl_dm.c:451: error: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘long long unsigned int’ on arm32 and x86_32. Use the inttypes.h PRId64 macro. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: Add qxl vga interface support for upstream qemuFabio Fantoni2013-02-204-11/+38
| | | | | | | | | | | Usage: vga="qxl" Signed-off-by: Fabio Fantoni <fabio.fantoni@heliman.it> Signed-off-by: Zhou Peng <zpengxen@gmail.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* MergeIan Campbell2013-02-161-1/+1
|\
| * xm: fix description of xm vcpu-set commandLalith Suresh2013-02-151-1/+1
| | | | | | | | | | | | | | | | Minor language correction in the description of the xm vcpu-set command. Signed-off-by: Lalith Suresh <suresh.lalith@gmail.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* | tools/libxl: Disable useless empty floppy drive with qemu-xenFabio Fantoni2013-02-151-0/+3
|/ | | | | | Signed-off-by: Fabio Fantoni <fabio.fantoni@heliman.it> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools/libxl: Improve videoram settingFabio Fantoni2013-02-152-1/+23
| | | | | | | | | | | | | - If videoram setting is less than 8 mb shows error and exit. - Added videoram setting for qemu upstream with cirrus (added in qemu 1.3). - Updated xl.cfg man. - Default and minimal videoram changed to 16 mb if stdvga is set and upstream qemu is being used. This is required by qemu 1.4 to avoid a xen memory error (qemu 1.3 doesn't complain about it, probably buggy). Signed-off-by: Fabio Fantoni <fabio.fantoni@heliman.it> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools/libxl: Added vga parameter for hvm domUsFabio Fantoni2013-02-151-1/+13
| | | | | | | | | | | | | | Usage: vga="stdvga"|"cirrus" - Default option is cirrus. - Prints error and exit if unknown value is passed. - stdvga parameter is now deprecated. - Updated xl.cfg man. Signed-off-by: Fabio Fantoni <fabio.fantoni@heliman.it> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: compile and run libxl/xlStefano Stabellini2013-02-152-47/+55
| | | | | | | | | | | | Move tsc, rtc, memmap_limit, localtime and shadow settings from libxl__build_pre to libxl__arch_domain_create. Get the console and xenstore pfn's from struct xc_dom_image for autotranslated guests. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxc: fixes for the ARM platformStefano Stabellini2013-02-154-25/+33
| | | | | | | | | | | | | | | | Make xc_dom_feature_translated an arch-dependent function. alloc_magic_pages: save console and xenstore pfn's in xc_dom_image. alloc_magic_pages: set HVM_PARAM_CONSOLE_EVTCHN and HVM_PARAM_STORE_EVTCHN hvm_params using the event channels allocated by the toolstack. Call xc_dom_gnttab_hvm_seed instead of xc_dom_gnttab_seed in xc_dom_gnttab_init for autotranslated guests. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: Cleanup, use LOG* and GCSPRINTF macro in libxl_dom.cRoss Philipson2013-02-151-58/+39
| | | | | | Signed-off-by: Ross Philipson <ross.philipson@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: HVM firmware passthrough supportRoss Philipson2013-02-154-17/+129
| | | | | | | | | | | | | | | | | | | | | | This patch introduces support for two new parameters in libxl: smbios_firmware=<path_to_smbios_structures_file> acpi_firmware=<path_to_acpi_tables_file> The changes are primarily in the domain building code where the firmware files are read and passed to libxc for loading into the new guest. After the domain building call to libxc, the addresses for the loaded blobs are returned and written to xenstore. LIBXL_HAVE_FIRMWARE_PASSTHROUGH is defined in libxl.h to allow users to determine if the feature is present. This patch also updates the xl.cfg man page with descriptions of the two new parameters for firmware passthrough. Signed-off-by: Ross Philipson <ross.philipson@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: switch to using the new xc_hvm_build() libxc API.Ross Philipson2013-02-151-6/+13
| | | | | | Signed-off-by: Ross Philipson <ross.philipson@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: pass debug flag down to libxl_domain_suspendOlaf Hering2013-02-152-7/+15
| | | | | | | | | | | | libxl_domain_suspend is already prepared to handle LIBXL_SUSPEND_DEBUG, and xl migrate handles the -d switch as well. Pass this flag down to libxl_domain_suspend, so that finally xc_domain_save can dump huge amount of debug data to stdout. Update xl.1 and help text output. 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: correct help text of xl migrateOlaf Hering2013-02-151-1/+1
| | | | | | Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools/xc: log pid in xc_save/xc_restore outputOlaf Hering2013-02-154-6/+15
| | | | | | | | | | If several migrations log their output to xend.log its not clear which line belongs to a which guest. Print entry/exit of xc_save and xc_restore and also request to print pid with each log call. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools/xc: restore logging in xc_saveOlaf Hering2013-02-151-5/+10
| | | | | | | | | | | | | | Prior to xen-4.1 the helper xc_save would print some progress during migration. With the new xc_interface_open API no more messages were printed because no logger was configured. Restore previous behaviour by providing a logger. The progress in xc_domain_save will be disabled because it generates alot of output and fills up xend.log quickly. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools/xc: turn XCFLAGS_* into shiftsOlaf Hering2013-02-151-5/+6
| | | | | | | | | to make it clear that these are bits and to make it easier to use in xend code. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools/xc: handle tty output differently in stdiostream_progressOlaf Hering2013-02-151-2/+20
| | | | | | | | | | | | | | If the output goes to a tty, rewind the cursor and print everything in a single line as it was done up to now. If the output goes to a file or pipe print a newline after each progress output. This will fix logging of progress messages from xc_save to xend.log. To support XTL_STDIOSTREAM_SHOW_PID or XTL_STDIOSTREAM_SHOW_DATE print the output via vmessage if the output is not a tty. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools/xc: fix logic error in stdiostream_progressOlaf Hering2013-02-151-1/+1
| | | | | | | | Setting XTL_STDIOSTREAM_HIDE_PROGRESS should disable progress reporting. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* trivial: Optimize printnumFrediano Ziglio2013-02-151-14/+6
| | | | | | | | Reuse the string of hexadecimal numbers to simplify printnum implementation Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools/ocaml: oxenstored: correctly handle a full ring.Ian Campbell2013-02-151-2/+2
| | | | | | | | | | | Change 26521:2c0fd406f02c (part of XSA-38 / CVE-2013-0215) incorrectly caused us to ignore rather than process a completely full ring. Check if producer and consumer are equal before masking to avoid this, since prod == cons + PAGE_SIZE after masking becomes prod == cons. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools: Fix memset(&p,0,sizeof(p)) idiom in several places.Michael Young2013-02-136-6/+6
| | | | | | | | | gcc 4.8 identifies several places where code of the form memset(x, 0, sizeof(x)); is used incorrectly, meaning that less memory is set to zero than required. Signed-off-by: Michael Young <m.a.young@durham.ac.uk> Committed-by: Keir Fraser <keir@xen.org>
* oxenstored: Enforce a maximum message size of 4096 bytesIan Jackson2013-02-071-0/+8
| | | | | | | | | | | | | | | | The maximum size of a message is part of the protocol spec in xen/include/public/io/xs_wire.h Before this patch a client which sends an overly large message can cause a buffer read overrun. Note if a badly-behaved client sends a very large message then it will be difficult for them to make their connection work again-- they will probably need to reboot. Signed-off-by: David Scott <dave.scott@eu.citrix.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/ocaml: oxenstored: Be more paranoid about ring readingIan Jackson2013-02-071-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | oxenstored makes use of the OCaml Xenbus bindings, in which the function xs_ring_read in tools/ocaml/libs/xb/xs_ring_stubs.c is used to read from the shared memory Xenstore ring. This function does not correctly handle all possible (prod, cons) states when MASK_XENSTORE_IDX(prod) > MASK_XENSTORE_IDX(cons). The root cause is the use of the unmasked values of prod and cons to calculate to_read. If prod is set to an out-of-range value, the ring peer can cause to_read to be too large or even negative. This allows the ring peer to force oxenstored to read and write out of range for the buffers leading to a crash or possibly to privilege escalation. Correct this by masking the values of cons and prod at the start, so we only deal with masked values. This makes the logic simpler, as semantically inappropriate values of the upper bits of the ring pointers are simply ignored. The same vulnerability does not exist in the ring writer because the only use made of the unmasked value is the check which prevents the prod pointer overtaking the cons pointer. A ring peer which defeats this check will suffer only lost data. However, additionally, precautions need to be taken to ensure that req_cons and req_prod are only read once in each function. Without the use of volatile or some asm construct, the compiler can "prove" that req_cons and req_prod do not change unexpectedly and is permitted to "amplify" the read of (say) req_cons into two reads at different times, giving two different values for use as cons, and then use the two sources of cons interchangeably. (The use of xen_mb() does not forbid this.) Therefore do the reads of req_cons and req_prod through a volatile pointer in both xs_ring_read and xs_ring_write. This is currently believed to be a theoretical vulnerability as we are not aware of any compilers which amplify reads in this way. This is a security issue, part of XSA-38 / CVE-2013-0215. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Tested-by: Matthew Daley <mattjd@gmail.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: fix xcflags assignment in libxl__domain_suspendOlaf Hering2013-02-051-3/+3
| | | | | | | | | Currently ->xcflags remains 1 because the braces are placed incorrectly. Put each logical unit into its own braces to fix assigment to xcflags. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools: update ocamlfind handlingOlaf Hering2013-02-059-21/+120
| | | | | | | | | | | | | | | configure checks just for ocamlc, but the tools in tools/ocaml depend also on ocamlfind. On my workstation I have just ocamlc installed, but no ocamlfind. As a result make will fail. Update configure.ac to check also for OCAMLFIND, update various Makefiles and replace hardcoded ocamlfind string with $(OCAMLFIND) Please rerun autogen.sh after applying this patch. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xencommons: redirect serial and parallel to /dev/nullStefano Stabellini2013-02-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Upstream QEMU doesn't support -nographic with -daemonize unless monitor, serial and parallel outputs are all redirected: /* According to documentation and historically, -nographic redirects * serial port, parallel port and monitor to stdio, which does not work * with -daemonize. We can redirect these to null instead, but since * -nographic is legacy, let's just error out. * We disallow -nographic only if all other ports are not redirected * explicitly, to not break existing legacy setups which uses * -nographic _and_ redirects all ports explicitly - this is valid * usage, -nographic is just a no-op in this case. */ Considering that we do want to redirect them to /dev/null anyway, do so. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Tested-by: Sander Eikelenboom <linux@eikelenboom.it> Acked-by: Ian Campbell <ian.campbell@citrix.com> [ ijc -- handled reject vs 26352:9a1610c1e564 "xencommons: Stop QEMU in do_stop()" and rewrapped the resulting long line ] Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools: revert to installing in /usrIan Campbell2013-01-282-0/+3
| | | | | | | | | | 26470:acaf29203cf9 missed a bunch of hardcoded paths, e.g. in the initscripts. I think at this juncture it is appropriate to revert this change and try again after some more testing. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Roger Pau Monné <roger.pau@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xl: SWITCH_FOREACH_OPT handles special options directly.Ian Campbell2013-01-251-145/+51
| | | | | | | | | | This removes the need for the "case 0: case 2:" boilerplate in every main_foo(). Calls exit(3) directly which is OK since xl cleans up the context etc in an atexit(3) handler. 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 helper macro for option parsing.Ian Campbell2013-01-251-444/+528
| | | | | | 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: allow def_getopt to handle long optionsIan Campbell2013-01-251-198/+125
| | | | | | | | | | | | | Improves consistency of option parsing and error handling. Consistently support --help for all options. Many users of getopt_long were needlessly passing an option_index pointer which was not used. 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>
* libxl: libxl__prepare_ao_device should reset num_execRoger Pau Monne2013-01-251-0/+1
| | | | | | | | num_exec was not cleared when calling libxl__prepare_ao_device. 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>
* libxc: drop relics of running on non-PAE 32-bit hostsJan Beulich2013-01-245-127/+14
| | | | | | | | | Additionally drop unused (and dangerous) defines and typedefs, plus a minor legibility improvement to setup_pgtables_x86_{32_pae,64}(). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
* libxc: match types of 'subject' and 'foreigndom' between struct xc_mmu and ↵Dario Faggioli2013-01-242-4/+4
| | | | | | | | | | | | | | | | | | | do_mmu_update In do_mmu_update() (in the hypervisor) the parameter 'foreigndom' is 'unsigned int' and both its high (bits 31-16) and low (bits 15-0) are parts utilised, as explained here: http://xenbits.xen.org/docs/unstable/hypercall/include,public,xen.h.html#Func_HYPERVISOR_mmu_update However, the actual parameter, i.e., the 'subject' field in struct xc_mmu is declared as domid_t, which typedef-s to uint16_t. This means we are never able to pass anything via the higher 16 bits of 'foreigndom', which in turns may cause the hypercall to fail when called on an actual foreign domain. Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools+stubdom: install under /usr/local by default.Ian Campbell2013-01-242-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This is the defacto (or FHS mandated?) standard location for software built from source, in order to avoid clashing with packaged software which is installed under /usr/bin etc. I think there is benefit in having Xen's install behave more like the majority of other OSS software out there. The major downside here is in the transition from 4.2 to 4.3 where people who have built from source will innevitably discover breakage because 4.3 no longer overwrites stuff in /usr like it used to so they pickup old stale bits from /usr instead of new stuff from /usr/local. Packages will use ./configure --prefix=/usr or whatever helper macro their package manager gives them. I have confirmed that doing this results in the same list of installed files as before this patch was applied. The hypervisor remains in /boot/ and there is no intention to move it. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Roger Pau Monné <roger.pau@citrix.com> Acked-by: Matt Wilson <msw@amazon.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: fix stale timeout event callback raceIan Jackson2013-01-242-77/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because there is not necessarily any lock held at the point the application (eg, libvirt) calls libxl_osevent_occurred_timeout, in a multithreaded program those calls may be arbitrarily delayed in relation to other activities within the program. Specifically this means when ->timeout_deregister returns, libxl does not know whether it can safely dispose of the for_libxl value or whether it needs to retain it in case of an in-progress call to _occurred_timeout. The interface could be fixed by requiring the application to make a new call into libxl to say that the deregistration was complete. However that new call would have to be threaded through the application's event loop; this is complicated and some application authors are likely not to implement it properly. Furthermore the easiest way to implement this facility in most event loops is to queue up a time event for "now". Shortcut all of this by having libxl always call timeout_modify setting abs={0,0} (ie, ASAP) instead of timeout_deregister. This will cause the application to call _occurred_timeout. When processing this calldown we see that we were no longer actually interested and simply throw it away. Additionally, there is a race between _occurred_timeout and ->timeout_modify. If libxl ever adjusts the deadline for a timeout the application may already be in the process of calling _occurred, in which case the situation with for_app's lifetime becomes very complicated. Therefore abolish libxl__ev_time_modify_{abs,rel} (which have no callers) and promise to the application only ever to call ->timeout_modify with abs=={0,0}. The application still needs to cope with ->timeout_modify racing with its internal function which calls _occurred_timeout. Document this. This is a forwards-compatible change for applications using the libxl API, and will hopefully eliminate these races in callback-supplying applications (such as libvirt) without the need for corresponding changes to the application. (It is possible that this might expose bugs in applications, though, as previously libxl would never call libxl_osevent_hooks->timeout_modify and now it never calls ->timeout_deregister). For clarity, fold the body of time_register_finite into its one remaining call site. This makes the semantics of ev->infinite slightly clearer. Cc: Bamvor Jian Zhang <bjzhang@suse.com> Cc: Ian Campbell <Ian.Campbell@citrix.com> Tested-by: Jim Fehlig <jfehlig@suse.com> Acked-by: Jim Fehlig <jfehlig@suse.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: fix stale fd event callback raceIan Jackson2013-01-242-29/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because there is not necessarily any lock held at the point the application (eg, libvirt) calls libxl_osevent_occurred_timeout and ..._fd, in a multithreaded program those calls may be arbitrarily delayed in relation to other activities within the program. libxl therefore needs to be prepared to receive very old event callbacks. Arrange for this to be the case for fd callbacks. This requires a new layer of indirection through a "hook nexus" struct which can outlive the libxl__ev_foo. Allocation and deallocation of these nexi is mostly handled in the OSEVENT macros which wrap up the application's callbacks. Document the problem and the solution in a comment in libxl_event.c just before the definition of struct libxl__osevent_hook_nexus. There is still a race relating to libxl__osevent_occurred_timeout; this will be addressed in the following patch. Reported-by: Bamvor Jian Zhang <bjzhang@suse.com> Cc: Bamvor Jian Zhang <bjzhang@suse.com> Cc: Ian Campbell <Ian.Campbell@citrix.com> Tested-by: Jim Fehlig <jfehlig@suse.com> Acked-by: Jim Fehlig <jfehlig@suse.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* Add a top level configure scriptMatthew Fioravante2013-01-185-3232/+15
| | | | | | 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>
* stubdom: Add autoconfMatthew Fioravante2013-01-1815-652/+14
| | | | | | | | | | | | | | | | | | Stub domains now use autoconf to build. This configure script can enable or disable specific domains and also specify custom download locations for stubdom library packages. See ./configure --help for details. C and Caml are disabled by default. vtpm-stubdom is conditional on the presense of cmake. Rename vtpmmgrdom to vtpmmgr-stubdom Also update .*ignore 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: correct xenstore permissions on console deviceDaniel De Graaf2013-01-171-0/+2
| | | | | | | | | | When the console is connected to a domain other than dom0, the console device's backend field should be set so the xenstore permissions for the console device reflect the domain that will be accessing them. 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>
* xenconsoled: use grant references instead of map_foreign_rangeDaniel De Graaf2013-01-173-10/+42
| | | | | | | | | | | | | | | Grant references for the xenstore and xenconsole shared pages exist, but currently only xenstore uses these references. Change the xenconsole daemon to prefer using the grant reference over map_foreign_range when mapping the shared console ring. This allows xenconsoled to be run in a domain other than dom0 if set up correctly - for libxl, the xenstore path /tool/xenconsoled/domid specifies the domain containing xenconsoled. 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>
* x86/mm: revert 26399:b0e618cb0233 (multiple vram areas)Tim Deegan2013-01-171-14/+6
| | | | | | | | Although this passed my smoke-tests at commit time, I'm now seeing screen corruption on 32-bit WinXP guests. Reverting for now. :( Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
* tools: Update to SeaBIOS 1.7.1Ian Campbell2013-01-171-2/+19
| | | | | | | | | | | | | | Only lightly tested with a Linux HVM guest PXE boot. Accept the defaults for the config options. Many of them are not relevant to Xen but this matches what others (at least the Debian SeaBIOS packages and the binary shipped by Qemu) are doing. The Debian Xen packages are built against Debian's SeaBIOS package so there is value in being similar. 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>
* libxl: don't continue to create the domain if the device model is not spawnedJulien Grall2013-01-171-2/+0
| | | | | | | | | | | When the device model can't be spawned, rc variable is cleared in device_model_spawn_outcome (libxl_dm.c). In this case libxl will continue to create the domain and let it between life and death. Signed-off-by: Julien Grall <julien.grall@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* Fix pygrub handling non-default entryMiroslav Rezanina2013-01-171-1/+1
| | | | | | | | | If we pass 0 as pygrub --entry argument (i.e. we want to boot first item), default value is used instead. This is dueto wrong check for range of allowed values of index - 0 is index of first item. Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com> Acked-by: Matt Wilson <msw@amazon.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* Switch from select() to poll() in xenconsoled's IO loopWei Liu2013-01-171-72/+140
| | | | | | | | | | | | | | | | | | | In Linux select() typically supports up to 1024 file descriptors. This can be a problem when user tries to boot up many guests. Switching to poll() has minimum impact on existing code and has better scalibility. pollfd array is dynamically allocated / reallocated. If the array fails to expand, we just ignore the incoming fd. Updated: reset *_pollfd after use. This fixes regression 14869. Also remove unused slave_pollfd in strcut domain. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* x86/mm: Provide support for multiple frame buffers in HVM guests.Robert Phillips2013-01-171-6/+14
| | | | | | | | | | | | | | | | | | | | | | Support is provided for both shadow and hardware assisted paging (HAP) modes. This code bookkeeps the set of video frame buffers (vram), detects when the guest has modified any of those buffers and, upon request, returns a bitmap of the modified pages. This lets other software components re-paint the portions of the monitor (or monitors) that have changed. Each monitor has a frame buffer of some size at some position in guest physical memory. The set of frame buffers being tracked can change over time as monitors are plugged and unplugged. Signed-off-by: Robert Phillips <robert.phillips@citrix.com> Acked-by: Tim Deegan <tim@xen.org> Removed a stray #include and a few hard tabs. Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
* mergeIan Campbell2013-01-131-136/+73
|\