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

Nudasnev/shim get set vp state #134

Merged
merged 4 commits into from
Mar 26, 2024
Merged

Conversation

NunoDasNeves
Copy link
Collaborator

Summary of the PR

Make the get/set vp state IOCTLs simpler and easier to use. Remove any interpretation of the XSAVE state, as it is not needed for save/restore.
Replace hv_ definitions in the interface with mshv_ definitions, so the kernel doesn't need to export these.
Use a plain buffer for the data to simplify things.

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR have Signed-Off-By trailers (with
    git commit -s), and the commit message has max 60 characters for the
    summary and max 75 characters for each description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

@NunoDasNeves NunoDasNeves force-pushed the nudasnev/shim-get-set-vp-state branch 8 times, most recently from fd00b3d to 22f51ed Compare March 21, 2024 20:41
mshv-bindings/src/regs.rs Outdated Show resolved Hide resolved
mshv-bindings/src/regs.rs Show resolved Hide resolved
Support BIT() macros containing variables/other defines in
LARGE_SNAKE_CASE. Now a constant for HV_HYP_PAGE_SIZE is generated
instead of being ignored.

Signed-off-by: Nuno Das Neves <[email protected]>
Signed-off-by: Nuno Das Neves <[email protected]>
@NunoDasNeves NunoDasNeves force-pushed the nudasnev/shim-get-set-vp-state branch from 22f51ed to bb03b55 Compare March 22, 2024 20:31
@russell-islam
Copy link
Collaborator

I have been discussing this changes with @NunoDasNeves and we agreed on this. This PR looks good to me. @jinankjain @liuw Could you please look into this?

@liuw
Copy link
Member

liuw commented Mar 22, 2024

I have been discussing this changes with @NunoDasNeves and we agreed on this. This PR looks good to me. @jinankjain @liuw Could you please look into this?

I don't have a strong opinion on this. If the three of you agree on a way forward I'm fine with this PR.

@NunoDasNeves NunoDasNeves force-pushed the nudasnev/shim-get-set-vp-state branch 2 times, most recently from b43ec6c to 666c5fe Compare March 25, 2024 19:06
@russell-islam
Copy link
Collaborator

@NunoDasNeves Please add missing Signed-off-by

Rework XSave and LapicState, replace their From<T>
implementations to convert to/from Buffer with TryFrom<T>.

Replace existing MSHV_GET/SET_VP_STATE implementations with the new
kernel interface.

Signed-off-by: Nuno Das Neves <[email protected]>
@NunoDasNeves NunoDasNeves force-pushed the nudasnev/shim-get-set-vp-state branch from 666c5fe to 7e7820a Compare March 25, 2024 22:15
@jinankjain jinankjain merged commit 9f1e0cd into main Mar 26, 2024
2 checks passed
@jinankjain jinankjain deleted the nudasnev/shim-get-set-vp-state branch March 26, 2024 16:23
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.

4 participants