Commit Graph
27041 Commits
Author SHA1 Message Date
Julien Grall f5bde3da40 xen/arm: Retrieve timer interrupts from the device tree
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-13 11:59:58 +01:00
Julien Grall 71fa862f21 xen/arm: Use hierarchical device tree to retrieve GIC information
- 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>
2013-05-13 11:59:58 +01:00
Julien Grall a55acb35cb xen/arm: Introduce request_dt_irq
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>
2013-05-13 11:59:58 +01:00
Julien Grall 6f5d777f4c xen/arm: Introduce setup_dt_irq
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>
2013-05-13 11:59:58 +01:00
Julien Grall cd025772d0 xen/arm: Introduce gic_irq_xlate
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>
2013-05-13 11:59:58 +01:00
Julien Grall 13bd8be39c xen/arm: Introduce gic_route_dt_irq
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>
2013-05-13 11:59:58 +01:00
Julien Grall 886f34045b xen/arm: Add helpers to retrieve an interrupt description from the device tree
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-13 11:59:57 +01:00
Julien Grall 227c02f8a6 xen/arm: Add helpers to retrieve an address from the device tree
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-13 11:59:57 +01:00
Julien Grall dbd1243248 xen/arm: Add helpers to use the device tree
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-13 11:59:57 +01:00
Julien Grall fb97eb614a xen/arm: Create a hierarchical device tree
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>
2013-05-13 11:59:57 +01:00
Julien Grall 11eedee7cc xen/arm: Add helpers ioreadl/iowritel
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-13 11:59:57 +01:00
Julien Grall 4e67146864 xen/arm: Introduce ioremap_attr, ioremap_cache, ioremap_nocache, ioremap_wc
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>
2013-05-13 11:59:56 +01:00
Julien Grall 73a6a932d6 xen/mm: Align virtual address on PAGE_SIZE in iounmap
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 ]
2013-05-13 11:59:43 +01:00
Julien Grall 0a6a239a61 xen/arm: Extend create_xen_entries prototype to take mapping attribute
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-13 11:51:42 +01:00
Ian Campbell ce2abaa5fa Merge branch 'staging' of ssh://xenbits.xen.org/home/xen/git/xen into staging 2013-05-13 11:44:02 +01:00
Jan Beulich 9b670aceff x86/EFI: fix build
... 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>
2013-05-13 12:07:40 +02:00
Daniel Kiper 667d8a84b2 tools/libfsimage: Fix clean and distclean make targets
If there is a single colon for a given target and the target
is redefined in another place (e.g. in included file) then
make executes only new target and displays following warning:

Makefile:35: warning: overriding commands for target `clean'
tools/libfsimage/common/../../../tools/libfsimage/Rules.mk:25:
warning: ignoring old commands for target `clean'

To cope with that issue define all required targets as double-colon
rules. Additionally, remove some redundant stuff.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-13 10:57:17 +01:00
Christoph Egger 2569c54743 docs: make 'gmake dist-docs' work
doc: buildsystem fixes

- use correct pathes (make gmake dist-docs from toplevel directory work)
- configure detects perl as tools/configure does

Signed-off-by: Christoph Egger <chegger@amazon.de>
Reviewed-by: Matthew Wilson <msw@amazon.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- reran autogen.sh ]
2013-05-13 10:53:37 +01:00
Julien Grall 017610862e xen/arm: gic_disable_cpu must be called with interrupts disabled
gic_disable_cpu is only called with interrupt disabled.
Use spin_lock instead of spin_lock_irq and check the function is
called with interrupts disabled.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-10 14:54:07 +01:00
George Dunlap 723d7bfec3 docs: Change cd-insert docs to match behavior
xl cd-insert takes a plain file.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-10 14:43:39 +01:00
Julien Grall 6b18d3dded xen/arm: Switch to SYS_STATE_boot right after console setup
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-10 14:17:16 +01:00
Julien Grall 55eb2e2cb8 xen/arm: Load dtb after dom0 kernel
On some setup, the first linux page table is at 0x40004000. Xen will load
dom0 device tree at 0x4000100. In case of the device tree is big, linux will
corrupt the device tree.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-10 14:17:15 +01:00
Julien Grall f2be6b895e xen/arm: Fix early_panic when EARLY_PRINTK is disabled
Even if EARLY_PRINTK is not enabled, early_panic must never return.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-10 14:17:12 +01:00
Julien Grall ac73c9ceff xen/arm: Bump early printk internal buffer to 512
When debug is enabled in device tree code, some lines
are bigger than 80 characters.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-10 14:17:08 +01:00
Julien Grall 1adf4eb703 xen/arm: Remove duplicated GICD_ICPIDR2 definition
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-10 14:17:07 +01:00
Julien Grall 0232cd2443 xen/arm: Don't allow dom0 to access to vpl011 UART0 memory range
As vpl011 UART is not initialized for dom 0, when the domain tries to access to
this range, a segfault will occur in Xen. The right behaviour should be a data
abort for the guest.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-10 14:17:05 +01:00
Julien Grall 1f5bee6af4 xen/arm: lr must be included in range [0-nr_lr(
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-10 14:17:00 +01:00
Ian Campbell b1d98d94d0 arm: cast int<->pointer via uintptr_t
Fixes build on arm64:

gic.c: In function ‘gic_irq_eoi’:
        gic.c:726:16: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
        gic.c: In function ‘maintenance_interrupt’:
        gic.c:776:29: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
        gic.c:778:64: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
        cc1: all warnings being treated as errors
        make[3]: *** [gic.o] Error 1

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Acked-by: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
2013-05-10 14:15:32 +01:00
Julien Grall c06c4fd172 .gitignore: Add vim swap files
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- corrected .hgignore regex syntax ]
2013-05-10 14:14:50 +01:00
Konrad Rzeszutek Wilk 907d1e458d MAINTAINERS: Change tmem maintainer
Konrad has graduated to becoming an maintainer in the Xen hypervisor.

Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-10 10:44:17 +02:00
Tim Deegan 078654af2d x86/mm/shadow: remove dead code for avoiding Xen entries on 32-bit tables.
All non-external-mode (==PV) guests have 4-level pagetables now that
the PAE build of Xen is gone.

This patch should have no effect, since the condition it removes could
never be true anyway: the l2 offset of HYPERVISOR_VIRT_START on 64-bit
Xen is much higher than any l2 offset we could have seen in the
tables (and indeed bigger than the 'int' type, which clang was
complaining about).  Actual compat PV guest xen entries are handled by
the equivalent test in the 64-bit SHADOW_FOREACH_L2E() below.

Reported-by: Julien Grall <julien.grall@linaro.org>
Signed-off-by: Tim Deegan <tim@xen.org>
2013-05-09 13:00:26 +01:00
Stefano Stabellini 3b38da8687 xen/arm: handle the runstate_memory_area
Support VCPUOP_register_runstate_memory_area on ARM.
Update_runstate_area on context switch.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-08 13:01:45 +01:00
Stefano Stabellini 8968bafa31 xen: move VCPUOP_register_runstate_memory_area to common code
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
2013-05-08 13:01:22 +01:00
Stefano Stabellini b5af4d4815 xen/arm: initialize vtimer offset to CNTPCT
Currently we initialize the vtimer offset to

CNTVCT + CNTVOFF = CNTPCT - CNTVOFF + CNTVOFF = CNTPCT

Simply initialize vtimer offset to CNTPCT.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-08 12:59:52 +01:00
Stefano Stabellini 803d6c993a xen/arm: clear pending irq queues on do_psci_cpu_on
Don't inject irqs to vcpus that are down.

Also when (re)activating a vcpu, clear the vgic and gic irq queues: we
don't want to inject any irqs that couldn't be handled by the vcpu right
before going offline.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-08 12:59:47 +01:00
Stefano Stabellini afb2edfc32 xen/arm: initialize virt_timer and phys_timer with the same values on all vcpus
Introduce a domain wide vtimer initialization function to initialize
the phys_timer and the virt_timer offsets.

Use the domain phys_timer and virt_timer offsets throughout the vtimer
code instead of the per-vcpu offsets.

Remove the per-vcpu offsets from struct vtimer altogether.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-08 12:59:41 +01:00
Stefano Stabellini 43e39ffc70 xen/arm: run the vtimer Xen timers on the pcpu the vcpu is running on
The Xen physical timer emulator and virtual timer driver use two
internal Xen timers: initialize them on the pcpu the vcpu is running on,
rather than the processor that it's creating the vcpu.

On vcpu restore migrate the phys_timer and the virt_timer to the
pcpu the vcpu is running on.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-08 12:59:36 +01:00
Stefano Stabellini 0c899a9f6f xen/arm: send IPIs to inject irqs into guest vcpus running on different pcpus
If we need to inject an irq into a VCPU that is running on a different
processor, we shouldn't just enqueue the irq into the lr_pending and
inflight lists and wait for something to interrupt the guest execution.
Send an IPI to the target pcpu so that Xen can inject the new interrupt
returning to guest.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-08 12:59:30 +01:00
Stefano Stabellini 66410d1d18 xen/arm: support VCPUOP_register_vcpu_info.
We don't want to support the full vcpu_op hypercall interface, just
VCPUOP_register_vcpu_info: introduce an internal ARM-only
do_arm_vcpu_op function to filter out the vcpu_op hypercalls that
we don't want to support.
Call do_arm_vcpu_op instead of do_vcpu_op from traps.c.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-08 12:59:23 +01:00
Stefano Stabellini 6ff9e4f743 xen: move VCPUOP_register_vcpu_info to common code
Move the implementation of VCPUOP_register_vcpu_info from x86 specific
to commmon code.

Move vcpu_info_mfn from an arch specific vcpu sub-field to the common
vcpu struct.
Move the initialization of vcpu_info_mfn to common code.

Move unmap_vcpu_info and the call to unmap_vcpu_info at domain
destruction time to common code.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
2013-05-08 12:59:18 +01:00
Daniel Kiper 80185fd5ba Remove traces of IA-64 architecture support
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2013-05-08 12:15:27 +01:00
Daniel Kiper 2336933873 Remove tools/libaio/src/syscall-ia64.h file
There is no support for IA-64 architecture in Xen.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2013-05-08 12:15:23 +01:00
Daniel Kiper 38aabce542 Silently ignore rm and include errors during make distclean
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2013-05-08 12:15:20 +01:00
Daniel Kiper e17295d050 docs: Remove tmp files during make clean
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2013-05-08 12:15:17 +01:00
Daniel Kiper 3eb7adb2ba stubdom/vtpm: Silently ignore rm errors during make clean
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
2013-05-08 12:14:53 +01:00
Daniel Kiper c2eea87c43 stubdom: Do not create dangling links
There is not architecture dependent files in libxc
hence do not create dangling links.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2013-05-08 12:14:46 +01:00
Daniel Kiper 43be6972f9 stubdom: Remove xenstore directory during make crossclean
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2013-05-08 12:14:43 +01:00
Daniel Kiper 2bf87074e1 stubdom: Clean extras/mini-os directory during make clean
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2013-05-08 12:14:39 +01:00
Daniel Kiper 03b90b0059 tools/xenstat/libxenstat: Remove src/libxenstat.a file during make clean
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2013-05-08 12:14:36 +01:00
Daniel Kiper ea5e515ba1 tools/xenmon: Fix typo in Makefile
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2013-05-08 12:14:32 +01:00