Skip to content

Cherry pick "Refactor: Use physical pointer abstraction in LVBS"#1022

Merged
sangho2 merged 1 commit into
uliteboxfrom
ulitebox-pr-817
Jul 11, 2026
Merged

Cherry pick "Refactor: Use physical pointer abstraction in LVBS"#1022
sangho2 merged 1 commit into
uliteboxfrom
ulitebox-pr-817

Conversation

@sangho2

@sangho2 sangho2 commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

No description provided.

This PR lets the LVBS platform (i.e., HEKI/HVCI) use physical pointer
abstraction to access VTL0 memory. This is equivalent to the OP-TEE
shim's normal-world memory access such that it is not only safer than
the legacy VTL0 memory copy functions (i.e.,
`copy_(slice_)(from|to)_vtl0_phys`) but also supporting virtually
contiguous access of non-contiguous physical page frames.

---------

Co-authored-by: Sangho Lee <sanghle@microsoft.com>
@sangho2 sangho2 enabled auto-merge July 11, 2026 03:32
@sangho2 sangho2 added this pull request to the merge queue Jul 11, 2026
Merged via the queue into ulitebox with commit 29126e4 Jul 11, 2026
7 checks passed
@sangho2 sangho2 deleted the ulitebox-pr-817 branch July 11, 2026 03:39
@github-actions

Copy link
Copy Markdown

🤖 SemverChecks 🤖 ⚠️ Potential breaking API changes detected ⚠️

Click for details
--- failure enum_variant_missing: pub enum variant removed or renamed ---

Description:
A publicly-visible enum has at least one variant that is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/enum_variant_missing.ron

Failed in:
  variant PhysPointerError::UnalignedPhysicalAddress, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/638bdd333ed69699f05950acbb7b4a3729d73ed3/litebox_common_linux/src/vmap.rs:150
  variant PhysPointerError::UnalignedOffset, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/638bdd333ed69699f05950acbb7b4a3729d73ed3/litebox_common_linux/src/vmap.rs:152
  variant PhysPointerError::NoMappingInfo, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/638bdd333ed69699f05950acbb7b4a3729d73ed3/litebox_common_linux/src/vmap.rs:166

--- failure struct_missing: pub struct removed or renamed ---

Description:
A publicly-visible struct cannot be imported by its prior path. A `pub use` may have been removed, or the struct itself may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/struct_missing.ron

Failed in:
  struct litebox_common_linux::vmap::PhysPageMapInfo, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/638bdd333ed69699f05950acbb7b4a3729d73ed3/litebox_common_linux/src/vmap.rs:95

--- failure trait_associated_type_added: non-sealed public trait added associated type without default value ---

Description:
A non-sealed trait has gained an associated type without a default value, which breaks downstream implementations of the trait
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#trait-new-item-no-default
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/trait_associated_type_added.ron

Failed in:
  trait associated type litebox_common_linux::vmap::VmapManager::MapInfo in file /home/runner/work/litebox/litebox/litebox_common_linux/src/vmap.rs:22

--- failure trait_method_default_impl_removed: pub trait default method impl removed ---

Description:
A method's default impl in an unsealed trait has been removed, breaking trait implementations that relied on that default
        ref: https://doc.rust-lang.org/book/ch10-02-traits.html#default-implementations
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/trait_method_default_impl_removed.ron

Failed in:
  trait method litebox_common_linux::vmap::VmapManager::validate_unowned in file /home/runner/work/litebox/litebox/litebox_common_linux/src/vmap.rs:79
  trait method litebox_common_linux::vmap::VmapManager::protect in file /home/runner/work/litebox/litebox/litebox_common_linux/src/vmap.rs:96

--- failure trait_unsafe_added: pub trait became unsafe ---

Description:
A publicly-visible trait became `unsafe`, so implementing it now requires an `unsafe impl` block.
        ref: https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html#implementing-an-unsafe-trait
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/trait_unsafe_added.ron

Failed in:
  trait litebox_common_linux::vmap::VmapManager in file /home/runner/work/litebox/litebox/litebox_common_linux/src/vmap.rs:19

--- failure feature_missing: package feature removed or renamed ---

Description:
A feature has been removed from this package's Cargo.toml. This will break downstream crates which enable that feature.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#cargo-feature-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/feature_missing.ron

Failed in:
  feature optee_syscall in the package's Cargo.toml

--- failure inherent_method_missing: pub method removed or renamed ---

Description:
A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/inherent_method_missing.ron

Failed in:
  LinuxKernel::copy_from_vtl0_phys, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/638bdd333ed69699f05950acbb7b4a3729d73ed3/litebox_platform_lvbs/src/lib.rs:749
  LinuxKernel::copy_to_vtl0_phys, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/638bdd333ed69699f05950acbb7b4a3729d73ed3/litebox_platform_lvbs/src/lib.rs:789
  LinuxKernel::copy_slice_to_vtl0_phys, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/638bdd333ed69699f05950acbb7b4a3729d73ed3/litebox_platform_lvbs/src/lib.rs:824
  LinuxKernel::copy_slice_from_vtl0_phys, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/638bdd333ed69699f05950acbb7b4a3729d73ed3/litebox_platform_lvbs/src/lib.rs:859

--- failure module_missing: pub module removed or renamed ---

Description:
A publicly-visible module cannot be imported by its prior path. A `pub use` may have been removed, or the module may have been renamed, removed, or made non-public.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/module_missing.ron

Failed in:
  mod litebox_shim_optee::ptr, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/638bdd333ed69699f05950acbb7b4a3729d73ed3/litebox_shim_optee/src/ptr.rs:4

--- failure struct_missing: pub struct removed or renamed ---

Description:
A publicly-visible struct cannot be imported by its prior path. A `pub use` may have been removed, or the struct itself may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/struct_missing.ron

Failed in:
  struct litebox_shim_optee::ptr::PhysConstPtr, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/638bdd333ed69699f05950acbb7b4a3729d73ed3/litebox_shim_optee/src/ptr.rs:499
  struct litebox_shim_optee::NormalWorldConstPtr, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/638bdd333ed69699f05950acbb7b4a3729d73ed3/litebox_shim_optee/src/ptr.rs:499
  struct litebox_shim_optee::ptr::PhysMutPtr, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/638bdd333ed69699f05950acbb7b4a3729d73ed3/litebox_shim_optee/src/ptr.rs:107
  struct litebox_shim_optee::NormalWorldMutPtr, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/638bdd333ed69699f05950acbb7b4a3729d73ed3/litebox_shim_optee/src/ptr.rs:107

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant