Re: [PATCH RFCv2 9/9] arm64: Support async page fault

From: Paolo Bonzini
Date: Thu May 28 2020 - 06:53:37 EST


On 28/05/20 09:03, Marc Zyngier wrote:
> The current state of the architecture doesn't seem to leave much leeway in
> terms of SW creativity here. You just can't allocate your own ISS encoding
> without risking a clash with future revisions of the architecture.
> It isn't even clear whether the value you put would stick in ESR_EL1
> if it isn't a valid value for this CPU (see the definition of 'Reserved'
> in the ARM ARM).
>
> Allocating such a syndrome would require from ARM:
>
> - the guarantee that no existing implementation, irrespective of the
> Â implementer, can cope with the ISS encoding of your choice,
>
> - the written promise in the architecture that some EC/ISS values
> Â are reserved for SW, and that promise to apply retrospectively.
>
> This is somewhat unlikely to happen.

Well, that's a euphemism probably. On x86 we're somewhat lucky that
there's an architectural way for injecting hypervisor vmexit directly in
the guest, and we can piggyback on that for async page faults (which are
essentially stage2 page faults that are processed by the guest).

Is it possible to reuse EL2 exception codes / syndromes somehow? (I
haven't checked in the ARM ARM the differences between the EL1 and EL2
syndrome registers).

Paolo