Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arch-split Refine up to Invariants_H for ARM+ARM_HYP #847

Open
wants to merge 6 commits into
base: arch-split
Choose a base branch
from

Conversation

Xaphiosis
Copy link
Member

@Xaphiosis Xaphiosis commented Jan 8, 2025

As seen with X64 (#842), you'll have to review this commit-by-commit. Fortunately there didn't need to be any interface changes this time, so we only have three commits. Copying from AARCH64 (nothing interesting there), updating the definitions/lemmas for Refine, and then fixing up anything else. This seems like a good approach, and keeping the copy commit separate is turning out to be a good idea for large changes like these.
Then I did the same thing again for ARM_HYP, adapting changes from ARM. Ran out of time for RISCV64 though.

I'm not entirely clear whether I should be saying "Up to Invariants_H" or "Up to InvariantUpdates_H". Currently going with the latter.

observations from this pass:

  • lemmas tcb_cte_cases = tcb_cte_cases_def tcb_cte_cases_neqs
    OR adding tcb_cte_cases_neqs to simpset (for future)
  • valid_arch_state_lift' can't be an interface lemma as it stands now due to
    PDEs on ARM; to do a proper lifting lemma we have to say preservation of all
    arch objects instead of PDEs
  • some of the X64.objBits_simps/ARM.objBits_simps/etc can be replaced with
    gen_objBits_simps because I wasn't consistent/observant enough to notice early
  • are things like valid_pde_mappings' crossable? (ARM)

Sets up ARM for Invariants_H arch-splitting using AARCH64 as a template.
Includes removal of ARM Invariants_H.

Signed-off-by: Rafal Kolanski <[email protected]>
Updates the rest of ARM Refine+Orphanage to conform to the generic
arch-split invariant interface. When things broke and when possible, we
took the proof or chunks of proof from AARCH64.

Otherwise:
- projectKOs is not in the simpset
- valid_pde_mappings' moved to valid_arch_state', resulting in
  valid_arch_state' lifting lemmas to have poor generic applicability
  (likely future interface lemmas will be based around preserving
  valid_arch_state')
- the power-of-two vs mask situation is still a mess, requiring changing
  proofs to go one way or the other
- unfolding tcb_cte_cases_def would benefit from tcb_cte_cases_neqs
  being in the simpset so that people avoid unfolding cteSizeBits when
  not necessary, but that can be done via a separate pass later

Signed-off-by: Rafal Kolanski <[email protected]>
…dates_H

Most of the changes were ported from X64 (which were adapted from
AARCH64).

Signed-off-by: Rafal Kolanski <[email protected]>
@Xaphiosis Xaphiosis added the arch-split splitting proofs into generic and architecture dependent label Jan 8, 2025
@Xaphiosis Xaphiosis requested a review from lsf37 January 8, 2025 08:59
Sets up ARM_HYP for Invariants_H arch-splitting using AARCH64 as a
template.
Includes removal of ARM_HYP Invariants_H.

Signed-off-by: Rafal Kolanski <[email protected]>
@Xaphiosis Xaphiosis changed the title arch-split Refine up to Invariants_H for ARM arch-split Refine up to Invariants_H for ARM+ARM_HYP Jan 10, 2025
@Xaphiosis Xaphiosis requested a review from corlewis January 10, 2025 09:13
Updates the rest of ARM_HYP Refine to conform to the generic
arch-split invariant interface. When things broke and when possible, we
took the proof or chunks of proof from AARCH64.

Otherwise:
- projectKOs is not in the simpset
- valid_pde_mappings' moved to valid_arch_state', resulting in
  valid_arch_state' lifting lemmas to have poor generic applicability
  (likely future interface lemmas will be based around preserving
  valid_arch_state')
- the power-of-two vs mask situation is still a mess, requiring changing
  proofs to go one way or the other
- unfolding tcb_cte_cases_def would benefit from tcb_cte_cases_neqs
  being in the simpset so that people avoid unfolding cteSizeBits when
  not necessary, but that can be done via a separate pass later

Signed-off-by: Rafal Kolanski <[email protected]>
Most of the changes were ported from ARM (which were adapted from
AARCH64).

Signed-off-by: Rafal Kolanski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-split splitting proofs into generic and architecture dependent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant