Skip to content

How to Enable Page Access Permission Menagement (S2AP) in RMM?  #21

@bows7ring

Description

@bows7ring

Hi there.

I'm working on some new Qemu features, and I guess I need RMM's support for Page Access Permission Menagement, by which I mean DBM & S2AP.

But I found that this is different from implementing page permission management (such as dirty log) in KVM.

Firstly, according to RMM's spec, stage 2 dirty logging is disabled.
image

Secondly, in the func s2tte_get_ripas in lib/realm/src/s2tt.c, there is a comment:

If valid s2tte descriptor is passed, then ensure S2AP[0] bit is 1 (S2AP is set to RW for lower EL), which corresponds to RIPAS_RAM (bits[6:5] = b01) on a valid descriptor.

But I don't understand why only S2AP[0] is set. Shouldn't RW be '11'? And shouldn't S2AP be pte<6:7>, which conflicts with RIPAS_RAM (bits<6:5>)?

My questions can be summarized as follows:

  1. How does RMM disable DBM and S2AP? Is it implemented by masking off the PTE provided by the host?
  2. Why are the definitions of S2AP and RIPAS contradictory? Does it mean that dirty logging can only be implemented in software?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions