From: Marc Zyngier <maz@kernel.org>
To: Fuad Tabba <fuad.tabba@linux.dev>
Cc: Vincent Donnefort <vdonnefort@google.com>,
Oliver Upton <oupton@kernel.org>,
kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Joey Gouly <joey.gouly@arm.com>,
Steffen Eiden <seiden@linux.ibm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Zenghui Yu <yuzenghui@huawei.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Raghavendra Rao Ananta <rananta@google.com>
Subject: Re: [PATCH 1/3] KVM: arm64: Don't walk the whole IPA space when destroying a pKVM stage-2
Date: Tue, 03 Nov 2026 16:26:01 +0000 [thread overview]
Message-ID: <865wyd3mqu.wl-maz@kernel.org> (raw)
In-Reply-To: <CA+EHjTwCPHp_odMPJAJ8pfPtymtU5ia_RrH30DavFeiZqvhVAQ@mail.gmail.com>
On Tue, 03 Nov 2026 16:15:03 +0000,
Fuad Tabba <fuad.tabba@linux.dev> wrote:
>
> Hi Vincent,
>
> On Tue, 03 Nov 2026 14:52:36 +0000, Vincent Donnefort
> <vdonnefort@google.com> wrote:
> [...]
> > > Walk the mapping tree once instead, and reschedule after passing each
> > > mapping to the reclaim or unshare helper. The unshare helper can't
> > > reschedule itself, as the map and unmap paths call it under the
> > > mmu_lock. A failed unshare now leaves only its own mapping behind, not
> > > the rest of its chunk.
> >
> > Not a problem now, but don't we make the device assignment story harder?
>
> I don't think so. In Android, the host doesn't track the MMIO of a
> device assigned to a protected guest. The hypervisor maps it into the
> guest, and gives it back to the host in __pkvm_start_teardown_vm(),
> before the host reclaims anything. So the walk this patch changes
> shouldn't reach it.
>
> >
> > >
> > > Fixes: 4ddfab5436b69 ("KVM: arm64: Reschedule as needed when destroying the stage-2 page-tables")
> >
> > Isn't it an optimisation?
>
> No, it fixes a regression: 4ddfab5436b6 replaced a single walk of the
> mapping tree with the 2^27 lookups, as described in the commit
> message.
But that's a configuration that simply does not exist in HW.
Therefore this isn't a fix, this is an opportunistic optimisation that
may or may not become useful. So not a fix, no backporting.
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2026-11-03 16:26 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 8:47 [PATCH 0/3] KVM: arm64: Stop stage-2 teardown scaling with the IPA size Fuad Tabba
2026-11-03 8:47 ` [PATCH 1/3] KVM: arm64: Don't walk the whole IPA space when destroying a pKVM stage-2 Fuad Tabba
2026-11-03 14:52 ` Vincent Donnefort
2026-11-03 16:15 ` Fuad Tabba
2026-11-03 16:26 ` Marc Zyngier [this message]
2026-11-03 16:27 ` Fuad Tabba
2026-11-03 16:37 ` Vincent Donnefort
2026-11-03 16:47 ` Oliver Upton
2026-11-03 16:48 ` Oliver Upton
2026-11-03 8:47 ` [PATCH 2/3] KVM: arm64: Skip empty IPA ranges when destroying stage-2 page-tables Fuad Tabba
2026-11-03 10:27 ` Suzuki K Poulose
2026-11-03 16:19 ` Fuad Tabba
2026-11-03 16:55 ` Oliver Upton
2026-11-03 8:47 ` [PATCH 3/3] KVM: arm64: Move stage-2 teardown into kvm_vm_s2_ops Fuad Tabba
2026-11-03 9:37 ` Suzuki K Poulose
2026-11-03 10:33 ` Suzuki K Poulose
2026-11-03 16:22 ` Fuad Tabba
2026-11-03 17:03 ` [PATCH 0/3] KVM: arm64: Stop stage-2 teardown scaling with the IPA size Oliver Upton
2026-11-03 19:08 ` Fuad Tabba
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=865wyd3mqu.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=fuad.tabba@linux.dev \
--cc=joey.gouly@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=oupton@kernel.org \
--cc=rananta@google.com \
--cc=seiden@linux.ibm.com \
--cc=suzuki.poulose@arm.com \
--cc=vdonnefort@google.com \
--cc=will@kernel.org \
--cc=yuzenghui@huawei.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
all inboxes | Powered by JetHome®