aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* unmodified_drivers: enable unplug per defaultOlaf Hering2013-09-201-1/+7
| | | | | | | | | | | | | Since xen-3.3 an official unplug protocol for emulated hardware is available in the toolstack. The pvops kernel does the unplug per default, so it is safe to do it also in the drivers for forward ported xenlinux. Currently its required to load xen-platform-pci with the module parameter dev_unplug=all, which is cumbersome. Also recognize the dev_unplug=never parameter, which provides the default before this patch. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* gnttab: remove unused shared header lookupMatthew Daley2013-09-201-1/+0
| | | | | | | | Coverity-ID: 1056171 Signed-off-by: Matthew Daley <mattjd@gmail.com> Reviewed-by: Tim Deegan <tim@xen.org> Reviewed-by: Jan Beulich <jbeulich@suse.com>
* sched_credit: filter node-affinity mask against online cpusDario Faggioli2013-09-201-11/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in _csched_cpu_pick(), as not doing so may result in the domain's node-affinity mask (as retrieved by csched_balance_cpumask() ) and online mask (as retrieved by cpupool_scheduler_cpumask() ) having an empty intersection. Therefore, when attempting a node-affinity load balancing step and running this: ... /* Pick an online CPU from the proper affinity mask */ csched_balance_cpumask(vc, balance_step, &cpus); cpumask_and(&cpus, &cpus, online); ... we end up with an empty cpumask (in cpus). At this point, in the following code: .... /* If present, prefer vc's current processor */ cpu = cpumask_test_cpu(vc->processor, &cpus) ? vc->processor : cpumask_cycle(vc->processor, &cpus); .... an ASSERT (from inside cpumask_cycle() ) triggers like this: (XEN) Xen call trace: (XEN) [<ffff82d08011b124>] _csched_cpu_pick+0x1d2/0x652 (XEN) [<ffff82d08011b5b2>] csched_cpu_pick+0xe/0x10 (XEN) [<ffff82d0801232de>] vcpu_migrate+0x167/0x31e (XEN) [<ffff82d0801238cc>] cpu_disable_scheduler+0x1c8/0x287 (XEN) [<ffff82d080101b3f>] cpupool_unassign_cpu_helper+0x20/0xb4 (XEN) [<ffff82d08010544f>] continue_hypercall_tasklet_handler+0x4a/0xb1 (XEN) [<ffff82d080127793>] do_tasklet_work+0x78/0xab (XEN) [<ffff82d080127a70>] do_tasklet+0x5f/0x8b (XEN) [<ffff82d080158985>] idle_loop+0x57/0x5e (XEN) (XEN) (XEN) **************************************** (XEN) Panic on CPU 1: (XEN) Assertion 'cpu < nr_cpu_ids' failed at /home/dario/Sources/xen/xen/xen.git/xen/include/xe:16481 It is for example sufficient to have a domain with node-affinity to NUMA node 1 running, and issueing a `xl cpupool-numa-split' would make the above happen. That is because, by default, all the existing domains remain assigned to the first cpupool, and it now (after the cpupool-numa-split) only includes NUMA node 0. This change prevents that by generalizing the function used for figuring out whether a node-affinity load balancing step is legit or not. This way we can, in _csched_cpu_pick(), figure out early enough that the mask would end up empty, skip the step all together and avoid the splat. Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com> Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com>
* x86_emulate: fold wide readsJan Beulich2013-09-201-13/+5
| | | | | | | | | | | | | With HVM's MMIO operand handling now being capable of splitting large reads, there's no need to issue at most machine word size reads when we really need wider operands. Not that this is not done everywhere - there are a couple of cases where keeping the reads separate is more natural (and folding them would complicate the code rather than simplifying it). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86_emulate: fix flag setting for 8-bit signed multiplicationJan Beulich2013-09-202-39/+19
| | | | | | | | | | | | | | | We really need to check for a signed overflow of 8 bits, while the previous check compared the sign-extended 8-bit result with the zero-extended 16-bit one (which was wrong for all negative results). Once at it - also adjust the 16-bit comparison for symmetry - improve the 8-bit multiplication (no need to zero-extend to 32-bits the sign-extended to 16 bits original 8-bit value) - fold both signed multiplication variants Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86_emulate: PUSH <mem> must read source operand just onceJan Beulich2013-09-201-46/+48
| | | | | | | | | | | ... for the case of accessing MMIO. Rather than doing the early operand type adjustment for just for that case, do it for all of the 0xF6, 0xF7, and 0xFF groups (allowing some other code to be dropped instead). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86_emulate: MOVSXD must read source operand just onceJan Beulich2013-09-202-14/+83
| | | | | | | | | | | | ... for the case of accessing MMIO. Also streamline the ARPL emulation a little, and add tests for both instructions (the MOVSXD one requires a few other adjustments, as we now need to run in a mode where the emulator's mode_64bit() returns true). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86: fix dependencies of emulator testJan Beulich2013-09-201-6/+5
| | | | | | | | | | | | Rather than mentioning the (linked) directory, mention the files thus making sure things get rebuild as needed when the core emulator files change. Also enable debug info generation unconditionally, as this is testing stuff only anyway. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86/HVM: properly handle MMIO reads and writes wider than a machine wordJan Beulich2013-09-201-20/+95
| | | | | | | | | Just like real hardware we ought to split such accesses transparently to the caller. With little extra effort we can at once even handle page crossing accesses correctly. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* tools: print xm deprecation warning to stderrIan Campbell2013-09-191-2/+2
| | | | | | To avoid confusing anything which is parsing the output. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* x86: mark BUG()s and assertion failures as terminal.Tim Deegan2013-09-192-3/+14
| | | | | | | | | This helps avoid static analysis false-positives, and might lead to better code density as the compiler knows it doesn't have to restore spilled state &c. Signed-off-by: Tim Deegan <tim@xen.org> Acked-by: Keir Fraser <keir@xen.org>
* VMX: fix failure path in construct_vmcsGeorge Dunlap2013-09-181-0/+3
| | | | | | | | | If the allocation fails, make sure to call vmx_vmcs_exit(). This is a candidate for backport. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
* x86/HVM: fix failure path in hvm_vcpu_initialiseGeorge Dunlap2013-09-181-1/+1
| | | | | | | | | | | | | | It looks like one of the failure cases in hvm_vcpu_initialise jumps to the wrong label; this could lead to slow leaks if something isn't cleaned up properly. I will probably change these labels in a future patch, but I figured it was better to have this fix separately. This is also a candidate for backport. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
* tools: disable xend build by defaultIan Campbell2013-09-174-4/+57
| | | | | | | | | | Add big warnings to configure, xend initscript and xm. The big xm warning is displayed once (per boot, or per tmpreaper clean), afterwards a single line warning is displayed. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* docs: fix documentation index for hypercallsIan Campbell2013-09-173-18/+32
| | | | | | | | | | | | | | | This was broken by 118104e5eaf2 "docs: Build docs for ARM as well as x86_64". Move docs to hypercall/ARCH instead of hypercall-ARCH. Support mulitple levels of subdirectories in gen-html-index tool. This removes the need for a symlink hypercall->hypercall-x86_64 since there is now a proper index at hypercall/index.html. Update INDEX to human readable names for the architecture specific hypercalls. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* passthrough/amd: Shuffle declaration.Tim Deegan2013-09-171-1/+1
| | | | | | | | | | | Coverity's parser chokes on seeing __section() before the type. Coverity CID 1087190 Signed-off-by: Tim Deegan <tim@xen.org> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com> Acked-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
* passthrough/amd: Missing 'break'Tim Deegan2013-09-171-0/+1
| | | | | | | | Coverity CID 1055502 Signed-off-by: Tim Deegan <tim@xen.org> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
* passthrough/amd: Drop unnecessary lock lookup.Tim Deegan2013-09-171-1/+0
| | | | | | | | | | | | The lock's not used for anything, and AFAICT no locking is needed since the IVRS tables are static after boot. Coverity CID 1087199 Signed-off-by: Tim Deegan <tim@xen.org> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> Acked-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
* ARM: parse separate DT properties for different commandlinesAndre Przywara2013-09-173-6/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we use the chosen/bootargs property as the Xen commandline and rely on xen,dom0-bootargs for Dom0. However this brings issues with bootloaders, which usually build bootargs by bootscripts for a Linux kernel - and not for the entirely different Xen hypervisor. Introduce a new possible device tree property "xen,xen-bootargs" explicitly for the Xen hypervisor and make the selection of which to use more fine grained: - If xen,xen-bootargs is present, it will be used for Xen. - If xen,dom0-bootargs is present, it will be used for Dom0. - If xen,xen-bootargs is _not_ present, but xen,dom0-bootargs is, bootargs will be used for Xen. Like the current situation. - If no Xen specific properties are present, bootargs is for Dom0. - If xen,xen-bootargs is present, but xen,dom0-bootargs is missing, bootargs will be used for Dom0. The aim is to allow common bootscripts to boot both Xen and native Linux with the same device tree blob. If needed, one could hard-code the Xen commandline into the DTB, leaving bootargs for Dom0 to be set by the (non Xen-aware) bootloader. I will send out a appropriate u-boot patch, which writes the content of the "xen_bootargs" environment variable into the xen,xen-bootargs dtb property. Signed-off-by: Andre Przywara <andre.przywara@linaro.org> Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Check if the device is available before using itJulien Grall2013-09-171-0/+3
| | | | | | | | | | | It's possible to have a device description in the DTS but the device is not wired. device_init must check if the device is available before doing anything with it. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/dts: replace get_val by dt_next_cellJulien Grall2013-09-171-16/+2
| | | | | Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/dts: device_get_reg: cells are 32-bit big endian valueJulien Grall2013-09-171-6/+6
| | | | | | | | Device tree cells are 32-bit big endian value. Use __be32 to avoid confusion later. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/dts: Clean up the exported API for device treeJulien Grall2013-09-172-93/+14
| | | | | | | | | | | All Xen code has been converted to the new device tree API that uses a tree structure to describe the DTS. The Flat Device tree is still used by Xen during early boot stage, but only in internal. Remove entirely unneeded functions or move to a static function. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: exynos5: Blacklist MCT deviceJulien Grall2013-09-171-0/+11
| | | | | | | | | | The Multi Core Timer (MCT) is a Samsung specific device. This device tries to route IRQ in non-boot CPU which is not yet handled by Xen. The user will see randomly dom0 hang, but I'm not sure that is the real reason. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: vexpress: Blacklist a list of board specific devicesJulien Grall2013-09-171-0/+17
| | | | | | | | | | | | On Versatile there are a bunch of devices which must not be pass-through to any guest (power management and cache coherency devices). This commit also blacklists the HDLCD device because Xen is unable to correctly map the framebuffer into dom0. Therefore, when Linux will try to access to the framebuffer, Xen will receive a non-handled data access. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Remove devices used by Xen from dom0 device treeJulien Grall2013-09-171-4/+3
| | | | | | | | | Devices used by Xen should not be pass-through to dom0. If the device is really usefull for dom0 (for instance the timer and the GIC), it will recreate the node. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Add new platform specific callback device_is_blacklistJulien Grall2013-09-173-1/+19
| | | | | | | | | | | | | | | | Each platform code will list the device that must not pass-through to a guest. Theses devices are used for: power management, timer,... When theses devices are given to DOM0, it can controls the hardware and then break the whole platform. This callback is enough until we will start to care about power performance. For this purpose, we may need to extend this interface to implement per-device MMIO filtering to allow dom0 to continue to control devices which it owns which happen to share e.g. a clock controller with Xen. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Create a fake timer node in dom0 device treeJulien Grall2013-09-171-0/+66
| | | | | | | Recreate the timer node and remove hypervisor specific interrupt. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Create a fake GIC node in dom0 device treeJulien Grall2013-09-171-0/+78
| | | | | | | | Recreate the GIC node and remove hypervisor specific ranges (vgic and hypervisor controls). Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Create a fake cpus node in dom0 device treeJulien Grall2013-09-171-0/+92
| | | | | | | | | | The number of cpus in dom0 can be different compare to the real number of physical cpus. For the moment, Xen assumes that the cpus are identical. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Create a fake PSCI node in dom0 device treeJulien Grall2013-09-171-0/+38
| | | | | | | Xen uses PSCI to bring up secondary cpus for the guest. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Don't map disabled device in DOM0Julien Grall2013-09-171-1/+5
| | | | | | | Linux should cope with 'status = "disabled"' in the Device Tree. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Build DOM0 FDT by browsing the device tree structureJulien Grall2013-09-171-165/+162
| | | | | | | | | Remove the usage of the FDT in benefit of the device tree structure. The latter is easier to use and can embedded meta-data for Xen (ie: is the device is used by Xen...). Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/dts: dt_find_interrupt_controller: accept multiple compatible stringsJulien Grall2013-09-174-4/+13
| | | | | Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Use dt_device_match to avoid multiple if conditionsJulien Grall2013-09-173-6/+18
| | | | | | | | | | There is some place in Xen ARM code where multiple if conditions is used check the presence of a node or find a node. These pieces of code can be replace by an array and using proper device tree helpers. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/video: hdlcd: Use early_printk instead of printkJulien Grall2013-09-171-11/+12
| | | | | | | | The video driver is initialized before the console is correctly set up. Therefore, printk will never output if there is no serial configured. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/video: hdlcd: Convert the driver to the new device tree APIJulien Grall2013-09-171-20/+26
| | | | | | | Avoid to use FDT API which will be removed soon Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian campbell <ian.campbell@citrix.com>
* xen/dts: Check the CPU ID is not greater than NR_CPUSJulien Grall2013-09-171-0/+7
| | | | | | | | | | | | On some board CPU IDs are not contiguous (for instance the Versatile Express with big.LITTLE supports). If the CPU ID is greater than NR_CPUS Xen will hang without any message. This is because console driver is not yet initialized and hypervisor data abort uses printk. For the moment check the CPU ID and print an warning if an error occured. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/dts: Check "reg" property length in process_multiboot_nodeJulien Grall2013-09-171-1/+5
| | | | | | | | | | The device tree compiler (dtc) will only warn if the "reg" property doesn't match #address-cells and #size-cells size. It won't update the different property. Therefore, Xen needs to check if the size match both properties, otherwise Xen can retrieve a wrong range. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/dts: Remove device_get_reg call in process_cpu_nodeJulien Grall2013-09-171-7/+12
| | | | | | | | The "reg" property is only composed of one uint32. device_get_reg can be replaced by dt_read_number. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen: Use the right string comparison function in device treeJulien Grall2013-09-172-5/+5
| | | | | | | | | When of_node_cmp and of_compat_cmp was introduced in commit fb97eb6 "xen/arm: Create a hierarchical device tree", they were copied from the wrong Linux header. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/dts: Add new helpers to use the device treeJulien Grall2013-09-172-8/+252
| | | | | | | | | | | | | | | | | | | | | | | List of new helpers taken from linux (commit 74b9272): - dt_property_read_string - dt_match_node - dt_find_maching_node - dt_device_is_available - dt_prop_cmp Other new helpers: - dt_set_cell - dt_for_each_child - dt_set_range - dt_cells_to_size - dt_next_cell - dt_get_range - dt_node_name_is_equal - dt_node_path_is_equal - dt_property_name_is_equal Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/dts: Don't add a fake property "name" in the device treeJulien Grall2013-09-171-1/+10
| | | | | | | | | | | | On new Flat Device Tree version, the property "name" may not exist. The property is never used in Xen code except to set the field "name" of dt_device_node. For convenience, remove the fake property. It will save space during the creation of the dom0 FDT. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/dts: Prefix device tree macro by dt_Julien Grall2013-09-172-7/+7
| | | | | | | | | | There is 2 macros: for_each_device_node and for_each_property_of_node with a too generic name. Also replace all call-site with the new function names. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/dts: Constify device_tree_flattenedJulien Grall2013-09-174-7/+11
| | | | | | | The Flat Device Tree is given by the bootloader. Xen doesn't need to modify it. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* tools/hotplug: set mtu from bridge for tap interfaceCharles Arnold2013-09-172-5/+12
| | | | | | | | | | | | | With changeset 22885 support was added for setting the MTU in the vif-bridge script for when a vif interface was set to 'online'. The was not done for the 'add' operation. The 'add' operation was added to the script for when tap devices were specified (c/s 21944). With the setting of the MTU for the 'online' case was there a reason for omitting the 'add'? This patch sets the MTU for both 'online' and 'add' in the vif-bridge script. Signed-off-by: Charles Arnold <carnold@suse.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: Use LOG_ERRNO rather than ERRNOVAL in libxl_pci.cGeorge Dunlap2013-09-161-10/+10
| | | | | | | | The xc_* functions (now) return -1 on error and set errno. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> CC: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Revert "libxl, hotplug/Linux: default to phy backend for raw format file"Ian Campbell2013-09-162-12/+10
| | | | | This reverts commit 11a63a1660453269ddd1893c15d0a98133b33ca7. The change causes issues with live migration.
* add ARINC653 scheduler maintainersNathan Studer2013-09-161-0/+7
| | | | | | | | | | | | Previously the ARINC653 scheduler was indirectly maintained by Kathy Hadley and Josh Holtrop being cc'd on changes by George Dunlap. Maintenance is currently being done by Robert VanVossen and myself. To avoid potential communication problems in the future, make Robbie and I the official maintainers. Signed-off-by: Nathan Studer <nate.studer@dornerworks.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* AMD-Vi: also match IVRS overrides on device IDJan Beulich2013-09-161-0/+18
| | | | | Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>