From: Alexandru Elisei <alexandru.elisei@arm.com>
To: Oliver Upton <oliver.upton@linux.dev>
Cc: Will Deacon <will@kernel.org>,
maz@kernel.org, kvmarm@lists.cs.columbia.edu,
linux-arm-kernel@lists.infradead.org
Subject: Re: KVM/arm64: SPE: Translate VA to IPA on a stage 2 fault instead of pinning VM memory
Date: Wed, 27 Jul 2022 12:00:10 +0100 [thread overview]
Message-ID: <YuEauq4sevyQAYpF@monolith.localdoman> (raw)
In-Reply-To: <YuApmZFdZzTi5ROu@google.com>
Hi Oliver,
On Tue, Jul 26, 2022 at 10:51:21AM -0700, Oliver Upton wrote:
> Hi Alex,
>
> On Mon, Jul 25, 2022 at 11:06:24AM +0100, Alexandru Elisei wrote:
>
> [...]
>
> I'm also a bit confused on how we would manage to un-pin memory on the
> way out with this. The guest is free to muck with the stage 1 and could
> cause the SPU to spew a bunch of stage 2 aborts if it wanted to be
> annoying. One way to tackle it would be to only allow a single
> root-to-target walk to be pinned by a vCPU at a time. Any time a new
> stage 2 abort comes from the SPU, we un-pin the old walk and pin the new
> one instead.
On the topic of memory unpinning, for a well behaved guest I belive that should
be done the next time the buffer is pinned. The buffer can (and should!) be
drained when both the buffer and sampling is disabled; unpinning the buffer when
profiling becomes disabled would lead to unnecessary stage 2 faults when
draining it.
That approach also means that KVM wouldn't have to do anything special for SPE
stage 2 faults.
Thanks,
Alex
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-07-27 11:00 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-19 13:51 KVM/arm64: SPE: Translate VA to IPA on a stage 2 fault instead of pinning VM memory Alexandru Elisei
2022-04-19 14:10 ` Will Deacon
2022-04-19 14:44 ` Alexandru Elisei
2022-04-19 14:59 ` Will Deacon
2022-04-19 15:20 ` Alexandru Elisei
2022-04-19 15:35 ` Alexandru Elisei
2022-07-25 10:06 ` Alexandru Elisei
2022-07-26 17:51 ` Oliver Upton
2022-07-27 9:30 ` Marc Zyngier
2022-07-27 9:52 ` Marc Zyngier
2022-07-27 10:38 ` Alexandru Elisei
2022-07-27 16:06 ` Oliver Upton
2022-07-27 10:56 ` Alexandru Elisei
2022-07-27 11:18 ` Marc Zyngier
2022-07-27 12:10 ` Alexandru Elisei
2022-07-27 10:19 ` Alexandru Elisei
2022-07-27 10:29 ` Marc Zyngier
2022-07-27 10:44 ` Alexandru Elisei
2022-07-27 11:08 ` Marc Zyngier
2022-07-27 11:57 ` Alexandru Elisei
2022-07-27 15:15 ` Oliver Upton
2022-07-27 11:00 ` Alexandru Elisei [this message]
2022-08-01 17:00 ` Will Deacon
2022-08-02 9:49 ` Alexandru Elisei
2022-08-02 19:34 ` Oliver Upton
2022-08-09 14:01 ` Alexandru Elisei
2022-08-09 18:43 ` Oliver Upton
2022-08-10 9:37 ` Alexandru Elisei
2022-08-10 15:25 ` Oliver Upton
2022-08-12 13:05 ` Alexandru Elisei
2022-08-17 15:05 ` Oliver Upton
2022-09-12 14:50 ` Alexandru Elisei
2022-09-13 10:58 ` Oliver Upton
2022-09-13 12:41 ` Alexandru Elisei
2022-09-13 14:13 ` Oliver Upton
2023-01-03 14:26 ` Alexandru Elisei
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=YuEauq4sevyQAYpF@monolith.localdoman \
--to=alexandru.elisei@arm.com \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
--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