Commit Graph

758 Commits

Author SHA1 Message Date
Gerwin Klein b147fe7d9d riscv ainvs: sorried ArchDetype_AI 2019-07-31 16:55:31 +10:00
Gerwin Klein 4eba33e349 ainvs: move unique_table_refs into arch 2019-07-31 16:55:31 +10:00
Gerwin Klein 2eb3cd3917 riscv ainvs: sorried ArchTcb, ArchEmptyFail, ArchCNodeInv, ArchBCorres2 2019-07-31 16:55:31 +10:00
Gerwin Klein 749546cf6e riscv ainvs: sorried ArchIpc_AI and ArchInterrupt_AI 2019-07-31 16:55:31 +10:00
Gerwin Klein d23772ce64 riscv ainvs: sorried ArchFinalise_AI 2019-07-31 16:55:31 +10:00
Gerwin Klein cf1c3b898c riscv ainvs: sorry ArchIpcCancel, ArchRetype, and ArchSchedule 2019-07-31 16:55:31 +10:00
Gerwin Klein 5321c8f340 ainvs: move Retype_AI lemma to arch for RISC-V 2019-07-31 16:55:31 +10:00
Gerwin Klein 5315a4f030 riscv ainvs: sorried ArchVSpace_AI 2019-07-31 16:55:31 +10:00
Gerwin Klein 585989948a riscv ainvs: two more lemma statements for store_pte_*_map 2019-07-31 16:55:31 +10:00
Rafal Kolanski d91c83f3a6 riscv aspec+ainvs: rename lookup_pt_* to pt_lookup_* to resemble vs_lookup_*
More consistent naming, easier to remember.
2019-07-31 16:55:31 +10:00
Rafal Kolanski 2dd69a1b7e riscv ainvs: progress on set_pt_valid_global_vspace_mappings
Removed a number of previous dependencies that are now irrelevant.
2019-07-31 16:55:31 +10:00
Rafal Kolanski e60ee77c86 riscv ainvs: introduce lookup_pt_target, reformulate valid_global_tables
- translate_address now uses lookup_pt_target
- valid_global_tables now resolves from riscv_global_pt instead of all
  ASIDs
2019-07-31 16:55:31 +10:00
Gerwin Klein 2f9e070f99 riscv ainvs: more store_pte properties 2019-07-31 16:55:31 +10:00
Gerwin Klein 602dfd2317 riscv ainvs: lifting lemma for vspace_for_asid 2019-07-31 16:55:31 +10:00
Gerwin Klein 0009222876 riscv ainvs: fix lemma name in ArchCSpacePre_AI 2019-07-31 16:55:31 +10:00
Gerwin Klein d9d1e6d472 riscv ainvs: begin sorrying ArchVSpace_AI 2019-07-31 16:55:31 +10:00
Gerwin Klein 4c6b8c4dcd riscv ainvs: sorried ArchInterruptAcc_AI 2019-07-31 16:55:31 +10:00
Gerwin Klein a9d866c870 riscv ainvs: add saturated version of vs_lookup_pages_arch_update for simp 2019-07-31 16:55:31 +10:00
Gerwin Klein 8f119cbfec riscv ainvs: sorried ArchTcbAcc_AI 2019-07-31 16:55:31 +10:00
Gerwin Klein d0a5262b04 riscv ainvs: restore complex form if interface lemma
(The simpler form breaks the generic proofs that expect the more complex statement)
2019-07-31 16:55:31 +10:00
Gerwin Klein eb7adb182a riscv ainvs: sorried ArchCSpacePre_AI and ArchCSpace_AI 2019-07-31 16:55:31 +10:00
Gerwin Klein a2a5163712 ainvs: make another lemma arch specific (unique_table_refs again) 2019-07-31 16:55:31 +10:00
Gerwin Klein bd88d2906b riscv ainvs: sorried ArchCSpaceInv_AI 2019-07-31 16:55:31 +10:00
Gerwin Klein 63a49d469d riscv ainvs: provide arch_cap_simps and enriched cap_simps 2019-07-31 16:55:31 +10:00
Gerwin Klein 4fd8eba182 riscv ainvs: make unique_table_refs lemma arch specific
This lemma worked by (planned) accident for all architectures so far, but
the type of unique_table_refs is different on RISC-V
2019-07-31 16:55:31 +10:00
Gerwin Klein 6c540c37d8 riscv ainvs: add interfaces lemmas to ArchInvariants_AI 2019-07-31 16:55:31 +10:00
Gerwin Klein b1f444be6b riscv ainvs: sorried ArchCSpaceInvPre_AI 2019-07-31 16:55:31 +10:00
Gerwin Klein 2c2e82c94c riscv ainvs: tweak vs_cap_ref_arch to include ASIDPoolCaps
The ASIDPoolCap case is not used in the invariant definitions, but
is convenient later in the proofs.
2019-07-31 16:55:31 +10:00
Gerwin Klein 537992b41e riscv ainvs: add interface definitions; refactor invariants for clarity
All invariants that are pure interface definitions and otherwise
unused in RISC-V are now collected in a separate section to make more clear
what is used and what is not.

Added definitions for cap_asid and empty_table, which turns out is needed in
its complex form, because it is used in generic theorems. The simple form lives
on as empty_pt.
2019-07-31 16:55:31 +10:00
Gerwin Klein a4bbab0985 riscv ainvs: sorried ArchAcc_AI
co-authored-by: Rafal Kolanski <rafal.kolanski@data61.csiro.au>
2019-07-31 16:55:26 +10:00
Gerwin Klein 5d6fd554f2 riscv ainvs: tweak valid_vs_lookup invariant
Mask out bottom bits of asid and vref in the cap; otherwise this
invariant would demand many caps for the same vspace object, one for
each combination of bottom "junk" bits.

co-authored-by: Rafal Kolanski <rafal.kolanski@data61.csiro.au>
2019-07-31 16:26:36 +10:00
Gerwin Klein 0fcc2c8a6f riscv ainvs: factor out has_kernel_mappings for use in preconditions later 2019-07-31 16:26:36 +10:00
Gerwin Klein 3be3a8ea8a riscv ainvs: global pts must point to page tables 2019-07-31 16:26:36 +10:00
Gerwin Klein 12d4439ddb ainvs: make some KHeap lemmas arch specific
These lemmas have different statements in RISC-V
2019-07-31 16:26:36 +10:00
Gerwin Klein c2e95e53c9 riscv ainvs: eta expand def for later unfolding 2019-07-31 16:26:36 +10:00
Rafal Kolanski bea2739ff2 riscv ainvs: a few more lifting lemmas in ArchKHeap_AI 2019-07-31 16:26:36 +10:00
Gerwin Klein 3c64ec187a riscv ainvs: proof progress: invalidating pte mappings
co-authored-by: Rafal Kolanski <rafal.kolanski@data61.csiro.au>
2019-07-31 16:26:36 +10:00
Gerwin Klein b6301ba636 riscv ainvs: initial invariant setup for RISC-V and initial proofs
co-authored-by: Rafal Kolanski <rafal.kolanski@data61.csiro.au>
2019-07-31 16:26:36 +10:00
Gerwin Klein 78e57e2d90 ainvs: add a type projection
currently only used in RISC-V, but should replace typ_at (or make typ_at an abbreviation for it) over time.
2019-07-31 14:13:56 +10:00
Gerwin Klein f59639342c ainvs: changes to generic invariants to accomodate RISC-V
These changes are mostly removing declarations and lemmas, making them
architecture specific.
2019-07-31 14:13:56 +10:00
Amirreza Zarrabi ac886401d7 ainvs: add support to thread id registers 2019-06-28 11:34:13 +10:00
Gerwin Klein c34840d09b global: isabelle update_cartouches 2019-06-14 11:41:21 +10:00
Michael McInerney 3300e119be ainvs: minor update for Isabelle2019 not included in previous commit 2019-06-13 16:22:33 +10:00
Michael McInerney 26fdedad4d ainvs, spec: changes to remove errors for Isabelle 2019 update 2019-06-13 16:22:33 +10:00
Michael McInerney 4463e9750e SELFOUR-1198: update proofs for correct restart PC
Fixes a case where a thread can go from Running->Inactive->Restart and
use a restart PC that is out of date. An out of date restart PC occurs
when a thread was transitioned to running after being in a blocked
state, but was never scheduled and so did not execute the traps code
that updates the restart PC.

This also renames relevant register names for consistency across
architectures (FaultIP and NextIP).
2019-06-13 11:43:50 +10:00
Michael McInerney 4a07af9d9d ainvs refine: update arch-split locale names
Previously, some arch-specific names were qualified with the wrong
architecture abbreviation.
2019-06-13 11:43:50 +10:00
Michael McInerney aec289ceb6 ainvs cleanup: remove unused as_user_valid_vspace_objs lemmas 2019-06-13 11:43:50 +10:00
Michael McInerney 75f1a25948 ainvs: add as_user_bind lemma 2019-06-13 11:43:50 +10:00
Victor Phan 1689dd94fe cleanup
arm ainvs: cleanup

Abbreviate Hoare triples that do not care about the return value and
whose pre and post conditions are the same.

x64 ainvs: cleanup

ainvs: cleanup

x64 ainvs: cleanup

drefine: cleanup
2019-04-18 14:32:08 +10:00
Victor Phan c9094ccbb3 ainvs: update for new definition of set_object
Added set_object_wp_strong, which infers from a given hoare triple with
command set_object that the object of same type already exists in the
heap, and hoare_set_object_weaken_pre which does the same thing, but can
be applied on top of existing lemmas about set_object.

ainvs: improve proof of set_thread_state_runnable_valid_blocked

ainvs: change return value to a more general one

in_set_object has a return value that is empty '()', but the theorem
still holds true when replaced with a generic parameter 'rv' making it
easier to use this lemma.

ainvs: trivial - updated style of proof

ainvs: strengthen set_object_idle lemma

Add conditions imposed by valid_idle into precondition.
Thank you to Matt Brecknell for the help.

ainvs: abbreviated Hoare triples and proof fix

ainvs: restated set_object_wp_strong with auxiliary lemmas

ainvs: update for new definition of set_object

ainvs: update for new definition of set_object

Move in a few set_object and set_aobject theorems from x64 theory files
as these theorems were architecture generic.

ainvs: update for new definition of set_object

ainvs: update for new definition of set_object
2019-04-18 14:32:08 +10:00
Victor Phan e9449ee263 x64 ainvs: update for new definition of set_object
Removed update_object, which does the same thing as the new version of
set_object, and replaced it with set_object.

x64 ainvs: update for new definition of set_object

Rename legacy update_object definitions to set_object definitions and
remove related lemmas (to move up into architecture generic
KHeap_AI.thy). Remove simpler_defs as the set_object definitions are now
equivalent.

x64 ainvs: move x64 specific lemma back to ArchKHeap_AI

set_aobject_valid_arch move back after confirmation with Matt Brecknell
that it is x64 specific

x64 ainvs: update for new definition of set_object

Fixed some proofs a result of removing set_arch_obj_simps from the simp
set.
2019-04-18 14:32:08 +10:00
Victor Phan 71b6cfccef arm-hyp ainvs: update for new definition of set_object 2019-04-18 14:32:08 +10:00
Victor Phan 96787bae7a arm ainvs: update for new definition of set_object 2019-04-18 14:32:08 +10:00
Michael Sproul 045683cd9c ainvs: Rights_AI theory with facts about VM rights
SysInit requires some facts about VM rights that are shared with AInvs, so this
commit introduces a new theory to contain the shared lemmas.
2019-02-19 14:24:41 +11:00
Japheth Lim 3fc4166e7e AInvs: cleaner way to express ARM page table alignment 2019-02-01 14:11:37 +11:00
Japheth Lim 016a5d33ac AInvs: adjust pointer alignment invariants for PTEs, PDEs, etc.
Addresses issue VER-1036.

Previously, there were pointer alignment invariants in valid_pte, etc.
However, these had two problems:
1. valid_pte was conditioned on the PTE being mapped, so we couldn't
   rely on PTE pointers being aligned unconditionally (see VER-1036).
2. The existing alignments were actually incorrect for large pages.
   Proofs that needed the true alignments, obtained them from other
   parts of invs (e.g. valid_objs).

This commit moves the alignment invariants to wellformed_pte, etc.
and changes them to use the correct values.
2019-02-01 14:11:37 +11:00
Thibaut Perami 86bbe323c8 access: Fix for GrantReply (SELFOUR-6)
Integrity and pasRefined are majorly changed

The main repercussions are:
 - 3 new authorities in the policy: Call, Reply, and DeleteDerived
 - The cdt and the caps state are linked in pasRefined
 - CDT parentship no longer implies control in certain cases (is_transferable)
 - CDT parentship now implies DeleteDerived
 - Introduction of cdt_change_allowed that specifies which slot your are
   allowed to modify
 - Integrity for CDT and CDT list use cdt_changes_allowed
 - Integrity for objects in now expressed as a transitive closure of
   atomic transition rules
2018-12-10 20:01:38 +11:00
Rafal Kolanski 8d137b4e86 x64 ainvs: update for GrantReply (SELFOUR-6) 2018-12-10 20:01:38 +11:00
Rafal Kolanski 25a6d636e0 arm-hyp ainvs: cleanup: unused lemmas 2018-12-10 20:01:37 +11:00
Rafal Kolanski 1975b57c11 arm-hyp ainvs: update for GrantReply (SELFOUR-6) 2018-12-10 20:01:37 +11:00
Thibaut Perami c955ff4917 aspec + arm ainvs: Update mask_rights to mask master reply caps 2018-12-10 20:01:37 +11:00
Thibaut Perami d3548a5720 arm ainvs: Cleanup 2018-12-10 20:01:37 +11:00
Thibaut Perami 2c065aa62c arm ainvs: Add is_valid_vtable_root as vtable_slot invariant 2018-12-10 20:01:37 +11:00
Thibaut Perami 3f26cde16a arm ainvs: Update for GrantReply (SELFOUR-6) 2018-12-10 20:01:37 +11:00
Japheth Lim fd6d4b87ae refactor einvs from Refine and Access into AInvs 2018-11-20 16:34:29 +11:00
Santiago Bautista d930ef2c09 arm-hyp ainvs: prove that the vcpu of the idle thread is always None
* Context :

 We would like to prove that, for ARM_HYP architecture,
  the current vcpu is always the vcpu associated to the current thread.
 See issue https://jira.csiro.au/browse/VER-770
  and PR 291 http://bitbucket.keg.ertos.in.nicta.com.au/projects/SEL4/repos/l4v/pull-requests/291

* Intermediate step : the vcpu of the idle thread is always None

 In this commit we update the proofs of abstract invariants for
  the arm_hyp architecture, so that the new version of `valid_idle`,
  stating that the vcpu of the idle thread is always None, holds.
2018-10-31 18:04:59 +11:00
Santiago Bautista 611ec8c5e0 ainvs: changed definition of `valid_idle` + `idle_tcb_at` ; defined `valid_arch_idle` invariant
* Context :

 We would like to prove that, for ARM_HYP architecture,
 the current vcpu is always the vcpu associated to the current thread.
 See issue https://jira.csiro.au/browse/VER-770
 and PR 291 http://bitbucket.keg.ertos.in.nicta.com.au/projects/SEL4/repos/l4v/pull-requests/291

* Intermediate step : the vcpu of the idle thread is always none

 In this commit, we modify the `valid_idle` invariant so that it includes
  the fact that the vcpu of the idle thread is always None.
 This is needed for PR291 (see Context above).
  `valid_idle` beeing defined with `idle_tcb_at`,
  we changed the definition of `idle_tcb_at`
  so that it can convey information about the architecture.
 And we defined `valid_arch_idle`
  that states that the vcpu of an iarch_tcb is None.

* What changed :

 Even if these changes are only interesting for the
  abstract invariants for arm_hyp architecture
  (that are being extended),
  it implied changes to several generic and architecture-specific
  files of the astract invariants (AInvs) sessions.

Co-authored-by : Corey Lewis <corey.lewis@data61.csiro.au>
Co-authored-by : Santiago Bautista <santiago.bautista@data61.csiro.au>
2018-10-31 18:04:59 +11:00
Gerwin Klein c53f7850d7 Base ASpec + machine on OptionMonad_ND; fix proof fallout 2018-10-25 12:54:02 +11:00
Gerwin Klein b064281eb5 ainvs: clean up and arch split BCorres
RISCV64 will need slight variations in the arch dependent proofs
2018-10-25 12:54:02 +11:00
Gerwin Klein 15bfcdd98b reduce DRefine dependencies from Refine to AInvs
This needs (and includes) some deduplication and moving of lemmas formerly in
refine.
2018-10-22 13:21:11 +11:00
Edward Pierzchalski c4dc578bc3 Fix up proofs after word lemma moves 2018-10-10 14:15:01 +11:00
Edward Pierzchalski d75740201c Remove pure word lemmas from proof/*
Removes redundant lemmas after moving them up to Word_Lib.
2018-10-10 14:15:00 +11:00
Mitchell Buckley 8173a37c2d Updated specs and proofs for SELFOUR-1491: control IRQ triggering on ARM. 2018-09-19 16:18:09 +10:00
Gerwin Klein 590b83ceb7 Isabelle2018 arm: AInvs 2018-08-20 09:06:36 +10:00
Gerwin Klein 6b9d9d24dd Isabelle2018: new "op x" syntax; now is "(x)"
(result of "isabelle update_op -m <dir>")
2018-08-20 09:06:35 +10:00
Gerwin Klein 011e08458e Isabelle2018: new comment syntax
(result of "isabelle update_comments <dirs>")
2018-08-20 09:06:35 +10:00
Gerwin Klein b5cdf4703f globally use session-qualified imports; add Lib session
Session-qualified imports will be required for Isabelle2018 and help clarify
the structure of sessions in the build tree.

This commit mainly adds a new set of sessions for lib/, including a Lib
session that includes most theories in lib/ and a few separate sessions for
parts that have dependencies beyond CParser or are separate AFP sessions.
The group "lib" collects all lib/ sessions.

As a consequence, other theories should use lib/ theories by session name,
not by path, which in turns means spec and proof sessions should also refer
to each other by session name, not path, to avoid duplicate theory errors in
theory merges later.
2018-08-20 09:06:34 +10:00
Gerwin Klein ead3e6fdc4 aspec: message_info_to_data is mostly arch independent
Factored out msg_label_bits, which is the only architecture specific part.
2018-08-06 11:22:51 +10:00
Gerwin Klein 8f1122270c aspec/ainvs: move TLS/ipc buffer FIXME to appropriate position in ADT_AI 2018-08-06 11:22:49 +10:00
Thomas Sewell 26049db669 Repair proofs for wpsimp/crunch changes.
A handle of fiddly proofs change slightly. A common offender involves
tcb_cap_cases, which should be unfolded with the ran_tcb_cap_cases
rule where possible rather than with tcb_cap_cases_def.
2018-08-03 18:25:30 +10:00
Joel Beeren 7f52da6571 x64: ainvs+refine: fix up proofs for decodeX64FrameInvocation changes 2018-07-05 16:23:15 +10:00
Joel Beeren 5ed7bb16be x64: fix up definition of performPageInvocation for unmapping pages 2018-07-05 16:23:15 +10:00
Michael Sproul b91ee8e4d0 x64: spec+ainvs+refine: add machine ops for nativeThreadUsingFPU and switchFpuOwner 2018-07-05 16:23:15 +10:00
Michael Sproul 43f482ab26 x64: ainvs: refine: changes for IRQ invocations (VER-879) 2018-07-05 16:23:15 +10:00
Michael Sproul c481c7d2df x64: set cteRightsBits to 0 (VER-930) 2018-07-05 16:23:15 +10:00
Joel Beeren 8953543843 x64: ainvs+refine: remove invalidateASIDEntry, simplify with just hwASIDInvalidate 2018-07-05 16:23:15 +10:00
Joel Beeren d4b830738f x64: ainvs: cleanup after ioportcontrol 2018-07-05 16:23:15 +10:00
Joel Beeren bdbcda7b3d x64: VER-917: ensure map type and vspace mappings are consistent 2018-07-05 16:23:15 +10:00
Matthew Brecknell f649240cde x64: CR3 and machine op updates for Meltdown 2018-07-05 16:23:15 +10:00
Matthew Brecknell a3de401c09 x64: more abstract specs and invariants for ASIDs 2018-07-05 16:23:15 +10:00
Rafal Kolanski d15b4e5cb6 x64 ainvs: preservation of canonical_address under addition 2018-07-05 16:23:14 +10:00
Corey Lewis c71fa27e14 Whitespace and typos 2018-07-03 13:42:23 +10:00
Maksym Bortin 9d315cda20 ainvs+refine: update proofs for SetTLSBase (VER-807) 2018-07-03 13:42:19 +10:00
Corey Lewis 967a091cf6 ainvs: Remove unnecessary crunches and whitespace 2018-06-27 11:48:56 +10:00
Corey Lewis 97c24b95c9 ainvs: Add itcb_arch to the itcb projection
This allows us to more easily show that arch specific tcb fields are
preserved by many functions of the spec. For ARM_HYP we add a
projection for the tcb_vcpu field.
2018-06-27 11:48:56 +10:00
Corey Lewis d77d31a77c lib: Refactor crunch so that it can be used for both the nondet monad and the trace monad 2018-06-26 14:45:28 +10:00
Rafal Kolanski 15d6b62040 arm: address setCurrentPD mismatch between abstract/haskell/C
ARM setCurrentPD was recently refactored as part of multi-VM support for
ARM_HYP. The Haskell was updated correctly, and the C was not.
Unfortunately, setCurrentPD was manually redefined in MachineOps.thy for
ARM hiding the change, making the C look correct when it wasn't.

We scrap the second definition of setCurrentPD, load it from the Haskell,
and have an abstract set_current_pd that's a bit simpler to refine down
from.

The proofs are updated for the above change and the update to the C
setCurrentPD that was breaking on KZM.
2018-06-22 11:59:30 +10:00
Rafal Kolanski 4a3d7a958c arm-hyp: update proofs for SELFOUR-584: running multiple VMs on ARM
As requested by verification, hypervisor registers are now an
enumeration-indexed array rather than individual fields. This cleans up
some of the proof. Additionally, we sweep some non-complexity under the
machine op rug: vcpu_hw_write/read_reg_ccorres is as deep as we go,
rather than specifying every operation and proving that
vcpu_hw_write seL4_VCPUReg_REG calls set_REG for every REG

I took this opportunity to clean up some arm-hyp definitions and proofs,
so some whitespace cleanup got tangled in.
2018-06-15 18:48:47 +10:00
Joel Beeren 25125763bd arm-hyp: ioportcontrol: fixes after adding IOPortControlCaps to x64 2018-04-19 05:27:06 +10:00
Joel Beeren 1634608453 arm: ioportcontrol: Fixes after adding IOPortControlCaps to x64 2018-04-19 05:27:06 +10:00
Joel Beeren f728dd25e8 x64: Add IOPortControlCaps to control IO port allocation
The previous implementation of IOPortCaps has problems with revocability
and determining parency etc. This commit adds IOPortControlCaps which
behave identically to IRQControlCaps -- invoking the IOPortControlCap
allows one to create IOPortCaps with the supplied range.

There now exist invariants to show that there is only one
IOPortControlCap and that all IOPortCaps in the system do not overlap.
Furthermore there is a global record of which IO ports have been
allocated to prevent reissuing the same ports.
2018-04-19 05:27:06 +10:00
Joel Beeren 02e5096534 x64: VER-917: correct VSpace invocations to update map_type, and add invariants to check that maptype and mapped addresses correspond for PageCaps 2018-04-19 05:27:05 +10:00
Corey Lewis 2d0baab462 Proof update for crunch changes 2018-04-04 14:13:55 +10:00
Thomas Sewell 0f38e20094 Many proof repairs. 2018-03-16 14:57:51 +11:00
Thomas Sewell 652cbb966e Initial proof updates for combinator changes. 2018-03-16 14:53:22 +11:00
Gerwin Klein 830f407d7f arm-hyp ainvs: proof update for user_context refactor 2018-03-08 18:41:28 +11:00
Gerwin Klein 8601dce656 ARM ainvs: proof update for user_context refactor 2018-03-08 18:41:28 +11:00
Gerwin Klein b29e9c9fd3 x64 ainvs: proof update for user_context refactor 2018-03-08 18:41:28 +11:00
Michael Sproul f0795805d1 SELFOUR-1016: fix confused deputy problem when setting priorities 2018-02-26 11:19:43 +11:00
Joel Beeren 4601f2a1ab Genericise deletion actions that occur after empty_slot
This patch adds a generic "post_cap_deletion" step that is called by
finalise_slot. Previous to this, the only caps which had actions
required at this stage were IRQHandlerCaps -- it was required that the
IRQ bitmap be updated after the cap itself was removed (as the
invariants state that for any existing IRQHandlerCap, the corresponding
bit in the IRQ bitmap must be set).

By genericising this, we add the capacity for new, arch-specific post
cap deletion actions to occur in the future.
2018-02-23 09:12:55 +11:00
Miki Tanaka 9fb7c5cf4d arm_hyp ainvs: fix a typo 2018-01-30 12:00:25 +11:00
Miki Tanaka 4efe5392f7 arm ainvs: fix a typo 2018-01-30 12:00:21 +11:00
Gerwin Klein 3bc1cb7f71 x64: update ainvs for asid_map removal 2018-01-11 18:48:37 +11:00
Matthew Brecknell 2f540e802c add constant definitions for bounds on untyped object sizes 2017-12-18 12:58:27 +11:00
Matthew Brecknell a1b60083e8 x64 ainvs: add some lemmas about canonical addresses 2017-12-18 12:57:55 +11:00
Miki Tanaka dcca6d496f x64 ainvs/refine: simple_ko setter/getter 2017-12-14 18:03:41 +11:00
Miki Tanaka 6eb2cb74ad arm-hyp: simple_ko setter/getter 2017-12-14 18:03:31 +11:00
Miki Tanaka b37bc04463 arm ainvs: wp rules for simple_ko setter/getter 2017-12-14 18:02:44 +11:00
Miki Tanaka 3841b6e8ba arm : add AEndpoint and ANTFN a_type simplification
in addition to the a_type ATCB simplification, the following two are now in the simpset:
  "a_type (Endpoint x) = AEndpoint"
  "a_type (Notification v) = ANTFN"
2017-12-14 07:17:27 +11:00
Joel Beeren ffc0640869 VER-853: put arch_check_irq into the Arch locale, and update x64 to match C 2017-12-13 12:13:36 +11:00
Joel Beeren b01b341b3c x64: adjust definition of Arch.switchToIdleThread (VER-848) 2017-12-13 12:13:36 +11:00
Joel Beeren a5a5edc832 VER-849: abstractly declare a threads registers have changed
This removes an ifdef present in invokeTCB_(Copy|Write)Registers, and
adds the function Arch_postModifyRegisters which does nothing on any
arch except x86-64.
2017-12-13 12:13:36 +11:00
Rafal Kolanski 2f28bfeaec x64: revise scheduler / fastpath / scheduler bitmaps (SELFOUR-242)
Apply "invert-fastpath" changes to x64 (ainvs, refine, partial crefine).
See main commit for arm for more context.
2017-11-27 22:05:46 +11:00
Rafal Kolanski 7b36283c70 arm-hyp: revise scheduler / fastpath / scheduler bitmaps (SELFOUR-242)
Apply "invert-fastpath" changes to arm-hyp (ainvs, refine, crefine).
See main commit for arm for more context.
2017-11-27 22:05:46 +11:00
Rafal Kolanski 3a22487cf3 arm: revise scheduler / fastpath / scheduler bitmaps (SELFOUR-242)
Colloquially known as "invert-fastpath".

Update verification efforts on ARM for the following seL4 changes:
- scheduling decisions done in possibleSwitchTo are moved to the
  scheduler
  - possibleSwitchTo only checks whether the candidate is valid for a
    fast switch, not its priority, accepting possible candidates
    immmediately as a switch-to scheduler action
  - the scheduler checks the candidate against the current thread and
    against the bitmaps before making a decision
  - attemptSwitchTo and switchIfRequiredTo are gone
  - scheduler is now more complicated, and numerous proofs related to it
    are rewritten from scratch
- fast path now checks ready queues via the scheduler bitmaps
- L2 scheduler bitmap order reversed for better cache locality

Many iterations between the kernel and verification teams were needed
to get this right.
2017-11-27 22:05:34 +11:00
Thomas Sewell 8753c05b20 Expand eval_bool; add a method word_eqI_solve.
A number of proofs begin with word_eqI followed by some similar steps,
suggesting a 'word_eqI_solve' proof method, which is implemented here.

Many of these steps are standard, however a tricky part is that constants of
type 'nat' which encode a particular number of bits must often be unfolded.
This was done by expanding the eval_bool machinery to add eval_int_nat, which
tries to evaluate ints and nats.

Testing eval_int_nat revealed the need to improve the code generator setup
somewhat. The Arch locale contains many of the relevant constants, and they are
given global names via requalify_const, but the code generator doesn't know
about them. Some tweaks make them available. I *think* this is safe for
arch_split, as long as the proofs that derive from them are true in each
architecture.
2017-11-01 17:30:46 +11:00
Matthew Brecknell 4f68967bfc Isabelle2017: update AInvs for RC0
* word_eqI is no longer rule_format.

  * Updated Isabelle/ML Thm.join_proofs to Thm.consolidate.

  * Updated suffix_refl to suffix_order.order.refl.

  * Removed some lines of proofs, thanks to improved simplifier.
2017-10-30 12:23:26 +11:00
Matthew Brecknell 48b3a8b4ca update object and field widths for x64, and remove some magic numbers
In X64 update the following to match the C kernel:
  - TCB size-bits (11).
  - Endpoint size-bits (4).
  - Guard bits (58).
  - Message registers.

For all architectures, replace magic numbers with defined constants in
specifications, and as far as possible in proofs:
  - tcb_bits in abstract spec.
  - tcbBlockSizeBits, cteSizeBits, ntfnSizeBits, epSizeBits in Haskell
    spec, Haskell and C refinement proofs.
2017-10-26 14:05:35 +11:00
Pang Luo 6b9912c47a manually adjust non-obvious cases of tab to space replacement 2017-10-20 14:22:36 +11:00
Matthew Brecknell 184d6b70b7 remove most tab characters 2017-10-20 14:22:36 +11:00
Thomas Sewell 2c0820c175 Improve arch-split for BCorres2_AI changes. 2017-10-10 11:02:19 +11:00
Thomas Sewell 6529c7dd42 Repair schedule_bcorres.
This was broken a long while back because arch_switch_to_idle_thread
might sometimes be skipped in the implementation if the idle thread
was previously scheduled. Putting the same behaviour in the most
abstract (unit) specification is pretty easy, and it's not clear why
it wasn't done earlier.
2017-10-10 11:02:19 +11:00
Matthew Brecknell b8fc532b4e reject all invalid IRQ inputs to IRQ control syscall
This updates the proofs for a change in the C code. The IRQ control
syscall now returns an error whenever the IRQ parameter is not a valid
IRQ value. Previously, the syscall threw away some higher-order bits
before checking for IRQ validity.

Incidentally, the C now only uses the name `irq` for variables of type
`irq_t`, and `irq_w` for variables of type `word_t`. This avoids trouble
with c-parser name mangling.
2017-10-05 07:59:02 +11:00
Joel Beeren 7e915e39bd x64: adjusted abbreviation in ArchAcc_AI to restore global name-clash counter to be consistent between architectures.
A private abbreviation in an anonymous context incidentally incremented
the global counter Variable.max_idxof which is used to avoid
name-collisions in lemmas.

For some reason (not obvious) the abbreviation in question was
incrementing the counter, and because it
was only in an X64 file, this resulted in X64 and the other
architectures getting out of sync. This was file previously, but became
a problem when processing the generic file lib/clib/Corres_C.

This commit adjusts the abbreviation to not increment the counter, and
fixes Refine and SR_lemmas_C to account for this change.
2017-09-19 12:07:02 +10:00
Miki Tanaka 71d1d4143b x64 ainvs: rename wellformed_arch_obj to arch_valid_obj 2017-08-18 10:04:01 +10:00
Miki Tanaka 55d50c7ba9 arm/arm_hyp ainvs: rename wellformed_arch_obj to arch_valid_obj 2017-08-18 09:49:11 +10:00
Miki Tanaka 07e9bfa417 remove_valid_arch_objs: updates for X64 2017-08-18 09:44:00 +10:00
Miki Tanaka 6d8e917087 Remove valid_arch_objs
now that we have valid_vspace_objs to express validiy of
vspace objects, we do not need valid_arch_objs: we have
valid_objs to state the validity of non-vspace arch objects.
2017-08-17 22:44:23 +10:00
Matthew Brecknell 8c549b6764 x64: remove all trailing whitespace 2017-08-11 14:19:39 +10:00
Joel Beeren f05bc45d59 misc: clean up before merging x64 2017-08-11 11:49:18 +10:00
Matthew Brecknell 2f70a304da ainvs: integrate all architectures 2017-08-09 16:57:39 +10:00
Matthew Brecknell 238e8b307e x64: merge master 2017-07-21 11:27:12 +10:00
Alejandro Gomez-Londono 796887d9b1 Removes all trailing whitespaces 2017-07-12 15:13:51 +10:00
Joel Beeren 81064fdb55 idle-thread-pd: run idle thread with the global PD all the time.
This avoids the multicore scenario of the idle thread running in the
address space that has been deleted by a thread running on another core.
2017-07-11 11:29:34 +10:00
Miki Tanaka 41fe1a0845 update proofs for SELFOUR-30/291 "Reschedule on self-modification"
- SELFOUR-30 Reschedule when changing own IPC buffer
Previously if you invoked the TCB of the current thread and
changed the IPC buffer frame this would not immediately take
affect, as the kernels view of the current IPC buffer is
updated in Arch_switchToThread. This change forces Arch_switchToThread
to get called, even if we would switch back to the original
thread.

- SELFOUR-291 Reschedule when changing own registers
Previously if you wrote to TCB of the current thread and
changed the TLS_BASE this would not immediately take
affect, as the kernel only updates this register in
Arch_switchToThread. This change forces Arch_switchToThread
to get called, even if we would switch back to the original
thread.
2017-06-26 15:52:35 +10:00
Joel Beeren 392d055e99 SELFOUR-748: rename tlb invalidation functions 2017-06-20 14:05:45 +10:00
Joel Beeren 7d4a7b5f64 arm ainvs: clear sorry in ArchAcc_AI 2017-06-19 14:32:44 +10:00
Alejandro Gomez-Londono fb9de60cfe arm ainvs: Update for create_mapping_entries changes 2017-06-19 14:32:44 +10:00
Miki Tanaka 93eed88af7 arm AInvs: add more valid_global_objs and valid_global_vspace_mappings lemmas (in BCorres2_AI) 2017-06-19 14:32:44 +10:00
Joel Beeren a6304f8ef7 arm ainvs: update arch stuff to match generic for top level ainvs files 2017-06-19 14:32:44 +10:00
Joel Beeren 702bfecd5a ainvs: reintroduce second_level_tables all over the place, update generic Arch_AI and various ArchArch_AI's to match 2017-06-19 14:32:44 +10:00
Alejandro Gomez-Londono 7ed3df02e6 arm ainvs: updated proofs in ArchBCorres2 + KernelInit + ArchInterrupt 2017-06-19 14:32:44 +10:00
Joel Beeren f492f85471 ainvs: added back in second_level_tables for Untyped, ported changes to ARM_HYP also 2017-06-19 14:32:43 +10:00
Joel Beeren 5e6740464d arm ainvs: added necessary locale assumptions in ArchIpc_AI 2017-06-19 14:32:43 +10:00
Miki Tanaka 993f6a0120 arm ainvs: Updated up to ArchFinalise_AI 2017-06-19 14:32:43 +10:00
Miki Tanaka 5e4df460e2 ainvs: adjust generic theories for ARM fix 2017-06-19 14:32:43 +10:00
Miki Tanaka 3dd695601d arm-hyp AInvs: reintroduce valid_global_objs and valid_global_vspace_mappings 2017-06-19 14:32:43 +10:00
Miki Tanaka 7470dcb698 arm-hyp invariants: make valid_arch_obj depend on valid_vspace_obj 2017-06-19 14:32:43 +10:00
Joel Beeren 1f4b9e686a arm-hyp: rename archTCBSanitise, arch_tcb_sanitise_condition, Arch_hasVCPU to be more appropriate 2017-06-19 14:32:43 +10:00
Matthew Brecknell ec0c106c49 arm-hyp ainvs: fix proofs broken by spec update 2017-06-19 14:32:43 +10:00
Alejandro Gomez-Londono c32ae000fc arm-hyp ainvs: Clear sorries in ArchEmptyFail_AI 2017-06-19 14:32:41 +10:00
Miki Tanaka 3d859cdad7 arm-hyp invariants: more sorries and fixes 2017-06-19 14:32:41 +10:00
Gerwin Klein d037bb83f8 arm-hyp ainvs: proof fixes for new new vcpu_save definition 2017-06-19 14:32:41 +10:00
Miki Tanaka de42edf6c5 arm-hyp invariants: add invariants for new vcpu_save definition (wip) 2017-06-19 14:32:41 +10:00
Joel Beeren 083e65a4b2 arm-hyp ainvs: fix ainvs after sanitise_register refactor 2017-06-19 14:32:40 +10:00
Miki Tanaka 3ef274ecf1 arm-hyp invariants: fix fallouts from invoke_vcpu_inject_irq changey 2017-06-19 14:32:39 +10:00
Alejandro Gomez-Londono f9b008bcee arm-hyp ainvs: update for dissociate_vcpu_tcb
* 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
Alejandro Gomez-Londono ea2bfa2e19 arm-hyp ainvs: update for do_flush 2017-06-19 14:32:32 +10:00
Alejandro Gomez-Londono cab9f2880b arm-hyp ainvs: (Fix) Correctly defining setCurrentPD 2017-06-19 14:32:32 +10:00
Rafal Kolanski cd8a45c220 arm-hyp ainvs: update lookupPtSlot 2017-06-19 14:32:32 +10:00
Rafal Kolanski f5d073cb62 arm-hyp ainvs: update for asid_high_bits change 2017-06-19 14:32:31 +10:00
Alejandro Gomez-Londono 5aefad5ccf arm-hyp ainvs: fix invariants for make_arch_fault_msg changes 2017-06-19 14:32:29 +10:00
Miki Tanaka 6e23fa008c arm-hyp invariants: empty_fail and no_irq rules for vcpuregs_gets and vcpuregs_sets 2017-06-19 14:32:29 +10:00
Gerwin Klein abc195f170 arm-hyp ainvs: add valid_arch_tcb invariant (vcpu_at for tcb_vcpu) 2017-06-19 14:32:28 +10:00
Alejandro Gomez-Londono bf8b1ebdad arm-hyp ainvs: Fixing some proofs due to renaming 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 cbb154f51d arm-hyp ainvs: no_fail rules for vcpuregs_gets and vcpuregs_sets 2017-06-19 14:32:27 +10:00
Gerwin Klein 61136c29fd arm-hyp: wp_pre rebase repair 2017-06-19 14:32:27 +10:00
Gerwin Klein 7cf0631ac2 arm-hyp ainvs: proof updates for abstract spec changes
In particular for:
  - new global PD
  - disable vcpu on switch to idle
  - banked registers
2017-06-19 14:32:26 +10:00
Gerwin Klein a84e8dd147 ainvs: generalise as_user_cte_wp_at 2017-06-19 14:32:26 +10:00
Gerwin Klein 65926a841a arm-hyp/ainvs: proof repair for vgic_maintenance
Includes stronger assumptions for handle_reserved_interrupt and friends,
which should be backported later (see JIRA VER-719 and VER-720)
2017-06-19 14:32:26 +10:00
Gerwin Klein 91b723903e ainvs (arm_hyp + generic): 'getActiveIRQ in_kernel' proof updates 2017-06-19 14:32:26 +10:00
Matthew Brecknell 3c1e139a12 arch_split: ARM_HYP: DetSchedDomainTime_AI, DetSchedSchedule_AI 2017-06-19 14:32:25 +10:00
Gerwin Klein 35e5e4162a arm-hyp/ainvs: use stronger assumptions for handle_hypervisor_fault 2017-06-19 14:32:25 +10:00
Miki Tanaka db6651b541 arm-hyp invariants: add missing invariant to BCorres2_AI (to be squashed) 2017-06-19 14:32:24 +10:00
Miki Tanaka 6348446d4b arm-hyp invariants: some fixes for statements used in refine (to be squashed later) 2017-06-19 14:32:24 +10:00
Rafal Kolanski b04eb57d99 arm-hyp ainvs: drop removed _impl consts from crunch_ignore 2017-06-19 14:32:24 +10:00
Gerwin Klein dbbc0d41b5 arm-hyp: AInvs sorry-free 2017-06-19 14:32:23 +10:00
Gerwin Klein 11018317be ainvs: adjust locale name 2017-06-19 14:32:23 +10:00
Miki Tanaka 4407fc3199 arm-hyp invariants: fix pde_shifting in ArchAcc_AI 2017-06-19 14:32:23 +10:00
Miki Tanaka e839c9f2a4 arm-hyp invariants: rename live' (to avoid name-clashing with execspec invariants) 2017-06-19 14:32:23 +10:00
Gerwin Klein 331cb52000 arm-hyp: AInvs down to detype 2017-06-19 14:32:23 +10:00
Gerwin Klein a74c569f57 remove lemma hv_inv_ex from Syscall_AI assumptions
The lemma is not true on ARM_HYP. It is also not needed for AInvs, although
it looks like it may be used in Refine/CRefine.

It'll have to be replaced with a set of more specific assumptions, which
should be added on master, so I'm just removing it on this branch for now.
2017-06-19 14:32:23 +10:00
Gerwin Klein 0a0525434b ArchFinalise_AI and ArchArch_AI sorry-free 2017-06-19 14:32:23 +10:00
Gerwin Klein 1985200773 arm-hyp: AInvs checkpoint
- AInvs builds with new definitions of dissociate et al
 - fixed most of the fallout of the change, left some as additional sorries
 - should now be ready for additional cur_vcp live invariant
2017-06-19 14:32:22 +10:00
Gerwin Klein 93c23aab92 ArchKernelInit_AI sorry clean 2017-06-19 14:32:22 +10:00
Miki Tanaka 88e2c5496e arm-hyp invariants: ArchCNodeInv_AI done 2017-06-19 14:32:22 +10:00
Alejandro Gomez-Londono 337a44ee89 arm-hyp invariants: ArchArch_AI progress
* Most sorries in ArchArch_AI are done
  * valid_arch_objs_lift moved to ArchKHeap_AI

  tags: [VER-679]
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 ebd972c6f2 arm-hyp invariants: ArchFinalise_AI done
* remove last sorry from ArchFinalise
* also includes a better fix for hyp_refs_of_simps
2017-06-19 14:32:22 +10:00
Miki Tanaka 317b2b3ff2 arm-hyp invariants: new liveness definition
* the definition of liveness is extended for tcb/vcpu reference
* proved liveness related properties for dissociate_vcpu_tcb, prepare_thread_delete, etc.
2017-06-19 14:32:22 +10:00
Miki Tanaka ac24b9eb2b arm-hyp invariants: fix argment order 2017-06-19 14:32:22 +10:00
Alejandro Gomez-Londono 9290b9eaec arm-hyp: Fix sorries in ArchDeterministic_AI and DetSchedDomainTime_AI
tags: [VER-681]
2017-06-19 14:32:21 +10:00
Alejandro Gomez-Londono 366afcb49d Fix sorry at ArchVSpaceEntries_AI.thy 2017-06-19 14:32:21 +10:00
Gerwin Klein bd4b36a82a arm-hyp: remove unused lemmas 2017-06-19 14:32:21 +10:00
Gerwin Klein 0fe246b6ed ArchFinalise_AI: progress; 2 sorries left 2017-06-19 14:32:21 +10:00
Alejandro Gomez-Londono 354feb14b2 Fix sorry at ArchVSpaceEntries_AI.thy 2017-06-19 14:32:21 +10:00
Miki Tanaka c80cffc456 arm-hyp invariants: more fixes for crunches and sorries
* passes quick_and_dirty test but needs a bit more work
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
Alejandro Gomez-Londono d25e2c8dfa arm-hyp invariants: fixing crunches and invs proofs 2017-06-19 14:32:21 +10:00
Miki Tanaka eb0ec4dcd0 arch_splitting, fixing sorries, some more invariants 2017-06-19 14:32:21 +10:00
--global d3a226b867 arm-hyp invariants: ArchVspace_AI crunches fix
Mostly vcpu_{switch,enable,save,disable,restore} {set,get}_vcpu
missing hoare rules

  tags: [VER-670]
2017-06-19 14:32:21 +10:00
Alejandro Gomez-Londono 059e67bc77 arm-hyp invariants: Changes to non_vspace_obj and valid_vso_at
tags: [VER-670]
2017-06-19 14:32:21 +10:00
Miki Tanaka 5cabf38229 arm-hyp invariants: fix arch_splitting/locales
* tcb_arch_ref: definition and invariants (to access obj_refs in tcb_arch in generic contexts)
* fixes related hyp_refs
2017-06-19 14:32:21 +10:00
Miki Tanaka ee5e6f9607 arm-hyp invariants: some fixes for locale interpretations 2017-06-19 14:32:21 +10:00
Miki Tanaka c1c30691d1 arm-hyp invariants: incremental progress (sorrying, fixing crunches/alignments, etc.)
* sorry perform_vcpu_invocation invariant statements
* fix pg_entry_align and related statements
* some crunches in ArchFinalise_AI
2017-06-19 14:32:21 +10:00
Miki Tanaka e25cc1f4a0 arm-hyp invariants: new valid_arch_state and valid_global_refs, more machine op invariants
* vcpu related changes in valid_arch_state and valid_global_refs
* related changes
* added a bunch of machine op invariants for vcpu_switch proofs
2017-06-19 14:32:20 +10:00
Miki Tanaka 419a8265f3 arm-hyp invariants: some fixes in ArchVSpace_AI and ArchRetype_AI
* fixed some crunches in ArchVSpace_AI
    pd_at_flush_page
    pt_at_flush_page
    perform_page_invocation_pspace_respects_device_region

* proved a bunch of vcpu related statements for the above crunches
  some of these might be useful in general

* removed a sorry from ArchRetype_AI
2017-06-19 14:32:20 +10:00
Miki Tanaka 61dffdb6cc arm-hyp invariants: changes from rebase for ARM_HYP invariants 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 26970ce865 arm-hyp invariants: symrefs for hypervisor
introducing hyp_sym_refs (vcpu/tcb symref) related definitions + proof updates
2017-06-19 14:32:20 +10:00
Miki Tanaka 0d4e4bd264 arm-hyp invariants: copy arch-splitted invariant files from ARM
earlier updates in ArchInvariants are kept
2017-06-19 14:32:20 +10:00
Miki Tanaka f0da7d17a1 arm-hyp invariants: add ARM_HYP directory, updating ArchInvariants_AI and Invariants_AI 2017-06-19 14:32:20 +10:00
Rafal Kolanski 298d4ea6fe arm-hyp haskell: changes from meeting 2017-06-17 16:26:11 +10:00
Joel Beeren 71e2db88a4 arm: refactor sanitise_register to take a bool instead of a kernel_object
This simplified the sanitise_register logic in CRefine for arm-hyp.
2017-05-03 21:51:57 +10:00
Joel Beeren 04d102608a x64: ainvs: fix broken proofs from strengthening of wellformed_pde et al 2017-04-21 17:17:21 +10:00
Joel Beeren 4a09859592 x64: ainvs: strengthen wellformed_pde et al 2017-04-21 13:32:52 +10:00
Joel Beeren 64fa273221 x64: ainvs: fix proofs after arch_decode_invocation refactor, add more to valid_cap for IOPorts 2017-04-20 14:36:28 +10:00
Joel Beeren 73cf43d8c3 x64: make word lemmas arch agnostic-ish 2017-04-12 18:10:13 +10:00
Joel Beeren a9e8518c1d x64: abstract: minor tweak to throws in arch_decode_irq_control_invocation 2017-04-11 18:37:30 +10:00
Matthew Brecknell c2aba18e1d ainvs x64: replace a conditional simp rule lookup_empty_refl
This was causing simplifier loops in some places, and slow-downs in
others.
2017-04-07 18:01:49 +10:00
Joel Beeren 89bc1d507d x64: fix ainvs after renames of set_current_cr3 et al 2017-04-07 16:05:02 +10:00
Joel Beeren 808ab82eb4 x64: ainvs: add pde_at to valid_pti etc as needed for refine 2017-04-06 11:39:12 +10:00
Joel Beeren d82ff09104 x64: abstract: add set_cap to perform_page_invocation for unmap, prove invariants 2017-04-05 15:43:21 +10:00
Joel Beeren c847b79220 x64: AInvs: move invalidate_asid_entry into case for delete_asid 2017-04-04 17:32:32 +10:00
Matthew Brecknell 659088cc13 x64: merge master 2017-03-29 20:22:12 +11:00
Joel Beeren df94ae6fad x64: aspec/ainvs: miscellaneous updates
* make update_cap_data do nothing for IOPorts
    * return same_aobject_as to previous definition for IOPorts
    * change cap_master_cap for IOPorts to be the identity
2017-03-29 17:23:25 +11:00
Matthew Brecknell f26ba5cebd arch_split: make cte_level_bits_def work with existing proofs
Many generic proofs make use of cte_level_bits_def. Although the
definition is architecture specific, the proofs work for any reasonable
value of cte_level_bits, so it's fine to expose the definition to
generic proofs.
2017-03-29 11:45:13 +11:00
Matthew Brecknell bf077ac664 ainvs x64 arm: remove canonical_address check from do_user_op
For x64, move the check to get_page_info, which is arch-specific.

This means there is no longer any need for canonical_address to be
defined for ARM.
2017-03-28 17:35:59 +11:00
Matthew Brecknell 6f3efc504a arch_split x64 arm: make endpoint_bits and ntfn_bits arch constants 2017-03-27 19:07:42 +11:00
Matthew Brecknell ad348ca355 trivial x64: add missing license header 2017-03-27 19:07:42 +11:00
Matthew Brecknell bb92e92f52 arch_split x64 arm: make cte_level_bits an arch constant 2017-03-27 19:07:28 +11:00
Joel Beeren 981e05d5f7 x64: abstract: remove spurious VMPML4E from vm_map_type 2017-03-23 15:34:30 +11:00
Joel Beeren 5252c420aa x64: fixed ArchKernelInit_AI after cte_level_bits change 2017-03-21 15:41:17 +11:00
Joel Beeren 49e12ef7dc x64: change cte_level_bits, obj_bits (Endpoint; Notification) to 5
rather than 4.

This is true on all 64-bit platforms as the size of these objects is 4
words (4*8 = 32 = 2^5). However, this breaks the 32-bit ARM proofs that
rely on these values being 4 - see jira issue VER-725.
2017-03-21 15:09:37 +11:00
Matthew Brecknell af0060bf7e x64: fix ArchKernelInit_AI
Includes a change to valid_global_vspace_mappings invariant, to
canonicalise virtual addresses while traversing page tables.
2017-03-21 14:42:12 +11:00
Gerwin Klein 54fc3a840c ainvs: minor cleanup 2017-03-17 15:14:40 +11:00
Gerwin Klein a2de84cf3d ainvs: repair wp_pre fallout 2017-03-16 19:39:11 +11:00
Matthew Brecknell 42ff16ed4c x64: fix sorry proofs in ArchAInvsPre_AI
The canonical_address constant (but not its definition) is now exported
to generic theories, and used in do_user_op. On ARM, all virtual
addresses are canonical.
2017-03-15 17:37:20 +11:00
Joel Beeren 86e8bbd1c7 x64: fixed ARM AInvs build after merge 2017-03-14 13:16:14 +11:00