This patchset changes all the get_phys_addr* functions in the arm page-table-walk code so that instead of "return true on translation failure, false on success" they are "return true on success, false on failure". This convention seems more intuitive and it matches the sense we use for the translate_for_debug and tlb_fill_align methods.
I've marked it RFC for two reasons: (1) I'm on the fence about whether the upheaval is worth it; I think on balance yes, especially now I've done the work, but you could argue the other way (2) I'm open to suggestions of whether the patchset could be better structured for review On point 2: I opted to convert one function at a time, on the theory that you can then review each patch by checking (a) are all the function's callsites updated to invert the sense of the return value (b) do all the "return" statements in the function change. It does mean that the patchset has a lot of places where we add a "!" logical NOT and then remove it again at a later point in the patchset. thanks -- PMM Peter Maydell (14): target/arm/ptw: Flip sense of get_phys_addr_disabled return value target/arm/ptw: Flip sense of get_phys_addr_lpae return value target/arm/ptw: Flip sense of get_phys_addr_v6 return value target/arm/ptw: Flip sense of get_phys_addr_v5 return value target/arm/ptw: Flip sense of get_phys_addr_psmav5 return value target/arm/ptw: Flip sense of get_phys_addr_pmsav7 return value target/arm/ptw: Flip sense of get_phys_addr_pmsav8 return value target/arm/ptw: Flip sense of pmsav8_mpu_lookup return value target/arm/ptw: Flip sense of get_phys_addr_twostage return value target/arm/ptw: Flip sense of get_phys_addr_nogpc return value target/arm/ptw: Flip sense of get_phys_addr_gpc return value target/arm/ptw: Flip sense of arm_cpu_get_phys_addr return value target/arm/ptw: Flip sense of get_phys_addr_for_at return value target/arm/ptw: Flip sense of get_phys_addr return value target/arm/internals.h | 4 +- target/arm/ptw.c | 82 ++++++++++++++++++------------------- target/arm/tcg/cpregs-at.c | 12 +++--- target/arm/tcg/m_helper.c | 8 ++-- target/arm/tcg/tlb_helper.c | 6 +-- 5 files changed, 55 insertions(+), 57 deletions(-) -- 2.43.0
