On 12/04/2024 03:09, Lance Yang wrote: > On Thu, Apr 11, 2024 at 9:17 PM Ryan Roberts <ryan.roberts@xxxxxxx> wrote: >> >> On 08/04/2024 05:24, Lance Yang wrote: >>> The per-pte get_and_clear/modify/set approach would result in >>> unfolding/refolding for contpte mappings on arm64. So we need >>> to override mkold_clean_ptes() for arm64 to avoid it. >> >> IIRC, in the last version, I suggested copying the wrprotect_ptes() pattern to >> correctly iterate over contpte blocks. I meant for you to take it as inspiration >> but looks like you have done a carbon copy, including lots of things that are >> unneeded here. That's my fault for not being clear - sorry! > > My bad. I must have misunderstood your intention. Not at all - it was my bad. wrprotect_ptes() is nothing like what I eventually suggested below, so sorry for the bad steer.