Skip to content

[mm_supv]: Move common x86 descriptor definitions to patina_internal_cpu #1995

Open

Description

@vineelko

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.

#1875 (comment)

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

Activity

  1. added
    state:needs-triage
    type:feature-request
    on Nov 17, 2026
  2. moved this to Backlog in Patinaon Nov 17, 2026
  3. added this to the Backlog milestone on Nov 17, 2026
  4. added theissue type on Nov 17, 2026
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

    state:backlogstate:needs-triagetype:feature-requesturgency:low

    Type

    Projects

    • Status
      Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions