[mm_supv]: Move common x86 descriptor definitions to patina_internal_cpu
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- rust
- Domain
- backend, embedded-iot
Research direction
Start by comparing the descriptor and CPU helper definitions in patina_mm_supervisor's privilege_mgmt/call_gate.rs, mmcore/validation.rs, and intrinsics.rs with patina_internal_cpu's gdt.rs. Audit which definitions are architectural and reusable, then update the supervisor imports while keeping the named MM-specific items there. Done means duplicate architectural types have a single definition and the supervisor uses the shared definitions.
Written by the indexing model from the issue text.
Description
Feature Overview
patina_mm_supervisor defines its own x86-64 descriptor types and CPU helpers that are not specific to MM. Examples are TssDescriptor and CallGateDescriptor (privilege_mgmt/call_gate.rs), SegmentDescriptor (mmcore/validation.rs), and DescriptorTablePointer with the CR/MSR/GDTR/IDTR accessors (intrinsics.rs). Some already have a counterpart in patina_internal_cpu, for example DescriptorTablePointer and TaskStateSegment in gdt.rs. Raised in review of #1875.
https://github.com/OpenDevicePartnership/patina/pull/1875#discussion_r4555539682
Solution Overview
Audit the supervisor for architectural definitions and helpers that other crates can use, move them into patina_internal_cpu (gdt.rs, or a new module next to it), and have the supervisor import them. Where a type exists in both crates, keep one copy. MM-specific items stay in the supervisor, such as the call gate selector layout and the SmiGdtImage template check.
Alternatives Considered
No response
Urgency
Low
Are you going to implement the feature request?
I will implement the feature
Do you need maintainer feedback?
No maintainer feedback needed
Anything else?
No response
- Dominant language
- Rust
- Stars
- 568
- Forks
- 63
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 60
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenDevicePartnership/patina
-
state:needs-owner state:needs-triage type:documentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenDevicePartnership/patina#1987 ·
Maintainers usually reply within 1 day
-
state:backlog state:needs-triage type:feature-request urgency:medium
Difficulty 5/5 Over a week Newbie friendliness 28/100
OpenDevicePartnership/patina#2039 ·
Maintainers usually reply within 1 day
-
Potential Major Update: Drop `Deref` from `Protocol<P>`Possibly taken @makubacki claimed this 7 days ago. Open
OpenDevicePartnership/patina#2036 · 1 assignee ·
Maintainers usually reply within 1 day
-
[Feature]: Enforce service thread safety through automatic Send and Sync implementationsPossibly taken @Javagedes claimed this 8 days ago. Openstate:needs-triage type:feature-request urgency:medium
OpenDevicePartnership/patina#2027 · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
OpenDevicePartnership/patina#2024 ·
Maintainers usually reply within 1 day
All issues in OpenDevicePartnership/patina
Similar issues
-
platform:windows provider:antigravity-cli providers setup triaged wontfix
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
can1357/oh-my-pi#21349 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
erkamyaman/rea-games#246 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
aaif-goose/goose#13970 ·
Maintainers usually reply within 1 day
-
comp-documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ClickHouse/ClickHouse#136277 ·
Maintainers usually reply within 1 day