public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Yan Zhao <yan.y.zhao@intel.com>
To: Sean Christopherson <seanjc@google.com>
Cc: <pbonzini@redhat.com>, <rick.p.edgecombe@intel.com>,
	<linux-kernel@vger.kernel.org>, <kvm@vger.kernel.org>
Subject: Re: [PATCH] KVM: selftests: Wait mprotect_ro_done before write to RO in mmu_stress_test
Date: Mon, 3 Mar 2025 11:14:05 +0800	[thread overview]
Message-ID: <Z8UefSf8aVfPaojZ@yzhao56-desk.sh.intel.com> (raw)
In-Reply-To: <Z8HBh1WR3CqcJkJQ@google.com>

On Fri, Feb 28, 2025 at 06:00:39AM -0800, Sean Christopherson wrote:
> 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
Haha, however, I failed writing code that makes you 100% happy in one shot :)
Your version is indeed cleaner than mine!

> check, and then botched things when adding back mprotect_ro_done.

      reply	other threads:[~2025-03-03  3:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-08 10:53 [PATCH] KVM: selftests: Wait mprotect_ro_done before write to RO in mmu_stress_test Yan Zhao
2025-02-11  1:03 ` Edgecombe, Rick P
2025-02-11  1:42   ` Yan Zhao
2025-02-11 18:29     ` Edgecombe, Rick P
2025-02-12  6:59       ` Yan Zhao
2025-02-26  1:53       ` Sean Christopherson
2025-02-26  2:07         ` Yan Zhao
2025-02-26  2:20           ` Sean Christopherson
2025-02-26  3:09             ` Yan Zhao
2025-02-26  1:48 ` Sean Christopherson
2025-02-26  3:08   ` Yan Zhao
2025-02-26 19:30     ` Sean Christopherson
2025-02-27  5:45       ` Yan Zhao
2025-02-27 22:18         ` Sean Christopherson
2025-02-28 10:55           ` Yan Zhao
2025-02-28 14:00             ` Sean Christopherson
2025-03-03  3:14               ` Yan Zhao [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z8UefSf8aVfPaojZ@yzhao56-desk.sh.intel.com \
    --to=yan.y.zhao@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rick.p.edgecombe@intel.com \
    --cc=seanjc@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox