Skip to content

Use sync regs instead of get/set regs on KVM #200

Closed

Description

@simongdavies

KVM has a set of functions (sync_regs, sync_regs_mut, clear_sync_dirty_regs, clear_sync_valid_regs, set_sync_dirty_regs and set_sync_valid_regs) that cause synchronisation of registers without the need to call get/set regs, this improves performance as it means that extra ioctls are not required to retrieve or set registers.

We should replace get/set regs with the appropriate sync functions

Activity

  1. added
    kind/enhancementFor PRs adding features, improving functionality, docs, tests, etc.
    on Jan 29, 2025
  2. added and removed
    kind/enhancementFor PRs adding features, improving functionality, docs, tests, etc.
    on Feb 5, 2025
  3. added this to the Backlog milestone on Mar 4, 2025
  4. danbugs commented on Mar 26, 2025

    @danbugs
    Contributor

    MSHV has an equivalent API for this too now.

  5. modified the milestones: Backlog, Upcoming on Mar 26, 2025
  6. added
    lifecycle/confirmedBug is verified or proposal seems reasonable
    and removed on Mar 26, 2025
  7. syntactically commented on Mar 27, 2025

    @syntactically
    Member

    MSHV has an equivalent API for this too now.

    IIRC most of the MSHV exit types also copy the registers into userspace as part of the HV exit message, so we don't even need an ioctl at all in some cases.

  8. ludfjig commented on Sep 22, 2026

    @ludfjig
    Contributor

    I implemented this and compared to main using guest_calls/call/* benchmarks, but showed no perf improvement whatsoever. Closing this for now

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

    Projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions