From: Paolo Bonzini <pbonzini@redhat.com>
To: David Matlack <dmatlack@google.com>
Cc: Sean Christopherson <seanjc@google.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
Ben Gardon <bgardon@google.com>,
kvm@vger.kernel.org
Subject: Re: [PATCH v2 0/4] KVM: x86/mmu: Fix write-protection bug in the TDP MMU
Date: Mon, 17 Jan 2022 18:59:10 +0100 [thread overview]
Message-ID: <aadbee28-054b-ddac-6b99-f7ee63e19d7c@redhat.com> (raw)
In-Reply-To: <20220113233020.3986005-1-dmatlack@google.com>
On 1/14/22 00:30, David Matlack wrote:
> While attempting to understand the big comment in
> kvm_mmu_slot_remove_write_access() about TLB flushing, I discovered a
> bug in the way the TDP MMU write-protects GFNs. I have not managed to
> reproduce the bug as it requires a rather complex set up of live
> migrating a VM that is using nested virtualization while the TDP MMU is
> enabled.
>
> Patch 1 fixes the bug and is CC'd to stable.
> Patch 2-3 fix, document, and enforce invariants around MMU-writable
> and Host-writable bits.
> Patch 4 fixes up the aformentioned comment to be more readable.
>
> Tested using the kvm-unit-tests and KVM selftests.
>
> v2:
> - Skip setting the SPTE when MMU-writable is already clear [Sean]
> - Add patches for {MMU,Host}-writable invariants [Sean]
> - Fix inaccuracies in kvm_mmu_slot_remove_write_access() comment [Sean]
>
> v1: https://lore.kernel.org/kvm/20220112215801.3502286-1-dmatlack@google.com/
>
> David Matlack (4):
> KVM: x86/mmu: Fix write-protection of PTs mapped by the TDP MMU
> KVM: x86/mmu: Clear MMU-writable during changed_pte notifier
> KVM: x86/mmu: Document and enforce MMU-writable and Host-writable
> invariants
> KVM: x86/mmu: Improve TLB flush comment in
> kvm_mmu_slot_remove_write_access()
>
> arch/x86/kvm/mmu/mmu.c | 31 ++++++++++++++++++++--------
> arch/x86/kvm/mmu/spte.c | 1 +
> arch/x86/kvm/mmu/spte.h | 42 ++++++++++++++++++++++++++++++++------
> arch/x86/kvm/mmu/tdp_mmu.c | 6 +++---
> 4 files changed, 62 insertions(+), 18 deletions(-)
>
>
> base-commit: fea31d1690945e6dd6c3e89ec5591490857bc3d4
Queued, thanks.
Paolo
next prev parent reply other threads:[~2022-01-17 17:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-13 23:30 [PATCH v2 0/4] KVM: x86/mmu: Fix write-protection bug in the TDP MMU David Matlack
2022-01-13 23:30 ` [PATCH v2 1/4] KVM: x86/mmu: Fix write-protection of PTs mapped by " David Matlack
2022-01-14 23:38 ` Sean Christopherson
2022-01-13 23:30 ` [PATCH v2 2/4] KVM: x86/mmu: Clear MMU-writable during changed_pte notifier David Matlack
2022-01-14 23:41 ` Sean Christopherson
2022-01-13 23:30 ` [PATCH v2 3/4] KVM: x86/mmu: Document and enforce MMU-writable and Host-writable invariants David Matlack
2022-01-14 22:29 ` Sean Christopherson
2022-01-18 17:45 ` David Matlack
2022-01-13 23:30 ` [PATCH v2 4/4] KVM: x86/mmu: Improve TLB flush comment in kvm_mmu_slot_remove_write_access() David Matlack
2022-01-14 23:58 ` Sean Christopherson
2022-01-17 17:59 ` Paolo Bonzini [this message]
2022-01-18 17:38 ` [PATCH v2 0/4] KVM: x86/mmu: Fix write-protection bug in the TDP MMU David Matlack
2022-01-18 17:41 ` Paolo Bonzini
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=aadbee28-054b-ddac-6b99-f7ee63e19d7c@redhat.com \
--to=pbonzini@redhat.com \
--cc=bgardon@google.com \
--cc=dmatlack@google.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=seanjc@google.com \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.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;
as well as URLs for NNTP newsgroup(s).