diff --git a/iommu_ref_model/libiommu/src/iommu_two_stage_trans.c b/iommu_ref_model/libiommu/src/iommu_two_stage_trans.c index b69437f..8740e7f 100644 --- a/iommu_ref_model/libiommu/src/iommu_two_stage_trans.c +++ b/iommu_ref_model/libiommu/src/iommu_two_stage_trans.c @@ -302,12 +302,12 @@ two_stage_address_translation( // – If the comparison fails, return to step 2 if ( (pte->A == 1) && ( (pte->D == 1) || (is_write == 0) || (pte->W == 0) ) ) goto step_8; - // If G-stage does not provide write permission then cause guest page fault - if ( gpte.W == 0 ) goto guest_page_fault; - // A and/or D bit update needed if ( SADE == 0 ) goto page_fault; + // If G-stage does not provide write permission then cause guest page fault + if ( gpte.W == 0 ) goto guest_page_fault; + // Count S/VS stage page walks count_events(PV, PID, PSCV, PSCID, DID, GV, GSCID, S_VS_PT_WALKS); amo_pte.raw = 0;