Skip to content

Remove unnecessarily complex guest function dispatch pointer logic #516

Closed

Description

@ludfjig

Currently, a hyperlight elf guest binary has an entrypoint. Execution is started at this entrypoint the first time the vm is ran. Additionally, the guest is required to write a pointer to a specific place in memory during execution. This pointer is then read by the host, and the host sets the guest's RIP to this pointer on subsequent guest function calls, so that execution starts from there.

The existing logic is complicated and can be simplified by always starting execution at entrypoint. Whether or not to run "initialization logic" can all be handled from the guest side (e.g. by reading parameters passed to entrypoint, set by the host). Apart from just a code simplification, this restructuring also has the added benefit from the guest's perspective for example, guests that don't require any initialization could avoid doing it entirely (impossible with current hyperlight structure). It would also allow an arbitrary number of separate initialization steps (as opposed to the current max on 1)

Activity

  1. added this to the Backlog milestone on May 21, 2025
  2. added theissue type on May 21, 2025
  3. ludfjig commented on Sep 24, 2026

    @ludfjig
    ContributorAuthor

    Closing this as it's not clear why this is needed or what benefits it woudl bring

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions