diff options
| author | tabba@google.com <tabba@google.com> | 2026-05-29 13:17:55 +0100 |
|---|---|---|
| committer | Marc Zyngier <maz@kernel.org> | 2026-06-07 14:38:56 +0100 |
| commit | f4411f9308c0187c211577b7c489545b0bdae455 (patch) | |
| tree | a9ba5756950fb2b2b654d5ce70aef4f9d35833b3 /tools/lib/python/feat | |
| parent | bd2618780ab4584a33ab1049338294a50690d149 (diff) | |
KVM: arm64: Roll back partial shares on kvm_share_hyp() failure
kvm_share_hyp() shares a range one page at a time. If share_pfn_hyp()
fails partway through, the pages already shared by this call are left
shared, while the caller treats the whole range as failed and never
unshares them.
Unshare those pages before returning the error. If an unshare itself
fails the page is leaked: it stays shared with the hypervisor and is
no longer reusable for pKVM, but no isolation guarantee is broken, so
WARN and continue. Not expected in practice.
Fixes: a83e2191b7f1 ("KVM: arm64: pkvm: Refcount the pages shared with EL2")
Suggested-by: Vincent Donnefort <vdonnefort@google.com>
Signed-off-by: Fuad Tabba <tabba@google.com>
Reviewed-by: Vincent Donnefort <vdonnefort@google.com>
Link: https://patch.msgid.link/20260529121755.2923500-4-tabba@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'tools/lib/python/feat')
0 files changed, 0 insertions, 0 deletions
