public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Ricardo Koller <ricarkol@google.com>
To: kvm@vger.kernel.org, kvmarm@lists.linux.dev, andrew.jones@linux.dev
Cc: pbonzini@redhat.com, maz@kernel.org, alexandru.elisei@arm.com,
	eric.auger@redhat.com, oupton@google.com, yuzenghui@huawei.com,
	Ricardo Koller <ricarkol@google.com>
Subject: [PATCH v2 0/4] KVM: selftests: aarch64: page_fault_test S1PTW related fixes
Date: Fri, 27 Jan 2023 21:43:49 +0000	[thread overview]
Message-ID: <20230127214353.245671-1-ricarkol@google.com> (raw)

Commit 406504c7b040 ("KVM: arm64: Fix S1PTW handling on RO memslots")
changed the way S1PTW faults were handled by KVM.  Before this fix,
KVM treated any fault due to any S1PTW as a write, even S1PTW that
didn't update the PTE.  Some tests in page_fault_test mistakenly check
for this KVM behavior and are currently failing.  For example, there's
a dirty log test that asserts that a S1PTW without AF or DA results in
the PTE page getting dirty.

The first commit fixes the userfaultfd check by relaxing all read vs.
write checks.  The second commit fixes the dirtylog tests by only
asserting dirty bits when the AF bit is set.  The third commit fixes
an issue found after fixing the previous two: the dirty log test was
checking for the first page in the PT region.  Finally, commit "KVM:
arm64: Fix S1PTW handling on RO memslots" allows for having readonly
memslots holding page tables, so commit 4 add tests for it.

Changes from v1:
- added sha1's for commit "KVM: arm64: Fix S1PTW handling on RO
  memslots" in all messages. (Oliver)
- removed _with_af from RO macro. (Oliver)

Ricardo Koller (4):
  KVM: selftests: aarch64: Relax userfaultfd read vs. write checks
  KVM: selftests: aarch64: Do not default to dirty PTE pages on all
    S1PTWs
  KVM: selftests: aarch64: Fix check of dirty log PT write
  KVM: selftests: aarch64: Test read-only PT memory regions

 .../selftests/kvm/aarch64/page_fault_test.c   | 187 ++++++++++--------
 1 file changed, 103 insertions(+), 84 deletions(-)

-- 
2.39.1.456.gfc5497dd1b-goog


             reply	other threads:[~2023-01-27 21:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27 21:43 Ricardo Koller [this message]
2023-01-27 21:43 ` [PATCH v2 1/4] KVM: selftests: aarch64: Relax userfaultfd read vs. write checks Ricardo Koller
2023-01-27 21:43 ` [PATCH v2 2/4] KVM: selftests: aarch64: Do not default to dirty PTE pages on all S1PTWs Ricardo Koller
2023-01-27 21:43 ` [PATCH v2 3/4] KVM: selftests: aarch64: Fix check of dirty log PT write Ricardo Koller
2023-01-27 21:43 ` [PATCH v2 4/4] KVM: selftests: aarch64: Test read-only PT memory regions Ricardo Koller
2023-01-27 23:00   ` Oliver Upton
2023-01-27 23:38     ` Ricardo Koller
2023-01-27 23:10 ` [PATCH v2 0/4] KVM: selftests: aarch64: page_fault_test S1PTW related fixes Oliver Upton
2023-01-29 18:54 ` Marc Zyngier

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=20230127214353.245671-1-ricarkol@google.com \
    --to=ricarkol@google.com \
    --cc=alexandru.elisei@arm.com \
    --cc=andrew.jones@linux.dev \
    --cc=eric.auger@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=maz@kernel.org \
    --cc=oupton@google.com \
    --cc=pbonzini@redhat.com \
    --cc=yuzenghui@huawei.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