From patchwork Wed Oct 4 23:49:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver Upton X-Patchwork-Id: 13409672 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4EF93E936EF for ; Wed, 4 Oct 2023 23:50:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243933AbjJDXuN (ORCPT ); Wed, 4 Oct 2023 19:50:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243199AbjJDXuL (ORCPT ); Wed, 4 Oct 2023 19:50:11 -0400 Received: from out-201.mta0.migadu.com (out-201.mta0.migadu.com [IPv6:2001:41d0:1004:224b::c9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85180D8 for ; Wed, 4 Oct 2023 16:50:08 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1696463405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=zrlS9qShL+VBMvCHeJefZmgBz6EH2IBmaUJdenIoZgI=; b=d1j923p0/uoPLgf2+CYvNqHe8Bz0muO4MALTRk1ZmYuvZ4pvS62fhzQcb98xMUzlo0BpSW nx+NGceMhJe4+yEqS54WNR+kFJxyZD9U7pE4IXXdrNsNYXYZVee7pUgge7TB5hQiox1gy+ J9A+TYmZO3wtqpKLX4+h7TuelArSszc= From: Oliver Upton To: kvmarm@lists.linux.dev Cc: kvm@vger.kernel.org, Marc Zyngier , James Morse , Suzuki K Poulose , Zenghui Yu , Oliver Upton Subject: [PATCH 0/3] KVM: arm64: Cleanups for managing SMCCC filter maple tree Date: Wed, 4 Oct 2023 23:49:44 +0000 Message-ID: <20231004234947.207507-1-oliver.upton@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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 Reviewed-by: Marc Zyngier