From: Greg KH <gregkh@linuxfoundation.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
seanjc@google.com, stable@vger.kernel.org
Subject: Re: [PATCH] KVM: x86/mmu: preserve pending TLB flush across calls to kvm_tdp_mmu_zap_sp
Date: Tue, 6 Apr 2021 20:25:03 +0200 [thread overview]
Message-ID: <YGynf54vwWpyxhz4@kroah.com> (raw)
In-Reply-To: <20210406162550.3732490-1-pbonzini@redhat.com>
On Tue, Apr 06, 2021 at 12:25:50PM -0400, Paolo Bonzini wrote:
> Right now, if a call to kvm_tdp_mmu_zap_sp returns false, the caller
> will skip the TLB flush, which is wrong. There are two ways to fix
> it:
>
> - since kvm_tdp_mmu_zap_sp will not yield and therefore will not flush
> the TLB itself, we could change the call to kvm_tdp_mmu_zap_sp to
> use "flush |= ..."
>
> - or we can chain the flush argument through kvm_tdp_mmu_zap_sp down
> to __kvm_tdp_mmu_zap_gfn_range.
>
> This patch does the former to simplify application to stable kernels.
>
> Cc: seanjc@google.com
> Fixes: 048f49809c526 ("KVM: x86/mmu: Ensure TLBs are flushed for TDP MMU during NX zapping")
> Cc: <stable@vger.kernel.org> # 5.10.x: 048f49809c: KVM: x86/mmu: Ensure TLBs are flushed for TDP MMU during NX zapping
> Cc: <stable@vger.kernel.org> # 5.10.x: 33a3164161: KVM: x86/mmu: Don't allow TDP MMU to yield when recovering NX pages
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> arch/x86/kvm/mmu/mmu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Is this for only the stable kernels, or is it addressed toward upstream
merges?
Confused,
greg k-h
next prev parent reply other threads:[~2021-04-06 18:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-06 16:25 [PATCH] KVM: x86/mmu: preserve pending TLB flush across calls to kvm_tdp_mmu_zap_sp Paolo Bonzini
2021-04-06 18:25 ` Greg KH [this message]
2021-04-06 18:35 ` Paolo Bonzini
2021-04-06 19:06 ` Greg KH
2021-04-06 18:59 ` 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=YGynf54vwWpyxhz4@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=stable@vger.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