Skip to content
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

Introduce generic hypercall ioctl #128

Merged
merged 6 commits into from
Apr 23, 2024

Commits on Apr 18, 2024

  1. ioctls: Amend conversion from mshv_root_hvcall to MshvError

    Don't use "EIO" as a special code for determining whether there is
    a hypercall error. Simply check if there is a hypercall error code.
    
    Signed-off-by: Nuno Das Neves <nudasnev@microsoft.com>
    NunoDasNeves committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    cec62b4 View commit details
    Browse the repository at this point in the history
  2. ioctls: tests: Check install_intercept() result with is_ok()

    Signed-off-by: Nuno Das Neves <nudasnev@microsoft.com>
    NunoDasNeves committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    b4abb44 View commit details
    Browse the repository at this point in the history
  3. ioctls: Add generic hypercall ioctl function

    Signed-off-by: Nuno Das Neves <nudasnev@microsoft.com>
    NunoDasNeves committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    da57ab1 View commit details
    Browse the repository at this point in the history
  4. bindings: Add hvcall.rs with utilities for generic hvcall ioctl

    Signed-off-by: Nuno Das Neves <nudasnev@microsoft.com>
    NunoDasNeves committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    9c47fb4 View commit details
    Browse the repository at this point in the history
  5. ioctls/vcpu: Add index field to vcpu fd

    This will be used with the generic hvcall ioctl for vcpus.
    
    Signed-off-by: Nuno Das Neves <nudasnev@microsoft.com>
    NunoDasNeves committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    d8b4a95 View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2024

  1. ioctls: Implement hvcall_ versions of various IOCTLs

    While leaving existing implementations untouched.
    
    Add:
    - VmFd::hvcall_set_partition_property
    - VcpuFd::hvcall_translate_gva
    - VcpuFd::hvcall_get_cpuid_values
    - VcpuFd::hvcall_get_reg
    - VcpuFd::hvcall_set_reg
    
    Add tests for the above.
    
    Signed-off-by: Nuno Das Neves <nudasnev@microsoft.com>
    NunoDasNeves committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    c03ec9c View commit details
    Browse the repository at this point in the history