aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* x86/hvm: avoid p2m lookups for vlapic accesses.xen-4.3.0-rc24.3.0-rc2Tim Deegan2013-05-161-0/+17
| | | | | | | | | | | | | The LAPIC base address is a known GFN, so we can skip looking up the p2m: we know it should be handled as emulated MMIO. That helps performance in older Windows OSes, which make a _lot_ of TPR accesses. This will change the behaviour of any OS that maps other memory/devices at its LAPIC address; the new behaviour (the LAPIC mapping always wins) is closer to actual hardware behaviour. Signed-off-by: Tim Deegan <tim@xen.org> Acked-by: Jan Beulich <jbeulich@suse.com>
* x86/vMCE: remove is_vmce_ready checkLiu Jinsong2013-05-163-75/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove is_vmce_ready() check since 1. it's problematic and overkilled: it checks if virq bind to dom0 mcelog driver. That's not correct, since mcelog is just a dom0 driver used to log error info, irrelated to dom0 vmce injection. It's also overkilled, defaulty dom0 disabled mcelog driver, under such case this checking would resulting in system crash: (XEN) MCE: This error page is ownded by DOM 0 (XEN) DOM0 not ready for vMCE (XEN) domain_crash called from mcaction.c:133 (XEN) Domain 0 reported crashed by domain 32767 on cpu#31: (XEN) Domain 0 crashed: rebooting machine in 5 seconds. (XEN) Resetting with ACPI MEMORY or I/O RESET_REG. 2. it's redundant: hypervisor in fact has checked 1). whether dom0 vmce ready or not (at inject_vmce()), via checking vmce trap callback, to make sure vmce injection OK; 2). whether dom0 mcelog driver ready or not (at mce_softirq()), via virq binding, to make sure error log works; 3. it's deprecated: for hvm, it checks whether guest vcpu has different virtual family/model with that of host pcpu --> that's deprecated, since vMCE has changed a lot, not bound to host MCE any more. Signed-off-by: Liu Jinsong <jinsong.liu@intel.com> Acked-by: Christoph Egger <chegger@amazon.de>
* x86/shadow: fix off-by-one in MMIO permission checkJan Beulich2013-05-151-3/+3
| | | | | | | | | iomem_access_permitted() wants an inclusive range as input. Also use pfn_to_paddr() in nearby code instead of open coding it. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Tim Deegan <tim@xen.org>
* x86/IO-APIC: fix guest RTE write corner casesJan Beulich2013-05-151-7/+50
| | | | | | | | | | | | | | | | | | | | This fixes two regressions from c/s 20143:a7de5bd776ca ("x86: Make the hypercall PHYSDEVOP_alloc_irq_vector hypercall dummy"): For one, IRQs that had their vector set up by Xen internally without a handler ever having got set (e.g. via "com<n>=..." without a matching consumer option like "console=com<n>") would wrongly call add_pin_to_irq() here, triggering the BUG_ON() in that function. Second, when assign_irq_vector() fails this addition to irq_2_pin[] needs to be undone. In the context of this I'm also surprised that the irq_2_pin[] manipulations here occur without any lock, i.e. rely on Dom0 to do some sort of serialization. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* Xen Power Management MaintainerLiu Jinsong2013-05-151-4/+12
| | | | | | | | | | | | Separate Xen ACPI and Xen Power Management, co-maintain Xen Power Management. Signed-off-by: Liu Jinsong <jinsong.liu@intel.com> Acked-by: "Wang, Winston L" <winston.l.wang@intel.com> Acked-by: "Wei, Gang" <gang.wei@intel.com> Make the affected file lists a little more precise. Signed-off-by: Jan Beulich <jbeulich@suse.com>
* Xen Machine Check (MCA) & RAS MaintainerLiu Jinsong2013-05-151-1/+1
| | | | | | | | Co-maintain Xen Machine Check (MCA) & RAS Signed-off-by: Liu Jinsong <jinsong.liu@intel.com> Acked-by: Christoph Egger <chegger@amazon.de> Acked-by: Yunhong Jiang <yunhong.jiang@intel.com>
* xen/arm: support "arm, armv8-timer" DTS compatibility.Ian Campbell2013-05-141-0/+2
| | | | | | | | On v8 the compatibility name differs but the node is otherwise specified the same. See linux/Documentation/devicetree/bindings/arm/arch_timer.txt Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* xen/arm64: do not clobber callee saved register in early_putchIan Campbell2013-05-141-3/+3
| | | | | | | | | | x23 is callee saved in the ARM 64 bit calling convention. Use x15 instead which is a temporary register which need not be preserved. Fixes a random crash during boot. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* xen/arm: Add emacs magic blocks to asm filesIan Campbell2013-05-144-0/+28
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* libxl: Make 'xl vcpu-set' work properly on overcommited hosts with an override.Konrad Rzeszutek Wilk2013-05-142-7/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The libxl_cpu_bitmap_alloc(..) function, if provided with a zero value for max CPUs will call xc_get_max_cpus() which will retrieve the number of physical CPUs the host has. This is usually OK if the guest's maxvcpus <= host pcpus. But if the value is different, then the bitmap for VCPUs is limited by the number of CPUs the host has. This is incorrect as what we want is to hotplug in the guest the amount of CPUs that the user specified on the command line and not be limited by the amount of physical CPUs. This means that a guest config like this: vcpus=8 maxvcpus=32 and on a 4 PCPU machine doing xl vcpu-set <guest name> 16 won't work. This is b/c the the size of the bitmap is one byte so it can only hold up to 8 VCPUs. Hence anything above that is going to be ignored. Note that this patch also fixes the bitmap setting - as it would set all of the bits allowed. Meaning if the user had a 4PCPU host we would still allow the user to set 8VCPUs. This second iteration of the patch fixes this. Note that all of the libxl_cpu_bitmap_[test|set] silently ignore any test or sets above its size: if (bit >= bitmap->size * 8) return 0; so we were never notified off this bug. This patch warns the user if they are trying to do this. If the user really wants to do this they have to provide the --ignore-host parameter to bypass this check. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl: claim: Print the values in 'xl info' unconditionallyKonrad Rzeszutek Wilk2013-05-141-6/+1
| | | | | | | | | | During the review of "libxl: Change claim_mode from bool to int." Ian Campbell suggested that the xl info should print the claim information irregardless of the global claim_mode value. Suggested-by: Ian Campbell <Ian.Campbell@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
* libxl: Change claim_mode from bool to int.Konrad Rzeszutek Wilk2013-05-143-7/+7
| | | | | | | | | | | | | | | | | During the review it was noticed that it would be better if internally the claim_mode was held as an 'int' instead of a 'bool'. The reason is that during the startup of xl, one has call the libxl_defbool_setdefault. otherwise any usage of claim_mode would result in assert break. The assert is due to the fact that using defbool without any set values (either true of false) will cause it hit an assertion. If we use an 'int' we don't have to worry about it and by default the value of zero will suffice for checks whether the claim is enabled or disabled. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
* hypervisor/xen/tools: Remove the XENMEM_get_oustanding_pages and provide the ↵Konrad Rzeszutek Wilk2013-05-1417-80/+16
| | | | | | | | | | | | | | | | | | | | | | | | data via xc_phys_info During the review of the patches it was noticed that there exists a race wherein the 'free_memory' value consists of information from two hypercalls. That is the XEN_SYSCTL_physinfo and XENMEM_get_outstanding_pages. The free memory the host has available for guest is the difference between the 'free_pages' (from XEN_SYSCTL_physinfo) and 'outstanding_pages'. As they are two hypercalls many things can happen in between the execution of them. This patch resolves this by eliminating the XENMEM_get_outstanding_pages hypercall and providing the free_pages and outstanding_pages information via the xc_phys_info structure. It also removes the XSM hooks and adds locking as needed. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Reviewed-by: Tim Deegan <tim@xen.org> Acked-by: Keir Fraser <keir.xen@gmail.com>
* Update SEABIOS_UPSTREAM_TAGIan Campbell2013-05-131-3/+3
| | | | | | | Pull in two fixes for newer IASL compilers. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Use {git, hg, svn} commit id if available for xen_changesetMarek Marczykowski2013-05-132-1/+102
| | | | | | | | | As Xen uses git as primary repository, get git commit id for xen_changeset info. Signed-off-by: Marek Marczykowski <marmarek@invisiblethingslab.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* also move compat mode VCPUOP_register_vcpu_info into common codeJan Beulich2013-05-132-9/+9
| | | | | | | | | Otherwise, with arch_compat_vcpu_op() calling arch_do_vcpu_op() to handle it, it results in -ENOSYS after 6ff9e4f7 ("xen: move VCPUOP_register_vcpu_info to common code") for 32-bit x86 domains. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* xen/arm64: Remove hardcoded value for gic in assembly codeJulien Grall2013-05-132-5/+10
| | | | | | | | | - arm64: use V2M_GIC_BASE_ADDRESS - only expose GIC_*_ADDRESS to assembly. The C code uses base addresses provide by the device tree Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: WORKAROUND Support kick cpus and switch to hypervisor for the exynos5Julien Grall2013-05-133-19/+86
| | | | | | | | | | | | | | | Use machine ID to know what is the current board. This value is only given to the first CPU by the bootloader. When the exynos 5 starts, there is only one CPU up. Xen needs to start the secondary cpu. The latter boots in secure mode. Theses modifications aim to be removed as soon as possible. It should be moved either in a platform specific boot-wrapper (which will be start before Xen), or in the bootloader (assuming U-Boot/Grub will support SMP). Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Add platform specific code for the exynos5Julien Grall2013-05-133-0/+150
| | | | | Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Add Exynos 4210 UART support for early printkAnthony PERARD2013-05-133-0/+81
| | | | | | Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Add Exynos 4210 UART supportAnthony PERARD2013-05-134-0/+478
| | | | | | Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Don't use pl011 UART by default for early printkJulien Grall2013-05-1314-92/+285
| | | | | | | | | | | | | | | | | | | | | | | Add CONFIG_EARLY_PRINTK options in configs/arm{32,64}.mk to let the user to choose if he wants to have early output, ie before the console is initialized. This code is specific for each UART. When CONFIG_EARLY_PRINTK is enabled, Xen will only be able to run on a board with this UART. If a developper wants to add support for a new UART, he must implement the following assembly macro/define: - EALY_UART_BASE_ADDRESS: variable which contains the physical base address for the UART - early_uart_init: initialize the UART - early_uart_ready: check and wait until the UART can transmit a new character - early_uart_transmit: transmit a character For more details about the parameters of each function, see arm{32,64}/debug-pl011.inc comments. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Remove setup_irqJulien Grall2013-05-131-7/+2
| | | | | | | | All calls to this function in ARM code have been removed. This function SHOULD not be used. If someone calls this function, a linking error will occur. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Remove request_irqJulien Grall2013-05-131-9/+2
| | | | | | | | All calls to this function in ARM code have been removed. This function SHOULD not be used. If someone calls this function, a linking error will occur. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Add versatile express platformJulien Grall2013-05-134-17/+43
| | | | | | | This platform contains nearly nothing specific except the reset function. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: WORKAROUND 1:1 memory mapping for dom0Julien Grall2013-05-132-0/+47
| | | | | | | | | | | | | Currently xen doesn't implement SYS MMU. When a device will talk with dom0 with DMA request the domain will use GFN instead of MFN. For instance on the arndale board, without this patch the network doesn't work. The 1:1 mapping is a workaround and MUST be remove as soon as a SYS MMU is implemented in XEN. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Allow Xen to run on multiple platform without recompilationJulien Grall2013-05-138-0/+215
| | | | | | | | | | | | | | | | | | Xen can include various platform support (ie: exynos5, versatile express...) and choose during boot time a set of callbacks for the current board. These callbacks will be called in places where each board can have specific code. For the moment the callbacks are: - platform_init: additional initialization for the platform - platform_init_time: some platform (ie: Exynos 5) needs to initialize the timer with an uncommon way - platform_specific_mapping: add mapping to dom0 which are not specified in the device tree - platform_reset: reset the platform - platform_poweroff: poweroff the platform - platform_quirks: list of quirks for a specific board. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Use the device tree to map the address range and IRQ to dom0Julien Grall2013-05-133-23/+138
| | | | | | | | - gic_route_irq_to_guest takes a dt_irq instead of an IRQ number - remove hardcoded address/IRQ Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Use device tree API in pl011 UART driverJulien Grall2013-05-134-25/+72
| | | | | | | | Allow UART driver to retrieve all its information in the device tree. It's possible to choose the pl011 driver via the Xen command line. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Add generic UART to get the device in the device treeJulien Grall2013-05-136-3/+83
| | | | | | | | | | | | | This generic UART will find the right UART via xen command line with dtuart=myserial. "myserial" is the alias of the UART in the device tree. Xen will retrieve the information via the device tree and call the initialization function for this specific UART thanks to the device API. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* xen/arm: New callback in uart_driver to get device tree interrupt structureJulien Grall2013-05-133-0/+27
| | | | | | | | | | | The existing function serial_irq doesn't allow to retrieve if the interrupt is edge or level trigger. Use this function to routes IRQs for all serial ports which Xen is using to Xen. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Introduce a generic way to use a device from the device treeJulien Grall2013-05-134-0/+134
| | | | | Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Don't hardcode virtual timer IRQsJulien Grall2013-05-133-6/+19
| | | | | | | Define virtual timer IRQs per VCPU Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Don't hardcode VGIC informationsJulien Grall2013-05-134-10/+39
| | | | | | | | | | | - Define VGIC base address per domain. For the moment the base addresses to dom0 base addresses. - The number of interrupt lines (ie number of SPIs) is equal to: * 0 for guests * number of host SPIs for dom0 Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Retrieve timer interrupts from the device treeJulien Grall2013-05-133-13/+61
| | | | | Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Use hierarchical device tree to retrieve GIC informationJulien Grall2013-05-133-68/+45
| | | | | | | | - Remove early parsing for GIC addresses - Remove hard coded maintenance IRQ number Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Introduce request_dt_irqJulien Grall2013-05-132-0/+11
| | | | | | | | This function will replace request_irq in a later patch. It takes a dt_irq as first argument instead of an unsigned int. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Introduce setup_dt_irqJulien Grall2013-05-132-0/+9
| | | | | | | | This function will replace setup_irq in later patch. It takes a dt_irq as first argument instead of an unsigned int. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Introduce gic_irq_xlateJulien Grall2013-05-133-0/+25
| | | | | | | | This function translates an interrupt specifier to an IRQ number and IRQ type (ie: level trigger, edge trigger,...). It's GIC specific. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Introduce gic_route_dt_irqJulien Grall2013-05-132-0/+16
| | | | | | | | This function routes an IRQ to a specific cpu. The IRQ is retrieved via the device tree. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Add helpers to retrieve an interrupt description from the device treeJulien Grall2013-05-132-0/+492
| | | | | Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Add helpers to retrieve an address from the device treeJulien Grall2013-05-132-0/+365
| | | | | Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Add helpers to use the device treeJulien Grall2013-05-132-34/+283
| | | | | Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Create a hierarchical device treeJulien Grall2013-05-133-5/+540
| | | | | | | | | Add function to parse the device tree and create a hierarchical tree. This code is based on drivers/of/base.c in linux source. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Add helpers ioreadl/iowritelJulien Grall2013-05-133-0/+92
| | | | | Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: Introduce ioremap_attr, ioremap_cache, ioremap_nocache, ioremap_wcJulien Grall2013-05-135-40/+35
| | | | | | | | | | | | Map physical range in virtual memory with a specific mapping attribute. Also add new mapping attributes for ARM: PAGE_HYPERVISOR_NOCACHE and PAGE_HYPERVISOR_WC. This function replaces early_ioremap which is only able to deal with 2Mb aligned mapping. Therefore, vmap initialization has been moved earlier. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xen/mm: Align virtual address on PAGE_SIZE in iounmapJulien Grall2013-05-131-1/+4
| | | | | | | | | | ioremap function can unlikely return an unaligned virtual address if the physical address itself is unaligned on a page size. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> [ ijc -- include asm/page.h to fix build error on x86 ]
* xen/arm: Extend create_xen_entries prototype to take mapping attributeJulien Grall2013-05-131-4/+5
| | | | | Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* Merge branch 'staging' of ssh://xenbits.xen.org/home/xen/git/xen into stagingIan Campbell2013-05-131-1/+1
|\
| * x86/EFI: fix buildJan Beulich2013-05-131-1/+1
| | | | | | | | | | | | | | | | | | ... after f6254405 ("xen/arm: compile and initialize vmap") moving the map_pages_to_xen() declaration. Reported-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>