How to trap Guest data aborts

Hi,

I am trying to understand if Guest OS data abort happens due to accessing some memory (e.g GIC distributor space) then is there any way I can route it to EL2 mode ?

I looked into HCR_EL2 register bits and tried setting AMO bit but it doesn't help. I see the control still reaching to EL1 Syn handler.

I would like to provide some RW memory functionality from EL2 so I want to trap it ?

Thanks.

Parents
  • Broadly speaking there are three cause of data aborts while in the guest:

    • Stage 1 MMU fault (the access was blocked by the guest's translation tables)
    • Stage 2 MMU fault (the access was allowed by the guest, but blocked by the hypervisor)
    • External abort (the access was allowed by both the guest and hypervisor, but failed in the memory system)

    Stage 1 faults will be taken to NS.EL1 (the guest).  (Unless you set HCR_EL2.TGE==1, but that does a whole load of other stuff as well)

    Stage 2 faults will be taken to EL2 (the Hypervisor)

    Where external aborts go will depend on whether they asynchronous or not.  Asynchronous (and external aborts will normally be so) are controlled by SCR_EL3 and HCR_EL2.

    I wasn't entirely clear what type of abort you referring to, but I hope this helps.

Reply
  • Broadly speaking there are three cause of data aborts while in the guest:

    • Stage 1 MMU fault (the access was blocked by the guest's translation tables)
    • Stage 2 MMU fault (the access was allowed by the guest, but blocked by the hypervisor)
    • External abort (the access was allowed by both the guest and hypervisor, but failed in the memory system)

    Stage 1 faults will be taken to NS.EL1 (the guest).  (Unless you set HCR_EL2.TGE==1, but that does a whole load of other stuff as well)

    Stage 2 faults will be taken to EL2 (the Hypervisor)

    Where external aborts go will depend on whether they asynchronous or not.  Asynchronous (and external aborts will normally be so) are controlled by SCR_EL3 and HCR_EL2.

    I wasn't entirely clear what type of abort you referring to, but I hope this helps.

Children
More questions in this forum