History log of /seL4-camkes-master/kernel/src/arch/arm/object/vcpu.c
Revision Date Author Comments
# 79da0792 01-Mar-2020 Gerwin Klein <gerwin.klein@data61.csiro.au>

Convert license tags to SPDX identifiers

This commit also converts our own copyright headers to directly use
SPDX, but leaves all other copyright header intact, only adding the
SPDX ident. As far as possible this commit also merges multiple
Data61 copyright statements/headers into one for consistency.


# c4fe5369 27-Jan-2020 Anna Lyons <anna@gh.st>

arm: remote IPI call support for VIRQS

Added support for injecting remote IPI calls towards given VCPU's
on SMP configured systems. This introudcing a new type of
IpiRemoteCall and handlers for updating the vgic state on
incoming/outgoing IPI's.

Co-authored-by: Yanyan Shen <yanyan.shen@data61.csiro.au>


# 2dbcc842 21-Dec-2019 Rafal Kolanski <rafal.kolanski@data61.csiro.au>

arm-hyp: bound check irq in decodeVCPUAckVPPI

Provide an error if IRQ is outside of valid Arch_checkIRQ bounds.


# 221ed2eb 20-Dec-2019 Rafal Kolanski <rafal.kolanski@data61.csiro.au>

arm-hyp: thread runnable check before handleFault

At this time verification does not have a provable link between the
current active VCPU and the current thread which would allow concluding
the current thread is runnable when the current VCPU is active. To
handle a fault, the current thread must be runnable.
Added extra checks to VGICMaintenance and VPPIEvent.


# 9d5168f0 28-Nov-2019 Rafal Kolanski <rafal.kolanski@data61.csiro.au>

arm_hyp: return error in decodeVCPUAckVPPI

An invalid VPPI caused out-of-bounds array access due to missing return
statement.


# 2ceeb1df 15-Oct-2019 Kent McLeod <Kent.Mcleod@data61.csiro.au>

VGICMaintenance: Update spurious check

Ignore any VGIC maintenance interrupts that arrive if a VCPU isn't
currently running.


# 71d636f8 20-Jun-2019 Alison Felizzi <Alison.Felizzi@data61.csiro.au>

arm_hyp: Save and restore vtimer state on switches

Added support for reading and writing additional virtual timer
registers for vcpu hw read and write accesses. These include the
compare value register (CNTV_CVAL) and offset register (CNTV_OFF),
each represented as two 32 bit (high and low) registers on aarch32 and
as single 64 bit registers on aarch64.

Added support for explicitly saving and restoring the virtual
timer registers when the vcpu is enabled and disabled. This
ensures when the vcpu is switched in and out, the virtual timer
registers are restored to a state that is consistent to when
it was last run.

By default the CNTVOFF register will be updated by the kernel to
accumulate the time the VCPU is not running. From the guest this will
result in the VCNT register not increasing when the VCPU is suspended.
This behavior can be turned off by disabling the
KernelArmVtimerUpdateVOffset config option.


# f795e7c0 23-Jun-2019 Alison Felizzi <Alison.Felizzi@data61.csiro.au>

arm: New virtual PPI event fault type

This commit introduces a new fault type, seL4_Fault_VPPIEvent.

This change means the kernel can reserve PPI interrupts and virtualise
them via delivering the irq to the active vcpu through a
specific fault. This enables multiplexing PPI IRQs across multiple VCPUS
which requires correctly masking and unmasking the IRQ depending on
which VCPU is running.

A new VCPU invocation, seL4_ARM_VCPU_AckVPPI is also added for
acknowledging the handling of the IRQ. This takes an IRQ as a parameter
but will only accept IRQ numbers that are sent as VPPIEvent faults.

Co-authored-by: Rafal Kolanski <rafal.kolanski@data61.csiro.au>
Co-authored-by: Kent McLeod <Kent.Mcleod@data61.csiro.au>


# 16bedb98 14-Oct-2019 Kent McLeod <Kent.Mcleod@data61.csiro.au>

arm_hyp: Remove some vcpu_* wrapper functions

These functions have entirely arch specific implementations so remove
function wrapping indirection to ease maintainability.


# 94c7800e 14-Oct-2019 Kent McLeod <Kent.Mcleod@data61.csiro.au>

arm_hyp: Refactor code into arch headers

Move vcpu functions that are specific to a particular Arm architecture
version into the relevant header files. Also move some generic functions
into the generic vcpu header file for use by arch specific headers.


# 8234026c 16-Sep-2019 Kent McLeod <Kent.Mcleod@data61.csiro.au>

aarch64: Move tpidrro_el0 from vcpu to tcb context

This register is visible to software executing at EL0 but not writeable.
Storing it in the VCPU context required custom save/restore handling as
it had to be explicitly handled when switching from a VCPU thread to a
non-VCPU thread so that it didn't become a channel. It is possible to
now update this register via seL4_TCB_WriteRegisters for software
executing at EL0.

This also fixes a potential bug where if a vcpu-thread is switched for a
non-vcpu-thread and then switched to a different vcpu-thread the
original vcpu-thread's copy of this register will get set to 0.


# 71244499 31-Oct-2016 Anna Lyons <Anna.Lyons@data61.csiro.au>

mcs: tickless scheduler implementation

This changes the budget/remaining fields in scheduling contexts
to contain timer ticks, not number of abstract sel4ticks.

seL4_SchedControl_Configure now takes microseconds, not ticks.

This commit is plat-independant - the platform and arch specific
timer code follows in later commits.


# 0d60f6f2 26-Mar-2019 Kent McLeod <Kent.Mcleod@data61.csiro.au>

arm: Rename gic_pl390 to gic_v2

This is to reflect that this driver provides support for features that
are newer than gic_pl390 such as virtualisation.


# 5646f774 20-Mar-2019 Curtis Millar <curtis.millar@data61.csiro.au>

RFC-3: Update user context for ARM with thread IDs

Switched appropriate naming conventions.
Was using the aarch64, have switched to aarch64 names.

TIPDRURW -> tpidr_el0
TPIDRURO -> tpidrro_el0
TPIDRPRW -> tpidr_el1

Switch TLS register on aarch32 from TPIDURO (tpidrro_el0) to tpidr_ro so
that it can be written to from user-land.

Thread ID registers tpidr_el0 have been added to the user context for
aarch32 and aarch64.

Only the thread ID that is writeable from EL0 is saved in the TCB and
saved/restored on context switch.

Thread IDs that are only changed within a VM (the read-only thread ID
for exception level 0 and the thread ID for exception level 1) are
stored in the VCPU and saved and stored as part of VM enable/disable.

Thread IDs that are only changed with VMs have been separated out into
hypervisor code.


# d0930f67 18-Mar-2019 Anna Lyons <Anna.Lyons@data61.csiro.au>

style: consistently attach return type

Add attach-return-type to astyle


# 761006e0 18-Mar-2019 Anna Lyons <Anna.Lyons@data61.csiro.au>

style: consistently align pointer with name

Run astyle with align-pointer=name


# 3d10ef0c 18-Mar-2019 Anna Lyons <Anna.Lyons@data61.csiro.au>

style: correct parenthesis padding

Use astyle's unpad-paren to unpad all parentheses that are not included
by pad-header, pad-oper, and pad-comma.


# 445e0915 07-Mar-2019 Jasper Lowell <jasper.lowell@data61.csiro.au>

aarch32: Rework access of fpu control registers

GCC accepts MCR/MRC instructions to modify fpu control registers. Clang
does not. VMSR/VMRS are instructions that the ARM specification suggests
to use when accessing fpu control registers.


# bc5c7883 19-Feb-2019 Yanyan Shen <yanyan.shen@data61.csiro.au>

arm: Make Arm VCPU states per-node.


# eb857ec7 28-Jan-2019 Simon Shields <simon.shields@data61.csiro.au>

ARM: stop using plat/machine/devices.h

This header is going away and contains nothing of substance. Remove it.


# 2e17a211 15-Aug-2018 Yanyan Shen <yanyan.shen@data61.csiro.au>

arm/hyp: Guard armv7-only FPU access function


# 7e8bbcc5 06-Apr-2018 Yanyan Shen <yanyan.shen@data61.csiro.au>

armv7/hyp: Move armv7 code armv7-a/armv/vcpu.h


# 758a46e2 06-Apr-2018 Yanyan Shen <yanyan.shen@data61.csiro.au>

arm/hyp: uint32 -> word_t


# b8673036 22-Mar-2018 Yanyan Shen <yanyan.shen@data61.csiro.au>

arm/hyp: Fix style


# a74de99a 22-Mar-2018 Yanyan Shen <yanyan.shen@data61.csiro.au>

arm/hyp: Use vcpu_read/write_reg instead


# d6b33211 22-Mar-2018 Yanyan Shen <yanyan.shen@data61.csiro.au>

arm/hyp: Fix typo TTBRC -> TTBCR


# 4dc8fda5 22-Mar-2018 Yanyan Shen <yanyan.shen@data61.csiro.au>

arm/hyp: Write VCPU's SCTRL when inactive


# b72e814b 21-Mar-2018 Yanyan Shen <yanyan.shen@data61.csiro.au>

arm/hyp: Fail for invalid index or null vcpu.


# 0337bedb 20-Mar-2018 Yanyan Shen <yanyan.shen@data61.csiro.au>

arm/hyp: Add inlines for CNTV_TVAL and CNTV_CTL.


# ef13a83a 20-Mar-2018 Yanyan Shen <yanyan.shen@data61.csiro.au>

arm: Change TTBR0/1 read/write function names.

The following functions, readTTBR0, writeTTBR0, readTTBR1, and
writeTTBR1, write and return raw TTBR0/1 values.
The function writeTTBR0Ptr is added for used in context swtich
functions, and it modify the input physical address before
writing the TTBR0. Places using these functions are also
updated.


# 822ebd7d 22-Feb-2018 Yanyan Shen <yanyan.shen@data61.csiro.au>

arm/hyp: Remove CNTV_CVAL


# 6e50e61a 22-Feb-2018 Yanyan Shen <yanyan.shen@data61.csiro.au>

arm/hyp: Remove redundant check.


# 16aa0715 01-Nov-2017 Yanyan Shen <yanyan.shen@data61.csiro.au>

arm/hyp: access_reg to vcpu_hw_read/write_reg


# 81317fb6 31-Oct-2017 Yanyan Shen <yanyan.shen@data61.csiro.au>

arm/hyp: refactor VCPU states

Use an array and constants to replace register names in the VCPU.


# 60e2acdb 22-Oct-2017 Yanyan Shen <yanyan.shen@data61.csiro.au>

arm/hyp: add support for running multiple ARM VMs

This commit saves/restores various control registers that can be
modified by guest VM kernels, so seL4 can execute multiple ARM
32-bit VMs multiplexing a single physical core.

When the CONFIG_HAVE_FPU option is selected, the commit allows
the VMs to use FPU registers and enables lazily saving/restoring
FPU registers for the VMs.


# b6e201ab 08-Apr-2018 Yanyan Shen <yanyan.shen@data61.csiro.au>

armv8/hyp: Parse inputs for VCPUInjectIRQ


# aeb2e4e4 08-Apr-2018 Yanyan Shen <yanyan.shen@data61.csiro.au>

armv8/hyp: Sync the status of vgic.lr


# 3d9962eb 05-Apr-2018 Yanyan Shen <yanyan.shen@data61.csiro.au>

arm/hyp: Call aarch64 VCPU functions


# f17d12b3 05-Apr-2018 Yanyan Shen <yanyan.shen@data61.csiro.au>

arm/hyp: Call aarch64 vcpu_enable/disable code


# a72f8beb 04-Apr-2018 Yanyan Shen <yanyan.shen@data61.csiro.au>

arm/hyp: ksCurThread -> NODE_STATE(ksCurThread)


# bc162cae 04-Apr-2018 Yanyan Shen <yanyan.shen@data61.csiro.au>

armv7/hyp: Move v7 hyp code to armv7-a/armv/vcpu.h


# 7f7a12c3 03-Apr-2018 Yanyan Shen <yanyan.shen@data61.csiro.au>

arm/hyp: uint32_t -> word_t


# e2bb6b29 03-Apr-2018 Yanyan Shen <yanyan.shen@data61.csiro.au>

arm/hyp: Move common HCR macros to vcpu.h


# 094fddb7 03-Apr-2018 Yanyan Shen <yanyan.shen@data61.csiro.au>

arm: Move VGIC code to gic_pl390 files


# 7561b2c5 28-Apr-2017 Bamboo <bamboo@keg.ertos.in.nicta.com.au>

[STYLE_FIX]


# 4c9207a7 29-Apr-2017 Gerwin Klein <gerwin.klein@data61.csiro.au>

arm-hyp: refactor VGICMaintenance to avoid potential overflow

seL4_Fault_VGICMaintenance can store indices up to 63, but
ctzl(eisr1) + 32 can be 64.

Also move current_fault assignment to after hardware interaction
for simpler verification conditions.


# d7cf9730 26-Apr-2017 Joel Beeren <joel.beeren@nicta.com.au>

Refactor sanitiseRegister to take a bool rather than a (tcb_t *).

This involves adding a function to determine if a tcb has a vcpu, and
makes verification a lot easier for arm-hyp.


# d6b12fb1 26-Apr-2017 Anna Lyons <Anna.Lyons@data61.csiro.au>

Fix out-by-1 in decodeVCPUInjectIRQ


# a7e29608 25-Apr-2017 Miki Tanaka <miki.tanaka@nicta.com.au>

arm-hyp: get gic_vcpu_num_list_regs via a local variable in vcpu_save and vcpu_restore


# d5fb1618 25-Apr-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

arm: Check current thread isRunnable in VGICMaintenance

This check should never be false, but is added until this fact can be proven


# 24307c2c 24-Apr-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

arm: Set badgeRegister in invokeVCPUReadReg

To be a proper kernel reply the badgeRegister should be set to 0


# d62e1fb4 24-Apr-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

arm: Lookup IPCBuffer in invokeVCPUReadReg and use setMR


# 353f0574 23-Apr-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

arm: Pass 'call' down to invokeVCPUReadReg

invokeVCPUReadReg should not be setting message registers for the return message unless
the user performed a call. In doing so we must refactor the call to readVCPUReg to
outside the introduced `if` condition since, as it performs machine operations, it
should always happen


# 00f94e76 20-Apr-2017 Miki Tanaka <miki.tanaka@nicta.com.au>

arm-hyp: vcpu_disable, split reading and setting of registers for easier verification


# 08f0cb3f 20-Apr-2017 Miki Tanaka <miki.tanaka@nicta.com.au>

arm-hyp: change the type of i in the loops in vcpu_restore and vcpu_save


# d49ac709 21-Apr-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

arm: Swap lines for verification simplicity


# 73db4168 04-Apr-2017 Rafal Kolanski <rafal.kolanski@nicta.com.au>

arm hyp: make invokeVCPUInjectIRQ index arg unsigned long

Argument passed to it comes directly from a word_t so it shouldn't be
signed. Also, verification.


# 4b491dcf 23-Mar-2017 Kofi Doku Atuah <kofidoku.atuah@data61.csiro.au>

SELFOUR-836: arm-hyp: Config option for saving/loading vs trapping debug state

Provides a configuration option for enabling HDCR.TD* traps, or saving and loading debug
state on VCPU switches. Currently verification only plans to support the trap setting.

As this option complicates all of the #ifdef's related to debug registers even further,
abstractions for enabling/disabling each individual piece of the debug code for different
configuration options are also implemented.

Part of these refactored #ifdef guards was to remove the guards completely from libsel4
around the definitions of the number of breakpoints and watchpoints.


# 3f90fad6 21-Mar-2017 Kofi Doku Atuah <kofidoku.atuah@data61.csiro.au>

SELFOUR-836: Hardware debug API functions should take tcb_t and not arch_tcb_t

Touches files all throughout x86 (32 and 64) and ARM.


# de6d4772 30-Mar-2017 Rafal Kolanski <rafal.kolanski@nicta.com.au>

rename arch_tcb.vcpu -> arch_tcb.tcbVCPU, vcpu.tcb -> vcpu.vcpuTCB

struct vcpu { struct tcb* tcb; ...
struct arch_tcb { struct vcpu* vcpu; ...
and
struct tcb { struct arch_tcb tcbArch; ...

These conspire to generate a type error on verification side due to
assumptions about non-colliding names.


# 941edc08 22-Mar-2017 Kofi Doku Atuah <kofidoku.atuah@data61.csiro.au>

SELFOUR-836: Fix build error in verification build


# 725d0dac 20-Mar-2017 Kofi Doku Atuah <kofidoku.atuah@data61.csiro.au>

SELFOUR-836: Disable debug context save/restore between VMs

This patch disables the debug register state save and restore on ARM-hyp,
such that Guest VMs can now interfere with one another and trigger
one another for certain limited scenarios. This will be undone later on.


# ccd9020b 29-Jan-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

Pass tcb_t to sanitiseRegister instead of arch_tcb_t


# f12f0477 27-Feb-2017 Kofi Doku Atuah <kofidoku.atuah@data61.csiro.au>

Add PL0 debug-API support for hyp-mode kernel

This patch enables the hype-mode kernel to intercept non-secure PL0
debug exceptions. Since it uses the HDCR register to do this (and not the SDCR),
it consequentially has no effect on any secure-monitor that may be executing
alongside the hypmode kernel.

For native seL4-hyp user threads, when the CPU sees a need to raise a debug
exception that was taken from PL0 (user), it will naturally try to raise that
exception to PL1 (supervisor).

But since seL4 is in PL2 and not PL1, seL4 has not set up an exception vector
table (VBAR) for PL1. So when the CPU attempts to vector into the PL1 VBAR,
it just gets a data abort, which it then delivers to PL2.

This patch causes the PL2 seL4 hypervisor to directly catch the debug exception
straight from PL0 and process the debug exception directly, for native threads.

Guest VM VCPUs are unaffected by this change. Their debug exceptions are delivered
to the Guest VM's PL1 VBAR as per usual.


# 469bdd61 04-Jan-2017 Kofi Doku Atuah <kofidoku.atuah@data61.csiro.au>

ARM-HYP: Add support for save/restore of debug registers

As things are now, the Guest VMs can modify the debug registers at will
from non-secure PL1, and the kernel does nothing to ensure that guest VM
debug coprocessor registers are preserved.

This is a preliminary patch that simply hooks into vcpu_save and saves the
CPU's debug coprocessor registers when saving VCPU state.

For restoring the debug registers on switching to a VCPU, we just re-use
restore_user_debug_context, which is already called in restore_user_context.
(Restore_user_context is called by c_handle_vcpu_fault()). Specifically,
we modify the used_breakpoints_bf so that restore_user_debug_context()
will always pop all the debug context.

This patch only covers the breakpoint and watchpoint registers,
and it doesn't cover the entire debug coprocessor, which is another
conversation.


# f8606c86 20-Feb-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

Provide spec for CTZL

Provides a spec for the __builtin_ctzl function and changes existing
code to use this wrapper


# 96c066c9 15-Feb-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

arm: Ensure only a VCPU with a linked TCB can be active

Changes `dissociateVCPUTCB` to invalidate the active VCPU if the active
VCPU is the one being dissociated. Given that the only linked VCPUs
can be active the check in `vcpu_finalise` can be removed as it already
calls `dissociatedVCPUTCB`


# 672fe8f8 31-Jan-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

arm: Move setThreadState in VCPU invocations

It is easier for verification if setThreadState happens just prior to the perform
phase of an invocation, instead of during the perform


# 2e5ce5a2 24-Jan-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

arm: VCPU interface for manipulating banked registers

Adds extra fields to the Read/Write VCPU Register invocations to read and write
the banked the registers


# d492e767 24-Jan-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

arm: save/restore banked registers in VCPUs

Adds space in the vcpu_t struct for the registers from the different operating modes
and saves/restores these registers as part of saving and restoring the VCPU


# f709e494 22-Jan-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

arm: SELFOUR-781: Only allow threads with VCPU to run outside user mode

Previously any thread could be set to run in any mode (except HYP mode).
Whilst this causes no security issues for the kernel, different execution
modes in ARM have different banked registers. These registers are not
currently saved and restored allowing for threads to manipulate registers
that will be seen (or potentially are being actively used) by other threads.

Saving and restoring these banked registers for all threads is a performance
cost (even if only done for the actual mode the thread runs in) for no real
benefit, as there is no clear reason to run a thread in other modes if you
do not have a vcpu. Therefore this commit restricts being in modes other than
user to threads that have a vcpu. When multiple VCPUs are properly supported
the switching of VCPUs will then save/restore these banked registers.


# be84d886 22-Jan-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

arm: Read/Write fields from active VCPUs

This is a commit to prepare for adding additional registers to the Read
and Write operations. As these registers are expected to be manipulated
in the course of normal virtualization the overhead of effectively switching
the VCPU out, just to modify a register, and then switch it back in, is
excessively high.


# 191b4465 22-Jan-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

arm: Introduce constant for VCPU register


# f658276a 03-Aug-2016 Thomas Sewell <Thomas.Sewell@nicta.com.au>

Remove many DONT_TRANSLATE markers.

The vast majority of the DONT_TRANSLATE markers in the kernel are used
to hide __asm__ statements and builtin functions
(e.g. __builtin_unreachable ()) from the C-to-Isabelle parser.

The parser now supports underscore identifiers and many __asm__ statements,
and the builtin functions are prototyped, meaning the vast majority of the
DONT_TRANSLATE markers can be dropped. The remaining markers cover functions
that must be treated specially.


# b827ad37 15-Jul-2016 Anna Lyons <Anna.Lyons@nicta.com.au>

SELFOUR-413: refactor libsel4 fault API

This is a *breaking API change*

This commit:

* makes seL4_Fault_tag_t common between the kernel and libsel4
* deprecates the existing functions from sel4/messages.h includes
* introduces a new fault API in sel4/faults.h and
* sel4/sel4_arch/faults.h
* deprecates seL4_GetTag(), as the function did not work without
the user calling seL4_SetTag() first (seL4_MessageInfo is passed
in registers and not set in the IPC buffer)
* removes previously deprecated functions (deprecated prior to 3.0.0)
* updates the seL4 manual to reflect the changes


# e43c31b4 19-Oct-2016 Adrian Danis <Adrian.Danis@data61.csiro.au>

arm_hyp: Correct vcpu_save

The use of the `active` flag in this function was inverted


# 4f2123b7 16-Oct-2016 Bamboo <bamboo@keg.ertos.in.nicta.com.au>

[STYLE_FIX]


# cdc86930 13-Oct-2016 Adrian Danis <Adrian.Danis@data61.csiro.au>

arm_hyp: Used cached value for num LRs


# 2a1d1e94 13-Oct-2016 Adrian Danis <Adrian.Danis@data61.csiro.au>

arm_hyp: Add lazy vcpu switching


# 04612f16 13-Oct-2016 Adrian Danis <Adrian.Danis@data61.csiro.au>

arm_hyp: Declare armHSCurVCPU in header


# fce6c03a 13-Oct-2016 Adrian Danis <Adrian.Danis@data61.csiro.au>

arm_hyp: Correctly destroy armHSCurVCPU

When finalizing a vcpu, if it is the current vcpu (as defined by
armHSCurVCPU) we should update the current vcpu, this change does
that


# 5970a03f 04-Oct-2016 Adrian Danis <Adrian.Danis@data61.csiro.au>

arm: Correct fail cases for reading and writing VCPU fields


# ef00e986 21-Aug-2016 Anna Lyons <Anna.Lyons@data61.csiro.au>

SELFOUR-615: arm entry point stubs


# 3c05b79a 27-Jul-2016 Adrian Danis <Adrian.Danis@data61.csiro.au>

Provide generic C entry/exit hook routines

It can be deseriable to run code before/after user mode, but
not have to write it in assembly. This commit adds such stubs
that get called as the first/last C code when coming in
and out of the kernel


# 3b85582e 04-Aug-2016 Adrian Danis <Adrian.Danis@data61.csiro.au>

SELFOUR-609: Introduce virq type in bitfield

Introduces a bitfield defined virq type that is then used to replace
manual bit packing of virtual irqs in the vcpu/vgic LR registers


# b4caa7e9 27-Jul-2016 Bamboo <bamboo@keg.ertos.in.nicta.com.au>

[STYLE_FIX]


# 6d891b0a 26-Jul-2016 Adrian Danis <Adrian.Danis@data61.csiro.au>

SELFOUR-551: Remove direct accesses to machine data structures

This commit wraps accesses to the vgic in functions that are marked as
DONT_TRANSLATE and uses a global constant (that is determined at boot time)
for the number of LR registers to prevent loops that have undefined bounds


# 8e0315f4 26-Jul-2016 Adrian Danis <Adrian.Danis@data61.csiro.au>

SELFOUR-551: Standardize VCPU capitalization

For acronyms seL4 other does CAPS or caps, this changes some functions
that were doing Caps


# d1b2b421 26-Jul-2016 Adrian Danis <Adrian.Danis@data61.csiro.au>

SELFOUR-551: Do setThreadState in perform functions

Move some instances of setThreadState from decode functions into
perform functions


# e4a732d5 26-Jul-2016 Adrian Danis <Adrian.Danis@data61.csiro.au>

SELFOUR-551: Remove unused arguments from decodeVCPUSetTCB


# a185335e 25-Jul-2016 Adrian Danis <Adrian.Danis@data61.csiro.au>

SELFOUR-551: Swap argument order of [di|a]ssociateVcpuTcb

Attempts to create some consistently across other functions that have
VCPU first in the name and also VCPU first in the argument list


# 9d7f36c8 25-Jul-2016 Adrian Danis <Adrian.Danis@data61.csiro.au>

SELFOUR-575: Remove unnecessary deriveCap in decodeVCPUSetTCB


# 98f8172b 25-Jul-2016 Adrian Danis <Adrian.Danis@data61.csiro.au>

SELFOUR-574: Remove schedule from VGICMaintenance

All call paths of VGICMaintenance will call schedule and
activeThread themselves. The operation is therefore redundant
here and is confusing for verification


# a4ed36a4 07-Jul-2016 Adrian Danis <Adrian.Danis@data61.csiro.au>

SELFOUR-555: Rename ksCurCPU->armHSCurVCPU


# eb0b1dea 21-Jun-2016 Adrian Danis <Adrian.Danis@data61.csiro.au>

arm-hyp: Comment on SCTLR_DEFAULT


# 5f0ae410 02-Jun-2016 Adrian Danis <Adrian.Danis@data61.csiro.au>

arm-hyp: Minor cleanups

Cleanup some small licensing, whitespace and configuration details


# 27ecdffe 26-May-2016 Yanyan Shen <yanyan.shen@nicta.com.au>

arm-hyp/tk1: address review comments.


# 13ae16a7 25-May-2016 Yanyan Shen <yanyan.shen@nicta.com.au>

arm-hyp/tk1: should trap SMC from guest kernel


# 879d9724 13-May-2016 Yanyan Shen <yanyan.shen@nicta.com.au>

arm/tk1: a checkpoint for SMMU implementation


# fa9b6e43 04-May-2016 Yanyan Shen <yanyan.shen@nicta.com.au>

arm/tk1: addresses/interrupts for hyp mode


# 90a3cdfb 02-Mar-2016 Yanyan Shen <yanyan.shen@nicta.com.au>

arm_hyp: remove unused macros


# 67bcf235 02-Mar-2016 Yanyan Shen <yanyan.shen@nicta.com.au>

arm_hyp: rm ARM_HYP ifdefs; func inline assembly

vcpu.c:
encapsulate inline assembly into inline functions that added to
device_pl2.h file.

other files:
replace #ifdef ARM_HYP with config_set(ARM_HYP)


# 24747dc5 02-Mar-2016 Yanyan Shen <yanyan.shen@nicta.com.au>

arm_hyp: remove unused macros


# 8e2e8db9 02-Mar-2016 Yanyan Shen <yanyan.shen@nicta.com.au>

arm_hyp: rm ARM_HYP ifdefs; func inline assembly

vcpu.c:
encapsulate inline assembly into inline functions that added to
device_pl2.h file.

other files:
replace #ifdef ARM_HYP with config_set(ARM_HYP)


# 380697ab 18-Jan-2016 Adrian Danis <Adrian.Danis@nicta.com.au>

Fixes for recent merge with master branch


# 7c754e68 01-Mar-2015 akroh <Alexander.Kroh@nicta.com.au>

ARM hyp: trap sensitive CPU operations via HCR


# 908c589a 19-Feb-2015 akroh <Alexander.Kroh@nicta.com.au>

ARM HYP: Trap SMC


# 95e1bfcc 17-Nov-2014 akroh <Alexander.Kroh@nicta.com.au>

ARM-HYP: Allow unaligned access for PL0


# a318446f 07-Jul-2014 TrustworthySystems <gatekeeper@sel4.systems>

Recommit of arm_hyp branch on release snapshot