Skip to content

[DRAFT] HEKI/HVCI separation: In-crate split (step 1 of 3)#1075

Draft
sangho2 wants to merge 1 commit into
mainfrom
sanghle/lvbs/pr1-vsm-move
Draft

[DRAFT] HEKI/HVCI separation: In-crate split (step 1 of 3)#1075
sangho2 wants to merge 1 commit into
mainfrom
sanghle/lvbs/pr1-vsm-move

Conversation

@sangho2

@sangho2 sangho2 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

DRAFT

This PR separates the HEKI/HVCI features from litebox_platform_lvbs. It introduces a litebox_service_heki crate and makes the HEKI/HVCI features leverage VsmBacked abstraction which is concretized by litebox_platform_lvbs.

It does make a lot of mechanical line/file changes, confusing the Myers diff algorithm used by GitHub. For ease of review, I break it down into three stacked sub-PRs:

  1. Mechanical split in litebox_platform_lvbs
  2. VsmBackend abstraction in litebox_platform_lvbs
  3. Mechanical relocation to litebox_service_heki

The second PR has contexts for review: Abstract Vsm to decouple the HEKI service from the LVBS platform. The other two are mostly mechanical.

Split the HEKI service logic out of the monolithic mshv/vsm.rs into a new
mshv::heki_service submodule (vsm, state, mem_integrity). Pure relocation: no
logic, signature, or behavior changes. The platform vsm.rs retains only VTL
bring-up, control-register locking, the vsm_dispatch entry point, and the
protected-frame registry (with FrameReservation). Cross-module visibility is
widened minimally where the relocated service handlers reach into the registry;
a follow-up introduces the VsmBackend abstraction that removes that coupling.
@sangho2
sangho2 force-pushed the sanghle/lvbs/pr1-vsm-move branch from c301f9a to 2f4ecf7 Compare July 23, 2026 22:23
@sangho2 sangho2 changed the title [DRAFT] HEKI/HVCI separation: In-crate mechanical split (step 1 of 3) [DRAFT] HEKI/HVCI separation: In-crate split (step 1 of 3) Jul 23, 2026
@github-actions

Copy link
Copy Markdown

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

Click for details
--- 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.49.0/src/lints/enum_missing.ron

Failed in:
  enum litebox_platform_lvbs::mshv::vsm::MemoryContainerError, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:2012
  enum litebox_platform_lvbs::mshv::vsm::PatchDataMapError, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:2301

--- 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.49.0/src/lints/function_missing.ron

Failed in:
  function litebox_platform_lvbs::mshv::vsm::mshv_vsm_validate_guest_module, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:596
  function litebox_platform_lvbs::mshv::vsm::mshv_vsm_copy_secondary_key, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:834
  function litebox_platform_lvbs::mshv::vsm::mshv_vsm_boot_aps, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:119
  function litebox_platform_lvbs::mshv::vsm::mshv_vsm_free_guest_module_init, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:735
  function litebox_platform_lvbs::mshv::vsm::mshv_vsm_kexec_validate, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:844
  function litebox_platform_lvbs::mshv::vsm::mshv_vsm_enable_aps, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:112
  function litebox_platform_lvbs::mshv::vsm::mshv_vsm_end_of_boot, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:238
  function litebox_platform_lvbs::mshv::vsm::mshv_vsm_load_kdata, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:329
  function litebox_platform_lvbs::mshv::vsm::mshv_vsm_unload_guest_module, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:793
  function litebox_platform_lvbs::mshv::vsm::mshv_vsm_patch_text, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:966
  function litebox_platform_lvbs::mshv::vsm::mshv_vsm_protect_memory, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:246

--- 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.49.0/src/lints/struct_missing.ron

Failed in:
  struct litebox_platform_lvbs::mshv::vsm::SymbolTable, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:2364
  struct litebox_platform_lvbs::mshv::vsm::ModuleMemoryRange, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:1402
  struct litebox_platform_lvbs::mshv::vsm::KexecMemoryMetadataIters, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:2110
  struct litebox_platform_lvbs::mshv::vsm::ModuleMemoryMetadataMap, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:1329
  struct litebox_platform_lvbs::mshv::vsm::MemoryContainer, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:1876
  struct litebox_platform_lvbs::mshv::vsm::KexecMemoryMetadataWrapper, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:2019
  struct litebox_platform_lvbs::mshv::vsm::PatchDataMap, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:2171
  struct litebox_platform_lvbs::mshv::vsm::KexecMemoryMetadata, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:2055
  struct litebox_platform_lvbs::mshv::vsm::ModuleMemoryMetadataIters, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:1569
  struct litebox_platform_lvbs::mshv::vsm::ModuleMemory, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:1808
  struct litebox_platform_lvbs::mshv::vsm::Vtl0KernelInfo, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:1254
  struct litebox_platform_lvbs::mshv::vsm::ModuleMemoryMetadata, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:1334
  struct litebox_platform_lvbs::mshv::vsm::KexecMemoryRange, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:2122
  struct litebox_platform_lvbs::mshv::vsm::Symbol, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-main/c3b9d2290a7abf1c226dc267bab1ebcaae700a37/litebox_platform_lvbs/src/mshv/vsm.rs:2309

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