Re: [PATCH] KVM: selftests: Wait mprotect_ro_done before write to RO in mmu_stress_test
From: Sean Christopherson
Date: Fri Feb 28 2025 - 09:00:56 EST
On Fri, Feb 28, 2025, Yan Zhao wrote:
> On Thu, Feb 27, 2025 at 02:18:02PM -0800, Sean Christopherson wrote:
> > On Thu, Feb 27, 2025, Yan Zhao wrote:
> So, I think the right one is:
> - } while (!READ_ONCE(mprotect_ro_done));
> + } while (!READ_ONCE(mprotect_ro_done) || !READ_ONCE(all_vcpus_hit_ro_fault));
/double facepalm
You're 100% correct. I did most of my testing with just the all_vcpus_hit_ro_fault
check, and then botched things when adding back mprotect_ro_done.