Alejandro Gomez-Londono
657a2caa25
arm-hyp haskell: Rearranging dissociateVCPUTCB to match C
...
* Swapping setObject (vcpu) and archThreadSet in dissociateVCPUTCB
to match the order in C
2017-06-19 14:32:35 +10:00
Alejandro Gomez-Londono
aa70f61c4e
arm-hyp aspec: Rearranging dissociate_vcpu_tcb to match C
...
* Swapping set_vcpu and arch_thread_set in dissociate_vcpu_tcb to
match the order in C
2017-06-19 14:32:35 +10:00
Gerwin Klein
5b92b63e98
arm-hyp: add missing license header
2017-06-19 14:32:35 +10:00
Alejandro Gomez-Londono
be31839bf9
arm-hyp abstract: update for do_flush
2017-06-19 14:32:32 +10:00
Rafal Kolanski
c1d5e9b5a3
arm-hyp haskell: update doFlush
2017-06-19 14:32:32 +10:00
Alejandro Gomez-Londono
15536ef9fa
arm-hyp design : (Fix) Correctly defining setCurrentPD
2017-06-19 14:32:32 +10:00
Alejandro Gomez-Londono
8ace5b721d
arm-hyp abstract: (Fix) Correctly defining setCurrentPD
2017-06-19 14:32:32 +10:00
Rafal Kolanski
170113c35e
arm-hyp haskell: update lookupPtSlot
...
MissingCapability 20->21
2017-06-19 14:32:32 +10:00
Rafal Kolanski
a86eed1a9b
arm-hyp abstract: update lookup_pt_slot
...
MissingCapability 20->21
2017-06-19 14:32:32 +10:00
Rafal Kolanski
288d3d5628
arm-hyp haskell: update kernelBase for TK1 in platform file
2017-06-19 14:32:31 +10:00
Rafal Kolanski
ce02f303ac
arm-hyp machine: update physBase for TK1
2017-06-19 14:32:31 +10:00
Rafal Kolanski
6f2b32dba2
arm-hyp abstract: set asid_high_bits for non-SMMU platform
...
Should be 7, had 6.
2017-06-19 14:32:31 +10:00
Rafal Kolanski
8aacdd5d56
arm-hyp haskell: asidHighBits depends on SMMU not HYPERVISOR
...
Incorrect preprocessor ifdef resulted in wrong asidHighBits for non-SMMU
plaform (should be 7, had 6).
2017-06-19 14:32:31 +10:00
Rafal Kolanski
6c1715827c
arm-hyp machine: update maxIRQ
2017-06-19 14:32:31 +10:00
Rafal Kolanski
75492ee523
arm-hyp machine: update cache lines (32->64)
2017-06-19 14:32:31 +10:00
Gerwin Klein
8c803f5056
arm-hyp abstract: adjust irq injection bit fiddling
2017-06-19 14:32:31 +10:00
Rafal Kolanski
c293aa20c1
cspec: build config for ARM_HYP (TK1)
2017-06-19 14:32:30 +10:00
Gerwin Klein
04fae5af32
arm-hyp abstract: hypervisor fault not itself allowed to fault
2017-06-19 14:32:30 +10:00
Gerwin Klein
115078328b
abstract: hypervisor_fault not itself allowed to fault
2017-06-19 14:32:30 +10:00
Alejandro Gomez-Londono
8533613172
arm-hyp haskell: Various fixes to the spec
...
* Removed `return []` after performARMVCPUInvocation in Arc.performInvocation
* Disabled ParityEnable atribute in attribsFromWord
2017-06-19 14:32:30 +10:00
Miki Tanaka
96bcd85299
arm-hyp execspec: change skeleton to manually define makeVCPUObject
...
to allow vgicLR to be initialised as a total function
2017-06-19 14:32:30 +10:00
Alejandro Gomez-Londono
d7c2d22eb2
arm-hyp aspec: adding addressTranslateS1CPR to make_arch_fault_msg
2017-06-19 14:32:29 +10:00
Gerwin Klein
db3ffbd4b6
arm-hyp abstract: fix order of VCPUSet arguments
2017-06-19 14:32:28 +10:00
Alejandro Gomez-Londono
be3d9e7209
arm-hyp haskell: Renaming constants/records to follow abstract/haskell convention
...
* Renaming of some records to follow abstract/haskell convention
* Some duplicated constants were removed and placed in a shared
location (machine/ARM_HYP/MachineTypes.thy)
2017-06-19 14:32:27 +10:00
Alejandro Gomez-Londono
9fef0a9dcb
arm-hyp aspec: Renaming constants/records to follow abstract/haskell convention
...
* Renaming of some records to follow abstract/haskell convention
* Some duplicated constants were removed and placed in a shared
location (machine/ARM_HYP/MachineTypes.thy)
2017-06-19 14:32:27 +10:00
Gerwin Klein
8f8e72defa
arm-hyp haskell: add ctRunning check for vgicMaintenance
2017-06-19 14:32:27 +10:00
Gerwin Klein
e9d3c3eb54
arm-hyp: remove unused ParityEnabled in aspec; solve sorries in ADT_H
...
ParityEnabled isn't used in ARM_HYP and we had to prove its absence as
invariant, which in turn makes the abstraction function from Haskell
to abstract partial (only works when invariants hold).
This commit removes that problem by removing ParityEnabled from the
abstract spec. Updated ainv and refine as necessary.
2017-06-19 14:32:27 +10:00
Alejandro Gomez-Londono
4688427394
arm-hyp haskell: Small fix to vcpuSave
2017-06-19 14:32:27 +10:00
Alejandro Gomez-Londono
e727f3b27b
arm-hyp aspec: Small fix to vcpu_save
2017-06-19 14:32:27 +10:00
Alejandro Gomez-Londono
e16231688d
arm-hyp aspec: (fix) Changed gicVCPUMaxNumLR from int to nat
2017-06-19 14:32:27 +10:00
Gerwin Klein
b2d946ce4e
arm-hyp abstract: add handling of VCPU banked registers
2017-06-19 14:32:26 +10:00
Gerwin Klein
364e1e7a3a
arm-hyp abstract: update sanitise_register
2017-06-19 14:32:26 +10:00
Gerwin Klein
f8c44eba19
arm-hyp abstract: Use an explicitly invalid PD when there is no user one
...
Adds an arm_us_global_pd pointer pointing to a PD with only invalid entries.
2017-06-19 14:32:26 +10:00
Gerwin Klein
d889cc37b7
arm-hyp abstract: Disable active VCPU when switching to the idle thread
2017-06-19 14:32:26 +10:00
Rafal Kolanski
8d1b696aa1
arm-hyp haskell: Use an explicitly invalid PD when there is no user one
...
Adds armUSGlobalPD pointer with no specific properties. Used in setVMRoot.
2017-06-19 14:32:26 +10:00
Rafal Kolanski
54999477b8
arm-hyp design: let ArchThread_H see ArchHypervisor_H
2017-06-19 14:32:26 +10:00
Rafal Kolanski
4839ac4ecd
arm-hyp haskell: Disable active VCPU when switching to the idle thread
2017-06-19 14:32:26 +10:00
Rafal Kolanski
6d037b92f6
arm-hyp design: requalify vcpureg type
2017-06-19 14:32:26 +10:00
Rafal Kolanski
1cffe58cb4
arm-hyp haskell: add handling of VCPU banked registers
2017-06-19 14:32:26 +10:00
Rafal Kolanski
9b922f0629
haskell: expose sanitiseRegister for lhs-boot imports
2017-06-19 14:32:26 +10:00
Rafal Kolanski
11f68df5fb
arm-hyp haskell: update sanitiseRegister
2017-06-19 14:32:26 +10:00
Gerwin Klein
de745cb2e8
haskell: adopt new getActiveIRQ parameter
2017-06-19 14:32:26 +10:00
Gerwin Klein
4ee422a392
aspec: make getActiveIRQ aware of whether we are at entry or preemption
...
Some interrupts can only occur at kernel entry, but not at kernel preemption
points. In particular interrupts that are caused by user-level code.
2017-06-19 14:32:26 +10:00
Gerwin Klein
e065d16e07
arm-hyp/abstract: handle vgic maintenance IRQs only when running
...
The case where we're not running should never happen, but to prove this
we'll need 3-4 more invariants. To be added later.
2017-06-19 14:32:25 +10:00
Gerwin Klein
e640578f90
arm-hyp/abstract: add vgic maintenance interrupt handling
2017-06-19 14:32:25 +10:00
Gerwin Klein
e18e3fa26a
arm-hyp/aspec: add VCPUFault handling to spec
2017-06-19 14:32:25 +10:00
Rafal Kolanski
9ab7608261
arm-hyp haskell: update *gic_vcpu_ctrl_lr to take words
...
trivial and squashable
2017-06-19 14:32:25 +10:00
Rafal Kolanski
8b907b1d8a
arm-hyp abstract: update *gic_vcpu_ctrl_lr to take words
...
trivial and squashable
2017-06-19 14:32:25 +10:00
Rafal Kolanski
f00965b376
arm-hyp haskell/design: tune VGIC lr machine ops to make more sense
...
Forcing the machine ops to depend on the arguments, and switching from
nat to machine_word since there are no nats in C.
2017-06-19 14:32:25 +10:00
Rafal Kolanski
5d202fa457
arm-hyp haskell: tweak check-arm-hyp.py script to compact diff
...
Renames '.ARM_HYP' to '.ARM' to drop obviously differing module and
import lines from diff.
2017-06-19 14:32:25 +10:00
Miki Tanaka
4e0c1d1711
arm-hyp execspec: fix createObjects/createObject (in ArchIntermediate_H)
2017-06-19 14:32:25 +10:00
Miki Tanaka
b17a3fdfcb
arm-hyp haskell: fix createObject (Object/ObjectType/ARM_HYP.lhs, to be squashed later)
2017-06-19 14:32:24 +10:00
Miki Tanaka
197423f87b
arm-hyp abstract: fix arch_data_to_obj_type (in ArchDecode_A, to be squashed)
2017-06-19 14:32:24 +10:00
Alejandro Gomez-Londono
4a76aec383
arm-hyp test: Fix race condition between ARM tests
2017-06-19 14:32:24 +10:00
Rafal Kolanski
53a2826e77
arm-hyp design/abstract: clean up and indent MachineOps
2017-06-19 14:32:24 +10:00
Rafal Kolanski
3b12ece77a
arm-hyp abstract/design: add VCPU banked register machine ops
2017-06-19 14:32:24 +10:00
Rafal Kolanski
654b655480
arm-hyp haskell: add banked register machine ops
2017-06-19 14:32:24 +10:00
Rafal Kolanski
821e9f6eec
haskell: preprocessing adjustment to ARM version of Hypervisor module
2017-06-19 14:32:24 +10:00
Rafal Kolanski
33ec22b7ed
haskell: trivial cleanup in SEL4.cabal
2017-06-19 14:32:24 +10:00
Rafal Kolanski
476690e91a
arm-hyp machine ops: get_gic_vcpu_ctrl_eisr*
2017-06-19 14:32:24 +10:00
Rafal Kolanski
5181434b31
arm-hyp design: VCPUFault and VGICMaintenance
2017-06-19 14:32:24 +10:00
Rafal Kolanski
ad97a1f0b7
haskell: trivial cleanup
2017-06-19 14:32:24 +10:00
Rafal Kolanski
9da5215256
arm-hyp haskell: cleanup stale FIXMEs
2017-06-19 14:32:24 +10:00
Rafal Kolanski
ec7724d8f0
arm-hyp haskell: setCurrentPD should use setCurrentPDPL2 on arm-hyp
...
(was using writeTTBR0 which is for non-hyp platforms)
2017-06-19 14:32:24 +10:00
Rafal Kolanski
0796539e2c
arm-hyp haskell: add handling of VGICMaintenance and VCPUFault
...
The VGICMaintenance is a reserved interrupt that is handled as a fault
(handles delivery of interrupts to supervisors).
The VCPUFault is a separate entry point entirely, which we model with
the HypervisorFault interface.
2017-06-19 14:32:24 +10:00
Miki Tanaka
132953550f
arm-hyp abtract: update the sanitise_register definition (rebasing done)
2017-06-19 14:32:24 +10:00
Miki Tanaka
c570dba350
arm-hyp haskell: add TCB argument for sanitiseRegister
2017-06-19 14:32:23 +10:00
Gerwin Klein
b5aa360587
arm-hyp/haskell: adjust to C code and make sure current VCPU is always reset
2017-06-19 14:32:23 +10:00
Gerwin Klein
5ddcd647c4
arm-hyp/haskell: include changes from seL4 96c066c96bb7c
...
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`
2017-06-19 14:32:23 +10:00
Miki Tanaka
1f0988c725
arm-hyp abstract: ArchTcb_A
2017-06-19 14:32:23 +10:00
Gerwin Klein
0d56bf7c3c
arm-hyp: adjust to C code and make sure current VCPU is always reset
2017-06-19 14:32:23 +10:00
Gerwin Klein
d5df873e62
arm-hyp spec: try to establish invariant "obj_at live cur_vcpu"
...
see JIRA VER-691
2017-06-19 14:32:22 +10:00
Gerwin Klein
310fd650d0
arm-hyp spec: add comments; minor vcpu fixes
2017-06-19 14:32:22 +10:00
Rafal Kolanski
7b75ed2b91
haskell: make ARM resemble the output of ARM_HYP preprocessing
...
The first step of merging the ARM hypervisor extensions into existing
ARM is to make the current ARM look like the preprocessed output of
ARM_HYP, which currently supports both platforms.
NOTE: this requires updates to ARM Refine and CRefine due to shuffling
around some constants (pteBits et al.). That is on its way.
2017-06-19 14:32:22 +10:00
Rafal Kolanski
9f91ea2dab
arm-hyp haskell: update to look like ARM when preprocessed
...
This should make ARM_HYP functionally identical to ARM when given no
hypervisor-related directives.
2017-06-19 14:32:22 +10:00
Rafal Kolanski
33b7defc0e
arm-hyp haskell: update capUntypedSize and makeArchFaultMessage
2017-06-19 14:32:22 +10:00
Rafal Kolanski
db3f98fe21
arm-hyp haskell: add script to check ARM vs preprocessed ARM_HYP
...
see ./check-arm-hyp
The tool is very primitive, but it gives a good overview where the two
diverge.
2017-06-19 14:32:22 +10:00
Rafal Kolanski
9b29384830
haskell: SEL4.cabal: make x64 a proper flag (ArchX64)
...
This used to be "if ArchArm then ARM else X64", which did not work for
ARM_HYP.
2017-06-19 14:32:22 +10:00
Rafal Kolanski
54913ba52e
haskell: disable warnings on unused imports and variables
...
Since we are running with -Werror (maybe we shouldn't) and using cpp to
configure whether arguments are used or not depending on the arch (i.e.
ARM vs ARM_HYP), it makes no sense to make unused variables and imports
an error.
Open to ideas on where to go from here.
2017-06-19 14:32:22 +10:00
Miki Tanaka
9123c3635e
arm-hyp: changes after rebase (on top of d08ee04e2f
)
2017-06-19 14:32:22 +10:00
Miki Tanaka
bea474e537
arm-hyp abstract: fix argment order
2017-06-19 14:32:22 +10:00
Alejandro Gomez-Londono
074480bdc5
arm-hyp ASpec: Handling VCPUInjectIRQ in perform_vcpu_invocation (Fix)
2017-06-19 14:32:22 +10:00
Alejandro Gomez-Londono
323fe9559b
arm-hyp ASpec: Remove setThreadState in VCPU invocations
2017-06-19 14:32:22 +10:00
Alejandro Gomez-Londono
a66eee92b1
arm-hyp haskell: Remove setThreadState in VCPU invocations
2017-06-19 14:32:21 +10:00
Miki Tanaka
a27ec6ef7f
arm-hyp abstract/exec/haskell spec: remove armUSGlobalPT/arm_global_pt (now unnecessary due to selfour-553 change)
2017-06-19 14:32:21 +10:00
Miki Tanaka
7e79b1b7b2
changes after rebasing (for isabelle2016-1 and the new wp)
2017-06-19 14:32:21 +10:00
Miki Tanaka
2bc3febb7b
arm-hyp abstract: alignment fix
2017-06-19 14:32:20 +10:00
Miki Tanaka
e7d89a712e
arm-hyp abstract: fix vcpu_switch
2017-06-19 14:32:20 +10:00
Miki Tanaka
1a8272dcea
arm-hyp haskell: fix vcpu_switch
2017-06-19 14:32:20 +10:00
Miki Tanaka
d717896670
arm-hyp test: regression for ARM_HYP
...
* add SpecCheck test, also add ASpec and ExecSpec tests for ARM arch
(the error messages that ARMxxx tests give are not prefixed with "ARM")
* export L4V_ARCH=ARM_HYP in run_tests
2017-06-19 14:32:20 +10:00
Miki Tanaka
1d4b6e934b
arm-hyp invariants: updates for vcpu, alignments, valid_vspace_obj, wellformed_arch_obj, etc.
2017-06-19 14:32:20 +10:00
Miki Tanaka
ae41019bc9
arm-hyp abstract: updates for the rebase (remove recycle, selfour-553, VER-623)
...
in particular, correct copy_global_mappings for ARM_HYP
2017-06-19 14:32:20 +10:00
Miki Tanaka
3e1c2774fe
arm-hyp abstract: callbacks and variuos vcpu functions, prepare_thread_delete
...
- defined prepare_thread_delete for finalise_cap
- defined callback axiomatisations
- defined finalise_vcpu and various vcpu related functions that it depends on
- defined vcpu_switch and other funcions
2017-06-19 14:32:20 +10:00
Miki Tanaka
b8bdab1167
arm-hyp abstract: alignment related fixes, vcpu related updates
...
fix some definitions with pde_bits/pte_bits,
pd/pt index bits, asid_high_bits and largePagePTE/superSectionPDE offsets
2017-06-19 14:32:20 +10:00
Miki Tanaka
9b817324b5
arm-hyp abstract: remove hyper_reg
...
There is only one user accessible hyper_registers.
So we can just use the content this single register instead.
2017-06-19 14:32:19 +10:00
Miki Tanaka
6b6a4cb1e5
arm-hyp abstract: updates for VCPUInjectIRQ
2017-06-19 14:32:19 +10:00
Miki Tanaka
48f5dedb8b
arm-hyp abstract: decode+perform for VCPU register read/write and ARMVCPUSetTCB
...
haskell updates 1aae9e8a6c5 and ca6b628757e
2017-06-19 14:32:19 +10:00
Miki Tanaka
9b7f39b09b
arm-hyp abstract: add vcpu, hypervisor fault event to ARM_HYP
2017-06-19 14:32:19 +10:00
Miki Tanaka
95c56fa1ca
arm-hyp abstract: arch-parametrising arch-specific extra registers (ARM_HYP file)
2017-06-19 14:32:19 +10:00
Miki Tanaka
2cc5edcc28
arm-hyp abstract: updating vspace with arm-hyp pt/pd + arch_fault
...
fixes for arch_fault, updating decode, fixing import paths for VCPU, etc.
2017-06-19 14:32:19 +10:00