From patchwork Fri Oct 28 08:34:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver Upton X-Patchwork-Id: 13023221 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 75E13ECAAA1 for ; Fri, 28 Oct 2022 08:36:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=tes8+x7nVDmvrHHYa24RzqwfnGjVYzZvvRElBjlmy9Y=; b=onSGIEZMQoutbe 9Q0TYUDKsuEYUHdPwi3shKIUTy4hfkygqqzsPKslObY8IE2Th2s4ow6TLKGhANqUcclVPR6r2Sw9l v0nQGyIDTuYudt7sZUTt5mrOeXfNAeziYW3kyybA8WOH76s3GfdjYCg57LrOwclaR3qD3pPZrL3FG c3GWWeslsQfjYN+2vZp2mUVhUm4McSZ3CdD8MKkiC/GNcEAWejLMh9OqjPT3uqXvMcvI+Jn8sxDoG rdS6lEmOzBtjISJZQJkv0EoxZRzHPfOSjf1gkVDig3+Qr3RQkpGDaWOaXAnzipjJfBovk8p7PnlDt xLiezbrowD2gQOm9uq6w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooKpk-00G9mV-LK; Fri, 28 Oct 2022 08:35:20 +0000 Received: from out2.migadu.com ([2001:41d0:2:aacc::]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooKpd-00G9k9-Eo for linux-arm-kernel@lists.infradead.org; Fri, 28 Oct 2022 08:35:18 +0000 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=1666946110; 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=Yf+n15Bb2ai4QCnL88CYPPcwLq0iceY6iN9pF2k3P5Q=; b=j4kJJ3RLELiXfnfiOSev4HcPjbiLyo2ZYe9906cwpPEHi5GeHTEmxSnwfS96sVLJ7mjH1M UaQJZZS5mhInspdE4rPozTxnSUFZd4Se2DfO9BGIgRVW1UWkzvnbbQtjWa4twTwUAeFDEN JGF0EqGst0zc7IPKVcnxshyf3KI15Bo= From: Oliver Upton To: Marc Zyngier , James Morse , Alexandru Elisei Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Quentin Perret , kvmarm@lists.linux.dev, Will Deacon , Fuad Tabba , Vincent Donnefort , Oliver Upton Subject: [PATCH 0/2] KVM: arm64: pKVM memory transitions cleanup Date: Fri, 28 Oct 2022 08:34:46 +0000 Message-Id: <20221028083448.1998389-1-oliver.upton@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221028_013514_304670_B8A30834 X-CRM114-Status: UNSURE ( 5.99 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In order to help resolve my own bikeshedding on the outstanding pKVM patches [1], small deck of patches to polish up the existing memory transitions. Mainly: - Rejig the layout of pkvm_mem_transition - Stop using out pointers to get at the 'completer' addr - Use better-fitting terminology (source/target) to describe the addresses involved in a memory transition Applies to 6.1-rc2. Politely compile tested, and that's just about it. Oliver Upton (2): KVM: arm64: Clean out the odd handling of completer_addr KVM: arm64: Redefine pKVM memory transitions in terms of source/target arch/arm64/kvm/hyp/nvhe/mem_protect.c | 124 +++++++++++--------------- 1 file changed, 52 insertions(+), 72 deletions(-) base-commit: 247f34f7b80357943234f93f247a1ae6b6c3a740