Skip to content

Remove platform singletons from the LVBS platform and OP-TEE shim - #1127

Open
Sangho Lee (sangho2) wants to merge 1 commit into
mainfrom
sanghle/no_plat_mux
Open

Remove platform singletons from the LVBS platform and OP-TEE shim#1127
Sangho Lee (sangho2) wants to merge 1 commit into
mainfrom
sanghle/no_plat_mux

Conversation

@sangho2

@sangho2 Sangho Lee (sangho2) commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

This PR removes platform singletons from the LVBS platform and OP-TEE shim crates, allowing us to drop litebox_platform_multiplex completely. Refactor both crates at once because they relied on the same GlobalVmapManager which is now removed as well.

@sangho2

Copy link
Copy Markdown
Contributor Author

A sequel of #1056

@sangho2 Sangho Lee (sangho2) changed the title [DRAFT] Remove platform singletons from the LVBS platform and OP-TEE shim Remove platform singletons from the LVBS platform and OP-TEE shim Aug 5, 2026
@sangho2
Sangho Lee (sangho2) marked this pull request as ready for review August 5, 2026 21:48
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

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

Click for details
--- failure method_parameter_count_changed: pub method parameter count changed ---

Description:
A publicly-visible method now takes a different number of parameters, not counting the receiver (self) parameter.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#fn-change-arity
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/method_parameter_count_changed.ron

Failed in:
  litebox_common_linux::physical_pointers::PhysMutPtr::new takes 2 parameters in /home/runner/work/litebox/litebox/target/semver-checks/git-main/d7353c40372f49833bf78f8415bf24103319171b/litebox_common_linux/src/physical_pointers.rs:122, but now takes 3 parameters in /home/runner/work/litebox/litebox/litebox_common_linux/src/physical_pointers.rs:117
  litebox_common_linux::physical_pointers::PhysMutPtr::with_contiguous_pages takes 2 parameters in /home/runner/work/litebox/litebox/target/semver-checks/git-main/d7353c40372f49833bf78f8415bf24103319171b/litebox_common_linux/src/physical_pointers.rs:165, but now takes 3 parameters in /home/runner/work/litebox/litebox/litebox_common_linux/src/physical_pointers.rs:165
  litebox_common_linux::physical_pointers::PhysMutPtr::with_usize takes 1 parameters in /home/runner/work/litebox/litebox/target/semver-checks/git-main/d7353c40372f49833bf78f8415bf24103319171b/litebox_common_linux/src/physical_pointers.rs:200, but now takes 2 parameters in /home/runner/work/litebox/litebox/litebox_common_linux/src/physical_pointers.rs:204
  litebox_common_linux::physical_pointers::PhysConstPtr::new takes 2 parameters in /home/runner/work/litebox/litebox/target/semver-checks/git-main/d7353c40372f49833bf78f8415bf24103319171b/litebox_common_linux/src/physical_pointers.rs:469, but now takes 3 parameters in /home/runner/work/litebox/litebox/litebox_common_linux/src/physical_pointers.rs:472
  litebox_common_linux::physical_pointers::PhysConstPtr::with_contiguous_pages takes 2 parameters in /home/runner/work/litebox/litebox/target/semver-checks/git-main/d7353c40372f49833bf78f8415bf24103319171b/litebox_common_linux/src/physical_pointers.rs:479, but now takes 3 parameters in /home/runner/work/litebox/litebox/litebox_common_linux/src/physical_pointers.rs:486
  litebox_common_linux::physical_pointers::PhysConstPtr::with_usize takes 1 parameters in /home/runner/work/litebox/litebox/target/semver-checks/git-main/d7353c40372f49833bf78f8415bf24103319171b/litebox_common_linux/src/physical_pointers.rs:490, but now takes 2 parameters in /home/runner/work/litebox/litebox/litebox_common_linux/src/physical_pointers.rs:501

--- failure repr_c_removed: repr(C) removed ---

Description:
repr(C) was removed from a type. This can cause its memory layout to change, breaking FFI use cases.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#repr-c-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/repr_c_removed.ron

Failed in:
  struct PhysMutPtr in /home/runner/work/litebox/litebox/litebox_common_linux/src/physical_pointers.rs:85
  struct PhysConstPtr in /home/runner/work/litebox/litebox/litebox_common_linux/src/physical_pointers.rs:458

--- failure trait_missing: pub trait removed or renamed ---

Description:
A publicly-visible trait cannot be imported by its prior path. A `pub use` may have been removed, or the trait 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.50.0/src/lints/trait_missing.ron

Failed in:
  trait litebox_common_linux::vmap::GlobalVmapManager, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/d7353c40372f49833bf78f8415bf24103319171b/litebox_common_linux/src/vmap.rs:126

--- failure type_const_generic_reordered: type const generics were reordered ---

Description:
A type's definition now requires a generic type parameter where a const generic previously stood. Uses of this type that supplied that const generic will be broken since a generic type is now required instead.
        ref: https://doc.rust-lang.org/reference/items/generics.html
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/type_const_generic_reordered.ron

Failed in:
  struct PhysMutPtr used to expect const ALIGN in the place of type T in /home/runner/work/litebox/litebox/litebox_common_linux/src/physical_pointers.rs:85
  struct PhysConstPtr used to expect const ALIGN in the place of type T in /home/runner/work/litebox/litebox/litebox_common_linux/src/physical_pointers.rs:458

--- failure type_generic_type_reordered: type generic types were reordered ---

Description:
A type's definition now requires a const generic parameter where a generic type previously stood. Uses of this type that supplied that generic type will be broken since a const generic is now required instead.
        ref: https://doc.rust-lang.org/reference/items/generics.html
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/type_generic_type_reordered.ron

Failed in:
  struct PhysMutPtr used to expect type V in the place of const ALIGN in /home/runner/work/litebox/litebox/litebox_common_linux/src/physical_pointers.rs:85
  struct PhysConstPtr used to expect type V in the place of const ALIGN in /home/runner/work/litebox/litebox/litebox_common_linux/src/physical_pointers.rs:458

--- failure type_mismatched_generic_lifetimes: type now takes a different number of generic lifetimes ---

Description:
A type now takes a different number of generic lifetime parameters. Uses of this type that name the previous number of parameters will be broken.
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/type_mismatched_generic_lifetimes.ron
Failed in:
  Struct PhysMutPtr (0 -> 1 lifetime params) in /home/runner/work/litebox/litebox/litebox_common_linux/src/physical_pointers.rs:85
  Struct PhysConstPtr (0 -> 1 lifetime params) in /home/runner/work/litebox/litebox/litebox_common_linux/src/physical_pointers.rs:458

--- failure auto_trait_impl_removed: auto trait no longer implemented ---

Description:
A public type has stopped implementing one or more auto traits. This can break downstream code that depends on the traits being implemented.
        ref: https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/auto_trait_impl_removed.ron

Failed in:
  type LvbsVtl1Gate is no longer UnwindSafe, in /home/runner/work/litebox/litebox/litebox_platform_lvbs/src/mshv/vsm.rs:587
  type LvbsVtl1Gate is no longer RefUnwindSafe, in /home/runner/work/litebox/litebox/litebox_platform_lvbs/src/mshv/vsm.rs:587
  type LvbsVtl0PrivilegedWriter is no longer UnwindSafe, in /home/runner/work/litebox/litebox/litebox_platform_lvbs/src/mshv/vsm.rs:601
  type LvbsVtl0PrivilegedWriter is no longer RefUnwindSafe, in /home/runner/work/litebox/litebox/litebox_platform_lvbs/src/mshv/vsm.rs:601
  type LvbsVtl0Gate is no longer UnwindSafe, in /home/runner/work/litebox/litebox/litebox_platform_lvbs/src/mshv/vsm.rs:578
  type LvbsVtl0Gate is no longer RefUnwindSafe, in /home/runner/work/litebox/litebox/litebox_platform_lvbs/src/mshv/vsm.rs:578

--- failure enum_missing: pub enum removed or renamed ---

Description:
A publicly-visible enum cannot be imported by its prior path. A `pub use` may have been removed, or the enum 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.50.0/src/lints/enum_missing.ron

Failed in:
  enum litebox_platform_lvbs::Vmap, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/d7353c40372f49833bf78f8415bf24103319171b/litebox_platform_lvbs/src/lib.rs:455

--- failure function_missing: pub fn removed or renamed ---

Description:
A publicly-visible function cannot be imported by its prior path. A `pub use` may have been removed, or the function 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.50.0/src/lints/function_missing.ron

Failed in:
  function litebox_platform_lvbs::set_platform_low, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/d7353c40372f49833bf78f8415bf24103319171b/litebox_platform_lvbs/src/lib.rs:2011
  function litebox_platform_lvbs::platform_low, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/d7353c40372f49833bf78f8415bf24103319171b/litebox_platform_lvbs/src/lib.rs:2021

--- failure function_parameter_count_changed: pub fn parameter count changed ---

Description:
A publicly-visible function now takes a different number of parameters.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#fn-change-arity
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/function_parameter_count_changed.ron

Failed in:
  litebox_platform_lvbs::mshv::vtl_switch::vtl_switch_init now takes 0 parameters instead of 1, in /home/runner/work/litebox/litebox/litebox_platform_lvbs/src/mshv/vtl_switch.rs:240

--- failure method_parameter_count_changed: pub method parameter count changed ---

Description:
A publicly-visible method now takes a different number of parameters, not counting the receiver (self) parameter.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#fn-change-arity
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/method_parameter_count_changed.ron

Failed in:
  litebox_platform_lvbs::mshv::vsm::LvbsVtl1Gate::mint takes 0 parameters in /home/runner/work/litebox/litebox/target/semver-checks/git-main/d7353c40372f49833bf78f8415bf24103319171b/litebox_platform_lvbs/src/mshv/vsm.rs:613, but now takes 1 parameters in /home/runner/work/litebox/litebox/litebox_platform_lvbs/src/mshv/vsm.rs:620
  litebox_platform_lvbs::mshv::vsm::LvbsVtl0PrivilegedWriter::mint takes 0 parameters in /home/runner/work/litebox/litebox/target/semver-checks/git-main/d7353c40372f49833bf78f8415bf24103319171b/litebox_platform_lvbs/src/mshv/vsm.rs:622, but now takes 1 parameters in /home/runner/work/litebox/litebox/litebox_platform_lvbs/src/mshv/vsm.rs:629
  litebox_platform_lvbs::mshv::vsm::LvbsVtl0Gate::mint takes 0 parameters in /home/runner/work/litebox/litebox/target/semver-checks/git-main/d7353c40372f49833bf78f8415bf24103319171b/litebox_platform_lvbs/src/mshv/vsm.rs:604, but now takes 1 parameters in /home/runner/work/litebox/litebox/litebox_platform_lvbs/src/mshv/vsm.rs:611

--- failure type_mismatched_generic_lifetimes: type now takes a different number of generic lifetimes ---

Description:
A type now takes a different number of generic lifetime parameters. Uses of this type that name the previous number of parameters will be broken.
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/type_mismatched_generic_lifetimes.ron
Failed in:
  Struct LvbsVtl0PrivilegedWriter (0 -> 1 lifetime params) in /home/runner/work/litebox/litebox/litebox_platform_lvbs/src/mshv/vsm.rs:601

--- failure enum_missing: pub enum removed or renamed ---

Description:
A publicly-visible enum cannot be imported by its prior path. A `pub use` may have been removed, or the enum 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.50.0/src/lints/enum_missing.ron

Failed in:
  enum litebox_shim_optee::Vmap, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/d7353c40372f49833bf78f8415bf24103319171b/litebox_shim_optee/src/lib.rs:1531

--- 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.50.0/src/lints/feature_missing.ron

Failed in:
  feature platform_linux_userland in the package's Cargo.toml
  feature platform_lvbs in the package's Cargo.toml

--- failure function_missing: pub fn removed or renamed ---

Description:
A publicly-visible function cannot be imported by its prior path. A `pub use` may have been removed, or the function 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.50.0/src/lints/function_missing.ron

Failed in:
  function litebox_shim_optee::session::session_manager, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/d7353c40372f49833bf78f8415bf24103319171b/litebox_shim_optee/src/session.rs:485

--- failure function_parameter_count_changed: pub fn parameter count changed ---

Description:
A publicly-visible function now takes a different number of parameters.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#fn-change-arity
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/function_parameter_count_changed.ron

Failed in:
  litebox_shim_optee::msg_handler::decode_ta_request now takes 2 parameters instead of 1, in /home/runner/work/litebox/litebox/litebox_shim_optee/src/msg_handler.rs:412
  litebox_shim_optee::msg_handler::update_optee_msg_args now takes 7 parameters instead of 6, in /home/runner/work/litebox/litebox/litebox_shim_optee/src/msg_handler.rs:604
  litebox_shim_optee::msg_handler::handle_optee_smc_args now takes 2 parameters instead of 1, in /home/runner/work/litebox/litebox/litebox_shim_optee/src/msg_handler.rs:212
  litebox_shim_optee::msg_handler::handle_optee_msg_args now takes 2 parameters instead of 1, in /home/runner/work/litebox/litebox/litebox_shim_optee/src/msg_handler.rs:335
  litebox_shim_optee::msg_handler::read_optee_msg_args_from_phys now takes 3 parameters instead of 2, in /home/runner/work/litebox/litebox/litebox_shim_optee/src/msg_handler.rs:182
  litebox_shim_optee::idk::generate_identity_signing_key now takes 3 parameters instead of 2, in /home/runner/work/litebox/litebox/litebox_shim_optee/src/idk.rs:43

--- failure function_requires_different_generic_type_params: function now requires a different number of generic type parameters ---

Description:
A function now requires a different number of generic type parameters than it used to. Uses of this function that supplied the previous number of generic types (e.g. via turbofish syntax) will be broken.
        ref: https://doc.rust-lang.org/reference/items/generics.html
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/function_requires_different_generic_type_params.ron

Failed in:
  function decode_ta_request (0 -> 1 generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/msg_handler.rs:412
  function update_optee_msg_args (0 -> 1 generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/msg_handler.rs:604
  function handle_optee_smc_args (0 -> 1 generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/msg_handler.rs:212
  function handle_optee_msg_args (0 -> 1 generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/msg_handler.rs:335
  function read_optee_msg_args_from_phys (0 -> 1 generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/msg_handler.rs:182
  function generate_identity_signing_key (0 -> 1 generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/idk.rs:43

--- failure method_parameter_count_changed: pub method parameter count changed ---

Description:
A publicly-visible method now takes a different number of parameters, not counting the receiver (self) parameter.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#fn-change-arity
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/method_parameter_count_changed.ron

Failed in:
  litebox_shim_optee::OpteeShimBuilder::new takes 0 parameters in /home/runner/work/litebox/litebox/target/semver-checks/git-main/d7353c40372f49833bf78f8415bf24103319171b/litebox_shim_optee/src/lib.rs:133, but now takes 2 parameters in /home/runner/work/litebox/litebox/litebox_shim_optee/src/lib.rs:173

--- failure trait_requires_more_generic_type_params: trait now requires more generic type parameters ---

Description:
A trait now requires more generic type parameters than it used to. Uses of this trait that supplied the previously-required number of generic types will be broken. To fix this, consider supplying default values for newly-added generic types.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#trait-new-parameter-no-default
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/trait_requires_more_generic_type_params.ron

Failed in:
  trait SessionManager (0 -> 1 required generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/session.rs:458
  trait SessionManager (0 -> 1 required generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/session.rs:458
  trait OpteeShimEntrypoints (0 -> 1 required generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/lib.rs:84
  trait OpteeShimBuilder (0 -> 1 required generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/lib.rs:157
  trait OpteeShim (0 -> 1 required generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/lib.rs:293
  trait LoadedProgram (0 -> 1 required generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/lib.rs:410
  trait TaInstance (0 -> 1 required generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/session.rs:128
  trait TaInstance (0 -> 1 required generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/session.rs:128
  trait SessionToken (0 -> 1 required generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/session.rs:396
  trait SessionToken (0 -> 1 required generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/session.rs:396
  trait OpenSessionTarget (0 -> 1 required generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/session.rs:178
  trait OpenSessionTarget (0 -> 1 required generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/session.rs:178

--- failure type_requires_more_generic_type_params: type now requires more generic type parameters ---

Description:
A type now requires more generic type parameters than it used to. Uses of this type that supplied the previously-required number of generic types will be broken. To fix this, consider supplying default values for newly-added generic types.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#trait-new-parameter-no-default
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/type_requires_more_generic_type_params.ron

Failed in:
  Struct SessionManager (0 -> 1 required generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/session.rs:458
  Struct SessionManager (0 -> 1 required generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/session.rs:458
  Struct OpteeShimEntrypoints (0 -> 1 required generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/lib.rs:84
  Struct OpteeShimBuilder (0 -> 1 required generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/lib.rs:157
  Struct OpteeShim (0 -> 1 required generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/lib.rs:293
  Struct LoadedProgram (0 -> 1 required generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/lib.rs:410
  Struct TaInstance (0 -> 1 required generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/session.rs:128
  Struct TaInstance (0 -> 1 required generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/session.rs:128
  Struct SessionToken (0 -> 1 required generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/session.rs:396
  Struct SessionToken (0 -> 1 required generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/session.rs:396
  Enum OpenSessionTarget (0 -> 1 required generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/session.rs:178
  Enum OpenSessionTarget (0 -> 1 required generic types) in /home/runner/work/litebox/litebox/litebox_shim_optee/src/session.rs:178

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