mbox series

[0/3] KVM: arm64: Cleanups for managing SMCCC filter maple tree

Message ID 20231004234947.207507-1-oliver.upton@linux.dev (mailing list archive)
Headers show
Series KVM: arm64: Cleanups for managing SMCCC filter maple tree | expand

Message

Oliver Upton Oct. 4, 2023, 11:49 p.m. UTC
Small series to clean up the way KVM manages the maple tree
representation of the SMCCC filter, only allocating nodes in the tree if
the SMCCC filter is used.

The other ugly bit that this fixes is the error path when 'reserved'
ranges cannot be inserted into the maple tree, instead returning an
error to userspace.

Oliver Upton (3):
  KVM: arm64: Add a predicate for testing if SMCCC filter is configured
  KVM: arm64: Only insert reserved ranges when SMCCC filter is used
  KVM: arm64: Use mtree_empty() to determine if SMCCC filter configured

 arch/arm64/include/asm/kvm_host.h |  4 +---
 arch/arm64/kvm/hypercalls.c       | 34 ++++++++++++++++++++-----------
 2 files changed, 23 insertions(+), 15 deletions(-)


base-commit: 6465e260f48790807eef06b583b38ca9789b6072

Comments

Marc Zyngier Oct. 5, 2023, 7:24 a.m. UTC | #1
On Thu, 05 Oct 2023 00:49:44 +0100,
Oliver Upton <oliver.upton@linux.dev> wrote:
> 
> Small series to clean up the way KVM manages the maple tree
> representation of the SMCCC filter, only allocating nodes in the tree if
> the SMCCC filter is used.
> 
> The other ugly bit that this fixes is the error path when 'reserved'
> ranges cannot be inserted into the maple tree, instead returning an
> error to userspace.
> 
> Oliver Upton (3):
>   KVM: arm64: Add a predicate for testing if SMCCC filter is configured
>   KVM: arm64: Only insert reserved ranges when SMCCC filter is used
>   KVM: arm64: Use mtree_empty() to determine if SMCCC filter configured
> 
>  arch/arm64/include/asm/kvm_host.h |  4 +---
>  arch/arm64/kvm/hypercalls.c       | 34 ++++++++++++++++++++-----------
>  2 files changed, 23 insertions(+), 15 deletions(-)

Reviewed-by: Marc Zyngier <maz@kernel.org>

	M.
Oliver Upton Oct. 5, 2023, 8:55 p.m. UTC | #2
On Wed, 4 Oct 2023 23:49:44 +0000, Oliver Upton wrote:
> Small series to clean up the way KVM manages the maple tree
> representation of the SMCCC filter, only allocating nodes in the tree if
> the SMCCC filter is used.
> 
> The other ugly bit that this fixes is the error path when 'reserved'
> ranges cannot be inserted into the maple tree, instead returning an
> error to userspace.
> 
> [...]

Applied to kvmarm/next, thanks!

[1/3] KVM: arm64: Add a predicate for testing if SMCCC filter is configured
      https://git.kernel.org/kvmarm/kvmarm/c/bb17fb31f00e
[2/3] KVM: arm64: Only insert reserved ranges when SMCCC filter is used
      https://git.kernel.org/kvmarm/kvmarm/c/d34b76489ea0
[3/3] KVM: arm64: Use mtree_empty() to determine if SMCCC filter configured
      https://git.kernel.org/kvmarm/kvmarm/c/4202bcac5e65

--
Best,
Oliver