From: Sean Christopherson <seanjc@google.com>
To: David Matlack <dmatlack@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Vipin Sharma <vipinsh@google.com>,
kvm@vger.kernel.org
Subject: Re: [PATCH 0/4] KVM: x86/mmu: Fix TDP MMU dirty logging bug L2 running with EPT disabled
Date: Wed, 10 Apr 2024 09:17:45 -0700 [thread overview]
Message-ID: <Zha7qWnZP8IsO6Vc@google.com> (raw)
In-Reply-To: <CALzav=eK-FeCDvjrfcWUR_KYy29r8O8HP=+L=zdp-UAYhpp+QQ@mail.gmail.com>
On Wed, Apr 10, 2024, David Matlack wrote:
> On Tue, Apr 9, 2024 at 5:20 PM Sean Christopherson <seanjc@google.com> wrote:
> >
> > On Fri, 15 Mar 2024 16:05:37 -0700, David Matlack wrote:
> > > Fix a bug in the TDP MMU caught by syzkaller and CONFIG_KVM_PROVE_MMU
> > > that causes writes made by L2 to no be reflected in the dirty log when
> > > L1 has disabled EPT.
> > >
> > > Patch 1 contains the fix. Patch 2 and 3 fix comments related to clearing
> > > dirty bits in the TDP MMU. Patch 4 adds selftests coverage of dirty
> > > logging of L2 when L1 has disabled EPT. i.e. a regression test for this
> > > bug.
> > >
> > > [...]
> >
> > Applied to kvm-x86 fixes, with the various tweaks mentioned in reply, and the
> > s/READ_ONCE/WRITE_ONCE fixup. A sanity check would be nice though, I botched
> > the first attempt at the fixup (the one time I _should_ have copy+pasted code...).
> >
> > Thanks!
> >
> > [1/4] KVM: x86/mmu: Check kvm_mmu_page_ad_need_write_protect() when clearing TDP MMU dirty bits
> > https://github.com/kvm-x86/linux/commit/b44914b27e6b
> > [2/4] KVM: x86/mmu: Remove function comments above clear_dirty_{gfn_range,pt_masked}()
> > https://github.com/kvm-x86/linux/commit/d0adc4ce20e8
> > [3/4] KVM: x86/mmu: Fix and clarify comments about clearing D-bit vs. write-protecting
> > https://github.com/kvm-x86/linux/commit/5709b14d1cea
> > [4/4] KVM: selftests: Add coverage of EPT-disabled to vmx_dirty_log_test
> > https://github.com/kvm-x86/linux/commit/1d24b536d85b
>
> This commit does not have the WRITE_ONCE() fixup, but when I look at
> the commits in the fixes branch itself I see [1] which is correct.
Argh, I must have forgot to copy+paste in the correct hashes (like I said above,
it took me a few tries to get things right).
For posterity...
[1/4] KVM: x86/mmu: Write-protect L2 SPTEs in TDP MMU when clearing dirty status
https://github.com/kvm-x86/linux/commit/b44914b27e6b
[2/4] KVM: x86/mmu: Remove function comments above clear_dirty_{gfn_range,pt_masked}()
https://github.com/kvm-x86/linux/commit/d0adc4ce20e8
[3/4] KVM: x86/mmu: Fix and clarify comments about clearing D-bit vs. write-protecting
https://github.com/kvm-x86/linux/commit/5709b14d1cea
[4/4] KVM: selftests: Add coverage of EPT-disabled to vmx_dirty_log_test
https://github.com/kvm-x86/linux/commit/f1ef5c343399
prev parent reply other threads:[~2024-04-10 16:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-15 23:05 [PATCH 0/4] KVM: x86/mmu: Fix TDP MMU dirty logging bug L2 running with EPT disabled David Matlack
2024-03-15 23:05 ` [PATCH 1/4] KVM: x86/mmu: Check kvm_mmu_page_ad_need_write_protect() when clearing TDP MMU dirty bits David Matlack
2024-04-09 23:13 ` Sean Christopherson
2024-03-15 23:05 ` [PATCH 2/4] KVM: x86/mmu: Remove function comments above clear_dirty_{gfn_range,pt_masked}() David Matlack
2024-03-15 23:05 ` [PATCH 3/4] KVM: x86/mmu: Fix and clarify comments about clearing D-bit vs. write-protecting David Matlack
2024-04-09 23:14 ` Sean Christopherson
2024-03-15 23:05 ` [PATCH 4/4] KVM: selftests: Add coverage of EPT-disabled to vmx_dirty_log_test David Matlack
2024-03-17 16:59 ` David Matlack
2024-04-10 0:19 ` [PATCH 0/4] KVM: x86/mmu: Fix TDP MMU dirty logging bug L2 running with EPT disabled Sean Christopherson
2024-04-10 16:05 ` David Matlack
2024-04-10 16:17 ` Sean Christopherson [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=Zha7qWnZP8IsO6Vc@google.com \
--to=seanjc@google.com \
--cc=dmatlack@google.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=vipinsh@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.