public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Yosry Ahmed <yosry.ahmed@linux.dev>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5] KVM: selftests: Test READ=>WRITE dirty logging behavior for shadow MMU
Date: Thu, 15 Jan 2026 15:46:59 -0800	[thread overview]
Message-ID: <aWl8cyfgqdbOrMV1@google.com> (raw)
In-Reply-To: <2kgs2paktjfb33sdr46zhlernx2xgokh5ac4og45obrvvlm34d@2df2kb2u44cy>

On Thu, Jan 15, 2026, Yosry Ahmed wrote:
> On Thu, Jan 15, 2026 at 09:21:54AM -0800, Sean Christopherson wrote:
> > +static void l2_guest_code(vm_vaddr_t base)
> >  {
> > -	READ_ONCE(*a);
> > -	WRITE_ONCE(*a, 1);
> > -	GUEST_SYNC(true);
> > -	GUEST_SYNC(false);
> > +	vm_vaddr_t page0 = TEST_GUEST_ADDR(base, 0);
> > +	vm_vaddr_t page1 = TEST_GUEST_ADDR(base, 1);
> >  
> > -	WRITE_ONCE(*b, 1);
> > -	GUEST_SYNC(true);
> > -	WRITE_ONCE(*b, 1);
> > -	GUEST_SYNC(true);
> > -	GUEST_SYNC(false);
> > +	READ_ONCE(*(u64 *)page0);
> > +	GUEST_SYNC(page0 | TEST_SYNC_READ_FAULT);
> > +	WRITE_ONCE(*(u64 *)page0, 1);
> > +	GUEST_SYNC(page0 | TEST_SYNC_WRITE_FAULT);
> > +	READ_ONCE(*(u64 *)page0);
> > +	GUEST_SYNC(page0 | TEST_SYNC_NO_FAULT);
> > +
> > +	WRITE_ONCE(*(u64 *)page1, 1);
> > +	GUEST_SYNC(page1 | TEST_SYNC_WRITE_FAULT);
> > +	WRITE_ONCE(*(u64 *)page1, 1);
> > +	GUEST_SYNC(page1 | TEST_SYNC_WRITE_FAULT);
> > +	READ_ONCE(*(u64 *)page1);
> > +	GUEST_SYNC(page1 | TEST_SYNC_NO_FAULT);
> > +	GUEST_SYNC(page1 | TEST_SYNC_NO_FAULT);
> 
> Extra GUEST_SYNC()?

Yeah, I'm guessing it was a copy+paste goof, I can't think of any value added by
a second sync here.  I'll drop it when applying.

Thanks!

  reply	other threads:[~2026-01-15 23:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-15 17:21 [PATCH v5] KVM: selftests: Test READ=>WRITE dirty logging behavior for shadow MMU Sean Christopherson
2026-01-15 22:21 ` Yosry Ahmed
2026-01-15 23:46   ` Sean Christopherson [this message]
2026-02-04  0:10 ` Sean Christopherson

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=aWl8cyfgqdbOrMV1@google.com \
    --to=seanjc@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=yosry.ahmed@linux.dev \
    /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