hw/arm/smmuv3: Refactor stage-1 PTW
commitbcc919e756cd793e59038f59ad69d543b369f689
authorMostafa Saleh <smostafa@google.com>
Thu, 25 May 2023 09:37:49 +0000 (25 10:37 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 30 May 2023 12:02:53 +0000 (30 13:02 +0100)
tree4606c2ed630a3728c435133ca75357d61715de5f
parent3b736c61849ebc16776143a947a90a731b0aea55
hw/arm/smmuv3: Refactor stage-1 PTW

In preparation for adding stage-2 support, rename smmu_ptw_64 to
smmu_ptw_64_s1 and refactor some of the code so it can be reused in
stage-2 page table walk.

Remove AA64 check from PTW as decode_cd already ensures that AA64 is
used, otherwise it faults with C_BAD_CD.

A stage member is added to SMMUPTWEventInfo to differentiate
between stage-1 and stage-2 ptw faults.

Add stage argument to trace_smmu_ptw_level be consistent with other
trace events.

Signed-off-by: Mostafa Saleh <smostafa@google.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Message-id: 20230516203327.2051088-4-smostafa@google.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/smmu-common.c
hw/arm/smmuv3.c
hw/arm/trace-events
include/hw/arm/smmu-common.h