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

TDX: Add a separate usermode-only APIC page for VTL 1 #775

Merged
merged 3 commits into from
Feb 21, 2025

Conversation

smalis-msft
Copy link
Contributor

@smalis-msft smalis-msft commented Feb 4, 2025

And rename VTL0's APIC page accessors to make things clearer.

This does not actually register the new page with the cpu yet, but that's not needed to maintain VTL 0 functionality.

Part 1 of #819, fixes #746

@smalis-msft smalis-msft requested a review from a team as a code owner February 4, 2025 16:45
smalis-msft added a commit that referenced this pull request Feb 5, 2025
Introduce a new TdxPrivateRegs struct that is stored per-vtl. This
allows userspace operations to operate on arbitrary VTLs, despite the
kernel only holding one set of registers. Copy these registers in and
out of the shared kernel page on every entry and exit. Remove `pub` from
accessors that directly touch private registers in the kernel and add
new accessors that allow vtl-shared state to still be accessed.

Together with #775 fixes #746.
@smalis-msft smalis-msft marked this pull request as draft February 6, 2025 17:22
@smalis-msft smalis-msft changed the title TDX: Rename kernel apic shared state accessors to have VTL0 suffix TDX: Add a separate usermode-only APIC page for VTL 1 Feb 6, 2025
@smalis-msft smalis-msft marked this pull request as ready for review February 6, 2025 20:01
@smalis-msft smalis-msft requested a review from a team as a code owner February 6, 2025 20:01
@smalis-msft smalis-msft enabled auto-merge (squash) February 7, 2025 22:30
@jstarks
Copy link
Member

jstarks commented Feb 18, 2025

Discussed offline: move to runner for better safety and to eliminate the macro.

@smalis-msft smalis-msft marked this pull request as draft February 19, 2025 18:49
auto-merge was automatically disabled February 19, 2025 18:49

Pull request was converted to draft

smalis-msft added a commit that referenced this pull request Feb 20, 2025
This allows Backings in the HCL runner to borrow fields from the HclVp,
and ensures that they won't outlive the HclVp. This will be useful for
future additions (like the WIP revision on #775), as I plan to add data
to these backings that isn't Cloneable.
@smalis-msft smalis-msft marked this pull request as ready for review February 20, 2025 18:47
@smalis-msft smalis-msft merged commit 326b7a2 into microsoft:main Feb 21, 2025
26 checks passed
@smalis-msft smalis-msft deleted the tdx-apic-hcl-rename branch February 21, 2025 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.

[TDX] VP context page needs to become VTL-aware
2 participants