From: Sean Christopherson <seanjc@google.com>
To: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: Hou Wenlong <houwenlong.hwl@antgroup.com>,
kvm@vger.kernel.org, David Matlack <dmatlack@google.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Lan Tianyu <Tianyu.Lan@microsoft.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/6] KVM: x86/mmu: Fix wrong gfn range of tlb flushing in kvm_set_pte_rmapp()
Date: Wed, 14 Dec 2022 19:11:27 +0000 [thread overview]
Message-ID: <Y5of3zZtfogg1Rml@google.com> (raw)
In-Reply-To: <CAJhGHyAENXDLL=2-2KXL3_hKF+XZaFxOfRV2vaf6E5nhUa1Mzw@mail.gmail.com>
On Wed, Dec 14, 2022, Lai Jiangshan wrote:
> On Thu, Oct 13, 2022 at 1:00 AM Sean Christopherson <seanjc@google.com> wrote:
> > > +/* Flush the given page (huge or not) of guest memory. */
> > > +static inline void kvm_flush_remote_tlbs_gfn(struct kvm *kvm, gfn_t gfn, int level)
> > > +{
> > > + u64 pages = KVM_PAGES_PER_HPAGE(level);
> > > +
> >
> > Rather than require the caller to align gfn, what about doing gfn_round_for_level()
> > in this helper? It's a little odd that the caller needs to align gfn but doesn't
> > have to compute the size.
> >
> > I'm 99% certain kvm_set_pte_rmap() is the only path that doesn't already align the
> > gfn, but it's nice to not have to worry about getting this right, e.g. alternatively
> > this helper could WARN if the gfn is misaligned, but that's _more work.
> >
> > kvm_flush_remote_tlbs_with_address(kvm, gfn_round_for_level(gfn, level),
> > KVM_PAGES_PER_HPAGE(level);
> >
> > If no one objects, this can be done when the series is applied, i.e. no need to
> > send v5 just for this.
> >
>
> Hello Paolo, Sean, Hou,
>
> It seems the patchset has not been queued. I believe it does
> fix bugs.
It's on my list of things to get merged for 6.3. I haven't been more agressive
in getting it queued because I assume there are very few KVM-on-HyperV users that
are likely to be affected.
next prev parent reply other threads:[~2022-12-14 19:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-10 12:19 [PATCH v4 0/6] KVM: x86/mmu: Fix wrong usages of range-based tlb flushing Hou Wenlong
2022-10-10 12:19 ` [PATCH v4 1/6] KVM: x86/mmu: Move round_gfn_for_level() helper into mmu_internal.h Hou Wenlong
2022-10-10 12:19 ` [PATCH v4 2/6] KVM: x86/mmu: Fix wrong gfn range of tlb flushing in kvm_set_pte_rmapp() Hou Wenlong
2022-10-12 16:46 ` Sean Christopherson
2022-12-14 15:07 ` Lai Jiangshan
2022-12-14 19:11 ` Sean Christopherson [this message]
2022-10-10 12:19 ` [PATCH v4 3/6] KVM: x86/mmu: Reduce gfn range of tlb flushing in tdp_mmu_map_handle_target_level() Hou Wenlong
2022-10-10 12:19 ` [PATCH v4 4/6] KVM: x86/mmu: Fix wrong start gfn of tlb flushing with range Hou Wenlong
2022-10-10 12:19 ` [PATCH v4 5/6] KVM: x86/mmu: Fix wrong gfn range of tlb flushing in validate_direct_spte() Hou Wenlong
2022-10-10 12:19 ` [PATCH v4 6/6] KVM: x86/mmu: Cleanup range-based flushing for given page Hou Wenlong
2023-01-19 20:54 ` [PATCH v4 0/6] KVM: x86/mmu: Fix wrong usages of range-based tlb flushing Sean Christopherson
2023-01-19 23:09 ` 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=Y5of3zZtfogg1Rml@google.com \
--to=seanjc@google.com \
--cc=Tianyu.Lan@microsoft.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=dmatlack@google.com \
--cc=houwenlong.hwl@antgroup.com \
--cc=hpa@zytor.com \
--cc=jiangshanlai@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@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 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.