aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* Download external tarballs from xenbits.xensource.comKeir Fraser2009-01-052-2/+4
| | | | | | | | | | | | | | I have copied the tarballs that the xen-unstable build downloads to xenbits.xensource.com (which also hosts our hg and git). This patch changes the download URLs to use that location. That way the build will depend on only one external machine, under one administration, rather than many. Also it means that the build won't break if these sites become permanently unavailable or are rearranged and we don't run a risk of having to panic and beg if a file should go missing. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* vtd hotplug: check if a device can be hot-plugged.Keir Fraser2009-01-053-11/+97
| | | | | | | | | | | | | | | When we statically assign a pci device (the pci=3D['xx:xx.x'] string in guest config file) to guest, we make many checkings (for instance, if the device is specified in 'pciback.hide', if it has non-page-aligned MMIO BARs, if it has a proper FLR capability, if the related devices should be co-assigned). However, with respect to the guest hotplug, we only check if the device exists and not assigned yet -- this is not enough, for instance, now xend allows us to assign an in-use device (being used by Dom0) to an HVM guest (because xc.test_assigned() returns OK) -- this will cause disaster... The patch adds some necessary checkings. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* xenctx: compat-mode/HVM supportKeir Fraser2009-01-051-105/+185
| | | | | | | | Add support to xenctx for guests that have a different word size to the tools (x86 only, but shouldn't break ia64). Again, only 32-bit HVM guests are supported until EFER.LMA is easier to get at. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* Make xc_translate_foreign_address aware of compat-mode guests andKeir Fraser2009-01-052-162/+77
| | | | | | | (32-bit) HVM guests. 64-bit HVM guests are still not supported for now, pending a sensible way of getting at the guest's EFER.LMA. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* PoD memory 9/9: xend integrationKeir Fraser2009-01-053-9/+45
| | | | | | | | | | | | | | | Xend integration for PoD functionality. * Add python bindings for xc_hvm_domain_build() and xc_domain_memory_set_pod_target() * Always call xc_hvm_domain_build(), with memsize = memory_static_max and target=memory_dynamic_max * When setting a new memory target: + First make sure we actually have enough free memory for the target setting to succeed + Call set_pod_target() with the new target, to Xen can do the Right Thing. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
* PoD memory 8/9: libxc interfaceKeir Fraser2009-01-055-5/+158
| | | | | | | | | | | | | Implement libxc interface to PoD functionality: * Add xc_hvm_build_target_mem(), which takes both memsize and target. Memsize is the total memory, allocated in PoD pages and reported in the e820; target is the size of the cache. If these are the same, the normal funcitonality is called. (So you can use the same function to build always, and it will decide whether to use PoD or not.) * Add xc_domain_memory_[gs]et_pod_target(), which sets and/or returns information about the PoD cache and p2m entries. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
* acpi: Reserve IO ports used by hotplugKeir Fraser2008-12-292-495/+514
| | | | | | | | | In DSDT, reserve the IO port ranges: [0x10c0, 0x10c2] and [0xb044, 0xb047] that are used by the virtual PCI hotplug. Or else, for a hotplugged-in device, the port IO BAR assigned by guest OS may conflict with the ranges here. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* rombios: disable DEBUG_ROMBIOS by default.Keir Fraser2008-12-291-1/+1
| | | | Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
* rombios: pass BDF correctly during option ROM scanKeir Fraser2008-12-291-2/+0
| | | | | Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com> Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* rombios: enabling option ROM write access during initialisation.Keir Fraser2008-12-291-1/+4
| | | | Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
* CPUIDLE: adjust cstate statistic interfaceKeir Fraser2008-12-191-1/+1
| | | | | | | | 1. change unit of residency, PM ticks -> ns. 2. output C0 usage & residency. Signed-off-by: Wei Gang <gang.wei@intel.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xend: Actually restrict a domU's access to xenstore when we mean to --Keir Fraser2008-12-181-1/+16
| | | | | | | | | | | this means that in some cases it cannot be owner of its own xenstore nodes. This bug was pointed out by Daniel Berrange at Red Hat. This patch is my own more generic fix that automatically covers a range of callers (albeit the patch is arguably a bit of a hack ;-). Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* rombios: Update to Bochs latestKeir Fraser2008-12-182-1484/+2109
| | | | Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
* xenpm: add cpu frequency control interface, through which user canKeir Fraser2008-12-161-142/+534
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tune the parameters manually. Now, xenpm can be invoked with the following options: Usage: xenpm get-cpuidle-states [cpuid]: list cpu idle information on CPU cpuid or all CPUs. xenpm get-cpufreq-states [cpuid]: list cpu frequency information on CPU cpuid or all CPUs. xenpm get-cpufreq-para [cpuid]: list cpu frequency information on CPU cpuid or all CPUs. xenpm set-scaling-maxfreq <cpuid> <HZ>: set max cpu frequency <HZ> on CPU <cpuid>. xenpm set-scaling-minfreq <cpuid> <HZ>: set min cpu frequency <HZ> on CPU <cpuid>. xenpm set-scaling-governor <cpuid> <name>: set scaling governor on CPU <cpuid>. xenpm set-scaling-speed <cpuid> <num>: set scaling speed on CPU <cpuid>. xenpm set-sampling-rate <cpuid> <num>: set sampling rate on CPU <cpuid>. xenpm set-up-threshold <cpuid> <num>: set up threshold on CPU <cpuid>. To ease the use of this tool, the shortcut option is supported, i.e. `xenpm get-cpui' is equal to `xenpm get-cpuidle-states'. Signed-off-by: Guanqun Lu <guanqun.lu@intel.com>
* x86: Update xen-detect utility to scan for Xen signature in CPUID space.Keir Fraser2008-12-161-8/+16
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: Enable MTF for HVM guest single step in gdbKeir Fraser2008-12-163-12/+49
| | | | | Signed-off-by: Edwin Zhai <edwin.zhai@intel.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* rombios: fix references to EBDAKeir Fraser2008-12-151-26/+35
| | | | | | | | Extended Bios Data Area (EBDA) can be relocated by the initialization of PCI option ROM. The IPL boot table is also. EBDA must be accessed via 0x40E after the initialization. Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* xenpmd: Fix bogus fgets() size parameter.Keir Fraser2008-12-131-5/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xc_pm: Fix off-by-one error in string array access.Keir Fraser2008-12-131-1/+1
| | | | Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* xentop: Fix fprintf() build failure.Keir Fraser2008-12-111-1/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* hvmloader: enable bus mastering of PCI deviceKeir Fraser2008-12-111-0/+5
| | | | | | Without this, init routine in some PCI option ROM doesn't work well. Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* rombios: fix rom_scan (ja->jmp)Keir Fraser2008-12-111-1/+1
| | | | | Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com> Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* libxc: Fix xc_pm.c build by avoiding bogus header includes.Keir Fraser2008-12-112-5/+6
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* gdbserver: Fix build failure.Keir Fraser2008-12-101-1/+1
| | | | | From: Edwin Zhai <edwin.zhai@intel.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Add user PM control interfaceKeir Fraser2008-12-102-0/+182
| | | | Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
* libxc: Fix memory leak in zlib usageKeir Fraser2008-12-102-0/+2
| | | | | | | Any call to inflate() must be followed by inflateEnd(), otherwise the internal zlib state is leaked. Signed-off-by: Kevin Wolf <kwolf@suse.de>
* Use virtual 8086 mode for VMX guests with CR0.PE == 0Keir Fraser2008-12-093-5/+52
| | | | | | | | | | | | | When a VMX guest tries to enter real mode, put it in virtual 8086 mode instead, if that's possible. Handle all errors and corner cases by falling back to the real-mode emulator. This is similar to the old VMXASSIST system except it uses Xen's x86_emulate emulator instead of having a partial emulator in the guest firmware. It more than doubles the speed of real-mode operation on VMX. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* tools: Fix a few error-path memory leaks.Keir Fraser2008-12-093-4/+10
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xend: Remember bootable flag for vbds in xenstoreKeir Fraser2008-12-092-7/+14
| | | | | | | | | | | | When xend is restarted, bootable flags of all disk devices are lost and then the first disk is marked as bootable by a "compatibility hack". When a guest domain is created with a mixture of several vbd and tap devices, the compatibility hack may fail to choose the right bootable device. Thus preventing the guest to be restarted. This patch fixes this behavior by remembering bootable flag for each disk device in xenstore database. Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* xend: Fix memory allocation bug after hvm reboot in numa systemKeir Fraser2008-12-093-5/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recently we find a bug on Nahelem machine (totally with two nodes, 6G memory (3G in each node): - Start a HVM guest with its all VCPUS pinned to node1, so all its memory is allocated from node1. - Reboot the HVM. - There will be some memory allocated from node0 even there is enough free memory on node1. Reason: For security issues, xen will not put all the pages of a dying hvm to domheap directly, but put them in scrub list and wait for handled by page_scrub_softirq(). If the dying hvm have a lot of memory, page_scrub_softirq() will not handle all of them before the start the hvm. There are some pages belong to node1 still in scrub list, new hvm can't use pages in it. So this hvm will get different memory distribution than before. Before changeset 18304, page_scrub_softirq() can be excuted parallel between all the cpus. Changeset 18305 serialise page_scrub_softirq() and Changeset 18307 serialise page_scrub_softirq() with a new lock to avoid holding up acquiring page_scrub_lock in free_domheap_pages(). Those changeset slow the ability to handle pages in scrub list. So the bug becomes more obvious after. Patch: This patch modifiers balloon.free to avoid this bug. After patch, balloon.free will check whether current machine is a numa system and the new created hvm has all its vcpus in the same node. If all the conditions above fit, we will wait until all the pages in scrub list are freed (if waiting time go beyond 20s, we will stop waiting it.). This seems to be too restricted at the first glance. We used to only wait for the free memory size of pinned node is bigger than required. But as we know HVM memory alloction granularity is 2M. Even the former condition is satisfied, we still may not find enough 2M-size memory on that node. Signed-off-by: Ting Zhou <ting.g.zhou@intel.com> Signed-off-by: Xiaowei Yang <Xiaowei.yang@intel.com>
* libxc: Fix gcc 4.3 build failureKeir Fraser2008-12-091-2/+4
| | | | Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* rombios: support BCVKeir Fraser2008-12-091-0/+24
| | | | | Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com> Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* Fix domain save when guest is in S3.Keir Fraser2008-12-052-9/+4
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xm: Fix xm block-list for inactive managed domainsKeir Fraser2008-12-041-1/+12
| | | | Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* xend: Remember bootloader settings in xenstoreKeir Fraser2008-12-041-0/+4
| | | | | | | | When xend is restarted, bootloader settings of all running domains are lost. The attached patches fixes this by saving bootloader and bootloader_args to xenstore database. Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* xentop: Fix xentop for blktapKeir Fraser2008-12-031-19/+6
| | | | | | | | | | | | | | | | | | | | | | | | Blktap devices information isn't shown by xentop currently. xen-unstable c/s 17813 said "blktap devices have statistics counters (e.g., rd_req, wr_req, oo_req) prepended by tap_". In fact, it is as follows. # ls -l /sys/devices/xen-backend/tap-1-769/statistics/ total 0 -r--r--r-- 1 root root 4096 Dec 3 20:37 oo_req -r--r--r-- 1 root root 4096 Dec 3 20:37 rd_req -r--r--r-- 1 root root 4096 Dec 3 20:37 rd_sect -r--r--r-- 1 root root 4096 Dec 3 20:37 wr_req -r--r--r-- 1 root root 4096 Dec 3 20:37 wr_sect The statistics counters haven't had "tap_" because it was removed by linux-2.6.18-xen c/s 34. This patch reverts xen-unstable c/s 17813, then we can get the blktap devices information by using xentop. Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* Do not request domain shutdown if in S3 state during domain save.Keir Fraser2008-12-031-10/+26
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xenpmd: Adjust strncat() length to avoid static buffer overflow.Keir Fraser2008-12-021-1/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xend: Fix device release for tap devicesKeir Fraser2008-11-281-2/+10
| | | | | | | | | I saw an error message when I shut down a domain. The error message showed that release of device(vbd/51712) failed. But the device was tap, was not vbd. I think that a cause of the error message is because _releaseDevices() calls destroyDevice() by wrong device class. Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* xm: Relax the sanity check on guest configuration with XSM-ACM addlabelKeir Fraser2008-11-281-2/+3
| | | | | | | | | The attached patch relaxes the sanity check on guest configuration when assigning a acm label to the guest. This patch makes a guest configuration accept a bootloader parameter. This is common for paravirtualized guests to boot them by using pygrub. Signed-off-by: INAKOSHI Hiroya <inakoshi.hiroya@jp.fujitsu.com>
* hvmloader: Pass BDF to PCI option ROMs.Keir Fraser2008-11-242-16/+33
| | | | | Signed-off-by: Shan Haitao <Haitao.shan@intel.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* hvmloader: Load physical PCI option ROMs where available.Keir Fraser2008-11-241-54/+135
| | | | | Signed-off-by: Shan Haitao <Haitao.shan@intel.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* hvmloader: Relocate the etherboot ROM to be near the end of VGAKeir Fraser2008-11-242-5/+7
| | | | | | | | | BIOS. Current Xen hard coded VGA ROM at 0xC0000 and etherboot ROM at 0xD0000. This makes the space in [0xC0000 - 0xDFFFF] to be fragments, which makes it hard to find enough space to hold another Option ROM. Signed-off-by: Shan Haitao <haitao.shan@intel.com>
* PCI interface changes for PCIE-AER enablingKeir Fraser2008-11-241-1/+34
| | | | | | | | | This patch reflects some pci interface changes in pciif.h in XEN head file. And also add domain shutdown support in xend for shutting domain from DOM0 kernel when non-recoverable uncorrected pci error happens. Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com> Signed-off-by: Ke Liping <liping.ke@intel.com>
* xend: Make _setCPUAffinity() errors nonfatal on domain resumeKeir Fraser2008-11-201-1/+8
| | | | | | | | | This patch allows domains to be resumed on different number of CPUs. After c/s 18764, a domain cannot be resumed when _setCPUAffinity() fails, which happens when affinity should be set to a non-existent CPU. This patch makes _setCPUAffinity() errors nonfatal. Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* xenapi: fix valid_object typoKeir Fraser2008-11-201-1/+1
| | | | Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
* x86: support CPUID hypervisor feature bitKeir Fraser2008-11-192-0/+4
| | | | | Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* tools: use sysfs interface to balloon driver if presentKeir Fraser2008-11-171-2/+27
| | | | | | | The pvops dom0 kernel does not expose the balloon driver via /proc/xen, so use the sysfs interface. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
* Fix to save CPU affinity for xm save/restoreKeir Fraser2008-11-141-2/+0
| | | | Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* xm: display domain id on domain creationKeir Fraser2008-11-131-2/+3
| | | | Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>