aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update Xen version to 4.1.0-rc44.1.0-rc4Keir Fraser2011-02-102-2/+3
|
* x86: suppress HPET broadcast initialization in the presence of ARATKeir Fraser2011-02-101-0/+3
| | | | | | | | | | | | This follows Linux commit 39fe05e58c5e448601ce46e6b03900d5bf31c4b0, noticing that all this setup is pointless when ARAT support is there, and knowing that on SLED11's native kernel it has actually caused S3 resume issues. A question would be whether HPET legacy interrupts should be forced off in this case (rather than leaving whatever came from firmware). Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86: tighten conditions under which writing certain MSRs is permittedKeir Fraser2011-02-101-4/+6
| | | | | | | | MSRs that control physical CPU aspects generally are pointless (and possibly dangerous) to be written when the writer isn't sufficiently aware that it's running virtualized. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* ix86: re-do permanent disabling of x2apicKeir Fraser2011-02-102-16/+12
| | | | | | | | Move logic into check_x2apic_preenabled() (to make sure generic_apic_probe() doesn't see genapic already set). Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Keir Fraser <keir@xen.org>
* x86/mm: make log-dirty code do all its allocations outside the lockTim Deegan2011-02-101-29/+66
| | | | | | to avoid taking the shadow/EPT lock with the lgd lock held. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* x86/mm: shuffle log-dirty code so only one path allocates memoryTim Deegan2011-02-101-9/+8
| | | | Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* Cpupools: vcpu affinity handlingJuergen Gross2011-02-101-1/+3
| | | | | | | | | If a vcpu is pinned to multiple physical cpus, the pinning is not removed if all those physical cpus are removed from the cpupool. When disabling the scheduler on a cpu, the affinity mask must be checked against the cpumask of the cpupool. Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
* x86/mm/shadow: fix unlocking on error path in p2m allocatorTim Deegan2011-02-091-1/+2
| | | | | | One unlock path wasn't gated to match the lock. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* x86: reduce magic number usage in XSAVE codeWei Gang2011-02-093-3/+3
| | | | Signed-off-by: Wei Gang <gang.wei@intel.com>
* amd iommu: dynamic page table depth adjustment.Wei Wang2011-02-093-6/+111
| | | | | | | | | IO Page table growth is triggered by amd_iommu_map_page and grows to upper level. I have tested it well for different devices (nic and gfx) and different guests (linux and Win7) with different guest memory sizes (512M, 1G, 4G and above). Signed-off-by: Wei Wang <wei.wang2@amd.com>
* docs: document vbd numbering and namingIan Jackson2011-02-091-0/+126
| | | | Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* cpupool: Fix __cpupool_find_by_id(), clean up accessor functions.Keir Fraser2011-02-091-8/+18
| | | | | | | | | | Firstly, __cpupool_find_by_id() would dereference NULL, at the end of an exact search if the search loop exited with *q==NULL. Fix this. Secondly, provide suitable accessor functions so that no caller needs to use the __-prefixed versions which take a boolean flag. Signed-off-by: Keir Fraser <keir@xen.org>
* cpupool: Strict parameter checking for cpupool operationsKeir Fraser2011-02-091-2/+2
| | | | | | | | Some cpupool actions didn't check the cpupool_id exactly. For some actions this doesn't make any sense, so refuse those actions if the specified cpupool doesn't exist. Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
* [VTD][QUIRK] add spin lock across snb pre/postamble functionsKeir Fraser2011-02-091-0/+12
| | | | | | | | Added a spinlock across snb_vtd_ops_preamble() and snb_vtd_ops_postamble() to make modifications to IGD registers atomic. Continue keeping snb_igd_quirk default off. Signed-off-by: Allen Kay <allen.m.kay@intel.com>
* xend: canonicalise symlinks found in /dev for vbds (helps vscsi)James Harper2011-02-081-0/+2
| | | | | | | | | | | By default, vscsi expects to be passed the final device name (eg /dev/st3) instead of one of the various udev symlinks (eg /dev/tape/by-path/pci-0000:01:08.0-scsi-0:0:2:0-st). The following patch resolves the path to the real path if the name starts with /dev/ Signed-off-by: James Harper <james.harper@bendigoit.com.au> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: initialise some variables in print_bitmap, to suppress bogus warningKamala Narasimhan2011-02-071-2/+2
| | | | | | | | | | | | GCC 4.2.4 cannot figure out that three variables aren't used before initialisation: xl_cmdimpl.c: In function `print_domain_vcpuinfo': xl_cmdimpl.c:3351: warning: `firstset' may be used uninitialized in this function [etc] Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com> Acked-by: Andre Przywara <andre.przywara@amd.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/hotplug: set mtu from bridge also on vif interfaceOlaf Hering2011-02-071-0/+5
| | | | | | | | | | | | Apply mtu size from bridge interface also in vif interface. This depends on a kernel change which allows arbitrary mtu sizes until the frontend driver has connected to the backend driver. Without this kernel change, the vif mtu size will be limited to 1500 even with this change to the vif-bridge script. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <Ian.Campbell@eu.citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* cpupool: Correct cpupool diag printingKeir Fraser2011-02-071-4/+5
| | | | | | | | Some of the cpupool_dprintk() calls are using undefined or uninitialized variables. Correct the argument lists to be able to define cpupool_printk as printk. Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
* minios: do not export {test,set,clear}_bit etc to applicationsIan Campbell2011-02-071-1/+2
| | | | | | | | | | | | | | | Fixes ioemu stubdom build: CC i386-stubdom/piix4acpi.o [...]/stubdom/ioemu/hw/piix4acpi.c:272: error: expected ')' before '?' token [...]/stubdom/ioemu/hw/piix4acpi.c:277: error: conflicting types for 'set_bit' [...]/stubdom/../extras/mini-os/include/x86/mini-os/os.h:396: error: previous definition of 'set_bit' was here [...]/stubdom/ioemu/hw/piix4acpi.c:282: error: conflicting types for 'clear_bit' [...]/stubdom/../extras/mini-os/include/x86/mini-os/os.h:414: error: previous definition of 'clear_bit' was here [...]/stubdom/ioemu/hw/piix4acpi.c: In function 'gpe_sts_write': 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>
* Pack some hvmop memory structures betterKeir Fraser2011-02-071-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | Some of the hvmop memory structures have a shocking amount of unnecesssary padding in them. Elements which can have only 3 values are given 64 bits of memory, and then aligned (so that there is padding behind them). This patch resizes and reorganizes in the following way, (hopefully) without introducing any differences between the layout for 32- and 64-bit. xen_hvm_set_mem_type: hvmmem_type -> 16 bits nr -> 32 bits (limiting us to setting 16TB at a time) xen_hvm_set_mem_access: hvmmem_access -> 16 bits nr -> 32 bits xen_hvm_get_mem_access: hvmmem_access -> 16 bits Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
* hvm_op: Clean up hvm_op() target domain lockign using ↵Keir Fraser2011-02-071-45/+17
| | | | | | rcu_lock_remote_target_domain_by_id(). Signed-off-by: Keir Fraser <keir@xen.org>
* Introduce rcu_lock_remote_target_domain_by_id().Keir Fraser2011-02-072-0/+21
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* x86/hvm: don't let domains call HVMOP_set_mem_type on themselves.Tim Deegan2011-02-071-0/+4
| | | | Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* hvm: fix XSAVE leaf 0 EBX size calculationKeir Fraser2011-02-061-3/+5
| | | | | | | | | | | | Fixes a size calculation bug when enabled bits in XFEATURE_MASK (xcr0) aren't contiguous. Current for_loop will stop when xcr0 feature bit is 0. But in reality, the bits can be non-contiguous. One example is that LWP is bit 62 on AMD platform. This patch iterates through all bits to calculate the size for enabled features. Signed-off-by: Wei Huang <wei.huang2@amd.com>
* trace: Change trace_var argument to void*, to match __trace_varKeir Fraser2011-02-061-1/+1
| | | | Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
* hvm_op: Clean up new mem_access and inject_trap ops.Keir Fraser2011-02-062-11/+19
| | | | | | | | | | Firstly, they are only for use from privileged entities, so mark them as usable only by code defining __XEN_TOOLS__. Secondly, the check for must-not-operate-on-myself can be done more cleanly. Signed-off-by: Keir Fraser <keir@xen.org>
* xsm/flask: Fix permission tablesKeir Fraser2011-02-062-0/+4
| | | | | | | | | | | | | | | | | | At some point, it seems that someone manually added Flask permission definitions to one header file without updating the corresponding policy configuration or the other related table. The end result is that we can get uninterpretable AVC messages like this: # xl dmesg | grep avc (XEN) avc: denied { 0x4000000 } for domid=0 scontext=system_u:system_r:dom0_t tcontext=system_u:system_r:domU_t tclass=domain Fix this by updating the flask config and regenerating the headers from it. In the future, this can be further improved by integrating the automatic generation of the headers into the build process as is presently done in SELinux. Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* xsm: Fix compilation error (unused variable)Keir Fraser2011-02-061-1/+1
| | | | Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* hvm amd: Fix 32bit guest VM save/restore issues associated with SYSENTER MSRsKeir Fraser2011-02-061-15/+27
| | | | | | | | | | This patch turn-on SYSENTER MSRs interception for 32bit guest VMs on AMD CPUs. With it, hvm_svm.guest_sysenter_xx fields always contain the canonical version of SYSENTER MSRs and are used in guest save/restore. The data fields in VMCB save area are updated as necessary. Reported-by: James Harper <james.harper@bendigoit.com.au> Signed-off-by: Wei Huang <wei.huang2@amd.com>
* amd iommu: Fix a xen crash after pci-attachKeir Fraser2011-02-061-0/+5
| | | | | | | | pci-detach triggers IO page table deallocation if the last passthru device has been removed from pdev list, and this will result a BUG on amd systems for next pci-attach. This patch fixes this issue. Signed-off-by: Wei Wang <wei.wang2@amd.com>
* cpupool: Check for memory allocation failure on switching schedulersKeir Fraser2011-02-063-5/+31
| | | | | | | | When switching schedulers on a physical cpu due to a cpupool operation check for a potential memory allocation failure and stop the operation gracefully. Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
* libxl: vncviewer: make autopass work properlyIan Jackson2011-02-041-8/+21
| | | | | | | | | | | | | | | | The file we write the vnc password to must be rewound back to the beginning, or the vnc viewer will simply get EOF. When the syscalls for communicating the password to the vnc client fail, bomb out with an error messsage rather than blundering on (and probably producing a spurious password prompt). Following this patch, xl vncviewer --autopass works, provided the qemu patch for writing the password to xenstore has also been applied. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: vncviewer: unconditionally read listen port address and passwordIan Jackson2011-02-041-11/+7
| | | | | | | | | | | The /local/domain/DOMID/device/vfb/0/backend path is irrelevant. libxl does not create it, so the branch would never be taken. Instead, simply read the target paths of interest. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: vncviewer: fix use-after-freeIan Jackson2011-02-041-2/+1
| | | | | | | | This bug can prevent xl vncviewer from working at all. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: actually print an error when execve (in libxl__exec) failsIan Jackson2011-02-041-0/+2
| | | | | | | | The header comment says libxl__exec logs errors. So it should do so. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: SECURITY: always honour request for vnc passwordIan Jackson2011-02-041-9/+16
| | | | | | | | | | | | | | | | | qemu only sets a password on its vnc display if the value for the -vnc option has the ",password" modifier. The code for constructing qemu-dm options was broken and only added this modifier for one of the cases. Unfortunately there does not appear to be any code for passing the vnc password to upstream qemu (ie, in the case where libxl_build_device_model_args_new is called). To avoid accidentally running the domain without a password, check for this situation and fail an assertion. This will have to be revisited after 4.1. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* QEMU_TAG updateIan Jackson2011-02-041-4/+3
|
* libxl: fix console autoconnect with pygrub, by invoking xenconsole twiceStefano Stabellini2011-02-041-1/+1
| | | | | | | | | | When using pygrub we have to connect to the console twice: once at the beginning to connect to pygrub and a second time after creating the pv console to connect to the guest's console. Signed-off-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>
* Update list of VT-D maintainers.Stefano Stabellini2011-02-041-1/+0
|
* xl: fix broken xl vcpu-list output (tool hangs on large machines)Andre Przywara2011-02-041-44/+52
| | | | | | | | | | | | | | | | | The algorithm for printing the CPU affinity in a condensed way looks for a set bit in a zero-byte: for (i = 0; !(pcpumap & 1); ++i, pcpumap >>= 1) Looking at the code I found that it is entirely broken if more than 8 CPUs are used. Beside that endless loop issue the output is totally bogus except for the "any CPU" case, which is handled explicitly earlier. I tried to fix it, but the whole approach does not work if the outer loops actually iterates (executing more than once). This fix reimplements the whole algorithm in a clean (though not much optimized way). It survived some unit-testing. Signed-off-by: Andre Przywara <andre.przywara@amd.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: pass gfx_passthru parameter to QEMUAllen Kay2011-02-021-0/+6
| | | | | | | | | Pass gfx_passthru parameter to QEMU. Keep it boolean for now as QEMU does not expect any other integer value. Signed-off-by: Allen Kay <allen.m.kay@intel.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: change default HVM emulated network card to rtl8139Ian Jackson2011-02-021-1/+1
| | | | | | | | | | | | | | xend uses rtl8139, and we want xl to be compatible with xm. Some older operating systems don't have e1000 drivers, and we want widest compatibility rather than best performance (people who want good performance are best advised to use PV-on-HVM drivers). We'll probably switch to a new default when switching to upstream qemu, in the Xen 4.2 release cycle. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xen/Makefile: Belatedly update XEN_EXTRAVERSION for rc3 releaseIan Jackson2011-02-021-1/+1
| | | | | | In rc3, XEN_EXTRAVERSION should mention rc4-pre. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: maintain a small, per-handle, cache of hypercall buffer memoryIan Campbell2011-02-013-19/+162
| | | | | | | | | | | | | | | | | | | | | | | | | Constantly m(un)locking memory can have significant overhead on systems with large numbers of CPUs. This was previously fixed by 20841:fbe8f32fa257 but this was dropped during the transition to hypercall buffers. Introduce a small cache of single page hypercall buffer allocations which can be resused to avoid this overhead. Add some statistics tracking to the hypercall buffer allocations. The cache size of 4 was chosen based on these statistics since they indicated that 2 pages was sufficient to satisfy all concurrent single page hypercall buffer allocations seen during "xl create", "xl shutdown" and "xl destroy" of both a PV and HVM guest therefore 4 pages should cover the majority of important cases. This fixes http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1719. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reported-by: Zheng, Shaohui <shaohui.zheng@intel.com> Tested-by: Haitao Shan <maillists.shan@gmail.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* The current libxl_set_memory_target function subtracts a negative amountStefano Stabellini2011-02-011-3/+6
| | | | | | | | | | | | | from an uint32_t variable without checking if the operation wraps around. This patch fixes this bug (that I previously believed to be an hypervisor issue): http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1729 Signed-off-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>
* tools: disable linker --as-needed option.Ian Campbell2011-02-011-0/+3
| | | | | | | | | | | | | | | | The Xen build system is not currently compatible with the --as-needed linker option. The proper fix for this is turning out to be rather invasive to the build system so simply disable for now with the intention of revisiting for the 4.2 release. The --no-as-needed option is available at least since binutils 2.15 (released in May 2004) and hence I think can be unconditionally relied on. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reported-by: Nathan March <nathan@gt.net> Tested-by: Nathan March <nathan@gt.net> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/Makefiles: install libvhd and libblktap with INSTALL_PROGMichael Young2011-02-012-2/+2
| | | | | | | | | | | Shared libraries should be executable. (rpm (4.9.0) doesn't automatically supply a "provides" entry for a library unless it is executable. Non-executable libraries can cause other trouble too.) Signed-off-by: Michael Young <m.a.young@durham.ac.uk> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* docs: Bring comments about NetworkManager and bridging up to dateMichael Young2011-02-011-2/+3
| | | | | | | | | Update a comment about NetworkManager not supporting bridging in Fedora 11 to refer instead to Fedora 14. Clarify the wording. Signed-off-by: Michael Young <m.a.young@durham.ac.uk> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/hotplug: Fix proxy arp messing about to use correct deviceMichael Young2011-02-011-1/+1
| | | | | | | | | | | | | | | | | Fix an anomaly in /etc/xen/scripts/network-route. Currently this script contains netdev=${netdev:-eth${vifnum}} ie. netdev is set to eth${vifnum} by default. Unfortunately vifnum is not set anywhere in the xen code so the default is actually the broken "eth". And anyway the vif number (which is what vifnum ought to be) is not relevant. The patch changes the default to eth0 (which is what the comment at the top of the file says it should be). Signed-off-by: Michael Young <m.a.young@durham.ac.uk> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* passthrough/vtd: disable 64-bit MMCFG quirk on 32-bit XenAllen Kay2011-02-011-0/+2
| | | | | | | | Attached patch disables pci_vtd_quirk for 32-bit Xen since 32-bit xen does not support MMCFG access. Signed-off-by: Allen Kay <allen.m.kay@intel.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>