#
7cc1142c |
|
08-Apr-2020 |
Kent McLeod <Kent.Mcleod@data61.csiro.au> |
aarch64,vcpu: Add CNTKCTL_EL1 register to vcpu_t This register is accessible from EL1 and affects whether Generic Timer registers are accessible from EL0. When switching out of guests, the kernel needs to restore the correct access for native threads. Signed-off-by: Kent McLeod <Kent.Mcleod@data61.csiro.au>
|
#
512a0200 |
|
19-Mar-2020 |
Qian Ge <qian.ge@data61.csiro.au> |
replacing all ifndef with pargma once All the kernel header files now use pargma once rather than the ifndef, as the pre-processed C files do not change while header files are protected with pargma once. This will also solve any naming issues caused by ifndef.
|
#
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.
|
#
bddd4054 |
|
27-Jan-2020 |
Alison Felizzi <Alison.Felizzi@data61.csiro.au> |
arm: Added define for VMPIDR and VMPIDR_EL2 Added constant definitions for the VMPIDR (arm32) and VMPIDR_EL2 (arm64) registers. These being vcpu registers that can be written, read, saved and restored. The 'Virtualization Multiprocessor ID Register' (VMPIDR) is needed to program a vcpu's affinity during initialisation. This is currently only exposed on SMP configurations. Co-authored-by: Anna Lyons <anna@gh.st>
|
#
0e05f416 |
|
23-Jun-2019 |
Alison Felizzi <Alison.Felizzi@data61.csiro.au> |
arm: Configure traps on vcpu WFE/WFI calls Configure the ability to trap on vcpu WFE/WFI calls. If enabled, user-level would need to schedule a future interrupt when a given vcpu invokes a WFE/WFI instruction. This otherwise leaving the vcpu in a disabled state. An application can choose to disable the trap if it doesn't want to handle the instruction and schedule a future interrupt.
|
#
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.
|
#
6e63a483 |
|
14-Oct-2019 |
Kent McLeod <Kent.Mcleod@data61.csiro.au> |
arm_hyp: Update ArmV8 vcpu register operations Update the register save and restore functions to use the provided wrapper functions that are now in scope.
|
#
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.
|
#
b45ca5cd |
|
17-Nov-2019 |
Nick Spinale <nick@nickspinale.com> |
aarch64: fix FAR_EL1 width in writeFAR Fixes a bug where writeFAR was only writing to the low 32 bits of the 64-bit FAR_EL1 register.
|
#
a047e8d8 |
|
14-Nov-2019 |
Nick Spinale <nick@nickspinale.com> |
aarch64: fix MRS/MSR in writeELR_EL1 Fixes a bug where writeELR_EL1 was reading from ELR_EL1 instead of writing to it.
|
#
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.
|
#
b1788e02 |
|
08-Jul-2019 |
Anna Lyons <anna@gh.st> |
aarch64: add support for 40-bit PA This commit adds support for using a 40-bit physical addresses in aarch64-hyp mode. 40-bit PA support is implemented by using a 3-stage translation, with a 13 bit page upper directory as the vspace root. PageGlobalDirectories are not used in this configuration. To use 40-bit PAs, platforms should set KernelArmPASizeBits40 to ON. Co-authored-by: Yanyan Shen <yanyan.shen@data61.csiro.au> Co-authored-by: Chris Guikema <chris.guikema@dornerworks.com>
|
#
dfd8641c |
|
17-Jul-2019 |
Anna Lyons <anna@gh.st> |
aarch64-hyp: check PA and granule sizes Check that the configured physical address range is supported by the processor and that the granule size (4KiB) is supported.
|
#
86a22fd3 |
|
28-Mar-2019 |
Chris Guikema <chris.guikema@dornerworks.com> |
trivial: properly mask vtcr macros
|
#
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.
|
#
a0ae9f76 |
|
13-May-2019 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8: Save/restore TPIDRRO_EL0 for VCPUs TPIDRRO_EL0 is used as IPC Buffer for seL4-native threads. The register should be saved and restored for VCPUs.
|
#
56de1ad7 |
|
02-Apr-2019 |
Anna Lyons <Anna.Lyons@data61.csiro.au> |
aarch64: adjustments to pass c-parser This commit updates the aarch64 build to pass the c-parser. - replace 0b constants with decimal - remove empty array definition - replace __uint128_t with uint64_t, and double the array size - remove variable shadowing No further verification guarantees are provided for aarch64 code.
|
#
f54e0ea5 |
|
21-Mar-2019 |
Anna Lyons <Anna.Lyons@data61.csiro.au> |
arm-hyp: pass ESR in handleUserLevelFault
|
#
d0930f67 |
|
18-Mar-2019 |
Anna Lyons <Anna.Lyons@data61.csiro.au> |
style: consistently attach return type Add attach-return-type to astyle
|
#
973c1ac5 |
|
05-Oct-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
arm/hyp: Trap SMC calls.
|
#
60b15e10 |
|
15-Aug-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Remove duplicated functions
|
#
f7fd2002 |
|
11-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Replace register strings with macros
|
#
572daddc |
|
11-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Define control register macros
|
#
12c8fe62 |
|
11-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Clarify SCTLR_EL1 macros
|
#
280609cb |
|
11-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Fix style
|
#
dd51a8b4 |
|
11-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: sharable -> shareable
|
#
507fcf8b |
|
11-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Use macros to replace raw numbers
|
#
abbbe5ae |
|
11-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Add start level macros for 4KB granule
|
#
30731951 |
|
11-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Add cacheability attribute macros
|
#
692a4424 |
|
11-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Add shareability attribute macros
|
#
b0738044 |
|
11-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Add translation granule size macros
|
#
7ad03187 |
|
11-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Add PA size constants
|
#
a0f19150 |
|
10-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Move macros to the beginning
|
#
7427a48b |
|
05-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Add read/writeVCPUReg functions
|
#
e17ad712 |
|
05-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Add armv_vcpu_init function
|
#
27271ca6 |
|
05-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Add armv_vcpu_disable function
|
#
dae33077 |
|
05-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Add armv_vcpu_enable function
|
#
6bcd6c5f |
|
05-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Add armv_vcpu_boot_init
|
#
a28e25f8 |
|
05-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Add vcpu_init_vtcr; use 44-bit IPA/PA
|
#
daade55a |
|
04-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Add macros to access VTCR_EL2 fields
|
#
110ad2f0 |
|
04-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Add arch_handleVCPUFault
|
#
826ce029 |
|
04-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Add VCPU register access functions
|
#
db3e0b0c |
|
04-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Add vcpu_hw_read/write_reg functions
|
#
3f36002e |
|
04-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Add functions to access registers
|
#
404ce2a9 |
|
04-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Add SCTLR constants for A57
|
#
81781910 |
|
04-Apr-2018 |
Yanyan Shen <yanyan.shen@data61.csiro.au> |
armv8/hyp: Add HCR_COMMON/_NATIVE/_VCPU
|