Skip to content

[WIP] Removed the OutBHandler and MemAccessHandler abstractions and related implementations. #732

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

simongdavies
Copy link
Contributor

Fixes #495

This pull request refactors the handling of virtual CPU (vCPU) operations in the Hyperlight hypervisor, focusing on simplifying memory management and removing outdated abstractions. The changes primarily affect the Linux and Windows implementations of the hypervisor, introducing a new memory manager (MemMgrWrapper) and function registry (FunctionRegistry) while eliminating the OutBHandler and MemAccessHandler abstractions.

Removal of Outdated Abstractions:

  • Removed the OutBHandler and MemAccessHandler traits and their associated types (OutBHandlerWrapper, MemAccessHandlerWrapper, etc.) from src/hyperlight_host/src/hypervisor/handlers.rs as they are no longer needed. [1] [2]

Introduction of New Memory Management:

  • Added mem_mgr (type: MemMgrWrapper<HostSharedMemory>) and host_funcs (type: Arc<Mutex<FunctionRegistry>>) to the HypervLinuxDriver and HypervWindowsDriver structs for centralized memory and function handling. [1] [2]

Refactoring of Hypervisor Logic:

  • Updated the Hypervisor trait implementations for both Linux and Windows drivers to use the new mem_mgr and host_funcs fields instead of the removed handler abstractions. This includes changes to methods like initialize, dispatch_call_from_host, and handle_outb. [1] [2] [3] [4]

@simongdavies simongdavies added the kind/enhancement For PRs adding features, improving functionality, docs, tests, etc. label Jul 24, 2025
@simongdavies simongdavies marked this pull request as draft July 24, 2025 22:33
@simongdavies simongdavies changed the title Removed the OutBHandler and MemAccessHandler abstractions and related implementations. [WIP] Removed the OutBHandler and MemAccessHandler abstractions and related implementations. Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement For PRs adding features, improving functionality, docs, tests, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove OutBHandlerWrapper type
1 participant