aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* hvmloader: fix SeaBIOS interfaceJan Beulich2013-09-054-7/+7
| | | | | | | | | | | | | | | The SeaBIOS ROM image may validly exceed 128k in size, it's only our interface code that so far assumed that it wouldn't. Remove that restriction by setting the base address depending on image size. Add a check to HVM loader so that too big images won't result in silent guest failure anymore. Uncomment the intended build-time size check for rombios, moving it into a function so that it would actually compile. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* libvhd: use UTC for VHD timestampWei Liu2013-09-031-24/+9
| | | | | | | | | | | | | | | | | | | | | | | [ported from xapi-project/blktap a79ac2c05f9 ("XOP-289: use UTC for VHD timestamps")] Currently, the local timezone is factored into VHD timestamps due to the use of mktime(). This breaks "vhd-util check" for VHDs created in one timezone and then moved westward, which results in "primary footer invalid: creation time in future" errors. Signed-off-by: Andrei Lifchits <andrei.lifchits@citrix.com> Andrei no longer works for Citrix but Germano Percossi (ex-colleague of Andrei) contacted Andrei and confirmed that 1) this work was written on Citrix time, 2) it is OK to have Andrei's SoB. Remove unused variable "tm". Signed-off-by: Germano Percossi <germano.percossi@citrix.com> Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: prefer qdisk over blktap when choosing disk backendWei Liu2013-09-031-2/+2
| | | | | | | | | There are some disk formats commonly supported by both qdisk and blktap. As qdisk is better supported and blktap is unmaintained, we choose qdisk over blktap whenever possible. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xend: fix file descriptor leak in pci utilitiesXi Xiong2013-09-031-0/+6
| | | | | | | | | | A file descriptor leak was detected after creating multiple domUs with pass-through PCI devices. This patch fixes the issue. Signed-off-by: Xi Xiong <xixiong@amazon.com> Reviewed-by: Matt Wilson <msw@amazon.com> [msw: adjusted commit message] Signed-off-by: Matt Wilson <msw@amazon.com>
* xend: handle extended PCI configuration space when saving stateSteven Noonan2013-09-031-1/+2
| | | | | | | | | | | | | | Newer PCI standards (e.g., PCI-X 2.0 and PCIe) introduce extended configuration space which is larger than 256 bytes. This patch uses stat() to determine the amount of space used to correctly save all of the PCI configuration space. Resets handled by the xen-pciback driver don't have this problem, as that code correctly handles saving extended configuration space. Signed-off-by: Steven Noonan <snoonan@amazon.com> Reviewed-by: Matt Wilson <msw@amazon.com> [msw: adjusted commit message] Signed-off-by: Matt Wilson <msw@amazon.com>
* hvmloader/smbios: Correctly count the number of tables writtenAndrew Cooper2013-08-301-1/+2
| | | | | | | | | | | | Fixes regression indirectly introduced by c/s 4d23036e709627 That changeset added some smbios tables which were option based on the toolstack providing appropriate xenstore keys. The do_struct() macro would unconditionally increment nr_structs, even if a table was not actually written. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* x86: AVX instruction emulation fixesJan Beulich2013-08-281-6/+138
| | | | | | | | | | | | | | | | | | | - we used the C4/C5 (first prefix) byte instead of the apparent ModR/M one as the second prefix byte - early decoding normalized vex.reg, thus corrupting it for the main consumer (copy_REX_VEX()), resulting in #UD on the two-operand instructions we emulate Also add respective test cases to the testing utility plus - fix get_fpu() (the fall-through order was inverted) - add cpu_has_avx2, even if it's currently unused (as in the new test cases I decided to refrain from using AVX2 instructions in order to be able to actually run all the tests on the hardware I have) - slightly tweak cpu_has_avx to more consistently express the outputs we don't care about (sinking them all into the same variable) Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* tools: drop VT-i exampleJan Beulich2013-08-272-181/+0
| | | | | | ... as being another IA64 leftover. Signed-off-by: Jan Beulich <jbeulich@suse.com>
* pygrub: add Debian extlinux.conf pathIan Campbell2013-08-271-0/+1
| | | | | | | | | This is Debian bug #697407. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=697407 Signed-off-by: Ian Campbell <ijc@hellion.org.uk> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: allow user to specify a system qemu-xen binaryIan Campbell2013-08-215-2/+76
| | | | | | | | If this option is given don't bother building qemu-xen ourselves. Likely to be handy for distros who have an existing qemu package which they want to reuse. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: Make qemu-xen-traditional build optional.Ian Campbell2013-08-214-1/+51
| | | | | | | | | | | | | | | | | | | | | | Now that we have upstream qemu people may want to avoid building this extra code. There is a little bit of trickery in stubdom/configure.ac to ensure that the ioemu stubdom is only built if qemu-traditional is enabled. libxl will return an error if a caller tries to build a domain using qemu-xen-traditional when this support was disabled at build time. Since qemu-xen-traditional has been historically tightly bound to the Xen releases I don't see any value in supporting "3rd party" provision of qemu-xen-traditional. We also do not want/need this on ARM therefore default is on for x86 and off otherwise. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> [ ijc -- trivial conflicts in Tools.mk.in and tools/configure.ac. Reran autogen.sh ]
* tools: foreign: add checks for compatible architecturesIan Campbell2013-08-202-2/+24
| | | | | | | | | That is architectures whose struct layout must be identical. Use this for arm32 and arm64. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xen: arm: include public/xen.h in foreign interface checkingIan Campbell2013-08-204-12/+18
| | | | | | | | | | | | | | | | | mkheader.py doesn't cope with struct foo { }; so add a newline. Define unsigned long and long to a non-existent type on ARM so as to catch their use. Teach mkheader.py to cope with structs which are ifdef'd. This cannot cope with #defines between the #ifdef and the struct definitions, so move MAX_GUEST_CMDLINE to be next to its only usage. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xen: only expose start_info on architectures which have a PV boot pathIan Campbell2013-08-201-3/+2
| | | | | | | | | Most of this struct is PV MMU specific and it is not used on ARM at all. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Jan Beulich <JBeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: drop 'sv'Ian Campbell2013-08-2027-1414/+0
| | | | | | | | | | | | I'm not even sure what this thing is. Looks like some sort of Twisted Python based frontend to xend. Whatever it is I am perfectly sure no one can be using it. Apart from drive by build fixes caused by updates elsewhere it has seen no real development since 2005. I suspect it was never even finished/usable. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: disable blktap1 build by defaultIan Campbell2013-08-204-3/+32
| | | | | | | | | | | I don't think there are any dom0's around whose kernels support only blktap1 and not something newer like blktap2 or qdisk. Certainly not that you would want to run Xen 4.4 on. libxl will never use blktap1. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: remove lomountIan Campbell2013-08-206-487/+0
| | | | | | | | | | Build was disabled by default in 2008 (9bb7f7e2aca49). As noted at the time people should be using kpartx these days instead. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Matt Wilson <msw@amazon.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: remove minitermIan Campbell2013-08-206-258/+0
| | | | | | | | | | | It has been disabled by default since 2008 (9bb7f7e2aca4). Back then Ian J asserted it was useful to keep them in the tree in source form. I don't think this is true anymore. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Matt Wilson <msw@amazon.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: delete xsviewIan Campbell2013-08-206-189/+1
| | | | | | | | | | | This was apparently a Qt xenstore viewer. It hasn't been touched since it was first committed in 2007 and I can't beleive anyone is actually using even if it still happens to work. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Matt Wilson <msw@amazon.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: remove in tree libaioIan Campbell2013-08-2089-6355/+11
| | | | | | | | | | | | | | | We have defaulted to using the system libaio for a while now and I din't think there are any relevant distros which don't have it that running Xen 4.4 would be reasonable on. Also it has caused confusion because it is not ever wanted on ARM, but the build system doesn't express that (could be fixed, but deleting is the right thing to do anyway). Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Matt Wilson <msw@amazon.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: make building xend configurable.Ian Campbell2013-08-207-30/+83
| | | | | | | | | | | | | xend has been deprecated for 2 releases now. Lets make it possible to not even build it. For now I'm leaving the default of on but I would like to change that before the 4.4 release. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Matt Wilson <msw@amazon.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: move xm and xend under tools pythonIan Campbell2013-08-204-1/+5
| | | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Matt Wilson <msw@amazon.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: silence HVM domain creation messagesMatthew Daley2013-08-201-2/+2
| | | | | | | | | | | There's no need for xl to output these messages on HVM domain creation to stderr by default. Change their loglevels from XTL_INFO to XTL_DETAIL; then the messages output by xl are the same as those for PV domain creation. These now-silenced messages can still be seen using verbose (-v) mode. Signed-off-by: Matthew Daley <mattjd@gmail.com>
* vif-bridge: fix cut behavior changeBob Proulx2013-08-201-2/+1
| | | | | | | | A recent change in GNU cut disallows use of a newline as a field delimiter. Avoid the problematic use of cut in vif-bridge. Signed-off-by: Bob Proulx <bob@proulx.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* tools: Cull more ia64 and ppc codeAndrew Cooper2013-08-202-99/+0
| | | | | Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
* tools: xen-mceinj: Add missing return value checksBastian Blank2013-08-191-2/+4
| | | | | | | | | | | The return value of vasprintf must be checked. This check is enforced with the compiler options used in Debian by request and in Ubuntu by default. Check the return value and abort on error. Signed-off-by: Bastian Blank <waldi@debian.org> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* rombios/debug: Reduce verbosity of rombiosAndrew Cooper2013-08-081-1/+2
| | | | | | | | Default builds of Qemu have the Bochs debug port logging #ifdef'd out, so remove all the completely wasted VMExits Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* rombios/ata Remove another needless trap from the int 0x13 hotpathAndrew Cooper2013-08-081-19/+13
| | | | | | | | | | | The return value from await_ide() is always ignored, and most calls to await_ide() immediately reread the status register. Therefore, making await_ide() return the last value of the status register removes a further two traps on the int 0x13 path. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* rombios/ata: Reading this status register has no relevant side effectsAndrew Cooper2013-08-081-1/+0
| | | | | | | | So taking two traps when one will do is pointless. This removes 1 of 13 VMExits on the int 0x13 hotpath. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* rombios/ata: Do not wait for BSY to be setAndrew Cooper2013-08-081-2/+2
| | | | | | | | | | | | | | | | | | After issuing a reset, the BSY bit is expected to be set. This is not the case for Qemu. In SeaBIOS.git: 580e33293244fee4556e56ecc67b8bd877f3c496 this check was even replaced with a udelay(5), as enough real hardware ignored the BSY bit as well. As rombios does not have an equivalent udelay(), replace the wait with a write to port 0x80 which is whitelisted by Xen for 'a small delay'. This causes 42k fewer IO traps to Qemu. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* rombios/keyboard: Don't needlessly poll the status registerAndrew Cooper2013-08-081-2/+2
| | | | | | | | Repeated polling of the status register is not going to change its value, so don't needlessly take 8192 traps to Qemu when 1 will do. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* autoconf: regenerate configure scripts with 4.4 versionIan Campbell2013-08-081-9/+9
| | | | | | | No semantic change, reduced noise in future patches. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Add vendor_device parameter for HVM guestsPaul Durrant2013-08-054-0/+36
| | | | | | | | | | | | The parameter determines which, if any, xen-pvdevice is specified on the QEMU command line. The default value is 'none' which means no argument will be passed. A value of 'xenserver' specifies a xen-pvdevice with device-id 0xc000 (the initial value in the xenserver namespace - see docs/misc/pci-device-reservations.txt). Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> [ ijc -- s/BUILD_INFO/BUILDINFO for consistency in LIBXL_HAVE define ]
* libxl: Fix function libxl__domain_resume_device_modelrwxybh2013-08-021-0/+1
| | | | | | | Add a break line in function libxl__domain_resume_device_model Signed-off-by: Bingheng Yan <rwxybh@126.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* flask: use DESTDIR directly in install target rulesVadim A. Misbakh-Soloviov2013-08-021-3/+3
| | | | | | | | | | 30.07.2013 13:51, Ian Campbell wrote: > I think it would be a bit less surprising for drive by patchers etc to > remove the DESTDIR from POLICY_LOADPATH and add it to the install > target, which is the usual way to do things. Up to you/Vadim though. Signed-off-by: Vadim A. Misbakh-Soloviov <mva@mva.name> Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
* tools: build flask-tools and flask policy only if flask enabledVadim A. Misbakh-Soloviov2013-08-021-1/+1
| | | | | Signed-off-by: Vadim A. Misbakh-Soloviov <mva@mva.name> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* flask: avoid installing policy file as '/boot'Vadim A. Misbakh-Soloviov2013-08-021-0/+1
| | | | | Signed-off-by: Vadim A. Misbakh-Soloviov <mva@mva.name> Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
* oxenstored: Protect oxenstored from malicious domains.=John Liu2013-07-225-6/+31
| | | | | | | | | | | | | | | add check logic when read from IO ring, and if error happens, then mark the reading connection as "bad", Unless vm reboot, oxenstored will not handle message from this connection any more. xs_ring_stubs.c: add a more strict check on ring reading connection.ml, domain.ml: add getter and setter for bad flag process.ml: if exception raised when reading from domain's ring, mark this domain as "bad" xenstored.ml: if a domain is marked as "bad", do not handle it. Signed-off-by: John Liu <john.liuqiming@huawei.com> Acked-by: David Scott <dave.scott@eu.citrix.com>
* libxl: Add vif.default.backend to xl.confGeorge Dunlap2013-07-224-0/+15
| | | | | | | | | This will allow a user to default to a network driver domain system-wide. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Roger Pau Monné <roger.pau@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xl: Enable by default claim mode.Konrad Rzeszutek Wilk2013-07-222-2/+2
| | | | | | | | | | During the Xen 4.3 release we discussed that this feature could be turned on by default - as it benefits all of the guests - not just tmem related. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: Allow network driver domains when run_hotplug_scritps is setGeorge Dunlap2013-07-171-7/+0
| | | | | | | | | | | | | | As of commit 05bfd984dfe7014f1f5ea1133608b9bab589c120, hotplug scripts are not run if backend_domid != LIBXL_TOOSTACK_DOMID; so there is no reason to restrict this for network driver domains any more. This is a candidate for backporting to 4.3. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Roger Pau Monné <roger.pau@citrix.com> CC: Ian Campbell <ian.campbell@citrix.com> CC: Ian Jackson <ian.jackson@citrix.com> CC: Jan Beulich <jbeulich@suse.com>
* xl: support for leaving domain paused after saveIan Murray2013-07-172-7/+16
| | | | | | | | | | | | | | New feature to allow xl save to leave a domain paused after its memory has been saved. This is to allow disk snapshots of domU to be taken that exactly correspond to the memory state at save time. Once the snapshot(s) have been taken or whatever, the domain can be unpaused in the usual manner. Usage: xl save -p <domid> <filespec> Signed-off-by: Ian Murray <murrayie@yahoo.co.uk> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* pygrub: allow user to specify an explicit offset to fsKjetil Torgrim Homme2013-07-171-4/+13
| | | | | | | This new option overrides partition table parsing Signed-off-by: Kjetil Torgrim Homme <kjetil.homme@redpill-linpro.com> Reviewed-by: Matt Wilson <msw@amazon.com>
* xl: Add 'xen_version' to `xl info`Andrew Cooper2013-07-121-0/+2
| | | | | | | | | | | | Getting the full Xen version in an easily scriptable way is awkward, especially if trying to piece together from xen_{major,minor,extra}. This reflects $(XEN_FULLVERSION) in the build system (but under a more sensible name, as $(XEN_VERSION) is just the major number). Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Matt Wilson <msw@amazon.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Revert "hvmloader: always include HPET table"Jan Beulich2013-07-081-5/+7
| | | | | | | | | | This reverts commit e4fd0475a08fda414da27c4e57b568f147cfc07e. Conflicts: tools/firmware/hvmloader/acpi/build.c Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir.xen@gmail.com>
* Revert "/home/jbeulich/tmp/commit.txt"Jan Beulich2013-07-081-7/+5
| | | | This reverts commit 80e3eddcc4896ab40c24506fd05f9795c4039b48.
* /home/jbeulich/tmp/commit.txtJan Beulich2013-07-081-5/+7
|
* libxl: do not call exit() in libxl_device_vtpm_listMarek Marczykowski2013-07-041-5/+6
| | | | | | | | Signal error with NULL return value, do not terminate the whole process. Signed-off-by: Marek Marczykowski <marmarek@invisiblethingslab.com> Reviewed-by: Jim Fehlig <jfehlig@suse.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* cpufreq, xenpm: fix cpufreq and xenpm mismatchJacob Shin2013-07-021-11/+3
| | | | | | | | Currently cpufreq and xenpm are out of sync. Fix cpufreq reporting of if turbo mode is enabled or not. Fix xenpm to not decode for tristate, but a boolean. Signed-off-by: Jacob Shin <jacob.shin@amd.com>
* libxl: suppress device assignment to HVM guest when there is no IOMMUIan Jackson2013-07-011-0/+12
| | | | | | | | | | | | | | | | | | | | | | | This in effect copies similar logic from xend: While there's no way to check whether a device is assigned to a particular guest, XEN_DOMCTL_test_assign_device at least allows checking whether an IOMMU is there and whether a device has been assign to _some_ guest. For the time being, this should be enough to cover for the missing error checking/recovery in other parts of libxl's device assignment paths. There remains a (functionality-, but not security-related) race in that the iommu should be set up earlier, but this is too risky a change for this stage of the 4.3 release. This is a security issue, XSA-61. Signed-off-by: Jan Beulich <jbeulich@suse.com> Tested-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>