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

iommu_mode transitions #462

Closed
just-for-fun-too opened this issue Jan 8, 2025 · 2 comments
Closed

iommu_mode transitions #462

just-for-fun-too opened this issue Jan 8, 2025 · 2 comments

Comments

@just-for-fun-too
Copy link

Hi

In Section 6.5 the following statement is made:

The IOMMU behavior of writing iommu_mode to 1LVL, 2LVL, or 3LVL, when the previous value of
the iommu_mode is not Off or Bare is UNSPECIFIED. To change DDT levels, the IOMMU must first
be transitioned to Bare or Off state. The behavior resulting from changing the iommu_mode to
Bare when the previous value of the iommu_mode was not Off is UNSPECIFIED.

  1. In the first sentence it states that a transition to 1LVL, 2LVL, or 3LVL has to be done from either the state being Off or Bare otherwise it is UNSPECIFIED.
    Bare -> 1LVL, 2LVL, 3LVL
    Off -> 1LVL, 2LVL, 3LVL
    xLVL -> yLVL (UNSPECIFIED)
  2. In the second sentence it states that to change DDT levels (meaning to change to 1LVL, 2LVL, or 3LVL) you must transition to Off or Bare.
    xLVL -> Off
    xLVL -> Bare (OK)
    Off or Bare -> yLVL
  3. In the third sentence it states that to go to Bare you have to go to Off otherwise the behavior is UNSPECIFIED.
    Off -> Bare
    xLVL -> Bare (UNSPECIFIED)

It seems the second and third sentences are inconsistent if you look at the bold text. Please clarify. Thanks!

@ved-rivos
Copy link
Collaborator

In your second point, the xLVL -> Bare is unspecified because of rule 3.

The specified behaviors are for following transitions:

  • Off -> *LVL or Bare
  • *LVL -> Off
  • Bare -> Off or *LVL

The following transitions have unspecified behavior:

  • *LVL -> Bare
  • xLVL -> yLVL

To change levels, one would need to first transition to Off. From Off one can transition either directly to xLVL or first transition to Bare and then transition to xLVL.

@just-for-fun-too
Copy link
Author

Thanks Ved!

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

No branches or pull requests

2 participants