From: Marc Zyngier <maz@kernel.org>
To: Quentin Perret <qperret@google.com>
Cc: kvm@vger.kernel.org, Will Deacon <will@kernel.org>,
linux-kernel@vger.kernel.org,
Catalin Marinas <catalin.marinas@arm.com>,
kvmarm@lists.cs.columbia.edu,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4 1/2] KVM: arm64: Move CMOs from user_mem_abort to the fault handlers
Date: Fri, 09 Apr 2021 10:00:33 +0100 [thread overview]
Message-ID: <87lf9romry.wl-maz@kernel.org> (raw)
In-Reply-To: <YHALa38PPQBceqF9@google.com>
On Fri, 09 Apr 2021 09:08:11 +0100,
Quentin Perret <qperret@google.com> wrote:
>
> Hi Yanan,
>
> On Friday 09 Apr 2021 at 11:36:51 (+0800), Yanan Wang wrote:
> > diff --git a/arch/arm64/kvm/hyp/pgtable.c b/arch/arm64/kvm/hyp/pgtable.c
> > +static void stage2_invalidate_icache(void *addr, u64 size)
> > +{
> > + if (icache_is_aliasing()) {
> > + /* Flush any kind of VIPT icache */
> > + __flush_icache_all();
> > + } else if (is_kernel_in_hyp_mode() || !icache_is_vpipt()) {
> > + /* PIPT or VPIPT at EL2 */
> > + invalidate_icache_range((unsigned long)addr,
> > + (unsigned long)addr + size);
> > + }
> > +}
> > +
>
> I would recommend to try and rebase this patch on kvmarm/next because
> we've made a few changes in pgtable.c recently. It is now linked into
> the EL2 NVHE code which means there are constraints on what can be used
> from there -- you'll need a bit of extra work to make some of these
> functions available to EL2.
That's an interesting point.
I wonder whether we are missing something on the i-side for VPITP +
host stage-2 due to switching HCR_EL2.VM. We haven't changed the VMID
(still 0), but I can't bring myself to be sure it doesn't affect the
icache in this case...
M.
--
Without deviation from the norm, progress is not possible.
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
next prev parent reply other threads:[~2021-04-09 9:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-09 3:36 [PATCH v4 0/2] KVM: arm64: Improve efficiency of stage2 page table Yanan Wang
2021-04-09 3:36 ` [PATCH v4 1/2] KVM: arm64: Move CMOs from user_mem_abort to the fault handlers Yanan Wang
2021-04-09 8:08 ` Quentin Perret
2021-04-09 8:59 ` wangyanan (Y)
2021-04-09 9:00 ` Marc Zyngier [this message]
2021-04-09 3:36 ` [PATCH v4 2/2] KVM: arm64: Distinguish cases of memcache allocations completely Yanan Wang
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=87lf9romry.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=qperret@google.com \
--cc=will@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;
as well as URLs for NNTP newsgroup(s).