Skip to content

prove: arch::pci (x86) & io - #706

Open
Marsman1996 wants to merge 23 commits into
asterinas:mainfrom
Marsman1996:prove-arch_pci
Open

Marsman1996 wants to merge 23 commits into
asterinas:mainfrom
Marsman1996:prove-arch_pci

Conversation

@Marsman1996

@Marsman1996 Marsman1996 commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator
  • Add Verus specifications and proofs for x86 PCI configuration-space access.
  • Model MMIO and PIO allocation, ownership, and recycling across the OSTD I/O APIs.
  • Centralize external IdAlloc, x86 port-I/O, and little-endian integer specifications in vstd_extra::external.
  • Replace the MMIO containment assumption with an explicit boot-window model connected to the concrete allocators by type invariants.

Maybe wait until the following PRs are merged:

@Marsman1996
Marsman1996 requested a review from rikosellic August 12, 2026 12:35
Comment thread ostd/src/arch/x86/device/io_port.rs Outdated
@Marsman1996 Marsman1996 changed the title prove: arch::pci (x86) prove: arch::pci (x86) & io Aug 13, 2026
@Marsman1996 Marsman1996 added AI-assist AI-aided proof or generation exec code Proofs about execution code labels Aug 13, 2026
Comment thread Cargo.toml Outdated
Comment thread ostd/src/arch/x86/device/io_port.rs Outdated
@Marsman1996
Marsman1996 marked this pull request as draft August 21, 2026 06:28
@Marsman1996

This comment was marked as outdated.

@Marsman1996
Marsman1996 marked this pull request as ready for review September 2, 2026 12:20
Comment thread verified_libs/vstd_extra/src/external/int_specs.rs
Comment thread verified_libs/vstd_extra/src/external/io_port.rs Outdated
Comment thread verified_libs/vstd_extra/src/external/io_port.rs Outdated
Comment thread verified_libs/vstd_extra/src/external/io_port.rs Outdated
Comment thread verified_libs/vstd_extra/src/external/io_port.rs Outdated
@Marsman1996

Copy link
Copy Markdown
Collaborator Author

Update ostd/src/io/io_port to 0.18.1 to solve the port overflow problem

Comment thread verified_libs/vstd_extra/src/external/io_port.rs Outdated
Comment thread ostd/src/io/mod.rs
ensures
IO_MEM_ALLOCATOR.wf(),
{
OnceImpl::new(Ghost(TrivialPred))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OnceImpl is our own definition of Once. Is it able to assume the specification for Once? It is a bit tricky because you may need to add a Tracked object to indicate whether an Once has been created.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OnceImpl::new is verified and its tracked initialization state is stored internally, so the static initializer can derive IO_MEM_ALLOCATOR.wf() from its specification without an additional Tracked creation token.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-assist AI-aided proof or generation exec code Proofs about execution code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants