aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* QEMU_TAG updateIan Jackson2013-02-221-3/+3
|
* tools/flask: add FLASK policy to buildDaniel De Graaf2013-02-225-2/+168
| | | | | | | | This patch enables the compilation of the FLASK policy as part of the tools build if the needed prerequisites are present. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* flask/policy: rework policy build systemDaniel De Graaf2013-02-226-153/+96
| | | | | | | | This adds the ability to define security classes and access vectors in FLASK policy not defined by the hypervisor, for the use of stub domains or applications without their own security policies. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
* flask/policy: sort dom0 accessesDaniel De Graaf2013-02-221-12/+48
| | | | | | | | For the example policy shipped with Xen, it makes sense to allow dom0 access to all system calls so that policy does not need to be updated for each new hypervisor or toolstack feature used. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
* build: Fix distclean when repo location changesAndrei Lifchits2013-02-221-1/+1
| | | | | | | | | If the path to xen-unstable.hg changes (i.e. you move the repo), the symlinks inside xen-unstable.hg/stubdom/libxc-x86_[32|64]/ all become broken, which breaks distclean because make attempts to clean inside those first and fails to find Makefile (which is also a symlink). Signed-off-by: Andrei Lifchits <andrei.lifchits@citrix.com>
* xend: Only add cpuid and cpuid_check to sexpr onceOlaf Hering2013-02-221-0/+4
| | | | | | | | | | | | | | | | tools/xend: Only add cpuid and cpuid_check to sexpr once When converting a XendConfig object to sexpr, cpuid and cpuid_check were being emitted twice in the resulting sexpr. The first conversion writes incorrect sexpr, causing parsing of the sexpr to fail when xend is restarted and domain sexpr files in /var/lib/xend/domains/<dom-uuid> are read and parsed. This patch skips the first conversion, and uses only the custom cpuid{_check} conversion methods called later. It is not pretty, but is the least invasive fix in this complex code. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* doc: Improve xc_domain_restore inline documentationFrediano Ziglio2013-02-221-0/+2
| | | | | | Was not clear that xc_domain_restore did not resume the machine. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
* xen: arm: implement cpuinfoIan Campbell2013-02-2210-48/+368
| | | | | | | | | | | | | | | | | | Use to: - Only context switch ThumbEE state if the processor implements it. In particular the ARMv8 FastModels do not. - Detect the generic timer, and therefore call identify_cpu before init_xen_time. Also improve the boot time messages a bit. I haven't added decoding for all of the CPUID words, it seems like overkill for the moment. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org> Cc: stefano.stabellini@citrix.com
* xen: arm: Fix guest mode for 64-bitIan Campbell2013-02-221-1/+7
| | | | | | | Need to check for the 64-bit EL2 modes, not 32-bit HYP mode. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm: print arm64 not arm32 in xen info when appropriate.Ian Campbell2013-02-221-1/+6
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm: Explicitly setup VPIDR & VMPIDR at start of dayIan Campbell2013-02-222-0/+11
| | | | | | | | | These are supposed to reset to the value of the underlying hardware but appears not to be on at least some v8 models. There's no harm in setting them explicitly. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm: Use generic mem{cpy, move, set, zero} on 64-bitIan Campbell2013-02-221-0/+3
| | | | | | | | No optimised versions are available in Linux yet (meaning I couldn't copy them). Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm: Enable VFP is a nop on 64-bit.Ian Campbell2013-02-221-1/+9
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm: implement do_multicall_call for both 32 and 64-bitIan Campbell2013-02-222-10/+23
| | | | | | | | Obviously nothing is actually making multicalls even on 32-bit so this isn't tested. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm: guest stage 1 walks on 64-bit hypervisorIan Campbell2013-02-221-2/+2
| | | | | | | Still only supports non-LPAE 32-bit guests. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm: handle 32-bit guest CP register traps on 64-bit hypervisorIan Campbell2013-02-221-3/+7
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm: select_user_reg support for 64-bit hypervisorIan Campbell2013-02-221-0/+10
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm: Use 64-bit compatible registers in vtimer.Ian Campbell2013-02-222-11/+24
| | | | | | | | Also, don't crash the host if we fail to emulate a vtimer access, just kill the guest. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm: p2m: use 64-bit compatible registers.Ian Campbell2013-02-222-1/+2
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm: time: use 64-bit compatible registersIan Campbell2013-02-222-23/+37
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm: gic: use 64-bit compatible registersIan Campbell2013-02-221-7/+5
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm: make dom0 builder work on 64-bit hypervisorIan Campbell2013-02-221-18/+35
| | | | | | | | This still only builds a 32-bit dom0, although it lays a bit of simple ground work for 64-bit dom0. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm: show_registers() support for 64-bit.Ian Campbell2013-02-221-25/+151
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm: guest context switching.Ian Campbell2013-02-224-62/+115
| | | | | | | | | | One side effect of this is that we now save the full 64-bit TTBR[0,1] even on a 32-bit hypervisor. This is needed anyway to support LPAE guests (although this patch doesn't implement anything other than the context switch). Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm64: percpu variable support.Ian Campbell2013-02-222-3/+3
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm: pcpu context switchIan Campbell2013-02-223-12/+55
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm: arm64 trap handling.Ian Campbell2013-02-228-6/+386
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm: move arm32 specific trap handlers to xen/arch/arm/arm32Ian Campbell2013-02-224-22/+58
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm64: add guest type to domain field.Ian Campbell2013-02-223-0/+24
| | | | | | | Currently 32 bit PV is the only option. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm: separate guest user regs from internal guest state.Ian Campbell2013-02-2215-56/+359
| | | | | | | | | | | | | | | | | | | | | | | | struct cpu_user_regs is currently used as both internal state (specifically at the base of the stack) and a guest/toolstack visible API (via struct vcpu_guest_context used by XEN_DOMCTL_{g,s}etvcpucontext and VCPUOP_initialise). This causes problems when we want to make the API 64-bit clean since we don't really want to change the size of the on-stack struct. So split into vcpu_guest_core_regs which is the API facing struct and keep cpu_user_regs purely internal, translate between the two. In the user API arrange for both 64- and 32-bit registers to be included in a layout which does not differ depending on toolstack architecture. Also switch to using the more formal banked register names (e.g. with the _usr suffix) for clarity. This is an ABI change. Note that the kernel doesn't currently use this data structure so it affects the tools interface only. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm: add register_t type, native register size for the hypervisorIan Campbell2013-02-228-39/+45
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* xen: arm: use vaddr_t more widely.Ian Campbell2013-02-223-11/+13
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm: extend HSR struct definitions to 64-bitIan Campbell2013-02-221-8/+12
| | | | | | | | | | | | The main change is that the 4-bit register specifiers are extended to 5 bits by taking in an adjacent SBZP bit. Also 64-bit has two other properties indicting whether or not the target register was 64-bit (x<n>) or 32-bit (w<n>) and whether the instruction has acquire/release semantics. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm64: add to foreign struct checksIan Campbell2013-02-225-11/+29
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* xen: arm64: changes to setup_pagetables and mm.cIan Campbell2013-02-224-25/+35
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm64: start of day changes to setup.cIan Campbell2013-02-222-18/+61
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm64: div64Ian Campbell2013-02-221-1/+16
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm64: interrupt/abort mask/unmaskIan Campbell2013-02-223-44/+98
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm64: xchg and cmpxchgIan Campbell2013-02-223-114/+270
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm64: barriers and wait for interrupts/eventsIan Campbell2013-02-223-12/+66
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm64: address translationIan Campbell2013-02-224-36/+75
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm64: dcache flushIan Campbell2013-02-223-4/+10
| | | | | | | | | | Use "dsb sy" instead of bare "dsb", they mean the same on 32-bit but only the former is valid on 64-bit. Abstract the actual flush operation into a macro. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm64: PTE handlingIan Campbell2013-02-223-20/+35
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm64: TLB flushesIan Campbell2013-02-226-83/+222
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm: refactor co-pro and sysreg reg handling.Ian Campbell2013-02-224-36/+118
| | | | | | | | | | | | | | | | | | | | | AArch64 has removed the concept of co-processors replacing them with a combination of specific instructions (cache and tlb flushes etc) and system registers (which are understood by name in the assembler). However most system registers are equivalent to a particular AArch32 co-pro register and can be used by generic code in the same way. Note that the names of the registers differ (often only slightly) For consistency it would be better to use only set of names in the common code. Therefore move the {READ,WRITE}_CP{32,64} accessors into arm32/processor.h and provide {READ,WRITE}_SYSREG. Where the names differ #defines will be provided on 32-bit. HSR_CPREG and friends are required even on 64-bit in order to decode traps from 32 bit guests. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm64: atomicsIan Campbell2013-02-223-153/+347
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm64: spinlocksIan Campbell2013-02-223-128/+273
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm64: basic config and types headersIan Campbell2013-02-229-57/+686
| | | | | | | | | The 64-bit bitops are taken from the Linux asm-generic implementations. They should be replaced with optimised versions from the Linux arm64 port when they become available. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm64: initial build + config changes, start of day codeIan Campbell2013-02-2213-5/+522
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: consolidate implementations of LOG() macroIan Campbell2013-02-223-14/+9
| | | | | | | | arm64 is going to add another one shortly, so take control now. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org> Acked-by: Keir Fraser <keir@xen.org>