From: Paolo Bonzini <pbonzini@redhat.com>
To: Emanuele Giuseppe Esposito <eesposit@redhat.com>, kvm@vger.kernel.org
Cc: Shuah Khan <shuah@kernel.org>,
Maxim Levitsky <mlevitsk@redhat.com>,
David Matlack <dmatlack@google.com>,
Jim Mattson <jmattson@google.com>,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: selftests: replace assertion with warning in access_tracking_perf_test
Date: Tue, 27 Sep 2022 14:14:53 +0200 [thread overview]
Message-ID: <005c8afa-d290-d140-0dac-19a41f2ef81a@redhat.com> (raw)
In-Reply-To: <20220926082923.299554-1-eesposit@redhat.com>
On 9/26/22 10:29, Emanuele Giuseppe Esposito wrote:
> Page_idle uses {ptep/pmdp}_clear_young_notify which in turn calls
> the mmu notifier callback ->clear_young(), which purposefully
> does not flush the TLB.
>
> When running the test in a nested guest, point 1. of the test
> doc header is violated, because KVM TLB is unbounded by size
> and since no flush is forced, KVM does not update the sptes
> accessed/idle bits resulting in guest assertion failure.
>
> More precisely, only the first ACCESS_WRITE in run_test() actually
> makes visible changes, because sptes are created and the accessed
> bit is set to 1 (or idle bit is 0). Then the first mark_memory_idle()
> passes since access bit is still one, and sets all pages as idle
> (or not accessed). When the next write is performed, the update
> is not flushed therefore idle is still 1 and next mark_memory_idle()
> fails.
Queued, thanks.
Paolo
prev parent reply other threads:[~2022-09-27 12:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-26 8:29 [PATCH] KVM: selftests: replace assertion with warning in access_tracking_perf_test Emanuele Giuseppe Esposito
2022-09-27 12:14 ` Paolo Bonzini [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=005c8afa-d290-d140-0dac-19a41f2ef81a@redhat.com \
--to=pbonzini@redhat.com \
--cc=dmatlack@google.com \
--cc=eesposit@redhat.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mlevitsk@redhat.com \
--cc=shuah@kernel.org \
/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